From be4ba0b969bdc2deff3140003b3124f97ea85eb5 Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Sat, 10 Sep 2022 11:11:21 +0200 Subject: [PATCH] [mirotalksfu] - add enable/disable Sounds --- public/js/Room.js | 7 +++++-- public/views/Room.html | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/public/js/Room.js b/public/js/Room.js index eb77b19d..a5a64eec 100644 --- a/public/js/Room.js +++ b/public/js/Room.js @@ -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); diff --git a/public/views/Room.html b/public/views/Room.html index c59e44c6..223aa0ed 100644 --- a/public/views/Room.html +++ b/public/views/Room.html @@ -178,6 +178,11 @@

Unlock room


+
+ + +
+