Ver código fonte

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 8 anos atrás
pai
commit
e34d86b485
1 arquivos alterados com 8 adições e 5 exclusões
  1. 8
    5
      modules/UI/shared_video/SharedVideo.js

+ 8
- 5
modules/UI/shared_video/SharedVideo.js Ver arquivo

@@ -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;

Carregando…
Cancelar
Salvar