[mirotalk] - add room duration
This commit is contained in:
@@ -28,6 +28,7 @@ async function getJoin() {
|
||||
chat: false,
|
||||
hide: false,
|
||||
notify: true,
|
||||
duration: 'unlimited',
|
||||
token: {
|
||||
username: 'username',
|
||||
password: 'password',
|
||||
|
||||
@@ -27,6 +27,7 @@ $data = array(
|
||||
"chat" => false,
|
||||
"hide" => false,
|
||||
"notify" => true,
|
||||
"duration" => "unlimited",
|
||||
"token" => array(
|
||||
"username" => "username",
|
||||
"password" => "password",
|
||||
|
||||
@@ -22,6 +22,7 @@ data = {
|
||||
"chat": "false",
|
||||
"hide": "false",
|
||||
"notify": "true",
|
||||
"duration": "unlimited",
|
||||
"token": {
|
||||
"username": "username",
|
||||
"password": "password",
|
||||
|
||||
@@ -18,6 +18,7 @@ REQUEST_DATA='{
|
||||
"chat": false,
|
||||
"hide": false,
|
||||
"notify": true,
|
||||
"duration": "unlimited",
|
||||
"token": {
|
||||
"username": "username",
|
||||
"password": "password",
|
||||
|
||||
@@ -105,6 +105,9 @@ paths:
|
||||
notify:
|
||||
type: boolean
|
||||
default: false
|
||||
duration:
|
||||
type: string
|
||||
default: 'unlimited'
|
||||
token:
|
||||
type: object
|
||||
description: |
|
||||
|
||||
+3
-1
@@ -58,7 +58,7 @@ module.exports = class ServerApi {
|
||||
|
||||
getJoinURL(data) {
|
||||
// Get data
|
||||
const { room, name, avatar, audio, video, screen, chat, notify, hide, token } = data;
|
||||
const { room, name, avatar, audio, video, screen, chat, notify, hide, duration, token } = data;
|
||||
|
||||
const roomValue = room || uuidV4();
|
||||
const nameValue = name || 'User-' + this.getRandomNumber();
|
||||
@@ -69,6 +69,7 @@ module.exports = class ServerApi {
|
||||
const chatValue = chat || false;
|
||||
const hideValue = hide || false;
|
||||
const notifyValue = notify || false;
|
||||
const durationValue = duration || 'unlimited';
|
||||
const jwtToken = token ? '&token=' + this.getToken(token) : '';
|
||||
|
||||
const joinURL =
|
||||
@@ -84,6 +85,7 @@ module.exports = class ServerApi {
|
||||
`&chat=${chatValue}` +
|
||||
`&hide=${hideValue}` +
|
||||
`¬ify=${notifyValue}` +
|
||||
`&duration=${durationValue}` +
|
||||
jwtToken;
|
||||
|
||||
return joinURL;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* ==============================================
|
||||
* MiroTalk P2P v.1.7.19 - Configuration File
|
||||
* MiroTalk P2P v.1.7.20 - Configuration File
|
||||
* ==============================================
|
||||
*
|
||||
* Branding and customizations require a license:
|
||||
|
||||
+3
-3
@@ -45,7 +45,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.7.19
|
||||
* @version 1.7.20
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -640,10 +640,10 @@ app.get('/join/', async (req, res) => {
|
||||
log.debug('Request Query', req.query);
|
||||
/*
|
||||
http://localhost:3000/join?room=test&name=mirotalk&audio=1&video=1&screen=0&chat=1¬ify=0&hide=0
|
||||
https://p2p.mirotalk.com/join?room=test&name=mirotalk&audio=1&video=1&screen=0&chat=1¬ify=0&hide=0
|
||||
https://p2p.mirotalk.com/join?room=test&name=mirotalk&audio=1&video=1&screen=0&chat=1¬ify=0&hide=0&duration=00:00:30
|
||||
https://mirotalk.up.railway.app/join?room=test&name=mirotalk&audio=1&video=1&screen=0&chat=1¬ify=0&hide=0
|
||||
*/
|
||||
const { room, name, audio, video, screen, chat, notify, hide, token } = checkXSS(req.query);
|
||||
const { room, name, audio, video, screen, chat, notify, hide, duration, token } = checkXSS(req.query);
|
||||
|
||||
if (!room) {
|
||||
log.warn('/join/params room empty', room);
|
||||
|
||||
Reference in New Issue
Block a user