Switching to "playsinline" attribute in the video tag (both of them)

This commit is contained in:
David Négrier 2021-06-03 14:31:21 +02:00
parent 4fd453ec05
commit ebf217057d
2 changed files with 4 additions and 6 deletions

View File

@ -1,6 +1,6 @@
<script lang="typescript">
import {Game} from "../../Phaser/Game/Game";
import {EnableCameraSceneName} from "../../Phaser/Login/EnableCameraScene";
import {EnableCameraScene, EnableCameraSceneName} from "../../Phaser/Login/EnableCameraScene";
import {
audioConstraintStore,
cameraListStore,
@ -18,9 +18,7 @@
let selectedCamera : string|null = null;
let selectedMicrophone : string|null = null;
const enableCameraScene = game.scene.getScene(EnableCameraSceneName);
var video = document.getElementById("myCamVideoSetup");
video.setAttribute("playsinline", 'true');
const enableCameraScene = game.scene.getScene(EnableCameraSceneName) as EnableCameraScene;
function submit() {
enableCameraScene.login();
@ -82,7 +80,7 @@
<h2>Turn on your camera and microphone</h2>
</section>
{#if $localStreamStore.stream}
<video class="myCamVideoSetup" use:srcObject={$localStreamStore.stream} autoplay muted></video>
<video class="myCamVideoSetup" use:srcObject={$localStreamStore.stream} autoplay muted playsinline></video>
{:else }
<div class="webrtcsetup">
<img class="background-img" src={cinemaCloseImg} alt="">

View File

@ -38,7 +38,7 @@
<div>
<div class="video-container div-myCamVideo" class:hide={!$localStreamStore.constraints.video}>
<video class="myCamVideo" use:srcObject={$localStreamStore.stream} autoplay muted></video>
<video class="myCamVideo" use:srcObject={$localStreamStore.stream} autoplay muted playsinline></video>
<!-- {#if stream}
<SoundMeterWidget stream={stream}></SoundMeterWidget>
{/if} -->