Просмотр исходного кода

Stops player update before sending stopping of shared video.

We used to stop player updates on self presence received, so between stop and self presence we can send a playing update which will provoke adding the video again to other participants.
master
damencho 9 лет назад
Родитель
Сommit
e34d86b485
1 измененных файлов: 8 добавлений и 5 удалений
  1. 8
    5
      modules/UI/shared_video/SharedVideo.js

+ 8
- 5
modules/UI/shared_video/SharedVideo.js Просмотреть файл

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;

Загрузка…
Отмена
Сохранить