diff --git a/public/js/simplewebrtc.bundle.js b/public/js/simplewebrtc.bundle.js index 9e707b9..6ed0453 100644 --- a/public/js/simplewebrtc.bundle.js +++ b/public/js/simplewebrtc.bundle.js @@ -430,7 +430,9 @@ SimpleWebRTC.prototype.stopScreenShare = function () { // a hack to emit the event the removes the video // element that we want if (videoEl) this.emit('videoRemoved', videoEl); - if (stream) stream.stop(); + if (stream) { + stream.getTracks().forEach(function (track) { track.stop(); }); + } this.webrtc.peers.forEach(function (peer) { if (peer.broadcaster) { peer.end();