diff --git a/.tangled/workflows/deploy.yaml b/.tangled/workflows/deploy.yaml new file mode 100644 index 0000000..5b2c027 --- /dev/null +++ b/.tangled/workflows/deploy.yaml @@ -0,0 +1,36 @@ +when: + - event: ["push"] + branch: ["main"] + +engine: "nixery" + +dependencies: + nixpkgs: + - nodejs + - nodePackages.npm + +environment: + WISP_PASSWORD: "${{ secrets.WISP_PASSWORD }}" + WISP_HANDLE: "goose.art" + WISP_SITE: "vodfrog" + +steps: + - name: "install" + run: "npm ci" + + - name: "build" + run: "npm run build" + + - name: "install wisp-cli" + run: | + curl -L -o /tmp/wisp-cli https://github.com/psky-atp/wisp-cli/releases/latest/download/wisp-cli-x86_64-unknown-linux-gnu + chmod +x /tmp/wisp-cli + + - name: "deploy to wisp" + run: | + /tmp/wisp-cli deploy "$WISP_HANDLE" \ + --path build \ + --site "$WISP_SITE" \ + --password "$WISP_PASSWORD" \ + --spa \ + -y diff --git a/src/lib/VideoPlayer.svelte b/src/lib/VideoPlayer.svelte index 6f21e1f..03a4eed 100644 --- a/src/lib/VideoPlayer.svelte +++ b/src/lib/VideoPlayer.svelte @@ -51,9 +51,12 @@ hls.on(Hls.Events.MANIFEST_PARSED, () => { videoEl?.play().catch(() => {}); // Warn Safari users about Opus audio - const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); + const isSafari = /^((?!chrome|android).)*safari/i.test( + navigator.userAgent, + ); if (isSafari) { - errorMsg = '🐸 Audio may not work in Safari — these streams use Opus. Try Chrome or Firefox for sound.'; + errorMsg = + "🐸 Audio may not work in Safari — these streams use Opus. Try Chrome or Firefox for sound."; } }); hls.on(Hls.Events.ERROR, (_event, data) => { @@ -207,15 +210,15 @@ } function onKeyDown(e: KeyboardEvent) { - if (e.code === 'Space' && videoEl) { + if (e.code === "Space" && videoEl) { e.preventDefault(); togglePlay(); } } $effect(() => { - window.addEventListener('keydown', onKeyDown); - return () => window.removeEventListener('keydown', onKeyDown); + window.addEventListener("keydown", onKeyDown); + return () => window.removeEventListener("keydown", onKeyDown); }); /** Show controls on mouse activity, auto-hide after 2.5s of inactivity during playback */ @@ -264,7 +267,11 @@ tabindex={0} > - +
- - {#if errorMsg}
{errorMsg}
{/if}
+> ->