diff --git a/static/sfu.js b/static/sfu.js index 4886d0b..e4f0f30 100644 --- a/static/sfu.js +++ b/static/sfu.js @@ -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); }