mirror of
https://github.com/jech/galene.git
synced 2024-12-22 23:35:46 +01:00
Unshare screen when stream ends.
This commit is contained in:
parent
b018b14c80
commit
6f7c809b71
1 changed files with 4 additions and 0 deletions
|
@ -174,6 +174,10 @@ async function setShareMedia() {
|
|||
c.stream = stream;
|
||||
stream.getTracks().forEach(t => {
|
||||
c.pc.addTrack(t, stream);
|
||||
t.onended = e => {
|
||||
document.getElementById('sharebox').checked = false;
|
||||
setShareMedia();
|
||||
}
|
||||
});
|
||||
await setMedia(shareMediaId);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue