Browse Source

Prevents users that are not sharing the video of pausing the video and leaves the control to the user sharing the video.

j8
damencho 9 years ago
parent
commit
b949ffdda1
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      modules/UI/shared_video/SharedVideo.js

+ 9
- 0
modules/UI/shared_video/SharedVideo.js View File

@@ -189,6 +189,12 @@ export default class SharedVideoManager {
189 189
             self.sharedVideo = new SharedVideoContainer(
190 190
                 {url, iframe, player});
191 191
 
192
+            //prevents pausing participants not sharing the video
193
+            // to pause the video
194
+            if (!APP.conference.isLocalId(self.from)) {
195
+                $("#sharedVideo").css("pointer-events","none");
196
+            }
197
+
192 198
             VideoLayout.addLargeVideoContainer(
193 199
                 SHARED_VIDEO_CONTAINER_TYPE, self.sharedVideo);
194 200
             VideoLayout.handleVideoThumbClicked(self.url);
@@ -372,6 +378,9 @@ export default class SharedVideoManager {
372 378
                     this.errorInPlayer.destroy();
373 379
                     this.errorInPlayer = null;
374 380
                 }
381
+                // revert to original behavior (prevents pausing
382
+                // for participants not sharing the video to pause it)
383
+                $("#sharedVideo").css("pointer-events","auto");
375 384
         });
376 385
 
377 386
         this.url = null;

Loading…
Cancel
Save