1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-25 18:15:57 +01:00

Stop tracks before closing stream.

Otherwise the camera status light stays on.
This commit is contained in:
Juliusz Chroboczek 2020-04-29 01:22:39 +02:00
parent 81dfabbe50
commit 9bd093e78c

View file

@ -54,6 +54,12 @@ Connection.prototype.close = function(sendit) {
while(this.timers.length > 0)
clearInterval(this.timers.pop());
this.stream.getTracks().forEach(t => {
try {
t.stop();
} catch(e) {
}
});
this.pc.close();
if(sendit) {