geesawra.industries/hydraulophone
An unofficial YouTube Music app for iPhone, iPad, and Mac.
WebM/Opus playback boundary
Historical WebKit implementation notes. As of 2026-09-23, production High uses
native Opus playback, confirmed on
the physical iPhone. This WebKit backend is retained for explicit diagnostic
comparison through -HydraulophoneWebKitOpus.
WebMAudioEngine is the foreground prototype boundary for progressive
High-Opus streams. It uses an isolated, non-persistent WKWebView with one
<audio> element because the current iOS AVPlayer capability probe does not
advertise WebM/Opus while WebKit does.
The page is intentionally static and contains no remote script or native
message bridge. The stream URL is supplied as a typed argument to
callAsyncJavaScript, and the media CSP only permits HTTPS googlevideo.com
hosts. The engine validates the stream URL before loading it, uses the stream
profile's user agent, and never uses login cookies.
This is a foreground prototype, not a background-playback acceptance claim.
WebKit scheduling and media behavior vary by iOS release, and physical-device
background playback has not yet been verified. Validate audio-session,
interruption, route-change, and background behavior on a physical iPhone
before relying on it in a shipping playback path. The normal HLS path remains
the existing AVPlayer path.
High player request behavior
The pinned AuraMusic source is revision
185a77d31733047de06cbec619d40731755a0ec1.
Its YTPlayerUtils.kt
audio path issues the WEB_REMIX player request without
playbackContext.contentPlaybackContext.signatureTimestamp; the helper that
adds the timestamp belongs to its video path. Hydraulophone's authenticated
High flow makes an initial player request to discover the script, extracts its
signature timestamp, then makes one timestamp-aligned player request using the
same session, visitor data, and proof pair. It resolves a ciphered result
locally through the existing adapter. This is an explicit Hydraulophone
adaptation: the unaligned ciphered URL returned HTTP 403, while the aligned
response passed 0%, 65%, and 90% range reads and a WebKit probe that played and
advanced after both far seeks. That evidence supports the adaptation for the
observed response, not a permanent InnerTube guarantee.
When a returned format is ciphered, Hydraulophone decodes the outer
signatureCipher envelope once and updates only the transformed signature and
n query fields. Other encoded URL fields and ordering are retained; a
signature parameter named n is rejected because it collides with the separate
n challenge.
High selects the highest valid Opus candidate returned by the aligned authenticated response, with no AAC-versus-Opus bitrate comparison or arbitrary 200 kb/s floor. This honors the product preference for Opus, including a roughly 135 kb/s Opus result when that is the best available Opus format. It then performs a one-byte media range check before installing the WebKit engine. HTTP 403 causes one fresh proof/player/alignment/range attempt; this bounded retry policy belongs to Hydraulophone. The range check does not prove that WebKit will receive identical headers or decode the full stream.
The bounded foreground diagnostic is just simulator-smoke-high. It verifies
the selected track, High quality, Opus codec, positive advertised bitrate, and observed
clock advancement while pinning the playback request generation. For WebKit
seeks it pins the request and seek generations, then captures whether the target
was buffered inside the JavaScript call immediately before assigning
audio.currentTime; already-buffered targets produce an inconclusive result.
This is playback-level evidence, not a record of the individual HTTP range
responses. The unaligned production canary completed both JNN proof exchanges,
then got HTTP 403 for the media probe on the first and refreshed proof pair. A
separate timestamp-aligned diagnostic used the same proof flow and returned
HTTP 206 at 0%, 65%, and 90%; its WebKit probe played a 272 kb/s Opus stream,
verified the full duration, advanced after both seeks, and completed a short
sustained run. The production resolver now uses that aligned request shape.
The production just simulator-smoke-high canary now resolves and plays the
aligned Opus stream through the shared controller, checks pause/resume, and
switches High→Standard→High. Its early 65% and 90% seeks both advanced, but both
targets were already buffered at assignment, so the canary reports random
access as inconclusive. The separate range diagnostic did verify matching
HTTP 206 ranges at all three positions, but on a different stream resolution.
Repeatable controller playback, same-stream far-range preflight, and
physical-device/background behavior remain open. Diagnostics log only
candidate shape, proof presence, timestamp alignment state, and HTTP status—
never URLs or token values.