mirror of
https://github.com/jech/galene.git
synced 2024-11-22 16:45:58 +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) {
|
if(sender) {
|
||||||
c.pc.removeTrack(sender)
|
c.pc.removeTrack(sender)
|
||||||
} else
|
} else {
|
||||||
console.warn('Removing unknown track');
|
console.warn('Removing unknown track');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Object.keys(c.labels).length === 0) {
|
||||||
|
stream.onaddtrack = null;
|
||||||
|
stream.onremovetrack == null;
|
||||||
|
delUpMedia(c);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
setMedia(c, true, video);
|
setMedia(c, true, video);
|
||||||
video.play();
|
video.play();
|
||||||
|
|
Loading…
Reference in a new issue