[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
@@ -136,6 +136,7 @@ describe('test-api', () => {
const data = {
room: 'room1',
name: 'John Doe',
avatar: 'avatar.jpg',
audio: true,
video: false,
screen: false,
@@ -148,7 +149,7 @@ describe('test-api', () => {
const result = serverApi.getJoinURL(data);
result.should.equal(
'https://example.com/join?room=room1&name=John%20Doe&audio=true&video=false&screen=false&hide=false&notify=false&token=testToken',
'https://example.com/join?room=room1&name=John%20Doe&avatar=avatar.jpg&audio=true&video=false&screen=false&hide=false&notify=false&token=testToken',
);
tokenStub.restore();
@@ -166,7 +167,7 @@ describe('test-api', () => {
const result = serverApi.getJoinURL({});
result.should.equal(
'https://example.com/join?room=room1&name=User-123456&audio=false&video=false&screen=false&hide=false&notify=false',
'https://example.com/join?room=room1&name=User-123456&avatar=false&audio=false&video=false&screen=false&hide=false&notify=false',
);
});
});