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
             self.sharedVideo = new SharedVideoContainer(
189
             self.sharedVideo = new SharedVideoContainer(
190
                 {url, iframe, player});
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
             VideoLayout.addLargeVideoContainer(
198
             VideoLayout.addLargeVideoContainer(
193
                 SHARED_VIDEO_CONTAINER_TYPE, self.sharedVideo);
199
                 SHARED_VIDEO_CONTAINER_TYPE, self.sharedVideo);
194
             VideoLayout.handleVideoThumbClicked(self.url);
200
             VideoLayout.handleVideoThumbClicked(self.url);
372
                     this.errorInPlayer.destroy();
378
                     this.errorInPlayer.destroy();
373
                     this.errorInPlayer = null;
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
         this.url = null;
386
         this.url = null;

Loading…
Cancel
Save