[mirotalksfu] - avatars improvements

هذا الالتزام موجود في:
Miroslav Pejic
2024-10-16 20:41:18 +02:00
الأصل 0c7af73c27
التزام f230b4e5a0
3 ملفات معدلة مع 7 إضافات و6 حذوفات

عرض الملف

@@ -234,7 +234,7 @@ module.exports = {
basePath: 'https://api.heygen.com', basePath: 'https://api.heygen.com',
apiKey: '', apiKey: '',
systemLimit: systemLimit:
'You are a streaming avatar from MiroTalk SFU, an industry-leading product that specialize in videos communications. Audience will try to have a conversation with you, please try answer the questions or respond their comments naturally, and concisely. - please try your best to response with short answers, and only answer the last question.', 'You are a streaming avatar from MiroTalk SFU, an industry-leading product that specialize in videos communications.',
}, },
email: { email: {
/* /*

عرض الملف

@@ -3003,7 +3003,7 @@ class RoomClient {
} }
} }
msgPopup(type, message) { msgPopup(type, message, timer = 3000) {
switch (type) { switch (type) {
case 'warning': case 'warning':
case 'error': case 'error':
@@ -3048,7 +3048,7 @@ class RoomClient {
showConfirmButton: false, showConfirmButton: false,
timerProgressBar: true, timerProgressBar: true,
toast: true, toast: true,
timer: 3000, timer: timer,
}); });
Toast.fire({ Toast.fire({
icon: 'info', icon: 'info',
@@ -7853,6 +7853,7 @@ class RoomClient {
// ############################################## // ##############################################
getAvatarList() { getAvatarList() {
this.msgPopup('toast', 'Please hold on, we are processing the avatar lists...', 10000);
this.socket this.socket
.request('getAvatarList') .request('getAvatarList')
.then(function (completion) { .then(function (completion) {
@@ -7885,7 +7886,7 @@ class RoomClient {
'default', 'default',
]; ];
console.log('AVATARS LISTS', completion.response.avatars); //console.log('AVATARS LISTS', completion.response.avatars);
completion.response.avatars.forEach((avatar) => { completion.response.avatars.forEach((avatar) => {
avatar.avatar_states.forEach((avatarUi) => { avatar.avatar_states.forEach((avatarUi) => {
if ( if (
@@ -7994,7 +7995,7 @@ class RoomClient {
const selectedPreviewURL = completion.response.list.find( const selectedPreviewURL = completion.response.list.find(
(flag) => flag.voice_id === selectedVoiceID, (flag) => flag.voice_id === selectedVoiceID,
)?.preview?.movio; )?.preview?.movio;
VideoAI.avatarVoice = selectedVoiceID; VideoAI.avatarVoice = selectedVoiceID ? selectedVoiceID : null;
if (selectedPreviewURL) { if (selectedPreviewURL) {
const avatarPreviewAudio = document.getElementById('avatarPreviewAudio'); const avatarPreviewAudio = document.getElementById('avatarPreviewAudio');
avatarPreviewAudio.src = selectedPreviewURL; avatarPreviewAudio.src = selectedPreviewURL;

عرض الملف

@@ -937,7 +937,7 @@ access to use this app.
<div id="tabVideoAI" class="tabcontent"> <div id="tabVideoAI" class="tabcontent">
<div class="avatarsVideoAI"> <div class="avatarsVideoAI">
<video id="avatarVideoAIPreview"></video> <video id="avatarVideoAIPreview" poster="../images/loader.gif"></video>
<hr /> <hr />
<table class="settingsTable"> <table class="settingsTable">
<tr id="avatars"> <tr id="avatars">