Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Stops player update before sending stopping of shared video.

damenchoe34d86b48531
diff --git a/modules/UI/shared_video/SharedVideo.js b/modules/UI/shared_video/SharedVideo.js
index 8991de840d..501b40ba47 100644
--- a/modules/UI/shared_video/SharedVideo.js
+++ b/modules/UI/shared_video/SharedVideo.js
@@ -84,6 +84,14 @@ export default class SharedVideoManager {
if(APP.conference.isLocalId(this.from)) {
showStopVideoPropmpt().then(() => {
+ // make sure we stop updates for playing before we send stop
+ // if we stop it after receiving self presence, we can end
+ // up sending stop playing, and on the other end it will not
+ // stop
+ if(this.intervalId) {
+ clearInterval(this.intervalId);
+ this.intervalId = null;
+ }
this.emitter.emit(
UIEvents.UPDATE_SHARED_VIDEO, this.url, 'stop');
JitsiMeetJS.analytics.sendEvent('sharedvideo.stoped');
@@ -423,11 +431,6 @@ export default class SharedVideoManager {
}
}
- if(this.intervalId) {
- clearInterval(this.intervalId);
- this.intervalId = null;
- }
-
this.emitter.removeListener(UIEvents.AUDIO_MUTED,
this.localAudioMutedListener);
this.localAudioMutedListener = null;