2021-06-01 09:08:02 +02:00
|
|
|
<script lang="typescript">
|
2021-06-01 17:23:16 +02:00
|
|
|
import { fly } from 'svelte/transition';
|
2021-06-01 09:08:02 +02:00
|
|
|
import {helpCameraSettingsVisibleStore} from "../../Stores/HelpCameraSettingsStore";
|
|
|
|
import firefoxImg from "./images/help-setting-camera-permission-firefox.png";
|
|
|
|
import chromeImg from "./images/help-setting-camera-permission-chrome.png";
|
2021-09-07 12:07:23 +02:00
|
|
|
import {getNavigatorType, isAndroid as isAndroidFct, NavigatorType} from "../../WebRtc/DeviceUtils";
|
2021-06-01 09:08:02 +02:00
|
|
|
|
2021-09-07 12:07:23 +02:00
|
|
|
let isAndroid = isAndroidFct();
|
|
|
|
let isFirefox = getNavigatorType() === NavigatorType.firefox;
|
|
|
|
let isChrome = getNavigatorType() === NavigatorType.chrome;
|
2021-06-01 09:08:02 +02:00
|
|
|
|
|
|
|
function refresh() {
|
|
|
|
window.location.reload();
|
|
|
|
}
|
|
|
|
|
|
|
|
function close() {
|
|
|
|
helpCameraSettingsVisibleStore.set(false);
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
2021-06-01 17:23:16 +02:00
|
|
|
<form class="helpCameraSettings nes-container" on:submit|preventDefault={close} transition:fly="{{ y: -900, duration: 500 }}">
|
2021-06-01 11:07:52 +02:00
|
|
|
<section>
|
2021-06-01 16:17:36 +02:00
|
|
|
<h2>Camera / Microphone access needed</h2>
|
2021-06-01 11:07:52 +02:00
|
|
|
<p class="err">Permission denied</p>
|
|
|
|
<p>You must allow camera and microphone access in your browser.</p>
|
2021-06-01 09:08:02 +02:00
|
|
|
<p>
|
|
|
|
{#if isFirefox }
|
2021-06-01 11:07:52 +02:00
|
|
|
<p class="err">Please click the "Remember this decision" checkbox, if you don't want Firefox to keep asking you the authorization.</p>
|
|
|
|
<img src={firefoxImg} alt="" />
|
|
|
|
{:else if isChrome && !isAndroid }
|
|
|
|
<img src={chromeImg} alt="" />
|
2021-06-01 09:08:02 +02:00
|
|
|
{/if}
|
|
|
|
</p>
|
|
|
|
</section>
|
2021-06-01 11:07:52 +02:00
|
|
|
<section>
|
|
|
|
<button class="helpCameraSettingsFormRefresh nes-btn" on:click|preventDefault={refresh}>Refresh</button>
|
|
|
|
<button type="submit" class="helpCameraSettingsFormContinue nes-btn is-primary" on:click|preventDefault={close}>Continue without webcam</button>
|
2021-06-01 09:08:02 +02:00
|
|
|
</section>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
2021-06-01 16:29:49 +02:00
|
|
|
<style lang="scss">
|
2021-06-01 09:08:02 +02:00
|
|
|
.helpCameraSettings {
|
2021-06-01 11:07:52 +02:00
|
|
|
pointer-events: auto;
|
|
|
|
background: #eceeee;
|
|
|
|
margin-left: auto;
|
|
|
|
margin-right: auto;
|
|
|
|
margin-top: 10vh;
|
|
|
|
max-height: 80vh;
|
|
|
|
max-width: 80vw;
|
2021-06-01 16:29:49 +02:00
|
|
|
overflow: auto;
|
2021-06-01 09:08:02 +02:00
|
|
|
text-align: center;
|
2021-06-01 16:29:49 +02:00
|
|
|
|
|
|
|
h2 {
|
|
|
|
font-family: 'Press Start 2P';
|
|
|
|
}
|
|
|
|
|
|
|
|
section {
|
|
|
|
p {
|
|
|
|
margin: 15px;
|
|
|
|
font-family: 'Press Start 2P';
|
|
|
|
|
|
|
|
& .err {
|
|
|
|
color: #ff0000;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
img {
|
|
|
|
max-width: 500px;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
}
|
2021-06-01 09:08:02 +02:00
|
|
|
}
|
|
|
|
</style>
|