From 213d882638bfe74d6cb8a62707eb59faf2159430 Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Mon, 18 Dec 2023 21:28:52 +0100 Subject: [PATCH] [mirotalk] - #202 - wip --- app/src/Server.js | 2 +- package.json | 2 +- public/js/Room.js | 2 +- public/js/RoomClient.js | 8 +++++++- public/js/Rules.js | 4 ++-- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/src/Server.js b/app/src/Server.js index e15e2870..b727dea5 100644 --- a/app/src/Server.js +++ b/app/src/Server.js @@ -40,7 +40,7 @@ dependencies: { * @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon * @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970 * @author Miroslav Pejic - miroslav.pejic.85@gmail.com - * @version 1.3.41 + * @version 1.3.42 * */ diff --git a/package.json b/package.json index de8f5f71..34ef036d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mirotalksfu", - "version": "1.3.41", + "version": "1.3.42", "description": "WebRTC SFU browser-based video calls", "main": "Server.js", "scripts": { diff --git a/public/js/Room.js b/public/js/Room.js index 1f3fe06c..e78be897 100644 --- a/public/js/Room.js +++ b/public/js/Room.js @@ -11,7 +11,7 @@ if (location.href.substr(0, 5) !== 'https') location.href = 'https' + location.h * @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon * @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970 * @author Miroslav Pejic - miroslav.pejic.85@gmail.com - * @version 1.3.41 + * @version 1.3.42 * */ diff --git a/public/js/RoomClient.js b/public/js/RoomClient.js index e67a0e01..ffd7369d 100644 --- a/public/js/RoomClient.js +++ b/public/js/RoomClient.js @@ -9,7 +9,7 @@ * @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon * @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970 * @author Miroslav Pejic - miroslav.pejic.85@gmail.com - * @version 1.3.41 + * @version 1.3.42 * */ @@ -5259,6 +5259,8 @@ class RoomClient { let btnKo = this.getId(uid); if (btnKo) { btnKo.addEventListener('click', () => { + if (!isPresenter) + return this.userLog('warning', 'Only the presenter can eject the participants', 'top-end'); this.peerAction('me', peer_id, 'eject'); }); } @@ -5274,6 +5276,8 @@ class RoomClient { let btnCm = this.getId(uid); if (btnCm) { btnCm.addEventListener('click', () => { + if (!isPresenter) + return this.userLog('warning', 'Only the presenter can hide the participants', 'top-end'); this.peerAction('me', peer_id, 'hide'); }); } @@ -5289,6 +5293,8 @@ class RoomClient { let btnAU = this.getId(uid); if (btnAU) { btnAU.addEventListener('click', (e) => { + if (!isPresenter) + return this.userLog('warning', 'Only the presenter can mute the participants', 'top-end'); if (e.target.className === html.audioOn) { this.peerAction('me', peer_id, 'mute'); } diff --git a/public/js/Rules.js b/public/js/Rules.js index 3111683f..40572ce5 100644 --- a/public/js/Rules.js +++ b/public/js/Rules.js @@ -97,8 +97,8 @@ function handleRules(isPresenter) { BUTTONS.videoOff.muteAudioButton = false; BUTTONS.videoOff.ejectButton = false; BUTTONS.consumerVideo.ejectButton = false; - BUTTONS.consumerVideo.muteAudioButton = false; - BUTTONS.consumerVideo.muteVideoButton = false; + //BUTTONS.consumerVideo.muteAudioButton = false; + //BUTTONS.consumerVideo.muteVideoButton = false; BUTTONS.whiteboard.whiteboardLockButton = false; //... } else {