vibeapp.win

How it works

Safari needs a 206, and Pages does not send one: playing a steam film from a blob

Cloudflare Pages answered a Range request with 200 and the whole file, and Safari needs a 206 to play video. So the kokkekunst.no front page fetches its 0.3 MB steam film and plays it from a blob. Three minutes later another commit fixed the loop, which stopped on the last frame when the film played from the blob.

The kokkekunst.no front page shows a photo of a kitchen pass, with a pot behind it. On 15 November 2026 the photo got a short, silent film of steam rising from the pot. The changelog gives the file size as 0.3 MB. The site only loads the film after the page has finished loading. Readers who have asked their phone for less motion or for data saving get the still photo, as before.

To get the film playing, we needed two commits about three minutes apart. The first worked around how Cloudflare Pages answers Range requests. The second fixed a problem the first one caused.

How the film is wired

The film lives in one component on the site. In short:

  • The <video> element has no src when the page loads. The film’s address sits in a data attribute.
  • A small inline script waits for the page’s load event. It returns early if the reader prefers reduced motion or has data saving on.
  • When the video fires playing, the script adds a class that fades the film in over the photo. That way you never see a black box waiting for the video.
  • Without JavaScript you just get the photo.

The film runs in all six versions of the front page: the four seasons, plus the Christmas and Easter scenes added the same day.

The first version set the video’s src straight to the file’s address and called play(). The session notes also record a check in headless Edge, driven over the Chrome DevTools Protocol, though they don’t say exactly when it was run relative to the fix below. The film played and looped. With the reduced-motion flag forced on, the video got no src at all.

The trap: 200 instead of 206

Browsers usually don’t fetch a video in one go. They ask for byte ranges with a Range header, and a server that supports this replies 206 Partial Content with just those bytes. Safari is strict about this. If the server doesn’t answer a range request with 206, Safari won’t play the video.

Claude measured how Cloudflare Pages behaves on 15 November. A request with Range: bytes=0-1 got a 200 back with the whole file, not a 206. The session notes describe what that meant: Edge played the film fine, but on an iPhone it would never have started. The steam would have been missing for every iPhone visitor.

The fix: fetch the file, play a blob

The first commit changed the start function. It no longer points the video at the address. Instead it:

  1. calls fetch on the film’s address,
  2. throws if the response isn’t OK, so an error status never turns into a broken video,
  3. reads the body as a blob,
  4. sets the video’s src to an object URL made from that blob, then calls play().

Any failure along the way is caught and ignored. If the fetch fails, the reader keeps the still photo, which is the same fallback as with reduced motion.

A blob URL points at data the browser already holds in memory. When Safari asks for a byte range, the browser answers from memory, and the server’s range handling no longer matters. The cost is that the browser downloads the whole file before playback starts. The code comment gives the reason that’s acceptable: at 0.3 MB the file is small enough to fetch whole. That trade wouldn’t hold for a long or heavy video. For a short loop it does.

The notes are open about one gap: the fix was not tested in a real Safari, because we don’t have one here. It rests on the measured Pages response and on what Safari is known to require. It hasn’t been seen working on an iPhone.

The follow-up: loop stopped on the last frame

The second commit landed at 12:37:56, about three minutes after the blob fix. Its message says the film now rewinds itself, because the loop attribute stopped on the last frame when the film played from a blob. The code comment says this was measured in Edge.

So the steam rose once and then froze. With the blob workaround, which Claude wrote, the loop attribute alone was not enough.

The fix doesn’t depend on loop. It adds a listener for the video’s ended event that sets currentTime back to 0 and calls play() again. As elsewhere in the script, a rejected play() promise is caught and ignored. The film now restarts itself however the browser handles loop on a blob source.

The material doesn’t say why loop behaves differently with a blob in Edge, and we won’t guess here. What’s recorded is the observation and the workaround.

Before the film: two that didn’t work

The session notes also list the films that were thrown out before this one:

  • Kling 3.0 Omni, given the same start and end frame, produced a still image with no movement.
  • Kling and Seedance, at five seconds, put the steam over the empty plate rather than the pot.

The notes also say the film was graded to the same strength as the photo, so the fade-in doesn’t come out brighter than the image underneath.

What we take from it

  • Edge playing a video proves nothing about Safari. Edge played the film fine while Pages answered a range request with 200.
  • Check what the host actually sends. Cloudflare Pages served the file, just not the way Safari needs. A one-line Range: bytes=0-1 request showed it.
  • A workaround can change other behavior. Moving to a blob was aimed at Safari, and in Edge, where the film had played fine before, the loop then stopped on the last frame. The fix for that landed about three minutes later.
  • Write down what wasn’t tested. “Not tested in real Safari” is in the notes and in this post, because it’s still true.