Commit c41e5e1
fix(network): advertise 127.0.0.1 instead of localhost in playlist URL
Build 122 overlay showed AVPlayer in `timeControlStatus=waitingToPlay
reason=AVPlayerWaitingWhileEvaluatingBufferingRateReason` but zero
`[HLSLocalServer] conn state=…` lines, even though that handler now
fires the moment any TCP connection arrives at the listener
(`.preparing` / `.ready` / `.failed` / `.cancelled`). The only way
that's consistent: AVPlayer never actually opens a socket to
localhost:port. It's hanging upstream of TCP, on hostname
resolution.
The original comment claimed `localhost` was needed for tvOS ATS
to treat the connection as exempt without a per-domain plist
entry. That's moot on the consumer side: Sodalite's Info.plist
already has both `NSAllowsArbitraryLoads` and
`NSAllowsLocalNetworking`, so any HTTP loopback is allowed
regardless of host form. The IP literal `127.0.0.1` sidesteps
the DNS / nsswitch / /etc/hosts resolution path AVKit appears to
hang in.
If this lands the connection, the next overlay screenshot will
show the burst of `[HLSLocalServer] conn state=ready` plus a
`GET /master.m3u8` line within a frame of `play()`. If AVPlayer
still hangs after this we know DNS wasn't the cause and can
chase the next suspect (codec-string strictness, asset
pre-flight) without DNS muddying the signal.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 5f22c59 commit c41e5e1
1 file changed
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
116 | 129 | | |
117 | 130 | | |
118 | 131 | | |
119 | | - | |
| 132 | + | |
120 | 133 | | |
121 | 134 | | |
122 | 135 | | |
| |||
0 commit comments