[mirotalksfu] - add room duration

هذا الالتزام موجود في:
Miroslav Pejic
2025-01-03 10:06:51 +01:00
الأصل 0c1dad20f4
التزام b5d4a4239f
11 ملفات معدلة مع 95 إضافات و34 حذوفات

عرض الملف

@@ -55,7 +55,7 @@ dev 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.6.74
* @version 1.6.75
*
*/
@@ -513,12 +513,11 @@ function startServer() {
log.debug('Direct Join', req.query);
// http://localhost:3010/join?room=test&roomPassword=0&name=mirotalksfu&audio=1&video=1&screen=0&hide=0&notify=1
// http://localhost:3010/join?room=test&roomPassword=0&name=mirotalksfu&audio=1&video=1&screen=0&hide=0&notify=1&duration=00:00:20
// http://localhost:3010/join?room=test&roomPassword=0&name=mirotalksfu&audio=1&video=1&screen=0&hide=0&notify=0&token=token
const { room, roomPassword, name, audio, video, screen, hide, notify, token, isPresenter } = checkXSS(
req.query,
);
const { room, roomPassword, name, audio, video, screen, hide, notify, duration, token, isPresenter } =
checkXSS(req.query);
if (!room) {
log.warn('/join/params room empty', room);

عرض الملف

@@ -68,7 +68,7 @@ module.exports = class ServerApi {
getJoinURL(data) {
// Get data
const { room, roomPassword, name, audio, video, screen, hide, notify, token } = data;
const { room, roomPassword, name, audio, video, screen, hide, notify, duration, token } = data;
const roomValue = room || uuidV4();
const nameValue = name || 'User-' + this.getRandomNumber();
@@ -78,6 +78,7 @@ module.exports = class ServerApi {
const screenValue = screen || false;
const hideValue = hide || false;
const notifyValue = notify || false;
const durationValue = duration || 'unlimited';
const jwtToken = token ? '&token=' + this.getToken(token) : '';
const joinURL =
@@ -92,6 +93,7 @@ module.exports = class ServerApi {
`&screen=${screenValue}` +
`&hide=${hideValue}` +
`&notify=${notifyValue}` +
`&duration=${durationValue}` +
jwtToken;
return joinURL;