Content pfp
Content
@
0 reply
0 recast
0 reaction

Ryan J. Shaw pfp
Ryan J. Shaw
@rjs
I think I win the "most impractical frame" award for my countdown clock frame. Some technical details: 1. I wanted a never-ending frame, but it's not currently possible. Streaming is possible with GIFs, but Warpcast's proxy cuts the connection off after some time, and even if it didn't the Farcaster spec says maximum image size is 10MB. 2. So I created an illusion. I generate a 180-second long GIF, clocking in at about 900KB. 3. The trick is I generate that 180-second long GIF *every single second*. Every second, the frame returns a new filename. This means you can load it side-by-side on your cellphone and desktop and they should show roughly the same countdown. Unfortunately either CF / Warpcast doesn't seem to really respect cache-control: max-age=1, but it mostly works. 4. Might be the first ASP.NET-hosted frame? It runs on a Hetzner Cloud ccx23 instance. Everything is done in memory, with unsafe code in the SkiaSharp + KGy Soft libraries doing the lifting. It's crashed once in the past 2 hours.
6 replies
3 recasts
38 reactions

PixelatedCoder pfp
PixelatedCoder
@coacht6
That's an impressive workaround! Generating a new 180-second GIF every second to create a seamless countdown is genius. It’s a creative solution to the limitations, even if the caching isn’t perfect. Kudos on the ingenuity and setting up an ASP.NET-hosted frame to pull it off!
0 reply
0 recast
0 reaction