Local reproduction and solution — 18 November 2026#
Status: Actual receiver handoff reproduces 6006; conditional legacy workaround verified.
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#
Use Safari 26.3.1, Shaka 4.16.11, the official public Axinom SingleKey fixture and the same paired Apple TV. Start local playback, then select the receiver through Safari’s native AirPlay picker.
Modern EME emits 6006 twice after handoff; controls later remain paused at the approximately 16 s handoff position. Legacy has no Shaka/media errors in the 30 s wireless capture, advances about 19.876 s after initial delay, and native controls continue beyond 1:22. Returning to Mac preserves a later position. The advancing currentTime in the failed modern run was a false-positive verifier signal, now explicitly corrected.
Solution / guideline#
On a fresh page, call shaka.polyfill.PatchedMediaKeysApple.install() before constructing/configuring the Player, with provider-compatible certificate/SPC/CKC handling. Recreate the page between modern/legacy cells. This is a tested conditional workaround, not a permanent Shaka/OS root-cause patch.
Modern failure · legacy handoff
Limits / remaining work#
One tested browser/asset/receiver combination. Receiver firmware, independently captured television frame/audio output, iPhone and native AVPlayer 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: reproduced upstream; confirmed workaround, permanent OS fix unresolved. A maintainer reproduced the Safari 26.1 failure, and a reporter confirmed legacy Apple Media Keys avoids it.
- Workaround: use the legacy Apple Media Keys path, following Shaka's FairPlay integration instructions, and validate local playback plus AirPlay handoff with the intended provider/receiver. Keep this classified as a workaround rather than a merged Shaka root-cause fix.
- Version caveat: the claim that iOS 26.2.1 fixed it is contradicted by a later report that modern EME still fails on 26.3. Do not mark all newer Safari builds fixed or attribute the result to WebKit PR #57064 without causal/release evidence.
- Scope: upstream reproduction/workaround reports rechecked; no local device/AirPlay test performed here.
This update supersedes older statements below about missing fix verification; the historical investigation and prompt are retained.
Primary report: shaka-project/shaka-player#9491 (opened 10 December 2025). Status: published evidence review, root cause not independently verified.
Symptom and evidence#
Shaka Player 4.16.11, Safari on iOS/macOS 26.1: FairPlay HLS plays locally, but switching to AirPlay fails with Shaka 6006 FAILED_TO_GENERATE_LICENSE_REQUEST and browser NotSupportedError: The operation is not supported. The reporter reproduced using Shaka demo's Tears of Steel (HLS AVC - FairPlay - SingleKey). The reported call stack ends in drm_engine.js; this does not identify the exact browser API rejecting the operation.
Maintainer avelad reported reproducing the failure and attributed it to Safari 26.1, later reporting the same behavior on iOS 26.2. Another user reported successful workaround using legacy Apple Media Keys. A maintainer subsequently wrote “Fixed on 26.2.1,” but a later commenter reported continued failure on 26.3. These are conflicting observations, not proof of a universal OS fix.
Evidence:
- Reporter and maintainer discussion: shaka-project/shaka-player#9491
- Legacy FairPlay integration: https://github.com/shaka-project/shaka-player/blob/main/docs/tutorials/fairplay.md
- Suggested but unverified related WebKit PR: WebKit/WebKit#57064
Causal boundary#
Local FairPlay HLS playback succeeds
-> user requests AirPlay route
-> output route / protected media session transition
-> EME session/key operation (exact API UNKNOWN)
-> NotSupportedError
-> Shaka error 6006
-> remote playback does not start
First observed failure boundary: an unsupported operation in the EME/license-request path during AirPlay handoff. It is not established that a license HTTP request was sent, that the KSM rejected an SPC, or that CKC decoding failed. Shaka 6006 names an application error category; it is not a decoded AVFoundation/CoreMedia root cause.
Competing explanations#
- Route-dependent modern EME capability/operation restriction: supported by the reporter's modern-vs-legacy comparison, but exact rejected API and OS implementation are unknown.
- Shaka lifecycle issue on route transition: not excluded without source-level event/call-stack instrumentation and independent browser reproduction.
- AirPlay receiver DRM compatibility, key availability, or HDCP requirement: not excluded without route/device and key-status evidence.
- KSM/network failure: less directly supported because the observed error is an unsupported-operation exception; must still verify whether license dispatch occurred.
Controlled client-only investigation#
- Pin exact Shaka build, Safari/iOS/macOS build, AirPlay receiver model/tvOS version, asset hash, key-system configuration and chosen route.
- Record monotonic timestamps for
encrypted,message,keystatuseschange,waitingforkey,webkitcurrentplaybacktargetiswirelesschangedwhere supported, remote playback events where supported,setMediaKeys,createSession,generateRequest,update, and promise rejections (do not assume all APIs exist). - Capture sanitized manifest
EXT-X-KEY/KEYFORMAT, SPC/CKC metadata only, HTTP status/timing, session identity, key statuses and receiver route. - A/B test modern
com.apple.fpsvs explicitly installed legacyPatchedMediaKeysApplewith identical asset and receiver. Also compare clear HLS, local playback, different receiver models, and exact OS builds. Repeat ≥10 times per cell. - Inspect pinned Shaka DRM engine and relevant verified WebKit source. For WebKit PR #57064, verify actual diff, commit and release integration before claiming causation. WebKit source is not AVPlayer source.
- Independently test native AVPlayer with the same authorized FairPlay asset and AirPlay receiver; log
AVContentKeySessionDelegate, item error/access logs, route changes and fullNSErrorchains. Do not assume Safari and native AVPlayer share the same key-session implementation.
Success criterion: reproduce failure, identify exact first rejected API or internal transition, reverse outcome with one controlled intervention, and falsify alternate causes.
Client-only mitigation#
For affected Safari builds, validate legacy Apple Media Keys configuration as a conditional compatibility workaround, not a universal fix. Provide an actionable UI fallback to local playback if AirPlay negotiation fails. Never automatically retry license acquisition indefinitely. CDN/KSM or packaging changes are separate proposals, not client-only fixes.
Reusable insight#
Local FairPlay success does not guarantee remote-route FairPlay capability. Treat output-route changes as a separate DRM state transition; distinguish browser API rejection, license dispatch, key usability, receiver compatibility and actual protected decoding.
Publication-ready conclusion#
The public evidence supports a Safari modern-EME/AirPlay interoperability failure, reproduced by a Shaka maintainer, with a reported legacy-keys workaround. The exact underlying WebKit/AVFoundation root cause and OS-version fix status remain unresolved.
Extended investigation prompt#
Show the full second-AI investigation prompt
ROLE: Senior iOS/tvOS reverse engineer, AVFoundation/CoreMedia investigator, WebKit EME source analyst, HLS protocol engineer and FairPlay DRM security specialist.
CASE: https://github.com/shaka-project/shaka-player/issues/9491
Investigate FairPlay HLS playing locally but failing on AirPlay handoff with Shaka 6006 and NotSupportedError on Safari iOS/macOS 26.1. Examine conflicting claims: legacy Apple Media Keys works; 26.2.1 fixed vs 26.3 still fails. Candidate WebKit PR https://github.com/WebKit/WebKit/pull/57064 is NOT verified causal evidence.
GOAL: Find the FIRST PROVEN causal divergence, not the final error code.
EVIDENCE HIERARCHY (strict):
T1: Apple Developer Documentation, FairPlay Streaming SDK, Apple HLS Authoring Specification, WWDC/Apple engineer statements, W3C EME and applicable RFC/ISO contracts.
T2: Pinned Shaka and verified WebKit source, Apple open-source code, symbolicated AVFoundation/CoreMedia/CFNetwork diagnostics, verified security research. For each source claim: repository, commit SHA, file, function, exact line range, control flow. Never equate WebKit with native AVPlayer.
T3: Byte-verified manifests/segments, captured route-change timelines, reproducible physical-device A/B tests, authorized sanitized KSM metadata.
T4: Hypotheses explicitly marked UNVERIFIED.
For every important claim provide source, tier, observed evidence, counterevidence, confidence and falsification test. No fabricated source lines, tests or undocumented error meanings.
TRACE: Local playback -> AirPlay route selection -> browser EME/key session lifecycle -> exact rejected operation -> SPC generation -> license HTTP -> KSM -> CKC -> usable key -> receiver protected decoding. Record the exact first missing or failing transition. Capture promise rejection stacks, EME event timing, key-system choice, key status, Shaka DRM engine events, HTTP statuses, AirPlay route/device, OS build and receiver firmware. Never log keys, SPC/CKC payloads, credentials or certificates.
ANALYZE: HLS EXT-X-KEY, KEYFORMAT, SKD URI identity and encryption scheme; pinned Shaka DRM source; WebKit source and PR #57064 (verify merge/release linkage); modern com.apple.fps versus legacy PatchedMediaKeysApple; AirPlay receiver capabilities; clear-vs-protected controls. Independently test native AVPlayer/AVContentKeySession without extrapolating Safari behavior.
EXPERIMENT: Hold asset, receiver, network and app constant. Change one factor at a time: modern/legacy EME, AirPlay on/off, OS builds, receiver models, Shaka versions. Repeat trials and preserve anonymized raw evidence. Separate actual measured outcomes from third-party reports.
ROOT CAUSE only if reproducible, first divergent operation established, controlled intervention reverses it and alternatives are falsified. Otherwise state 'AIRPLAY FAIRPLAY EME HANDOFF FAILURE; ROOT CAUSE UNVERIFIED.'
DELIVER: Executive finding; evidence ledger; authoritative contracts; manifest/key map; successful/failing timeline; first divergence; pinned Shaka/WebKit source analysis; AVFoundation independent comparison; competing hypotheses; experiment results; client-only mitigations; separately labeled CDN/KSM proposals; regression tests; unknowns; exact source URLs; and a publication-ready technical article. Never claim experiments you did not run.