diff --git a/bricks/rtc.js b/bricks/rtc.js index 62b4626..e5114f7 100644 --- a/bricks/rtc.js +++ b/bricks/rtc.js @@ -454,7 +454,7 @@ bricks.RTCP2PConnect = class { receiver.track.stop(); } }); - video.srcObject.getTracks().forEach(track => track.stop()); + video.get_stream().getTracks().forEach(track => track.stop()); var dc = this.peers[peer.id].dc; if (dc){ dc.close(); @@ -463,7 +463,8 @@ bricks.RTCP2PConnect = class { delete self.peers[peer.id]; var keys = Object.keys(self.peers); if (keys.length == 0){ - this.localVideo.srcObject.getTracks().forEach(track => track.stop()); + this.localVideo.get_stream() + .getTracks().forEach(track => track.stop()); this.local_stream.getTracks().forEach(track => track.stop()); this.local_screan.getTracks().forEach(track => track.stop()); }