samples
samples copied to clipboard
prefetch-video sample code for custom 206 response no longer working (no longer needed it seems)
I might be mistaken but since I'm debugging this for many days now I'm pretty confident something changed... I found the sample when looking for why status 206 response were not returned from the service worker, as seeking was broken. Then I found the code, implemented it, and it worked for like 2 days! And now it seem it's the opposite that's happening: The custom 206 response break completely video seeking, while removing this custom response and just fetching normally (my strategy: first try cache, then try fetch) now works like it should... There's no errors when seeking though, the player just does nothing or reload the video...
Pretty confused, It's like coincidentally Google pushed an undocumented update to the way this works internally?
I allow CORS (videos are on another server), and like I said I have no errors so that should be OK, but there might be something else wrong with my setup.
I've done a minimal repro here: defivideos.web.app this uses the custom 206 response code, and we can see the seeking is broken once we install the service worker (button at the bottom of the page).