[mirotalksfu] - add start all transcriptions
هذا الالتزام موجود في:
ثنائية
public/images/transcription.png
Normal file
ثنائية
public/images/transcription.png
Normal file
ملف ثنائي غير معروض.
|
بعد العرض: | الارتفاع: | الحجم: 2.7 KiB |
@@ -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();
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -150,6 +150,7 @@ function handleRules(isPresenter) {
|
||||
BUTTONS.settings.sendEmailInvitation = true;
|
||||
|
||||
show(editorUnlockBtn);
|
||||
show(transcriptionAllLi);
|
||||
//...
|
||||
|
||||
// ##################################
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1615,14 +1615,19 @@ access to use this app.
|
||||
</li>
|
||||
<li>
|
||||
<button id="transcriptionGhostBtn">
|
||||
<i class="fas fa-circle-half-stroke"></i> Toggle bg
|
||||
<i class="fas fa-circle-half-stroke"></i> Toggle bg
|
||||
</button>
|
||||
</li>
|
||||
<li id="transcriptionAllLi" class="hidden">
|
||||
<button id="transcriptionAllBtn">
|
||||
<i class="fas fa-play"></i> Start for all
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button id="transcriptionSaveBtn"><i class="fas fa-save"></i> Save</button>
|
||||
<button id="transcriptionSaveBtn"><i class="fas fa-save"></i> Save</button>
|
||||
</li>
|
||||
<li>
|
||||
<button id="transcriptionCleanBtn"><i class="fas fa-trash"></i> Clean</button>
|
||||
<button id="transcriptionCleanBtn"><i class="fas fa-trash"></i> Clean</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -1630,7 +1635,7 @@ access to use this app.
|
||||
</div>
|
||||
</header>
|
||||
<main id="transcriptionChat" class="transcription-chat"></main>
|
||||
<div class="transcription-inputarea">
|
||||
<div id="transcriptionFooter" class="transcription-inputarea">
|
||||
<select id="transcriptionLanguage" class="form-select text-light bg-dark"></select>
|
||||
<select id="transcriptionDialect" class="form-select text-light bg-dark"></select>
|
||||
<button id="transcriptionSpeechStart" class=""><i class="fas fa-play"></i></button>
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم