[mirotalksfu] - add disable audio-video btn on join
هذا الالتزام موجود في:
@@ -37,6 +37,8 @@ let isAudioAllowed = false;
|
|||||||
let isVideoAllowed = false;
|
let isVideoAllowed = false;
|
||||||
let isAudioOn = true;
|
let isAudioOn = true;
|
||||||
let isVideoOn = true;
|
let isVideoOn = true;
|
||||||
|
let initAudioButton = null;
|
||||||
|
let initVideoButton = null;
|
||||||
|
|
||||||
let recTimer = null;
|
let recTimer = null;
|
||||||
let recElapsedTime = null;
|
let recElapsedTime = null;
|
||||||
@@ -242,7 +244,8 @@ function whoAreYou() {
|
|||||||
html: `<br />
|
html: `<br />
|
||||||
<div style="overflow: hidden;">
|
<div style="overflow: hidden;">
|
||||||
<button id="initAudioButton" class="fas fa-microphone" onclick="handleAudio(event)"></button>
|
<button id="initAudioButton" class="fas fa-microphone" onclick="handleAudio(event)"></button>
|
||||||
<button id="initVideoButton" class="fas fa-video" onclick="handleVideo(event)"></button>
|
<button id="initVideoButton" class="fas fa-video" onclick="handleVideo(event)"></button> |
|
||||||
|
<button id="initDisableAllButton" class="fas fa-eye-slash" style="color: red;" onclick="disableAudioVideo()"></button>
|
||||||
</div>`,
|
</div>`,
|
||||||
confirmButtonText: `Join meeting`,
|
confirmButtonText: `Join meeting`,
|
||||||
showClass: {
|
showClass: {
|
||||||
@@ -261,13 +264,14 @@ function whoAreYou() {
|
|||||||
joinRoom(peer_name, room_id);
|
joinRoom(peer_name, room_id);
|
||||||
});
|
});
|
||||||
|
|
||||||
let initAudioButton = document.getElementById('initAudioButton');
|
initAudioButton = document.getElementById('initAudioButton');
|
||||||
let initVideoButton = document.getElementById('initVideoButton');
|
initVideoButton = document.getElementById('initVideoButton');
|
||||||
if (!isAudioAllowed) initAudioButton.className = 'hidden';
|
if (!isAudioAllowed) initAudioButton.className = 'hidden';
|
||||||
if (!isVideoAllowed) initVideoButton.className = 'hidden';
|
if (!isVideoAllowed) initVideoButton.className = 'hidden';
|
||||||
if (!DetectRTC.isMobileDevice) {
|
if (!DetectRTC.isMobileDevice) {
|
||||||
setTippy('initAudioButton', 'Enable / Disable audio', 'left');
|
setTippy('initAudioButton', 'Enable / Disable audio', 'left');
|
||||||
setTippy('initVideoButton', 'Enable / Disable video', 'right');
|
setTippy('initVideoButton', 'Enable / Disable video', 'right');
|
||||||
|
setTippy('initDisableAllButton', 'Disable audio & video', 'right');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,6 +289,14 @@ function handleVideo(e) {
|
|||||||
setColor(startVideoButton, isVideoOn ? 'white' : 'red');
|
setColor(startVideoButton, isVideoOn ? 'white' : 'red');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function disableAudioVideo() {
|
||||||
|
isAudioOn, (isVideoOn = false);
|
||||||
|
initAudioButton.className = 'fas fa-microphone-slash';
|
||||||
|
initVideoButton.className = 'fas fa-video-slash';
|
||||||
|
setColor(initAudioButton, 'red');
|
||||||
|
setColor(initVideoButton, 'red');
|
||||||
|
}
|
||||||
|
|
||||||
// ####################################################
|
// ####################################################
|
||||||
// SHARE ROOM
|
// SHARE ROOM
|
||||||
// ####################################################
|
// ####################################################
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم