[mirotalk] - #281 - Add Support for Custom Avatar via Options Object

This commit is contained in:
Miroslav Pejic
2025-04-08 00:33:25 +02:00
parent b3dc1e2452
commit b22fe1b2ee
16 changed files with 220 additions and 82 deletions
+3 -2
View File
@@ -21,8 +21,9 @@ async function getJoin() {
body: JSON.stringify({
room: 'test',
name: 'mirotalk',
audio: true,
video: true,
avatar: false,
audio: false,
video: false,
screen: false,
hide: false,
notify: true,
+3 -2
View File
@@ -20,8 +20,9 @@ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$data = array(
"room" => "test",
"name" => "mirotalk",
"audio" => true,
"video" => true,
"avatar" => false,
"audio" => false,
"video" => false,
"screen" => false,
"hide" => false,
"notify" => true,
+3 -2
View File
@@ -15,8 +15,9 @@ headers = {
data = {
"room": "test",
"name": "mirotalk",
"audio": "true",
"video": "true",
"avatar": "false",
"audio": "false",
"video": "false",
"screen": "false",
"hide": "false",
"notify": "true",
+26 -6
View File
@@ -1,12 +1,32 @@
#!/bin/bash
# Configuration
API_KEY_SECRET="mirotalkp2p_default_secret"
MIROTALK_URL="https://p2p.mirotalk.com/api/v1/join"
# Alternative URLs:
# MIROTALK_URL="http://localhost:3000/api/v1/join"
# MIROTALK_URL = "https://mirotalk.up.railway.app/api/v1/join"
# MIROTALK_URL="https://mirotalk.up.railway.app/api/v1/join"
curl $MIROTALK_URL \
--header "authorization: $API_KEY_SECRET" \
--header "Content-Type: application/json" \
--data '{"room":"test","name":"mirotalk","audio":"true","video":"true","screen":"false","hide":"false","notify":"true","token":{"username":"username","password":"password","presenter":"true", "expire":"1h"}}' \
--request POST
# Join request data
REQUEST_DATA='{
"room": "test",
"name": "mirotalk",
"avatar": false,
"audio": false,
"video": false,
"screen": false,
"hide": false,
"notify": true,
"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"
+5
View File
@@ -84,6 +84,9 @@ paths:
name:
type: string
default: 'mirotalk'
avatar:
type: string
default: ''
audio:
type: boolean
default: false
@@ -222,6 +225,8 @@ definitions:
properties:
peer_name:
type: string
peer_avatar:
type: string
peer_presenter:
type: boolean
peer_video: