[mirotalksfu] - add redirect on leave room, update dep.

هذا الالتزام موجود في:
Miroslav Pejic
2023-10-27 14:20:53 +02:00
الأصل 9c856a0f86
التزام c3e459e999
7 ملفات معدلة مع 35 إضافات و22 حذوفات

عرض الملف

@@ -17,6 +17,7 @@ module.exports = class Room {
this._roomPassword = null;
this._hostOnlyRecording = false;
this.survey = config.survey;
this.redirect = config.redirect;
this.peers = new Map();
this.router = null;
this.createTheRouter();
@@ -110,6 +111,7 @@ module.exports = class Room {
hostOnlyRecording: this._hostOnlyRecording,
},
survey: this.survey,
redirect: this.redirect,
peers: JSON.stringify([...this.peers]),
};
}

عرض الملف

@@ -40,7 +40,7 @@ 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.1.3
* @version 1.1.4
*
*/

عرض الملف

@@ -119,6 +119,15 @@ module.exports = {
enabled: false,
url: '',
},
redirect: {
/*
Redirect URL on leave room
Upon leaving the room, users who either opt out of providing feedback or if the survey is disabled
will be redirected to a specified URL. If enabled false the default '/newroom' URL will be used.
*/
enabled: false,
url: '',
},
stats: {
/*
Umami: https://github.com/umami-software/umami

عرض الملف

@@ -1,6 +1,6 @@
{
"name": "mirotalksfu",
"version": "1.1.3",
"version": "1.1.4",
"description": "WebRTC SFU browser-based video calls",
"main": "Server.js",
"scripts": {
@@ -34,20 +34,20 @@
"author": "Miroslav Pejic",
"license": "AGPL-3.0",
"dependencies": {
"@sentry/integrations": "7.74.1",
"@sentry/node": "7.74.1",
"axios": "^1.5.1",
"@sentry/integrations": "7.75.1",
"@sentry/node": "7.75.1",
"axios": "^1.6.0",
"body-parser": "1.20.2",
"colors": "1.4.0",
"compression": "1.7.4",
"cors": "2.8.5",
"crypto-js": "4.1.1",
"crypto-js": "4.2.0",
"express": "4.18.2",
"httpolyglot": "0.1.2",
"mediasoup": "3.12.16",
"mediasoup-client": "3.6.102",
"mediasoup-client": "3.6.103",
"ngrok": "^4.3.3",
"openai": "^4.12.4",
"openai": "^4.14.0",
"qs": "6.11.2",
"socket.io": "4.7.2",
"swagger-ui-express": "5.0.0",

عرض الملف

@@ -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.1.3
* @version 1.1.4
*
*/
@@ -28,6 +28,11 @@ let survey = {
url: 'https://www.questionpro.com/t/AUs7VZq02P',
};
let redirect = {
enabled: true,
url: '/newroom',
};
const _PEER = {
audioOn: '<i class="fas fa-microphone"></i>',
audioOff: '<i style="color: red;" class="fas fa-microphone-slash"></i>',
@@ -2135,10 +2140,10 @@ function handleRoomClientEvents() {
console.log('Room event: Client save recording before to exit');
rc.stopRecording();
}
if (survey.enabled) {
if (survey && survey.enabled) {
leaveFeedback();
} else {
openURL('/newroom');
redirect && redirect.enabled ? openURL(redirect.url) : openURL('/newroom');
}
});
}

عرض الملف

@@ -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.1.3
* @version 1.1.4
*
*/
@@ -344,6 +344,8 @@ class RoomClient {
async handleRoomInfo(room) {
console.log('07.0 ----> Room Survey', room.survey);
survey = room.survey;
console.log('07.0 ----> Room Leave Redirect', room.redirect);
redirect = room.redirect;
let peers = new Map(JSON.parse(room.peers));
participantsCount = peers.size;
for (let peer of Array.from(peers.keys()).filter((id) => id == this.peer_id)) {

عرض الملف

@@ -35,14 +35,9 @@
1: [
function (require, module, exports) {
'use strict';
var __importDefault =
(this && this.__importDefault) ||
function (mod) {
return mod && mod.__esModule ? mod : { default: mod };
};
Object.defineProperty(exports, '__esModule', { value: true });
exports.Logger = void 0;
const debug_1 = __importDefault(require('debug'));
const debug_1 = require('debug');
const LIB_NAME = 'awaitqueue';
class Logger {
constructor(prefix) {
@@ -88,7 +83,7 @@
*/
class AwaitQueueStoppedError extends Error {
constructor(message) {
super(message !== null && message !== void 0 ? message : 'AwaitQueue stopped');
super(message ?? 'AwaitQueue stopped');
this.name = 'AwaitQueueStoppedError';
// @ts-ignore
if (typeof Error.captureStackTrace === 'function') {
@@ -104,7 +99,7 @@
*/
class AwaitQueueRemovedTaskError extends Error {
constructor(message) {
super(message !== null && message !== void 0 ? message : 'AwaitQueue task removed');
super(message ?? 'AwaitQueue task removed');
this.name = 'AwaitQueueRemovedTaskError';
// @ts-ignore
if (typeof Error.captureStackTrace === 'function') {
@@ -127,7 +122,7 @@
return this.pendingTasks.size;
}
async push(task, name) {
name = name !== null && name !== void 0 ? name : task.name;
name = name ?? task.name;
logger.debug(`push() [name:${name}]`);
if (typeof task !== 'function') {
throw new TypeError('given task is not a function');
@@ -12794,7 +12789,7 @@
/**
* Expose mediasoup-client version.
*/
exports.version = '3.6.102';
exports.version = '3.6.103';
/**
* Expose parseScalabilityMode() function.
*/