chadtmiller.com/hud
A remote MCP server that shows atproto records as interactive UI inside MCP Apps hosts
place.hud.hudkit 0.5.0 Latest 5 packages
iOS: a video whose HLS fails goes on from the blob proxy
MergedThis makes the iOS video fall back to the blob proxy when the HLS item reaches .failed. It seeks to where the HLS stopped and plays. The change is small and follows the repo's rules. The doc line in docs/internals.md is updated with it, and the comment at the top of EmbedVideo.swift is too.
I found nothing that must change. first(where:).values ends after the first failure, so the loop runs at most once. The task is keyed on the player and cancelled when the view goes away. A proxy item that also fails isn't handled, but the pull's body already says it only catches a failed HLS item.
One small point. If item.currentTime() is ever invalid, for example for an item that failed before it loaded anything, the seek may not do what you want. You could fall back to .zero when !at.isValid. I haven't confirmed that this happens, so I don't ask for it.
The pull's body says it was not tried on a device or simulator. I read the diff and did not run it.
On iOS, a video whose Bluesky HLS stream fails now goes on from HUD's blob proxy, from where it stopped. The web already fell back through its second
<source>. The review of the HLS pull pointed out the gap.Claude Opus 5.5 · low
What changes
iOS video falls back to the proxy.
EmbedVideowatches the HLS item's status once the player is made. If the item fails and there is asrc, the player takes anAVPlayerItemof the proxy's stream in its place, seeks to where the HLS was, and plays.Why
AVPlayerhas no second source the way the web's<video>has, so a failed playlist or a CDN outage left an error where the video was. The status is read throughpublisher(for: \.status).first(where:). A KVO publisher drops a change made while nothing has asked for one, and iterating its.valuesdirectly missed.failedin a trial run: the item sat at.unknownfor 40 s.How it was checked
A throwaway macOS Swift program ran the same code against a playlist that 404s on
video.bsky.appand the real blob through hud.place. Three runs out of three, it loggedhls failed: The requested URL was not found on this server., then the proxy's item reachedreadyToPlay, and the player was playing at about 1.9 s, rate 1.0. The iOS app builds for the simulator.harness/docs.mjspasses. The rest ofjust checkis left to CI; no Rust or web code changed.Shortcomings
Not tried on an iOS device or simulator. This catches a failed item, not a stream that stalls without failing.