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
AirPlay: Use en0 WiFi IP address instead of 127.0.0.1 #86
A quick search shows you should be able to identify active network interface using usesInterfaceType(_:) and then use getIFAddresses to get the corresponding IP.
I haven't tested that but seems to be the way forward.
Another unrelated AirPlay caveat: Just mentioning this as I'm sure someone will open an issue in the future about it:
AVPlayer will reject DV/HDR master playlist on SDR receivers device even if "match dynamic range" is enabled. It will not automatically switch.
TV MUST be in HDR or DV mode to accept any non-SDR content via AirPlay.
This should not be an issue as users should leave their Apple TV running in HDR or DV by default. The tvOS UI is mastered in HDR anyway and tvOS does a great job tone mapping SDR to HDR/DV.
My Suggestion: leave it like that, but just document this as a genuine AirPlay limitation. Users are advised to set their Apple TVs to HDR or DV (mine does that by default anyway). The alternative would be to force media playlist routing with AirPlay as a safe universal option (I do recommend this).
Shipped, and verified end to end on iPhone to Apple TV. Implementation follows your suggestions:
HLSLocalServer now binds 0.0.0.0 so the receiver can reach it over the LAN.
While the AVPlayer reports external playback, the engine reloads the loopback over the device's active LAN IP instead of 127.0.0.1 (en* scan: en0/WiFi preferred, wired en* fallback), and forces the media playlist so a DV/HDR master is never handed to an SDR receiver (your second caveat). It reverts to the 127.0.0.1 loopback when AirPlay ends, since loopback is more reliable for local playback.
Because the receiver plays the engine-processed HLS, Dolby Vision / Atmos / subtitles are carried through rather than lost.
Thanks for the precise pointers, including the active-interface and DV/HDR-master caveats. The NWPathMonitor active-interface approach is noted for the both-WiFi-and-Ethernet edge; for now the synchronous en* scan keeps it off the reload path.
I don't use AirPlay much but I'm very curious to try this and see how an "external" avplayer interacts with the engine on the iPhone with things like seeking.
A minor correction to your note, DV/HDR will not be carried through as media playlist routing will make AVPlayer tone map to SDR (even if TV is in HDR or DV mode)
The real choices are:
media playlist: airplay forces SDR for everything regardless of media, receiver capabilities or current TV mode. Safest.
master playlist: HDR & DV will work when receivers are in HDR mode. SDR-locked devices will reject it. Best for HDR TV users.
It is a limitation we'll have to deal with for now as we cannot probe receiver capabilities via AirPlay. I'll you decide which path to take.
In both cases SDR & Atmos work.
Very excited to try Sodalite on my iPhone (assuming its the same TestFlight)!
And hopefully you'll consider allowing local files for easier testing :P (but I understand if you want it to stay strictly Jellyfin)
Activity
DrHurt commentedon Jun 28, 2026
A quick search shows you should be able to identify active network interface using
usesInterfaceType(_:)and then usegetIFAddressesto get the corresponding IP.I haven't tested that but seems to be the way forward.
feat(airplay): serve the loopback HLS over the LAN WiFi IP while AirP…
Merge feat/airplay-lan-host: AirPlay via LAN WiFi IP (#86)
refactor(airplay): pick the active en* interface IP, not just en0 (#86)
Merge feat/airplay-active-interface: active-interface IP for AirPlay (#…
DrHurt commentedon Jun 28, 2026
Another unrelated AirPlay caveat: Just mentioning this as I'm sure someone will open an issue in the future about it:
AVPlayer will reject DV/HDR master playlist on SDR receivers device even if "match dynamic range" is enabled. It will not automatically switch.
TV MUST be in HDR or DV mode to accept any non-SDR content via AirPlay.
This should not be an issue as users should leave their Apple TV running in HDR or DV by default. The tvOS UI is mastered in HDR anyway and tvOS does a great job tone mapping SDR to HDR/DV.
My Suggestion: leave it like that, but just document this as a genuine AirPlay limitation. Users are advised to set their Apple TVs to HDR or DV (mine does that by default anyway). The alternative would be to force media playlist routing with AirPlay as a safe universal option (I do recommend this).
fix(airplay): rebuild loopback URL on LAN IP + media playlist in load…
Merge feat/airplay-lan-media: serve loopback on LAN IP + media playli…
superuser404notfound commentedon Jun 28, 2026
Shipped, and verified end to end on iPhone to Apple TV. Implementation follows your suggestions:
Thanks for the precise pointers, including the active-interface and DV/HDR-master caveats. The NWPathMonitor active-interface approach is noted for the both-WiFi-and-Ethernet edge; for now the synchronous en* scan keeps it off the reload path.
DrHurt commentedon Jun 28, 2026
I don't use AirPlay much but I'm very curious to try this and see how an "external" avplayer interacts with the engine on the iPhone with things like seeking.
A minor correction to your note, DV/HDR will not be carried through as media playlist routing will make AVPlayer tone map to SDR (even if TV is in HDR or DV mode)
The real choices are:
It is a limitation we'll have to deal with for now as we cannot probe receiver capabilities via AirPlay. I'll you decide which path to take.
In both cases SDR & Atmos work.
Very excited to try Sodalite on my iPhone (assuming its the same TestFlight)!
And hopefully you'll consider allowing local files for easier testing :P (but I understand if you want it to stay strictly Jellyfin)
DrHurt commentedon Jun 28, 2026
I see you've added mov_text subs to PIP. Might be worth adding it here as well so text subs get forwarded via AirPlay.
fix(player): keep loopback + master for wired HDMI external display (…
fix(airplay): hold the external-playback edge across the reload it st…
2 remaining items
docs(airplay): the receiver's output mode decides, and in HDR it says…
feat(visionos): support visionOS as a build platform (superuser404not…
fix(subtitles): keep load-declared external subtitles on the remote-H…
feat(subtitles): declare sidecar subtitles as renditions on the remot…
fix(hlsserver): the local origin answers only its own session
fix(server): bound what a peer without the session token can hold, an…
fix(network): the HLS loopback server listens on 127.0.0.1 only
fix(network): the HLS loopback server listens on 127.0.0.1 only
fix(airplay): serve the loopback over the LAN address on macOS too
fix(network): the HLS loopback server listens on 127.0.0.1 only
fix(network): the HLS loopback server listens on 127.0.0.1 only
fix(network): the HLS loopback server listens on 127.0.0.1 only
fix(network): the HLS loopback server listens on 127.0.0.1 only
fix(network): the HLS loopback server listens on 127.0.0.1 only
fix(network): the HLS loopback server listens on 127.0.0.1 only