Browse Source

Merge pull request #1130 from jitsi/fix-stopping-sharedvideo

Stops player update before sending stopping of shared video.
j8
hristoterezov 9 years ago
parent
commit
7f3323f7c0
1 changed files with 8 additions and 5 deletions
  1. 8
    5
      modules/UI/shared_video/SharedVideo.js

+ 8
- 5
modules/UI/shared_video/SharedVideo.js View File

84
 
84
 
85
         if(APP.conference.isLocalId(this.from)) {
85
         if(APP.conference.isLocalId(this.from)) {
86
             showStopVideoPropmpt().then(() => {
86
             showStopVideoPropmpt().then(() => {
87
+                    // make sure we stop updates for playing before we send stop
88
+                    // if we stop it after receiving self presence, we can end
89
+                    // up sending stop playing, and on the other end it will not
90
+                    // stop
91
+                    if(this.intervalId) {
92
+                         clearInterval(this.intervalId);
93
+                         this.intervalId = null;
94
+                    }
87
                     this.emitter.emit(
95
                     this.emitter.emit(
88
                         UIEvents.UPDATE_SHARED_VIDEO, this.url, 'stop');
96
                         UIEvents.UPDATE_SHARED_VIDEO, this.url, 'stop');
89
                     JitsiMeetJS.analytics.sendEvent('sharedvideo.stoped');
97
                     JitsiMeetJS.analytics.sendEvent('sharedvideo.stoped');
423
             }
431
             }
424
         }
432
         }
425
 
433
 
426
-        if(this.intervalId) {
427
-            clearInterval(this.intervalId);
428
-            this.intervalId = null;
429
-        }
430
-
431
         this.emitter.removeListener(UIEvents.AUDIO_MUTED,
434
         this.emitter.removeListener(UIEvents.AUDIO_MUTED,
432
             this.localAudioMutedListener);
435
             this.localAudioMutedListener);
433
         this.localAudioMutedListener = null;
436
         this.localAudioMutedListener = null;

Loading…
Cancel
Save