-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
73019c0
commit d977aa0
Showing
2 changed files
with
23 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,14 @@ | ||
<script lang="ts"> | ||
import { user } from '$lib/stores/user'; | ||
import SettingsCard from "$lib/components/SettingsCard.svelte"; | ||
import Camera from '~icons/mdi/camera-outline' | ||
import Record from '~icons/mdi/radio-button-unchecked' | ||
import CameraSetting from './CameraSetting.svelte'; | ||
import { onDestroy } from 'svelte'; | ||
const ws_token = `?access_token=${$user.bearer_token}` | ||
let source = "/api/camera/stream"+ ws_token; | ||
onDestroy(() => { | ||
source = "" | ||
}) | ||
import Stream from '$lib/components/Stream.svelte'; | ||
</script> | ||
|
||
|
||
<SettingsCard collapsible={false}> | ||
<Camera slot="icon" class="lex-shrink-0 mr-2 h-6 w-6 self-end" /> | ||
<span slot="title">Camera</span> | ||
<img src={source} alt="Live-stream" class="w-full rounded-lg shadow-lg" /> | ||
<Stream /> | ||
<CameraSetting /> | ||
</SettingsCard> |