VersionControl:PRs/magenta/438

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Revision as of 15:12, 11 November 2026 by DrivingThatTrain (talk | contribs) (cryptograss/magenta#438, as GitHub has it)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
magenta#438: An iPhone plays a release with Safari's own HLS, not hls.js
State 🟣 merged 2026-11-11 15:12:47
Worked on by magent, skyler, justin
Moods #uploads-and-embeds, #general
Deploy redeploy maybelle (magenta)
Branch magent/iphone-native-hls → main, by magent-cryptograss
Opened · last pushed 2026-11-08 18:51:54 · 2026-11-08 18:51:49
On Skyler's iPhone 17, releases played sound over a black picture, and then showed "This browser can't play it here" with the video gone.

**Why:** both players (`moods.html`'s `attachRelease` and the tiding page's `attach`) were meant to use Safari's own HLS on iOS ("iOS: the browser's own"). They checked `'MediaSource' in window || 'ManagedMediaSource' in window`. iOS 17.1 added ManagedMediaSource, so iPhones started going through hls.js 1.7.3 instead. There, the combined Opus+AV1 buffer was refused: hls.js fell back to the sound alone, or failed with a media error, which removes the video.

**Change:** only classic `MediaSource` sends a release to hls.js. An iPhone has none, so it gets `master.m3u8` natively, and Safari picks the rendition. iPads and desktop Safari have classic MediaSource and keep hls.js and its quality bar.

**Checked:** in Chromium on production's tiding page, faking an iPhone (no `MediaSource`, a `ManagedMediaSource`, native HLS). As deployed now, the video element is removed. With this change, the video's `src` is `master.m3u8` and hls.js isn't used. Not checked on a real iPhone: Skyler, opening `master.m3u8` straight in Safari will show whether Safari's own player gives a picture. PickiPedia's Release page player has the same hls.js-first order and needs the same change if this works.

Deploy: redeploy maybelle (magenta)
Worked on by: magent, Skyler and Justin, in #uploads-and-embeds and #general