🎥 Moves camera stream to component

This commit is contained in:
Rune Harlyk
2024-07-05 11:41:03 +02:00
parent 73019c008b
commit d977aa0a70
2 changed files with 23 additions and 12 deletions
+21
View File
@@ -0,0 +1,21 @@
<script lang="ts">
import { user } from '$lib/stores/user';
import { onDestroy } from 'svelte';
const ws_token = `?access_token=${$user.bearer_token}`
let source = "/api/camera/stream"+ ws_token;
onDestroy(() => {
source = '#';
});
</script>
<div class="w-full h-full">
<img
src={source}
class="absolute object-cover blur-3xl w-full h-full -z-10"
alt="Live stream is down"
/>
<img src={source} class="object-contain w-full h-full" alt="Live stream is down" />
</div>