Ping status camera and microphone

This commit is contained in:
Gregoire Parant 2020-10-24 14:40:51 +02:00
parent 199ed1266a
commit 69f3e511ab

View File

@ -109,6 +109,7 @@ export class MediaManager {
}
this.applyPreviousConfig();
});
this.pingCameraStatus();
}
public onUpdateLocalStream(callback: UpdatedLocalStreamCallback): void {
@ -619,6 +620,17 @@ export class MediaManager {
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);
}
}