瀏覽代碼

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

Stops player update before sending stopping of shared video.
j8
hristoterezov 8 年之前
父節點
當前提交
7f3323f7c0
共有 1 個檔案被更改,包括 8 行新增5 行删除
  1. 8
    5
      modules/UI/shared_video/SharedVideo.js

+ 8
- 5
modules/UI/shared_video/SharedVideo.js 查看文件

@@ -84,6 +84,14 @@ export default class SharedVideoManager {
84 84
 
85 85
         if(APP.conference.isLocalId(this.from)) {
86 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 95
                     this.emitter.emit(
88 96
                         UIEvents.UPDATE_SHARED_VIDEO, this.url, 'stop');
89 97
                     JitsiMeetJS.analytics.sendEvent('sharedvideo.stoped');
@@ -423,11 +431,6 @@ export default class SharedVideoManager {
423 431
             }
424 432
         }
425 433
 
426
-        if(this.intervalId) {
427
-            clearInterval(this.intervalId);
428
-            this.intervalId = null;
429
-        }
430
-
431 434
         this.emitter.removeListener(UIEvents.AUDIO_MUTED,
432 435
             this.localAudioMutedListener);
433 436
         this.localAudioMutedListener = null;

Loading…
取消
儲存