From 1bdeda4ec3b1ed8962a2d09fa3f21a8ad044ebcf Mon Sep 17 00:00:00 2001 From: damencho Date: Tue, 22 Mar 2016 14:49:37 -0500 Subject: [PATCH] Fixes updateLarge video to change to different container types which do not have stream. --- modules/UI/shared_video/SharedVideo.js | 7 ++++--- modules/UI/videolayout/LargeVideo.js | 7 ++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/UI/shared_video/SharedVideo.js b/modules/UI/shared_video/SharedVideo.js index edeeb70cb..f715cf59e 100644 --- a/modules/UI/shared_video/SharedVideo.js +++ b/modules/UI/shared_video/SharedVideo.js @@ -124,13 +124,15 @@ export default class SharedVideoManager { self.isSharedVideoShown = true; + // If we are sending the command and we are starting the player + // we need to continuously send the player current time position if(APP.conference.isLocalId(self.from)) { self.intervalId = setInterval( self.updateCheck.bind(self), self.updateInterval); } - // set initial state + // set initial state of the player if there is enough information if(attributes.state === 'pause') player.pauseVideo(); else if(attributes.time > 0) { @@ -334,7 +336,7 @@ function SharedVideoThumb (url) this.videoSpanId = "sharedVideoContainer"; this.container = this.createContainer(this.videoSpanId); this.container.onclick = this.videoClick.bind(this); - //this.bindHoverHandler(); + this.bindHoverHandler(); SmallVideo.call(this, VideoLayout); this.isVideoMuted = true; @@ -371,7 +373,6 @@ SharedVideoThumb.prototype.createContainer = function (spanId) { */ SharedVideoThumb.prototype.videoClick = function () { VideoLayout.handleVideoThumbClicked(true, this.url); - VideoLayout.showLargeVideoContainer(this.videoType, true); }; /** diff --git a/modules/UI/videolayout/LargeVideo.js b/modules/UI/videolayout/LargeVideo.js index 61a2d46c4..ed73f9c27 100644 --- a/modules/UI/videolayout/LargeVideo.js +++ b/modules/UI/videolayout/LargeVideo.js @@ -452,7 +452,12 @@ export default class LargeVideoManager { // change the avatar url on large this.updateAvatar(Avatar.getAvatarUrl(id)); - let isVideoMuted = stream ? stream.isMuted() : true; + // If we the continer is VIDEO_CONTAINER_TYPE, we need to check + // its stream whether exist and is muted to set isVideoMuted + // in rest of the cases it is false + let isVideoMuted = false; + if (videoType == VIDEO_CONTAINER_TYPE) + isVideoMuted = stream ? stream.isMuted() : true; // show the avatar on large if needed container.showAvatar(isVideoMuted);