2021-06-01 09:08:02 +02:00
|
|
|
<script lang="typescript">
|
|
|
|
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-06-01 11:07:52 +02:00
|
|
|
let isAndroid = window.navigator.userAgent.includes('Android');
|
2021-06-01 09:08:02 +02:00
|
|
|
let isFirefox = window.navigator.userAgent.includes('Firefox');
|
|
|
|
let isChrome = window.navigator.userAgent.includes('Chrome');
|
|
|
|
|
|
|
|
function refresh() {
|
|
|
|
window.location.reload();
|
|
|
|
}
|
|
|
|
|
|
|
|
function close() {
|
|
|
|
helpCameraSettingsVisibleStore.set(false);
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
2021-06-01 11:07:52 +02:00
|
|
|
<form class="helpCameraSettings nes-container" on:submit|preventDefault={close}>
|
|
|
|
<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>
|