mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-04-21 16:31:55 +00:00
Merge pull request #1035 from Sipherdrakon/Sipherdrakon-hidive-pssh-fix
Corrected PSSH parsing for manifests with multiple DRM schemes
This commit is contained in:
commit
8929b26c54
1 changed files with 22 additions and 8 deletions
|
|
@ -153,12 +153,19 @@ export async function parse(manifest: string, language?: LanguageItem, url?: str
|
||||||
['cenc:pssh', 'mspr:pro']
|
['cenc:pssh', 'mspr:pro']
|
||||||
);
|
);
|
||||||
|
|
||||||
if (playlist.contentProtection &&
|
const widevinePssh = extractPSSH(
|
||||||
playlist.contentProtection?.['com.widevine.alpha'].pssh)
|
manifest,
|
||||||
pItem.pssh_wvd = arrayBufferToBase64(playlist.contentProtection['com.widevine.alpha'].pssh);
|
'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed',
|
||||||
|
['cenc:pssh']
|
||||||
|
);
|
||||||
|
|
||||||
|
if (widevinePssh) {
|
||||||
|
pItem.pssh_wvd = widevinePssh;
|
||||||
|
}
|
||||||
|
|
||||||
if (playreadyPssh)
|
if (playreadyPssh) {
|
||||||
pItem.pssh_prd = playreadyPssh;
|
pItem.pssh_prd = playreadyPssh;
|
||||||
|
}
|
||||||
|
|
||||||
ret[host].audio.push(pItem);
|
ret[host].audio.push(pItem);
|
||||||
}
|
}
|
||||||
|
|
@ -228,12 +235,19 @@ export async function parse(manifest: string, language?: LanguageItem, url?: str
|
||||||
['cenc:pssh', 'mspr:pro']
|
['cenc:pssh', 'mspr:pro']
|
||||||
);
|
);
|
||||||
|
|
||||||
if (playlist.contentProtection &&
|
const widevinePssh = extractPSSH(
|
||||||
playlist.contentProtection?.['com.widevine.alpha'].pssh)
|
manifest,
|
||||||
pItem.pssh_wvd = arrayBufferToBase64(playlist.contentProtection['com.widevine.alpha'].pssh);
|
'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed',
|
||||||
|
['cenc:pssh']
|
||||||
|
);
|
||||||
|
|
||||||
if (playreadyPssh)
|
if (widevinePssh) {
|
||||||
|
pItem.pssh_wvd = widevinePssh;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (playreadyPssh) {
|
||||||
pItem.pssh_prd = playreadyPssh;
|
pItem.pssh_prd = playreadyPssh;
|
||||||
|
}
|
||||||
|
|
||||||
ret[host].video.push(pItem);
|
ret[host].video.push(pItem);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue