optimisation retour video avec un element video

This commit is contained in:
2023-01-29 21:43:07 +01:00
parent 0cc80637be
commit 4374bd0694
7 changed files with 34 additions and 15 deletions

View File

@@ -6,16 +6,18 @@ const STATE = {
};
class StateManager {
constructor(canvas) {
this.canvas = canvas;
constructor() {
this._state = STATE.sleeping;
this._cameraPage = new CameraPage(this.canvas);
this._cameraPage = new CameraPage();
this._sleepingPage = new SleepingPage();
this.wsClient = new WebsocketClient(
(effects) => this._cameraPage.setEffects(effects),
(state) => this.changeState(state)
);
this._sleepingPage.enabled = true;
this._cameraPage.enabled = false;
//TODO: Remove qd implémenté dans le backend
document.getElementById("sleeping-page-continue").onclick = () => this.setState(STATE.video);