feat(drm): license a plugin DRM at the licence step and over --remote with the client's plugin device

This commit is contained in:
imSp4rky
2026-12-03 15:51:42 -07:00
parent f1f91a7d5c
commit 0536056ed6
24 changed files with 803 additions and 136 deletions
+12 -4
View File
@@ -1074,8 +1074,10 @@ def every_drm() -> list:
def local_plugin_drm() -> CustomDRM:
"""A plugin DRM that a device licensed: its content key and its ticket never leave the machine."""
drm = CustomDRM("example", kids=[VIDEO_KID], display_id="EXAMPLE-1", data={"ticket": "server only"})
"""A plugin DRM that a device licensed: its ticket crosses as licence data, its content key and its other data never do."""
drm = CustomDRM(
"example", kids=[VIDEO_KID], display_id="EXAMPLE-1", data={"ticket": VIDEO_KID.hex, "secret": "server only"}
)
drm.content_keys[VIDEO_KID] = VIDEO_KEY
return drm
@@ -1085,7 +1087,13 @@ def test_rest_drm_of_each_system(example_plugins: None) -> None:
assert serialize_drm(drm) == [
*REST_VIDEO["drm"],
{"type": "other", "kids": [], "label": "OTHER", "data": {"key": HELD_KEY.hex()}},
{"type": "example", "kids": [VIDEO_KID.hex], "label": "EXAMPLE", "display_id": "EXAMPLE-1"},
{
"type": "example",
"kids": [VIDEO_KID.hex],
"label": "EXAMPLE",
"display_id": "EXAMPLE-1",
"data": {"ticket": VIDEO_KID.hex},
},
{
"type": "clearkeyctr",
"key": HELD_KEY.hex(),
@@ -1129,7 +1137,7 @@ def test_reconstruct_rest_drm(example_plugins: None) -> None:
"label": "EXAMPLE",
"kids": [VIDEO_KID.hex],
"display_id": "EXAMPLE-1",
"data": {},
"data": {"ticket": VIDEO_KID.hex},
},
{"class": "ClearKeyCTR", "kids": [], "content_keys": {}},
]