Native HLS src= can stall before EME license dispatch (Shaka #9794)

GitHub source

Inferred. This page is generated from GitHub Issue #39; GitHub remains the canonical authoring and discussion source.

Local reproduction and solution — 18 November 2026#

Status: Conditional legacy control verified; original pre-license-dispatch root cause remains unverified.

Source and evidence#

Upstream case · local report and evidence · portable reproduction instructions

Observed results are Reproduced only within the stated seam. Implementation explanations remain Inferred, not Apple Confirmed.

Reconstruct the scene#

On the reported Shaka 5.0.4, run the public Axinom MultiKey fixture through native modern EME and through explicit legacy Apple Media Keys on a fresh page.

Modern observes one encrypted event/session/license request and fails with media error 3/3016 before the response returns HTTP 200; legacy plays the same fixture. A separate 4.16.6 modern run stalls after two successful licenses/usable keys; 4.16.6 legacy completes 30 load/play cycles. These have different first-observed boundaries from the original no-license-dispatch report.

Solution / guideline#

Explicit legacy installation before Player construction is a tested conditional workaround for the related public startup failures. Do not adopt the original broad early-attachment patch as a proven native com.apple.fps fix.

All pinned patches and results

Limits / remaining work#

The original 5.0.4 pre-license causal chain and a permanent production patch remain unverified.

This update supersedes earlier no-local-run statements below only within the stated scope. Historical source reports are retained; no unresolved issue is closed by this publication.


Earlier investigation and source history

Verification update — 17 November 2026#

Status: upstream A/B reproduction; working legacy-path workaround, proposed native-path fix not verified. The reporter's Safari 26.3 / Shaka 5.0.4 matrix shows unpatched playback works with PatchedMediaKeysApple but stalls without it. A maintainer's Safari 18.6 matrix also shows working legacy playback.

  • Workaround: explicitly install shaka.polyfill.PatchedMediaKeysApple.install() for integrations that require the legacy FairPlay path, following the supported Shaka tutorial; validate the exact browser/provider combination.
  • Do not adopt the original broad DRM early-attachment patch as a proven solution: both matrices show that proposed patch causes 3016 on the native com.apple.fps path. The reporter acknowledged the regression and proposed narrowing the changes to the polyfill.
  • Scope: upstream #9794 is still open at this review. No merged permanent fix or independent local device reproduction was established. This is a confirmed configuration-specific workaround, not a claim that all Safari native EME playback is fixed.

This update supersedes older statements below about missing fix verification; the historical investigation and prompt are retained.


Investigation (31 October 2026)#

Source: shaka-project/shaka-player#9794

Reported: Shaka 5.0.4 on Safari native HLS src= can stall before FairPlay license dispatch. In a March 12 report, Safari 26.3 emitted encrypted and waitingforkey but no license request; the explicit legacy MediaKeys polyfill worked. A maintainer's March 9 test on Safari 18.6 found that a proposed broad early-attach patch regressed native com.apple.fps on TS single-key and CMAF multi-key fixtures.

First observable boundary: encrypted event → EME message/SPC → KSM HTTP request. A missing request is not evidence of a rejected CKC or KSM failure. Shaka 3016 is a generic video error.

Hypotheses, not confirmed causes: deferred attachMediaKeys_, needWaitForEncryptedEvent, native/legacy key-system mapping, polyfill lifecycle, or Safari-version interaction. Do not recommend the unverified early-attach patch globally.

Diagnostic graph: HLS EXT-X-KEY → native/patched EME choice → MediaKeys creation/attachment → encrypted/waitingforkey → initDataTransform → EME message/SPC → KSM request → CKC → usable key → decode.

Next experiment: Pin Shaka 5.0.4 and exact patch SHA; compare Safari 18.6/26.3/current × native EME/polyfill × TS single-key/CMAF multi-key × baseline/patch. Timestamp requestMediaKeySystemAccess, createMediaKeys, setMediaKeys, encrypted, waitingforkey, message, keystatuseschange, KSM HTTP requests and failures. Identify first divergent transition and reverse it with one controlled change.

Client mitigation: Validate the explicit supported legacy polyfill path on affected browser versions; do not deploy broad early-attachment changes without native-EME regression tests. Keep native AVPlayer/AVContentKeySession behavior separate from Safari/Shaka.

Reusable insight: No license request means investigate the pre-license pipeline before the license server.

Evidence status: Public issue and maintainer A/B observations reviewed; no independent device reproduction or source checkout performed in this run. Root cause remains unverified.

References: