avatar
{🧪} +paoloricciuti.svelte @paolo.ricciuti.me

I was always fascinated by the play pause animation on youtube...so I replicated it! It was actually way simpler than i was expecting and it works on all browsers! Check it out here: svelte.dev/playground/7...

Video thumbnail
sep 8, 2025, 3:57 pm • 15 2

Replies

avatar
nuqayah.bsky.social @nuqayah.bsky.social

nice! using svg: svelte.dev/playground/2... a bit shorter, but requires js to trigger the animation. not sure if that can be simplified.

sep 9, 2025, 9:15 am • 2 0 • view
avatar
{🧪} +paoloricciuti.svelte @paolo.ricciuti.me

You can technically update the path with css but that doesn't work in Firefox and safari unfortunately (and it doesn't work in the bad way...it completely breaks and doesn't update at all). I guess updating with JS might be fine because for a video to be controlled by a button you still need it

sep 9, 2025, 9:18 am • 0 0 • view