[mirotalksfu] - fix typo

main
Miroslav Pejic 4 years ago
parent a58c7cb5ca
commit 787d73b3e4

@ -93,133 +93,137 @@ function startSpeech(action) {
function execVoiceCommands(transcript) { function execVoiceCommands(transcript) {
switch (transcript.trim()) { switch (transcript.trim()) {
case commands.shareRoom: case commands.shareRoom:
console.log('Command detected', commands.shareRoom); printCommand(commands.shareRoom);
shareButton.click(); shareButton.click();
break; break;
case commands.leaveRoom: case commands.leaveRoom:
console.log('Command detected', commands.leaveRoom); printCommand(commands.leaveRoom);
exitButton.click(); exitButton.click();
break; break;
case commands.audioOn: case commands.audioOn:
console.log('Command detected', commands.audioOn); printCommand(commands.audioOn);
startAudioButton.click(); startAudioButton.click();
break; break;
case commands.audioOff: case commands.audioOff:
console.log('Command detected', commands.audioOff); printCommand(commands.audioOff);
stopAudioButton.click(); stopAudioButton.click();
break; break;
case commands.videoOn: case commands.videoOn:
console.log('Command detected', commands.videoOn); printCommand(commands.videoOn);
startVideoButton.click(); startVideoButton.click();
break; break;
case commands.videoOff: case commands.videoOff:
console.log('Command detected', commands.videoOff); printCommand(commands.videoOff);
stopVideoButton.click(); stopVideoButton.click();
break; break;
case commands.screenOn: case commands.screenOn:
console.log('Command detected', commands.screenOn); printCommand(commands.screenOn);
startScreenButton.click(); startScreenButton.click();
break; break;
case commands.screenOff: case commands.screenOff:
console.log('Command detected', commands.screenOff); printCommand(commands.screenOff);
stopScreenButton.click(); stopScreenButton.click();
break; break;
case commands.chatOn: case commands.chatOn:
console.log('Command detected', commands.chatOn); printCommand(commands.chatOn);
chatButton.click(); chatButton.click();
break; break;
case commands.chatSend: case commands.chatSend:
console.log('Command detected', commands.chatSend); printCommand(commands.chatSend);
chatSendButton.click(); chatSendButton.click();
break; break;
case commands.chatOff: case commands.chatOff:
console.log('Command detected', commands.chatOff); printCommand(commands.chatOff);
chatCloseButton.click(); chatCloseButton.click();
break; break;
case commands.whiteboardOn: case commands.whiteboardOn:
console.log('Command detected', commands.whiteboardOn); printCommand(commands.whiteboardOn);
whiteboardButton.click(); whiteboardButton.click();
break; break;
case commands.whiteboardOff: case commands.whiteboardOff:
console.log('Command detected', commands.whiteboardOff); printCommand(commands.whiteboardOff);
whiteboardCloseBtn.click(); whiteboardCloseBtn.click();
break; break;
case commands.recordingOn: case commands.recordingOn:
console.log('Command detected', commands.recordingOn); printCommand(commands.recordingOn);
startRecButton.click(); startRecButton.click();
break; break;
case commands.recordingPause: case commands.recordingPause:
console.log('Command detected', commands.recordingPause); printCommand(commands.recordingPause);
pauseRecButton.click(); pauseRecButton.click();
break; break;
case commands.recordingResume: case commands.recordingResume:
console.log('Command detected', commands.recordingResume); printCommand(commands.recordingResume);
recordingResume.click(); recordingResume.click();
break; break;
case commands.recordingOff: case commands.recordingOff:
console.log('Command detected', commands.recordingOff); printCommand(commands.recordingOff);
stopRecButton.click(); stopRecButton.click();
break; break;
case commands.settingsOn: case commands.settingsOn:
console.log('Command detected', commands.settingsOn); printCommand(commands.settingsOn);
settingsButton.click(); settingsButton.click();
break; break;
case commands.settingsOff: case commands.settingsOff:
console.log('Command detected', commands.settingsOff); printCommand(commands.settingsOff);
mySettingsCloseBtn.click(); mySettingsCloseBtn.click();
break; break;
case commands.participantsOn: case commands.participantsOn:
console.log('Command detected', commands.participantsOn); printCommand(commands.participantsOn);
participantsButton.click(); participantsButton.click();
break; break;
case commands.participantsRefresh: case commands.participantsRefresh:
console.log('Command detected', commands.participantsRefresh); printCommand(commands.participantsRefresh);
participantsRefreshBtn.click(); participantsRefreshBtn.click();
break; break;
case commands.participantsOff: case commands.participantsOff:
console.log('Command detected', commands.participantsOff); printCommand(commands.participantsOff);
participantsCloseBtn.click(); participantsCloseBtn.click();
break; break;
case commands.fileShareOn: case commands.fileShareOn:
console.log('Command detected', commands.fileShareOn); printCommand(commands.fileShareOn);
fileShareButton.click(); fileShareButton.click();
break; break;
case commands.fileShareOff: case commands.fileShareOff:
console.log('Command detected', commands.fileShareOff); printCommand(commands.fileShareOff);
sendAbortBtn.click(); sendAbortBtn.click();
break; break;
case commands.youtubeOn: case commands.youtubeOn:
console.log('Command detected', commands.youtubeOn); printCommand(commands.youtubeOn);
youTubeShareButton.click(); youTubeShareButton.click();
break; break;
case commands.youtubeOff: case commands.youtubeOff:
console.log('Command detected', commands.youtubeOff); printCommand(commands.youtubeOff);
youTubeCloseBtn.click(); youTubeCloseBtn.click();
break; break;
case commands.swapCamera: case commands.swapCamera:
console.log('Command detected', commands.swapCamera); printCommand(commands.swapCamera);
swapCameraButton.click(); swapCameraButton.click();
break; break;
case commands.raiseHand: case commands.raiseHand:
console.log('Command detected', commands.raiseHand); printCommand(commands.raiseHand);
raiseHandButton.click(); raiseHandButton.click();
break; break;
case commands.lowerHand: case commands.lowerHand:
console.log('Command detected', commands.lowerHand); printCommand(commands.lowerHand);
lowerHandButton.click(); lowerHandButton.click();
break; break;
case commands.roomLock: case commands.roomLock:
console.log('Command detected', commands.roomLock); printCommand(commands.roomLock);
lockRoomButton.click(); lockRoomButton.click();
break; break;
case commands.roomUnlock: case commands.roomUnlock:
console.log('Command detected', commands.roomUnlock); printCommand(commands.roomUnlock);
unlockRoomButton.click(); unlockRoomButton.click();
break; break;
case commands.about: case commands.about:
console.log('Command detected', commands.about); printCommand(commands.about);
aboutButton.click(); aboutButton.click();
break; break;
// ... // ...
} }
} }
function printCommand(command) {
console.log('Detected', { command: command });
}

Loading…
Cancel
Save