diff --git a/bigbluebutton-html5/imports/api/screenshare/client/bridge/kurento.js b/bigbluebutton-html5/imports/api/screenshare/client/bridge/kurento.js index d63005606733887c0c3558f80d594ebdcdcb0520..42ee92cbd5f7d4c77993133f4b9f9549a02b4860 100755 --- a/bigbluebutton-html5/imports/api/screenshare/client/bridge/kurento.js +++ b/bigbluebutton-html5/imports/api/screenshare/client/bridge/kurento.js @@ -283,6 +283,8 @@ export default class KurentoScreenshareBridge { }; stop() { + const mediaElement = document.getElementById(SCREENSHARE_VIDEO_TAG); + if (this.broker) { this.broker.stop(); // Checks if this session is a sharer and if it's not reconnecting @@ -292,6 +294,12 @@ export default class KurentoScreenshareBridge { if (this.broker.role === SEND_ROLE && !this.reconnecting) setSharingScreen(false); this.broker = null; } + + if (mediaElement && typeof mediaElement.pause === 'function') { + mediaElement.pause(); + mediaElement.srcObject = null; + } + this.gdmStream = null; this.clearReconnectionTimeout(); }