mirror of
https://github.com/jech/galene.git
synced 2024-11-10 02:35:58 +01:00
Stop tracks before closing stream.
Otherwise the camera status light stays on.
This commit is contained in:
parent
81dfabbe50
commit
9bd093e78c
1 changed files with 6 additions and 0 deletions
|
@ -54,6 +54,12 @@ Connection.prototype.close = function(sendit) {
|
||||||
while(this.timers.length > 0)
|
while(this.timers.length > 0)
|
||||||
clearInterval(this.timers.pop());
|
clearInterval(this.timers.pop());
|
||||||
|
|
||||||
|
this.stream.getTracks().forEach(t => {
|
||||||
|
try {
|
||||||
|
t.stop();
|
||||||
|
} catch(e) {
|
||||||
|
}
|
||||||
|
});
|
||||||
this.pc.close();
|
this.pc.close();
|
||||||
|
|
||||||
if(sendit) {
|
if(sendit) {
|
||||||
|
|
Loading…
Reference in a new issue