Fixes issue with missing avatar for Jigasi user. Fixes issue with avatar not being displayed when user has no video. Removed duplicated logic for checking video muted status(removed from LargeVideo which exists in SmallVideo).

pull/334/head
paweldomas 11 years ago
parent 349f196664
commit 2ffe178456
  1. 5
      modules/UI/avatar/Avatar.js
  2. 15
      modules/UI/videolayout/LargeVideo.js
  3. 4
      modules/UI/videolayout/SmallVideo.js
  4. 5
      modules/UI/videolayout/VideoLayout.js

@ -52,8 +52,9 @@ var Avatar = {
}
var id = users[jid];
if (!id) {
console.warn("No avatar stored yet for " + jid);
return null;
console.warn(
"No avatar stored yet for " + jid + " - using JID as ID");
id = jid;
}
return 'https://www.gravatar.com/avatar/' +
MD5.hexdigest(id.trim().toLowerCase()) +

@ -224,20 +224,9 @@ function updateActiveSpeakerAvatarSrc() {
var url = Avatar.getActiveSpeakerUrl(jid);
if (avatar.src === url)
return;
var isMuted = null;
if (!currentSmallVideo.isLocal &&
!LargeVideo.VideoLayout.isInLastN(currentSmallVideo.getResourceJid())) {
isMuted = true;
}
else
{
isMuted = APP.RTC.isVideoMuted(jid);
}
if (jid && isMuted !== null) {
if (jid) {
avatar.src = url;
$("#largeVideo").css("visibility", isMuted ? "hidden" : "visible");
currentSmallVideo.showAvatar(isMuted);
currentSmallVideo.showAvatar();
}
}

@ -325,7 +325,9 @@ SmallVideo.prototype.showAvatar = function (show) {
}
else
{
show = APP.RTC.isVideoMuted(this.peerJid);
// We want to show the avatar when the video is muted or not exists
// that is when 'true' or 'null' is returned
show = APP.RTC.isVideoMuted(this.peerJid) !== false;
}
}

@ -864,9 +864,10 @@ var VideoLayout = (function (my) {
if(!isVisible && focusedVideoResourceJid)
{
var smallVideo = VideoLayout.getSmallVideo(focusedVideoResourceJid);
if(smallVideo)
if(smallVideo) {
smallVideo.focus(false);
smallVideo.showAvatar();
smallVideo.showAvatar();
}
focusedVideoResourceJid = null;
}
};

Loading…
Cancel
Save