[mirotalk] - fix captions, update dep

This commit is contained in:
Miroslav Pejic
2024-12-17 23:50:19 +01:00
parent f410d5a0b8
commit 0ea4a10890
4 changed files with 23 additions and 18 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ dependencies: {
* @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.4.10
* @version 1.4.11
*
*/
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "mirotalk",
"version": "1.4.10",
"version": "1.4.11",
"description": "A free WebRTC browser-based video call",
"main": "server.js",
"scripts": {
@@ -42,7 +42,7 @@
"homepage": "https://github.com/miroslavpejic85/mirotalk",
"dependencies": {
"@mattermost/client": "^10.2.0",
"@sentry/node": "^8.45.1",
"@sentry/node": "^8.46.0",
"axios": "^1.7.9",
"colors": "^1.4.0",
"compression": "^1.7.5",
@@ -55,7 +55,7 @@
"js-yaml": "^4.1.0",
"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",
+18 -13
View File
@@ -15,7 +15,7 @@
* @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.4.10
* @version 1.4.11
*
*/
@@ -296,6 +296,7 @@ const captionClean = getId('captionClean');
const captionSaveBtn = getId('captionSaveBtn');
const captionClose = getId('captionClose');
const captionChat = getId('captionChat');
const captionFooter = getId('captionFooter');
// My settings
const mySettings = getId('mySettings');
@@ -4783,7 +4784,7 @@ function setChatRoomBtn() {
* Caption room buttons click event
*/
function setCaptionRoomBtn() {
if (speechRecognition && buttons.main.showCaptionRoomBtn) {
if (buttons.main.showCaptionRoomBtn) {
// open hide caption
captionBtn.addEventListener('click', (e) => {
if (!isCaptionBoxVisible) {
@@ -4844,14 +4845,18 @@ function setCaptionRoomBtn() {
// hide it
elemDisplay(speechRecognitionStop, false);
// start recognition speech
speechRecognitionStart.addEventListener('click', (e) => {
startSpeech();
});
// stop recognition speech
speechRecognitionStop.addEventListener('click', (e) => {
stopSpeech();
});
if (speechRecognition) {
// start recognition speech
speechRecognitionStart.addEventListener('click', (e) => {
startSpeech();
});
// stop recognition speech
speechRecognitionStop.addEventListener('click', (e) => {
stopSpeech();
});
} else {
elemDisplay(captionFooter, false);
}
} else {
elemDisplay(captionBtn, false);
// https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API#browser_compatibility
@@ -10592,7 +10597,7 @@ function handleCaptionActions(config) {
switch (action) {
case 'start':
if (!speechRecognition || !buttons.main.showCaptionRoomBtn) {
if (!speechRecognition) {
userLog(
'info',
`${peer_name} wants to start captions for this session, but your browser does not support it. Please use a Chromium-based browser like Google Chrome, Microsoft Edge, or Brave.`,
@@ -10600,7 +10605,7 @@ function handleCaptionActions(config) {
return;
}
if (recognitionRunning) return;
if (recognitionRunning || !buttons.main.showCaptionRoomBtn) return;
Swal.fire({
allowOutsideClick: false,
@@ -10690,7 +10695,7 @@ function showAbout() {
Swal.fire({
background: swBg,
position: 'center',
title: '<strong>WebRTC P2P v1.4.10</strong>',
title: '<strong>WebRTC P2P v1.4.11</strong>',
imageAlt: 'mirotalk-about',
imageUrl: images.about,
customClass: { image: 'img-about' },
+1 -1
View File
@@ -299,7 +299,7 @@ access to use this app.
</header>
<main id="captionChat" class="caption-chat"></main>
<div class="caption-inputarea">
<div id="captionFooter" class="caption-inputarea">
<select id="recognitionLanguage"></select>
<select id="recognitionDialect"></select>
<button id="speechRecognitionStart"><i class="fas fa-play"></i> Start</button>