[mirotalksfu] - add room duration
هذا الالتزام موجود في:
@@ -24,6 +24,7 @@ async function getJoin() {
|
||||
screen: true,
|
||||
hide: false,
|
||||
notify: true,
|
||||
duration: 'unlimited',
|
||||
token: {
|
||||
username: 'username',
|
||||
password: 'password',
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
$API_KEY_SECRET = "mirotalksfu_default_secret";
|
||||
$MIROTALK_URL = "https://sfu.mirotalk.com/api/v1/join";
|
||||
// $MIROTALK_URL = "http://localhost:3010/api/v1/join";
|
||||
//$MIROTALK_URL = "http://localhost:3010/api/v1/join";
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $MIROTALK_URL);
|
||||
@@ -25,6 +25,7 @@ $data = array(
|
||||
"screen" => true,
|
||||
"hide" => false,
|
||||
"notify" => true,
|
||||
"duration" => "unlimited",
|
||||
"token" => array(
|
||||
"username" => "username",
|
||||
"password" => "password",
|
||||
|
||||
@@ -20,6 +20,7 @@ data = {
|
||||
"screen": "true",
|
||||
"hide": "false",
|
||||
"notify": "true",
|
||||
"duration": "unlimited",
|
||||
"token": {
|
||||
"username": "username",
|
||||
"password": "password",
|
||||
|
||||
@@ -7,5 +7,5 @@ MIROTALK_URL="https://sfu.mirotalk.com/api/v1/join"
|
||||
curl $MIROTALK_URL \
|
||||
--header "authorization: $API_KEY_SECRET" \
|
||||
--header "Content-Type: application/json" \
|
||||
--data '{"room":"test","roomPassword":"false","name":"mirotalksfu","audio":"true","video":"true","screen":"false","hide":"false","notify":"true","token":{"username":"username","password":"password","presenter":"true", "expire":"1h"}}' \
|
||||
--data '{"room":"test","roomPassword":"false","name":"mirotalksfu","audio":"true","video":"true","screen":"false","hide":"false","notify":"true","duration":"unlimited","token":{"username":"username","password":"password","presenter":"true", "expire":"1h"}}' \
|
||||
--request POST
|
||||
@@ -177,6 +177,9 @@ definitions:
|
||||
notify:
|
||||
type: boolean
|
||||
default: false
|
||||
duration:
|
||||
type: string
|
||||
default: 'unlimited'
|
||||
token:
|
||||
$ref: '#/definitions/TokenRequest'
|
||||
TokenRequest:
|
||||
|
||||
@@ -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¬ify=1
|
||||
// http://localhost:3010/join?room=test&roomPassword=0&name=mirotalksfu&audio=1&video=1&screen=0&hide=0¬ify=1&duration=00:00:20
|
||||
// http://localhost:3010/join?room=test&roomPassword=0&name=mirotalksfu&audio=1&video=1&screen=0&hide=0¬ify=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}` +
|
||||
`¬ify=${notifyValue}` +
|
||||
`&duration=${durationValue}` +
|
||||
jwtToken;
|
||||
|
||||
return joinURL;
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم