You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nativeRemoteHLS drops LoadOptions.httpHeaders (AVURLAsset created without AVURLAssetHTTPHeaderFieldsKey) #119
On the nativeRemoteHLS bypass, LoadOptions.httpHeaders is silently ignored: loadRemoteHLS hands the URL to NativeAVPlayerHost.load, which builds the asset as AVURLAsset(url:) with no options dictionary (Sources/AetherEngine/Native/NativeAVPlayerHost.swift, ~line 147).
The path's doc comment says "Jellyfin HLS URL carries auth (ApiKey / PlaySessionId / LiveStreamId) as query params; no extra headers needed" — true for Jellyfin, but nativeRemoteHLS is also the only viable route for generic remote live HLS (IPTV / Stremio TV add-ons), and many of those origins enforce per-stream Referer / User-Agent / Authorization headers declared by the provider (Stremio behaviorHints.proxyHeaders.request). Those channels currently cannot play at all:
FFmpeg ingest path: a remote playlist through the custom AVIOReader has no base URL for relative segment URIs (avformat_open_input runs with url = nil), so remote HLS must use nativeRemoteHLS regardless.
nativeRemoteHLS path: headers are dropped, so header-enforcing origins answer 403/error bodies.
Repro
Any HLS origin that 403s without a Referer (or use a local server that requires one).
(the long-standing key AVFoundation honors for playlist+segment requests), and plumb a headers parameter through NativeAVPlayerHost.load. Worth a doc note either way that httpHeaders currently doesn't apply to nativeRemoteHLS.
Found while wiring IPTV live channels in a host app: streams resolved from a Stremio TV add-on declare User-Agent/Referer per channel; channels whose origins enforce them fail on this path today.
Fixed on main in d8a1525. LoadOptions.httpHeaders now rides into the AVURLAsset on the nativeRemoteHLS path via AVURLAssetHTTPHeaderFieldsKey, plumbed through a new httpHeaders parameter on NativeAVPlayerHost.load (same pattern the audio-only host already used). Loopback callers pass nothing and keep their default asset, so Jellyfin behavior is untouched.
One thing beyond the report: the remote-HLS audio tap (#95) fetches playlists, segments, and AES keys on its own URLSession, so it would have kept 403ing on the same origins. The tap fetcher now sends the same headers.
The stale doc comments (LoadOptions.httpHeaders, the load-site note) are updated too. Please retest with your header-enforcing Stremio channels against main; #120 landed alongside this, so both fixes are in.
Retested on 5.0.1, fixed. I verified it at the wire: a local proxy that 403s unless the exact Referer + User-Agent arrive, fronting a real live HLS master. The player's playlist request came through with both headers and playback started (it couldn't have otherwise, the proxy rejects bare requests). Good catch on the audio-tap fetcher needing the same headers; I wouldn't have noticed that until AI subtitles went quiet on those channels. Thanks, closing.
Activity
fix(native): forward LoadOptions.httpHeaders on the nativeRemoteHLS p…
Merge fix/issue119-remote-hls-http-headers: forward httpHeaders on th…
docs: note httpHeaders forwarding on nativeRemoteHLS and the tap fetc…
superuser404notfound commentedon Jul 10, 2026
Fixed on main in d8a1525.
LoadOptions.httpHeadersnow rides into theAVURLAsseton thenativeRemoteHLSpath viaAVURLAssetHTTPHeaderFieldsKey, plumbed through a newhttpHeadersparameter onNativeAVPlayerHost.load(same pattern the audio-only host already used). Loopback callers pass nothing and keep their default asset, so Jellyfin behavior is untouched.One thing beyond the report: the remote-HLS audio tap (#95) fetches playlists, segments, and AES keys on its own URLSession, so it would have kept 403ing on the same origins. The tap fetcher now sends the same headers.
The stale doc comments (
LoadOptions.httpHeaders, the load-site note) are updated too. Please retest with your header-enforcing Stremio channels against main; #120 landed alongside this, so both fixes are in.chore(release): 5.0.1
superuser404notfound commentedon Jul 10, 2026
Tagged and released: both this fix and #120 shipped in 5.0.1, so you can pin the release tag instead of main for the retest.
dlev02 commentedon Jul 10, 2026
Retested on 5.0.1, fixed. I verified it at the wire: a local proxy that 403s unless the exact Referer + User-Agent arrive, fronting a real live HLS master. The player's playlist request came through with both headers and playback started (it couldn't have otherwise, the proxy rejects bare requests). Good catch on the audio-tap fetcher needing the same headers; I wouldn't have noticed that until AI subtitles went quiet on those channels. Thanks, closing.
fix(hls): reroute live remote-HLS onto the ingest path when video car…
fix(hls): keep credential headers on the host's origin when a playlis…