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. * @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 { update(time: number, delta: number) : void {
mediaManager.setLastUpdateScene();
this.currentTick = time; this.currentTick = time;
this.CurrentPlayer.moveUser(delta); this.CurrentPlayer.moveUser(delta);
@ -959,8 +960,6 @@ export class GameScene extends ResizableScene implements CenterListener {
this.CurrentPlayer.x = this.startX; this.CurrentPlayer.x = this.startX;
this.CurrentPlayer.y = this.startY; this.CurrentPlayer.y = this.startY;
} }
mediaManager.setLastUpdateScene();
} }
private checkToExit(): {key: string, hash: string} | null { private checkToExit(): {key: string, hash: string} | null {

View File

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