mirror of
https://github.com/jech/galene.git
synced 2024-11-09 18:25:58 +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;
|
c.stream = stream;
|
||||||
stream.getTracks().forEach(t => {
|
stream.getTracks().forEach(t => {
|
||||||
c.pc.addTrack(t, stream);
|
c.pc.addTrack(t, stream);
|
||||||
|
t.onended = e => {
|
||||||
|
document.getElementById('sharebox').checked = false;
|
||||||
|
setShareMedia();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
await setMedia(shareMediaId);
|
await setMedia(shareMediaId);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue