[mirotalksfu] - Add Support for Custom Avatar via Options Object
هذا الالتزام موجود في:
@@ -19,9 +19,10 @@ async function getJoin() {
|
||||
room: 'test',
|
||||
roomPassword: false,
|
||||
name: 'mirotalksfu',
|
||||
audio: true,
|
||||
video: true,
|
||||
screen: true,
|
||||
avatar: false,
|
||||
audio: false,
|
||||
video: false,
|
||||
screen: false,
|
||||
hide: false,
|
||||
notify: true,
|
||||
duration: 'unlimited',
|
||||
|
||||
@@ -20,9 +20,10 @@ $data = array(
|
||||
"room" => "test",
|
||||
"roomPassword" => false,
|
||||
"name" => "mirotalksfu",
|
||||
"audio" => true,
|
||||
"video" => true,
|
||||
"screen" => true,
|
||||
"avatar" => false,
|
||||
"audio" => false,
|
||||
"video" => false,
|
||||
"screen" => false,
|
||||
"hide" => false,
|
||||
"notify" => true,
|
||||
"duration" => "unlimited",
|
||||
|
||||
@@ -15,9 +15,10 @@ data = {
|
||||
"room": "test",
|
||||
"roomPassword": "false",
|
||||
"name": "mirotalksfu",
|
||||
"audio": "true",
|
||||
"video": "true",
|
||||
"screen": "true",
|
||||
"avatar": "false",
|
||||
"audio": "false",
|
||||
"video": "false",
|
||||
"screen": "false",
|
||||
"hide": "false",
|
||||
"notify": "true",
|
||||
"duration": "unlimited",
|
||||
|
||||
@@ -1,11 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Configuration
|
||||
API_KEY_SECRET="mirotalksfu_default_secret"
|
||||
MIROTALK_URL="https://sfu.mirotalk.com/api/v1/join"
|
||||
# Alternative URL for local testing:
|
||||
# MIROTALK_URL="http://localhost:3010/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","duration":"unlimited","token":{"username":"username","password":"password","presenter":"true", "expire":"1h"}}' \
|
||||
--request POST
|
||||
# Request data with proper JSON formatting
|
||||
REQUEST_DATA='{
|
||||
"room": "test",
|
||||
"roomPassword": false,
|
||||
"name": "mirotalksfu",
|
||||
"avatar": false,
|
||||
"audio": false,
|
||||
"video": false,
|
||||
"screen": false,
|
||||
"hide": false,
|
||||
"notify": true,
|
||||
"duration": "unlimited",
|
||||
"token": {
|
||||
"username": "username",
|
||||
"password": "password",
|
||||
"presenter": true,
|
||||
"expire": "1h"
|
||||
}
|
||||
}'
|
||||
|
||||
# Make the API request
|
||||
curl -X POST "$MIROTALK_URL" \
|
||||
-H "Authorization: $API_KEY_SECRET" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$REQUEST_DATA"
|
||||
@@ -162,6 +162,9 @@ definitions:
|
||||
name:
|
||||
type: string
|
||||
default: 'mirotalksfu'
|
||||
avatar:
|
||||
type: ['boolean', 'string'] # Allow boolean or string type
|
||||
default: false
|
||||
audio:
|
||||
type: boolean
|
||||
default: false
|
||||
@@ -212,6 +215,8 @@ definitions:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
avatar:
|
||||
type: string
|
||||
presenter:
|
||||
type: boolean
|
||||
video:
|
||||
|
||||
@@ -10,6 +10,7 @@ module.exports = class Peer {
|
||||
const {
|
||||
peer_uuid,
|
||||
peer_name,
|
||||
peer_avatar,
|
||||
peer_presenter,
|
||||
peer_audio,
|
||||
peer_audio_volume,
|
||||
@@ -23,6 +24,7 @@ module.exports = class Peer {
|
||||
this.peer_info = peer_info;
|
||||
this.peer_uuid = peer_uuid;
|
||||
this.peer_name = peer_name;
|
||||
this.peer_avatar = peer_avatar;
|
||||
this.peer_presenter = peer_presenter;
|
||||
this.peer_audio = peer_audio;
|
||||
this.peer_video = peer_video;
|
||||
|
||||
@@ -64,7 +64,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.8.12
|
||||
* @version 1.8.13
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -68,11 +68,12 @@ module.exports = class ServerApi {
|
||||
|
||||
getJoinURL(data) {
|
||||
// Get data
|
||||
const { room, roomPassword, name, audio, video, screen, hide, notify, duration, token } = data;
|
||||
const { room, roomPassword, name, avatar, audio, video, screen, hide, notify, duration, token } = data;
|
||||
|
||||
const roomValue = room || uuidV4();
|
||||
const nameValue = name || 'User-' + this.getRandomNumber();
|
||||
const roomPasswordValue = roomPassword || false;
|
||||
const nameValue = name || 'User-' + this.getRandomNumber();
|
||||
const avatarValue = avatar || false;
|
||||
const audioValue = audio || false;
|
||||
const videoValue = video || false;
|
||||
const screenValue = screen || false;
|
||||
@@ -88,6 +89,7 @@ module.exports = class ServerApi {
|
||||
`room=${roomValue}` +
|
||||
`&roomPassword=${roomPasswordValue}` +
|
||||
`&name=${encodeURIComponent(nameValue)}` +
|
||||
`&avatar=${encodeURIComponent(avatarValue)}` +
|
||||
`&audio=${audioValue}` +
|
||||
`&video=${videoValue}` +
|
||||
`&screen=${screenValue}` +
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم