Fix screen unshare on Chrome 47+

Backport f78bc2596c
master
Daniel Berteaud 8 years ago
parent 5eae36ef1f
commit 572d0b47cd
  1. 4
      public/js/simplewebrtc.bundle.js

@ -430,7 +430,9 @@ SimpleWebRTC.prototype.stopScreenShare = function () {
// a hack to emit the event the removes the video // a hack to emit the event the removes the video
// element that we want // element that we want
if (videoEl) this.emit('videoRemoved', videoEl); 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) { this.webrtc.peers.forEach(function (peer) {
if (peer.broadcaster) { if (peer.broadcaster) {
peer.end(); peer.end();

Loading…
Cancel
Save