[mirotalk] - recording improvements, update dep

This commit is contained in:
Miroslav Pejic
2024-04-17 21:17:32 +02:00
parent 084ac9ed39
commit 726e9de763
3 changed files with 43 additions and 6 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.3.18
* @version 1.3.19
*
*/
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "mirotalk",
"version": "1.3.18",
"version": "1.3.19",
"description": "A free WebRTC browser-based video call",
"main": "server.js",
"scripts": {
@@ -49,7 +49,7 @@
"express": "^4.19.2",
"jsonwebtoken": "^9.0.2",
"ngrok": "^5.0.0-beta.2",
"openai": "^4.35.0",
"openai": "^4.37.0",
"qs": "^6.12.1",
"socket.io": "^4.7.5",
"swagger-ui-express": "^5.0.0",
+40 -3
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.3.18
* @version 1.3.19
*
*/
@@ -6512,7 +6512,7 @@ function getAudioStreamFromAudioElements() {
* @param {string} action recording action
*/
function notifyRecording(fromId, from, action) {
const msg = '🔴 ' + action + ' recording.';
const msg = '🔴 ' + action + ' conference recording';
const chatMessage = {
from: from,
fromId: fromId,
@@ -6522,7 +6522,18 @@ function notifyRecording(fromId, from, action) {
};
handleDataChannelChat(chatMessage);
if (!showChatOnMessage) {
msgHTML(null, images.recording, null, `${from}<br /><h1>${action} recording</h1>`);
const recAgree = action != 'Stop' ? 'Your presence implies you agree to being recorded' : '';
toastMessage(
null,
null,
`${from}
<br /><br />
<span>${msg}</span>
<br /><br />
${recAgree}`,
'top-end',
6000,
);
}
}
@@ -10061,6 +10072,32 @@ function userLog(type, message, timer = 3000) {
}
}
/**
* Popup Toast message
* @param {string} icon info, success, alert, warning
* @param {string} title message title
* @param {string} html message in html format
* @param {string} position message position
* @param {integer} duration time popup in ms
*/
function toastMessage(icon, title, html, position = 'top-end', duration = 3000) {
const Toast = Swal.mixin({
background: swBg,
position: position,
icon: icon,
showConfirmButton: false,
timerProgressBar: true,
toast: true,
timer: duration,
});
Toast.fire({
title: title,
html: html,
showClass: { popup: 'animate__animated animate__fadeInDown' },
hideClass: { popup: 'animate__animated animate__fadeOutUp' },
});
}
/**
* Popup html message
* @param {string} icon info, success, alert, warning