diff --git a/front/dist/resources/html/EnableCameraScene.html b/front/dist/resources/html/EnableCameraScene.html deleted file mode 100644 index 21c798b5..00000000 --- a/front/dist/resources/html/EnableCameraScene.html +++ /dev/null @@ -1,126 +0,0 @@ - - - diff --git a/front/src/Components/App.svelte b/front/src/Components/App.svelte index 286b5687..581c5673 100644 --- a/front/src/Components/App.svelte +++ b/front/src/Components/App.svelte @@ -1,7 +1,7 @@
@@ -21,6 +21,9 @@ {#if $selectCompanionSceneVisibleStore} {/if} + {#if $enableCameraSceneVisibilityStore} + + {/if} diff --git a/front/src/Components/EnableCamera/EnableCameraScene.svelte b/front/src/Components/EnableCamera/EnableCameraScene.svelte new file mode 100644 index 00000000..ac2cf992 --- /dev/null +++ b/front/src/Components/EnableCamera/EnableCameraScene.svelte @@ -0,0 +1,76 @@ + + +
+
+

Turn on your camera and microphone

+
+ +
+ +
+
+ + + diff --git a/front/src/Components/Login/LoginScene.svelte b/front/src/Components/Login/LoginScene.svelte index 6a05ba9f..ea824908 100644 --- a/front/src/Components/Login/LoginScene.svelte +++ b/front/src/Components/Login/LoginScene.svelte @@ -30,7 +30,7 @@

Enter your name

- {startValidating = true}} class:is-error={name.trim() === '' && startValidating} /> + {startValidating = true}} class:is-error={name.trim() === '' && startValidating} />
{#if name.trim() === '' && startValidating }

The name is empty

@@ -71,6 +71,7 @@ section.error-section { min-height: 2rem; + margin: 0; p { margin: 0; diff --git a/front/src/Phaser/Login/EnableCameraScene.ts b/front/src/Phaser/Login/EnableCameraScene.ts index 6002da7b..73fa7303 100644 --- a/front/src/Phaser/Login/EnableCameraScene.ts +++ b/front/src/Phaser/Login/EnableCameraScene.ts @@ -12,8 +12,8 @@ import { MenuScene } from "../Menu/MenuScene"; import {ResizableScene} from "./ResizableScene"; import { audioConstraintStore, - enableCameraSceneVisibilityStore, localStreamStore, + enableCameraSceneVisibilityStore, mediaStreamConstraintsStore, videoConstraintStore } from "../../Stores/MediaStore"; @@ -28,8 +28,6 @@ enum LoginTextures { arrowUp = "arrow_up" } -const enableCameraSceneKey = 'enableCameraScene'; - export class EnableCameraScene extends ResizableScene { private textField!: TextField; private cameraNameField!: TextField; @@ -45,8 +43,6 @@ export class EnableCameraScene extends ResizableScene { private soundMeterSprite!: SoundMeterSprite; private microphoneNameField!: TextField; - private enableCameraSceneElement!: Phaser.GameObjects.DOMElement; - private mobileTapZone!: Zone; private localStreamStoreUnsubscriber!: Unsubscriber; @@ -58,9 +54,6 @@ export class EnableCameraScene extends ResizableScene { } preload() { - - this.load.html(enableCameraSceneKey, 'resources/html/EnableCameraScene.html'); - this.load.image(LoginTextures.playButton, "resources/objects/play_button.png"); this.load.image(LoginTextures.arrowRight, "resources/objects/arrow_right.png"); this.load.image(LoginTextures.arrowUp, "resources/objects/arrow_up.png"); @@ -69,18 +62,6 @@ export class EnableCameraScene extends ResizableScene { } create() { - - this.enableCameraSceneElement = this.add.dom(-1000, 0).createFromCache(enableCameraSceneKey); - this.centerXDomElement(this.enableCameraSceneElement, 300); - - MenuScene.revealMenusAfterInit(this.enableCameraSceneElement, enableCameraSceneKey); - - const continuingButton = this.enableCameraSceneElement.getChildByID('enableCameraSceneFormSubmit') as HTMLButtonElement; - continuingButton.addEventListener('click', (e) => { - e.preventDefault(); - this.login(); - }); - if (touchScreenManager.supportTouchScreen) { new PinchManager(this); } @@ -272,19 +253,17 @@ export class EnableCameraScene extends ResizableScene { this.arrowUp.x = this.microphoneNameField.x - this.microphoneNameField.width / 2 - 16; this.arrowUp.y = this.microphoneNameField.y; - const actionBtn = document.querySelector('#enableCameraScene .action'); + /*const actionBtn = document.querySelector('#enableCameraScene .action'); if (actionBtn !== null) { actionBtn.style.top = (this.scale.height - 65) + 'px'; - } + }*/ } update(time: number, delta: number): void { this.soundMeterSprite.setVolume(this.soundMeter.getVolume()); - - this.centerXDomElement(this.enableCameraSceneElement, 300); } - private login(): void { + public login(): void { HtmlUtils.getElementByIdOrFail('webRtcSetup').style.display = 'none'; this.soundMeter.stop();