fix(hls): refuse key tags the DRM of the track cannot decrypt

This commit is contained in:
imSp4rky
2026-11-29 22:07:43 -07:00
parent ba2911056d
commit f0163439d4
5 changed files with 123 additions and 26 deletions
+2 -2
View File
@@ -128,8 +128,8 @@ def hls_key_drm(key: Any, kid: UUID | None = None) -> Widevine | PlayReady | Non
def drm_stub(drm_type: str, kid_hexes: list[str]) -> Widevine | PlayReady:
"""A PlayReady (``drm_type`` ``playready``) or else Widevine DRM that names ``kid_hexes``, for content keys got without a PSSH.
The header is built here and holds the key ids and nothing a packager signed. A licence server that goes by
the key ids answers its challenge, so a service can also license through it; one that checks the header does not.
The header is built here: a PlayReady one holds the first key id, a Widevine one every key id, and nothing a
packager signed. A licence server that goes by the key ids answers its challenge; one that checks the header does not.
"""
from unshackle.core.drm.playready import PlayReady
from unshackle.core.drm.widevine import Widevine