fix(hls): bridge a FairPlay playlist whose clear part has a METHOD=NONE tag and its own init segment

This commit is contained in:
imSp4rky
2026-12-01 18:32:31 -07:00
parent f680df7eff
commit e0880812d5
4 changed files with 121 additions and 10 deletions
+6 -2
View File
@@ -483,7 +483,10 @@ these conditions are true:
- The track has no DRM object.
- Every `EXT-X-KEY` of its media playlist is `SAMPLE-AES` or `SAMPLE-AES-CTR` for a DRM system
unshackle cannot license.
unshackle cannot license, or `METHOD=NONE`. A segment under `METHOD=NONE` must have an init segment
that no encrypted segment uses: a decrypter that reads the encrypted init segment decrypts the clear
samples too. A tag with `KEYFORMAT="identity"`, or with no `KEYFORMAT`, names no DRM system: each
encrypted segment also needs a tag of a DRM system.
- The configured CDM is a PlayReady or Widevine CDM.
- The init segment (`EXT-X-MAP`) of the track names a key ID in its `tenc` box. When the `tenc` key ID is all
zeros, the playlist must have one key URI, and each init segment under the key tag must give the same
@@ -510,7 +513,8 @@ on the track:
by the key ID, not with one that checks a header a packager signed. A platform can issue the
content key of one package of a title and refuse another. When a track carries a Widevine or PlayReady DRM
object and every `EXT-X-KEY` of its playlist is `SAMPLE-AES` or `SAMPLE-AES-CTR` for a key system
unshackle cannot license, `HLS.drop_unsupported_keys` removes the tags from the parsed playlist.
unshackle cannot license, or `METHOD=NONE` under the same condition, `HLS.drop_unsupported_keys` removes the
tags from the parsed playlist.
The download then licenses and decrypts the track with the DRM object of the track. This works for
one content key per track: the key changes of the playlist go with the tags. This limit also
applies to a DRM object that the download builds. Any other track stops with