From b949ffdda1b7bf7dbdb70b2854ac909f42d5ef7a Mon Sep 17 00:00:00 2001 From: damencho Date: Fri, 1 Apr 2016 17:23:30 -0500 Subject: [PATCH] Prevents users that are not sharing the video of pausing the video and leaves the control to the user sharing the video. --- modules/UI/shared_video/SharedVideo.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/UI/shared_video/SharedVideo.js b/modules/UI/shared_video/SharedVideo.js index fb7875442..a57a41fc3 100644 --- a/modules/UI/shared_video/SharedVideo.js +++ b/modules/UI/shared_video/SharedVideo.js @@ -189,6 +189,12 @@ export default class SharedVideoManager { self.sharedVideo = new SharedVideoContainer( {url, iframe, player}); + //prevents pausing participants not sharing the video + // to pause the video + if (!APP.conference.isLocalId(self.from)) { + $("#sharedVideo").css("pointer-events","none"); + } + VideoLayout.addLargeVideoContainer( SHARED_VIDEO_CONTAINER_TYPE, self.sharedVideo); VideoLayout.handleVideoThumbClicked(self.url); @@ -372,6 +378,9 @@ export default class SharedVideoManager { this.errorInPlayer.destroy(); this.errorInPlayer = null; } + // revert to original behavior (prevents pausing + // for participants not sharing the video to pause it) + $("#sharedVideo").css("pointer-events","auto"); }); this.url = null;