Ask iOS for the playback audio session on a page with a video #14

Merged
thatguygriff merged 1 commits from video-audio-session-on-ios into main 2026-09-03 00:56:05 +00:00
Owner

Fixes #13.

The TikTok adapter is innocent. Every rendition TikTok offers for that post carries a
full stereo AAC track — enabled, the full 85.3s, audio_bit_rate: 64139 — and decoding
one with afconvert gives real audio (RMS 5423, peak near full scale). The /m/ proxy
returns correct 206s with content-range and accept-ranges, and the markup sets no
muted. Playing the page as served and tapping the output with a Web Audio analyser
measures peak 0.97 in WebKit and 0.96 in Chromium.

iOS is what silences it. A video playing inline gets the "ambient" audio session,
which the Ring/Silent switch mutes — so the post plays perfectly and says nothing, and
only going fullscreen gets the sound back. Nothing about it is platform-specific;
every video on the site is affected on an iPhone, TikTok was just the link that got
tried.

Claiming the playback session says what is true of this page: the sound is the point,
not decoration. It is declared only where there is a video, so an ordinary text post
never claims it, and the session activates when something plays rather than on load, so
it interrupts nothing on a page nobody presses play on.

Verified in WebKit: a post page with a video reports type: "playback", the index page
stays at auto, no page errors, and the audio still measures loud through the proxy.
npm run typecheck clean, 140/140 tests pass.

No test — public/app.js is not importable without a DOM, and browsers.js is the only
public file structured for one.

🤖 Generated with Claude Code

https://claude.ai/code/session_01B3RUMiXa6eAW3okw9nB9NF

Fixes #13. The TikTok adapter is innocent. Every rendition TikTok offers for that post carries a full stereo AAC track — enabled, the full 85.3s, `audio_bit_rate: 64139` — and decoding one with `afconvert` gives real audio (RMS 5423, peak near full scale). The `/m/` proxy returns correct 206s with `content-range` and `accept-ranges`, and the markup sets no `muted`. Playing the page as served and tapping the output with a Web Audio analyser measures **peak 0.97 in WebKit** and 0.96 in Chromium. iOS is what silences it. A video playing *inline* gets the "ambient" audio session, which the Ring/Silent switch mutes — so the post plays perfectly and says nothing, and only going fullscreen gets the sound back. Nothing about it is platform-specific; every video on the site is affected on an iPhone, TikTok was just the link that got tried. Claiming the `playback` session says what is true of this page: the sound is the point, not decoration. It is declared only where there is a video, so an ordinary text post never claims it, and the session activates when something plays rather than on load, so it interrupts nothing on a page nobody presses play on. Verified in WebKit: a post page with a video reports `type: "playback"`, the index page stays at `auto`, no page errors, and the audio still measures loud through the proxy. `npm run typecheck` clean, 140/140 tests pass. No test — `public/app.js` is not importable without a DOM, and `browsers.js` is the only public file structured for one. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01B3RUMiXa6eAW3okw9nB9NF
thatguygriff added 1 commit 2026-09-03 00:07:26 +00:00
Ask iOS for the playback audio session on a page with a video
CI / Typecheck, test, build (pull_request) Successful in 12s
4c78ce8a27
A TikTok post played perfectly and said nothing on an iPhone. The file was
not the problem: every rendition TikTok offers for it carries a full AAC
track, and the page as served measures loud audio in WebKit and Chromium
alike, straight through the /m/ proxy.

iOS is the problem. A video playing inline gets the "ambient" audio session,
which the Ring/Silent switch mutes; only going fullscreen gets the sound
back. Claiming "playback" says what is true of this page -- the sound is the
point, not decoration -- and the switch stops applying.

Declared only where there is a video, so an ordinary text post never claims
it, and the session activates when something plays rather than on load, so
it interrupts nothing on a page nobody presses play on.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01B3RUMiXa6eAW3okw9nB9NF
thatguygriff merged commit 05455a86da into main 2026-09-03 00:56:05 +00:00
thatguygriff deleted branch video-audio-session-on-ios 2026-09-03 00:56:05 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Unsupervised/antisocial#14