diff --git a/public/js/client.js b/public/js/client.js index e95a3110..a1db8011 100644 --- a/public/js/client.js +++ b/public/js/client.js @@ -43,6 +43,8 @@ const videoAudioShare = '../images/va-share.png'; const aboutImg = '../images/mirotalk-logo.png'; const imgFeedback = '../images/feedback.png'; const forbiddenImg = '../images/forbidden.png'; +const avatarImg = '../images/mirotalk-logo.png'; + // nice free icon: https://www.iconfinder.com const fileSharingInput = '*'; // allow all file extensions @@ -123,6 +125,8 @@ const userLimitsActive = false; // Limit users per room const usersCountLimit = 2; // Limit 2 users per room if userLimitsActive true +const useAvatarApi = true; // if false the cam-Off avatar = avatarImg + let notifyBySound = true; // turn on - off sound notifications let thisRoomPassword = null; @@ -2241,12 +2245,16 @@ function adaptAspectRatio() { */ function setPeerAvatarImgName(videoAvatarImageId, peerName) { let videoAvatarImageElement = getId(videoAvatarImageId); - // default img size 64 max 512 - let avatarImgSize = isMobileDevice ? 128 : 256; - videoAvatarImageElement.setAttribute( - 'src', - avatarApiUrl + '?name=' + peerName + '&size=' + avatarImgSize + '&background=random&rounded=true', - ); + if (useAvatarApi) { + // default img size 64 max 512 + let avatarImgSize = isMobileDevice ? 128 : 256; + videoAvatarImageElement.setAttribute( + 'src', + avatarApiUrl + '?name=' + peerName + '&size=' + avatarImgSize + '&background=random&rounded=true', + ); + } else { + videoAvatarImageElement.setAttribute('src', avatarImg); + } } /**