[mirotalksfu] - add new voice cmd, improve emoji UI

هذا الالتزام موجود في:
Miroslav Pejic
2022-01-16 22:46:00 +01:00
الأصل 154e0d93cd
التزام b793fe8f12
5 ملفات معدلة مع 19 إضافات و9 حذوفات

عرض الملف

@@ -96,7 +96,6 @@ function initClient() {
setTippy('chatSpeechStartButton', 'Start speech recognition', 'top');
setTippy('chatSpeechStopButton', 'Stop speech recognition', 'top');
setTippy('chatEmojiButton', 'Emoji', 'top');
setTippy('chatCloseEmojiButton', 'Close emoji', 'top');
setTippy('chatCleanButton', 'Clean', 'bottom');
setTippy('chatSaveButton', 'Save', 'bottom');
setTippy('sessionTime', 'Session time', 'right');
@@ -635,9 +634,6 @@ function handleButtons() {
chatEmojiButton.onclick = () => {
rc.toggleChatEmoji();
};
chatCloseEmojiButton.onclick = () => {
rc.toggleChatEmoji();
};
chatSpeechStartButton.onclick = () => {
startSpeech(true);
};

عرض الملف

@@ -99,6 +99,7 @@ class RoomClient {
this._isConnected = false;
this.isVideoOnFullScreen = false;
this.isChatOpen = false;
this.isChatEmojiOpen = false;
this.camVideo = false;
this.camera = 'user';
@@ -1464,7 +1465,8 @@ class RoomClient {
toggleChatEmoji() {
this.getId('chatEmoji').classList.toggle('show');
this.getId('chatCloseEmojiButton').classList.toggle('show');
this.isChatEmojiOpen = this.isChatEmojiOpen ? false : true;
this.getId('chatEmojiButton').style.color = this.isChatEmojiOpen ? '#FFFF00' : '#FFFFFF';
}
sendMessage() {

عرض الملف

@@ -27,6 +27,9 @@ const commands = {
participantsOn: 'show the participants',
participantsRefresh: 'refresh the participants',
participantsOff: 'hide the participants',
participantsVideoOff: 'stop the participants video',
participantsAudioOff: 'stop the participants audio',
participantsKickOut: 'kick out the participants',
fileShareOn: 'open the file',
fileShareOff: 'close the file',
youtubeOn: 'open the YouTube',
@@ -180,6 +183,18 @@ function execVoiceCommands(transcript) {
printCommand(commands.participantsOff);
participantsCloseBtn.click();
break;
case commands.participantsVideoOff:
printCommand(commands.participantsVideoOff);
rc.peerAction('me', rc.peer_id, 'hide', true, true);
break;
case commands.participantsAudioOff:
printCommand(commands.participantsAudioOff);
rc.peerAction('me', rc.peer_id, 'mute', true, true);
break;
case commands.participantsKickOut:
printCommand(commands.participantsAudioOff);
rc.peerAction('me', rc.peer_id, 'eject', true, true);
break;
case commands.fileShareOn:
printCommand(commands.fileShareOn);
fileShareButton.click();