let cameraState = true;
let micState = true;
function toggleVideo(){
if(cameraState){
WTSDK.Participant.disableVideo();
cameraState = false;
const video = document.getElementById('vide_control');
video.classList.remove('vcam_on');
video.classList.add('vcam_off');
}else {
WTSDK.Participant.enableVideo();
cameraState = true;
const video = document.getElementById('vide_control');
video.classList.remove('vcam_off');
video.classList.add('vcam_on');
}
}
function toggleAudio() {
if(micState){
WTSDK.Participant.disableAudio();
micState = false;
const video = document.getElementById('audio_control');
video.classList.remove('mic_on');
video.classList.add('mic_off');
}else {
WTSDK.Participant.enableAudio();
micState = true;
const video = document.getElementById('audio_control');
video.classList.remove('mic_off');
video.classList.add('mic_on');
}
}