Add camera input selection and fallback capture flow

This commit is contained in:
2026-03-05 10:50:00 +00:00
parent 08433b3923
commit c458857f0a
3 changed files with 187 additions and 18 deletions

View File

@@ -74,6 +74,34 @@
<div class="glass-card p-6 rounded-3xl border border-white/5 space-y-4 min-h-[220px]">
<h3 class="text-xs font-bold text-gray-500 uppercase tracking-wider">Actions / Options</h3>
<div class="space-y-2">
<div class="flex items-center justify-between gap-2">
<label for="cameraInputSelect" class="text-[11px] text-gray-400 uppercase tracking-wider font-semibold">
Camera Input
</label>
<button
id="refreshCameraInputsBtn"
class="btn btn-ghost btn-xs rounded-lg text-gray-400 hover:text-white"
onclick={() => appController.refreshCameraInputs()}
>
Refresh
</button>
</div>
<select
id="cameraInputSelect"
class="select select-sm w-full bg-black/40 border-white/10 text-gray-200 rounded-xl"
value={$appState.selectedCameraInputId}
onchange={(event) => appController.selectCameraInput((event.currentTarget as HTMLSelectElement).value)}
>
{#if $appState.cameraInputDevices.length === 0}
<option value="">No camera inputs found</option>
{:else}
{#each $appState.cameraInputDevices as cameraInput (cameraInput.id)}
<option value={cameraInput.id}>{cameraInput.label}</option>
{/each}
{/if}
</select>
</div>
<div class="space-y-3">
{#if !$appState.isMotionActive}
<button