From 4cf1f92e25c7179bbf03c9779ff41cdb11b01c52 Mon Sep 17 00:00:00 2001 From: paweldomas Date: Tue, 26 Jan 2016 13:17:38 -0600 Subject: [PATCH 1/2] Fixes broken large video resize functionality. --- modules/UI/videolayout/LargeVideo.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/UI/videolayout/LargeVideo.js b/modules/UI/videolayout/LargeVideo.js index 6903f5c32..bf05235c4 100644 --- a/modules/UI/videolayout/LargeVideo.js +++ b/modules/UI/videolayout/LargeVideo.js @@ -57,7 +57,7 @@ function getDesktopVideoSize(videoWidth, availableHeight = availableWidth / aspectRatio; } - return { availableWidth, availableHeight }; + return [ availableWidth, availableHeight ]; } @@ -106,7 +106,7 @@ function getCameraVideoSize(videoWidth, } - return { availableWidth, availableHeight }; + return [ availableWidth, availableHeight ]; } /** @@ -239,7 +239,7 @@ class VideoContainer extends LargeContainer { } resize (containerWidth, containerHeight, animate = false) { - let { width, height } + let [width, height] = this.getVideoSize(containerWidth, containerHeight); let { horizontalIndent, verticalIndent } = this.getVideoPosition(width, height, @@ -251,8 +251,8 @@ class VideoContainer extends LargeContainer { this.$avatar.css('top', top); this.$wrapper.animate({ - width, - height, + width: width, + height: height, top: verticalIndent, bottom: verticalIndent, From 875a7b6f4f8baf22ca6edb52669f0d1333f2a000 Mon Sep 17 00:00:00 2001 From: paweldomas Date: Tue, 26 Jan 2016 14:58:58 -0600 Subject: [PATCH 2/2] Uses property instead of jquery to hook "onplay" event of the large video. --- modules/UI/videolayout/LargeVideo.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/UI/videolayout/LargeVideo.js b/modules/UI/videolayout/LargeVideo.js index bf05235c4..c39ef63ec 100644 --- a/modules/UI/videolayout/LargeVideo.js +++ b/modules/UI/videolayout/LargeVideo.js @@ -179,7 +179,10 @@ class VideoContainer extends LargeContainer { this.$video.volume = 0; } - this.$video.on('play', onPlay); + // This does not work with Temasys plugin - has to be a property to be + // copied between new elements + //this.$video.on('play', onPlay); + this.$video[0].onplay = onPlay; } /**