From f0df9e409a65ed795f36b0b512c701769a6a7af7 Mon Sep 17 00:00:00 2001 From: cor Date: Fri, 27 Sep 2024 04:08:23 +0200 Subject: [PATCH] fix(ceremony): play glitch background on ios --- ceremony/ceremony.nix | 2 +- ceremony/src/routes/+layout.svelte | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ceremony/ceremony.nix b/ceremony/ceremony.nix index a45508ac92..719839fc64 100644 --- a/ceremony/ceremony.nix +++ b/ceremony/ceremony.nix @@ -55,7 +55,7 @@ _: { export VITE_SUPABASE_ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im90ZmFhbWR4bWdua2pxc29zeHllIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjEzMjA5NDMsImV4cCI6MjAzNjg5Njk0M30.q91NJPFFHKJXnbhbpUYwsB0NmimtD7pGPx6PkbB_A3w" npm install - npm run dev + npm run dev -- --host ''; }; }; diff --git a/ceremony/src/routes/+layout.svelte b/ceremony/src/routes/+layout.svelte index e072dd69e0..3e5352ee22 100644 --- a/ceremony/src/routes/+layout.svelte +++ b/ceremony/src/routes/+layout.svelte @@ -42,6 +42,13 @@ watch( contributor.setUserId(user.session?.user.id) } ) + +$effect(() => { + if (!showBootSequence) { + // @ts-ignore + document.getElementById("glitch-video").play() + } +}) let showBootSequence = $state(true) let bootSequenceVideoElement = $state(null) @@ -72,6 +79,7 @@ const hideBootSequenceVideo = () => (showBootSequence = false) {:else}