This commit is contained in:
yumoqing 2024-10-12 18:02:02 +08:00
parent a337e93ffe
commit 9df6b3c33d

View File

@ -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());
}