[mirotalksfu] - add enable/disable Sounds

هذا الالتزام موجود في:
Miroslav Pejic
2022-09-10 11:11:21 +02:00
الأصل 96783df12d
التزام be4ba0b969
2 ملفات معدلة مع 10 إضافات و2 حذوفات

عرض الملف

@@ -24,8 +24,6 @@ const socket = io({ transports: ['websocket'] });
const surveyActive = true;
const isSoundEnabled = true;
const url = {
ipLookup: 'https://extreme-ip-lookup.com/json/?key=demo2',
survey: 'https://www.questionpro.com/t/AUs7VZq02P',
@@ -74,6 +72,7 @@ let notify = getNotify();
let peer_geo = null;
let peer_info = null;
let isSoundEnabled = true;
let isEnumerateAudioDevices = false;
let isEnumerateVideoDevices = false;
let isAudioAllowed = false;
@@ -987,6 +986,10 @@ function handleSelects() {
rc.closeThenProduce(RoomClient.mediaType.video, videoSelect.value);
rc.setLocalStorageDevices(RoomClient.mediaType.video, videoSelect.selectedIndex, videoSelect.value);
};
// room
switchSound.onchange = (e) => {
isSoundEnabled = e.currentTarget.checked;
};
// styling
BtnsAspectRatio.onchange = () => {
setAspectRatio(BtnsAspectRatio.value);

عرض الملف

@@ -178,6 +178,11 @@
<p>Unlock room</p>
</button>
<br />
<div class="form-check form-switch form-switch-md" style="margin: 5px">
<input class="form-check-input" type="checkbox" id="switchSound" checked />
<label class="form-check-label" style="color: #fff" for="switchSound">&nbsp;Sounds</label>
</div>
<br />
<button id="sessionTimeButton">
<i class="fas fa-clock"></i>
<p id="sessionTime"></p>