diff --git a/app/src/Server.js b/app/src/Server.js index 4efcbfc5..79880d38 100644 --- a/app/src/Server.js +++ b/app/src/Server.js @@ -55,7 +55,7 @@ dev 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.6.49 + * @version 1.6.50 * */ diff --git a/package.json b/package.json index 6583d3ce..201ccff9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mirotalksfu", - "version": "1.6.49", + "version": "1.6.50", "description": "WebRTC SFU browser-based video calls", "main": "Server.js", "scripts": { @@ -58,7 +58,7 @@ }, "dependencies": { "@mattermost/client": "^10.2.0", - "@sentry/node": "^8.45.0", + "@sentry/node": "^8.46.0", "axios": "^1.7.9", "colors": "1.4.0", "compression": "1.7.5", @@ -78,7 +78,7 @@ "mediasoup-client": "3.7.18", "ngrok": "^5.0.0-beta.2", "nodemailer": "^6.9.16", - "openai": "^4.76.3", + "openai": "^4.77.0", "qs": "6.13.1", "socket.io": "4.8.1", "swagger-ui-express": "5.0.1", diff --git a/public/images/transcription.png b/public/images/transcription.png new file mode 100644 index 00000000..a87f31a1 Binary files /dev/null and b/public/images/transcription.png differ diff --git a/public/js/Room.js b/public/js/Room.js index 973f8a28..4ff88292 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.6.49 + * @version 1.6.50 * */ @@ -1758,6 +1758,9 @@ function handleButtons() { transcriptionMinBtn.onclick = () => { transcription.minimize(); }; + transcriptionAllBtn.onclick = () => { + transcription.startAll(); + }; transcriptionGhostBtn.onclick = () => { transcription.toggleBg(); }; diff --git a/public/js/RoomClient.js b/public/js/RoomClient.js index 7453424f..83bfed22 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.6.49 + * @version 1.6.50 * */ @@ -111,6 +111,7 @@ const image = { network: '../images/network.gif', rtmp: '../images/rtmp.png', save: '../images/save.png', + transcription: '../images/transcription.png', }; const mediaType = { @@ -7388,6 +7389,9 @@ class RoomClient { case 'roomEmoji': this.handleRoomEmoji(cmd); break; + case 'transcriptionAll': + this.transcription.handleTranscriptionAll(cmd); + break; case 'transcript': this.transcription.handleTranscript(cmd); break; diff --git a/public/js/Rules.js b/public/js/Rules.js index af29d7bb..8c41eb81 100644 --- a/public/js/Rules.js +++ b/public/js/Rules.js @@ -150,6 +150,7 @@ function handleRules(isPresenter) { BUTTONS.settings.sendEmailInvitation = true; show(editorUnlockBtn); + show(transcriptionAllLi); //... // ################################## diff --git a/public/js/Transcription.js b/public/js/Transcription.js index 7d816bab..4df3ba7b 100644 --- a/public/js/Transcription.js +++ b/public/js/Transcription.js @@ -415,6 +415,64 @@ class Transcription { }; } + handleTranscriptionAll(cmd) { + const { peer_name, transcriptionLanguageIndex, transcriptionDialectIndex } = cmd.data; + + if (!this.speechTranscription) { + hide(transcriptionFooter); + rc.msgPopup( + 'info', + `${peer_name} wants to start transcriptions for this session, but your browser does not support it. Please use a Chromium-based browser like Google Chrome, Microsoft Edge, or Brave.`, + ); + return; + } + + if (this.transcriptionRunning || !BUTTONS.main.transcriptionButton) return; + + Swal.fire({ + allowOutsideClick: false, + allowEscapeKey: false, + showDenyButton: true, + background: swalBackground, + position: 'center', + imageUrl: image.transcription, + title: 'Start Transcription', + text: `${peer_name} wants to start the transcriptions for this session. Would you like to enable them?`, + confirmButtonText: `Yes`, + denyButtonText: `No`, + showClass: { popup: 'animate__animated animate__fadeInDown' }, + hideClass: { popup: 'animate__animated animate__fadeOutUp' }, + }).then((result) => { + if (result.isConfirmed) { + if (this.isHidden) { + this.toggle(); + } + if (!this.transcriptionRunning) { + transcriptionLanguage.selectedIndex = transcriptionLanguageIndex; + this.updateCountry(); + transcriptionDialect.selectedIndex = transcriptionDialectIndex; + transcription.start(); + } + } + }); + } + + startAll() { + if (!this.transcriptionRunning) { + transcription.start(); + } + rc.emitCmd({ + type: 'transcriptionAll', + broadcast: true, + data: { + peer_id: rc.peer_id, + peer_name: rc.peer_name, + transcriptionLanguageIndex: transcriptionLanguage.selectedIndex, + transcriptionDialectIndex: transcriptionDialect.selectedIndex, + }, + }); + } + start() { try { this.transcriptionRunning = true; diff --git a/public/views/Room.html b/public/views/Room.html index a297b4f4..cb3e4772 100644 --- a/public/views/Room.html +++ b/public/views/Room.html @@ -1615,14 +1615,19 @@

Polls

  • +
  • +
  • - +
  • - +
  • @@ -1630,7 +1635,7 @@

    Polls

    -
    +