mirror of
https://github.com/jech/galene.git
synced 2024-12-22 23:35:46 +01:00
Remove streamed video when it finishes.
This commit is contained in:
parent
e2a79e24a1
commit
3a86157f15
1 changed files with 8 additions and 1 deletions
|
@ -926,8 +926,15 @@ async function addFileMedia(file) {
|
|||
});
|
||||
if(sender) {
|
||||
c.pc.removeTrack(sender)
|
||||
} else
|
||||
} else {
|
||||
console.warn('Removing unknown track');
|
||||
}
|
||||
|
||||
if(Object.keys(c.labels).length === 0) {
|
||||
stream.onaddtrack = null;
|
||||
stream.onremovetrack == null;
|
||||
delUpMedia(c);
|
||||
}
|
||||
};
|
||||
setMedia(c, true, video);
|
||||
video.play();
|
||||
|
|
Loading…
Reference in a new issue