Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ceremony): play glitch background on ios #3032

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ceremony/ceremony.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ _: {
export VITE_SUPABASE_ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im90ZmFhbWR4bWdua2pxc29zeHllIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjEzMjA5NDMsImV4cCI6MjAzNjg5Njk0M30.q91NJPFFHKJXnbhbpUYwsB0NmimtD7pGPx6PkbB_A3w"

npm install
npm run dev
npm run dev -- --host
'';
};
};
Expand Down
8 changes: 8 additions & 0 deletions ceremony/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLVideoElement | null>(null)

Expand Down Expand Up @@ -72,6 +79,7 @@ const hideBootSequenceVideo = () => (showBootSequence = false)
</video>
{:else}
<video
id="glitch-video"
loop
muted
autoplay
Expand Down
Loading