Ping status camera and microphone
This commit is contained in:
parent
199ed1266a
commit
69f3e511ab
@ -109,6 +109,7 @@ export class MediaManager {
|
|||||||
}
|
}
|
||||||
this.applyPreviousConfig();
|
this.applyPreviousConfig();
|
||||||
});
|
});
|
||||||
|
this.pingCameraStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
public onUpdateLocalStream(callback: UpdatedLocalStreamCallback): void {
|
public onUpdateLocalStream(callback: UpdatedLocalStreamCallback): void {
|
||||||
@ -619,6 +620,17 @@ export class MediaManager {
|
|||||||
mainContainer.appendChild(divReport);
|
mainContainer.appendChild(divReport);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//ping always 30 seconds data on stream
|
||||||
|
private pingCameraStatus(){
|
||||||
|
setTimeout(() => {
|
||||||
|
console.log('ping camera status');
|
||||||
|
this.getCamera().then((stream: MediaStream) => {
|
||||||
|
this.triggerUpdatedLocalStreamCallbacks(stream);
|
||||||
|
this.pingCameraStatus();
|
||||||
|
});
|
||||||
|
}, 30000);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user