geesawra.industries/hydraulophone
An unofficial YouTube Music app for iPhone, iPad, and Mac.
0
0
# Native audio-only HLS
## Decision and evidence
Use native AVPlayer HLS when the selected player profile provides an audio-only
rendition. Keep delivery (`hls` or `progressive`) separate from the stable song
ID and duration metadata. No decoder library, transcoder, download feature, or
local HTTP server was added.
The decisive request prerequisite is documented in [visitor-context.md](visitor-context.md).
It follows AuraMusic commit `185a77d31733047de06cbec619d40731755a0ec1`,
particularly its anonymous visitor bootstrap and per-profile client context.
HLS selection is an intentional Hydraulophone/iOS choice, not a port of the
Android Media3 demuxer.
The 2026-09-22 simulator returned a VISIONOS master with 16 video variants and
two independent audio groups. The application selects an audio rendition URI,
never the video master. Native playback provided correct full duration and
working unbuffered 65%/90% seeks, unlike the progressive-MP4 loader checkpoint.
## Quality is distinct from delivery
- Current fixed default: the highest advertised audio bandwidth.
- YouTube audio-group tags can omit BANDWIDTH. The observed HLS IDs `233`
(~48 kb/s HE-AAC) and `234` (~128 kb/s AAC-LC) have an isolated protocol
fallback in the HLS adapter, so a missing number does not select the first,
lowest-quality group.
- Format descriptions are independently documented in this
[YouTube format reference](https://gist.github.com/MartinEesmaa/2f4b261cb90a47e9c41ba115a011a4aa)
and the [234/140 container comparison](https://hydrogenaud.io/index.php/topic,126346.0.html).
These are unofficial observations, not a YouTube API guarantee.
- 128 kb/s HLS must not be labelled equivalent to official-app 256 kb/s High.
The owner wants a ~256 kb/s path even if it uses another delivery/container.
- Future user preferences must distinguish fixed Low/High from adaptive Auto.
Fixed settings choose a rendition and retain it through seeks. Auto requires
an actual audio-only adaptive choice; do not mislabel a fixed low rendition
as Auto or silently change the user's setting after a seek.
## Transport, credentials, and limitations
The Core transport fetches master and selected media playlists with the same
five approved profile headers used for media probes. Bodies are bounded to
512 KiB, and each advertised media/key/map URL is checked for HTTPS, approved
media hosts, and absence of embedded credentials. Only finite VOD playlists
are currently supported. URLs and playlist bodies stay in memory.
Native AVPlayer receives the selected rendition, its profile user agent, an
explicit empty cookie list, and precise-duration preference. It does not
receive authentication cookies, Authorization, delegated identity, or visitor
headers. AVPlayer owns subsequent HLS buffering and segment requests.
Important boundary: initial playlist/resource URL validation is ours, while
subsequent native HLS redirects use AVFoundation/ATS. The custom URLSession
redirect delegate does not intercept AVPlayer's internal segment requests.
Do not claim per-hop application host enforcement for that native path.
The existing progressive loader remains separate with its explicit header,
range, and redirect policy. It must not receive a master playlist or pretend
that a partial read is EOF. Broader HLS variants, live playlists, DRM, and
physical-device/background behavior remain outside this acceptance result.
## Scrubbing
The view owns only a temporary drag preview. It sends one seek intent on
release; accessibility adjustments remain discrete intents. The playback
controller cancels superseded seeks, guards completions by generation, and
holds a pending target until the current native clock reaches it. Delayed
periodic-callback timestamps cannot overwrite a newer seek.