Fix trgger stream and update scene record

This commit is contained in:
Gregoire Parant 2020-11-21 18:47:38 +01:00
parent a6876658ab
commit 39cdc3fbd9
2 changed files with 3 additions and 6 deletions

View file

@ -906,6 +906,7 @@ export class GameScene extends ResizableScene implements CenterListener {
* @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
*/
update(time: number, delta: number) : void {
mediaManager.setLastUpdateScene();
this.currentTick = time;
this.CurrentPlayer.moveUser(delta);
@ -959,8 +960,6 @@ export class GameScene extends ResizableScene implements CenterListener {
this.CurrentPlayer.x = this.startX;
this.CurrentPlayer.y = this.startY;
}
mediaManager.setLastUpdateScene();
}
private checkToExit(): {key: string, hash: string} | null {

View file

@ -661,10 +661,8 @@ export class MediaManager {
private pingCameraStatus(){
setTimeout(() => {
console.log('ping camera status');
this.getCamera().then((stream: MediaStream) => {
this.triggerUpdatedLocalStreamCallbacks(stream);
this.pingCameraStatus();
});
this.triggerUpdatedLocalStreamCallbacks(this.localStream);
this.pingCameraStatus();
}, 30000);
}