Add pssh box parsing and expose them in resolveKey

This commit is contained in:
Vanilagy
2026-04-24 19:01:25 +02:00
parent 1d6731e4f6
commit 5ee78c6480
8 changed files with 244 additions and 10 deletions
+5 -2
View File
@@ -352,7 +352,10 @@ using input = new Input({
formats: ALL_FORMATS,
formatOptions: {
isobmff: {
resolveKeyId: ({ keyId }) => {
resolveKeyId: ({ keyId, psshBoxes }) => {
// psshBoxes contains Protection System Specific Header boxes
// relevant to this key ID. They can be used to obtain a
// decryption key from a DRM license server.
const key = keyMap.get(keyId);
if (!key) {
throw new Error('Unknown key ID.');
@@ -367,4 +370,4 @@ using input = new Input({
## Subtitles
Reading subtitles from HLS playlists is not currently supported. Sorry!
Reading subtitles from HLS playlists is not currently supported. Sorry!