[mirotalksfu] - save recording on disconnect

هذا الالتزام موجود في:
Miroslav Pejic
2023-12-22 17:05:55 +01:00
الأصل 9f823ac60a
التزام 2b91efd182
2 ملفات معدلة مع 28 إضافات و17 حذوفات

عرض الملف

@@ -860,6 +860,7 @@ class RoomClient {
function () {
this.exit(true);
this.ServerAway();
this.saveRecording('Socket disconnected');
}.bind(this),
);
}
@@ -4051,19 +4052,21 @@ class RoomClient {
lastRecordingInfo.innerHTML = `Last Recording Info: ${recordingInfo}`;
show(lastRecordingInfo);
Swal.fire({
background: swalBackground,
position: 'center',
icon: 'success',
title: 'Recording',
html: `<div style="text-align: left;">
🔴 Recording Info:
${recordingInfo}
Please wait to be processed, then will be downloaded to your ${currentDevice} device.
</div>`,
showClass: { popup: 'animate__animated animate__fadeInDown' },
hideClass: { popup: 'animate__animated animate__fadeOutUp' },
});
if (window.localStorage.isReconnected === 'false') {
Swal.fire({
background: swalBackground,
position: 'center',
icon: 'success',
title: 'Recording',
html: `<div style="text-align: left;">
🔴 Recording Info:
${recordingInfo}
Please wait to be processed, then will be downloaded to your ${currentDevice} device.
</div>`,
showClass: { popup: 'animate__animated animate__fadeInDown' },
hideClass: { popup: 'animate__animated animate__fadeOutUp' },
});
}
console.log('MediaRecorder Download Blobs');
const url = window.URL.createObjectURL(blob);
@@ -4159,6 +4162,13 @@ class RoomClient {
);
}
saveRecording(reason) {
if (this._isRecording || recordingStatus.innerText != '0s') {
console.log(`Save recording: ${reason}`);
this.stopRecording();
}
}
// ####################################################
// FILE SHARING
// ####################################################