Commit 9bd093e7 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Stop tracks before closing stream.

Otherwise the camera status light stays on.
parent 81dfabbe
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment