mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 13:59:23 +00:00
Release user media
This commit is contained in:
parent
67e38faac9
commit
c4e81d1ded
@ -330,6 +330,11 @@ class CallWindow extends CustomEvents {
|
|||||||
delete this.mainPeer;
|
delete this.mainPeer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Release user media
|
||||||
|
if(this.mainStream) {
|
||||||
|
this.mainStream.getTracks().forEach(e => e.stop())
|
||||||
|
}
|
||||||
|
|
||||||
// Destroy peer connections
|
// Destroy peer connections
|
||||||
for(const el of this.peersEls)
|
for(const el of this.peersEls)
|
||||||
el[1].destroy()
|
el[1].destroy()
|
||||||
@ -501,6 +506,7 @@ class CallWindow extends CustomEvents {
|
|||||||
videoEl.play()
|
videoEl.play()
|
||||||
|
|
||||||
this.videoEls.set(peerID, videoEl)
|
this.videoEls.set(peerID, videoEl)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user