mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-01-11 20:10:20 +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']
|
||||
);
|
||||
|
||||
if (playlist.contentProtection &&
|
||||
playlist.contentProtection?.['com.widevine.alpha'].pssh)
|
||||
pItem.pssh_wvd = arrayBufferToBase64(playlist.contentProtection['com.widevine.alpha'].pssh);
|
||||
const widevinePssh = extractPSSH(
|
||||
manifest,
|
||||
'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed',
|
||||
['cenc:pssh']
|
||||
);
|
||||
|
||||
if (widevinePssh) {
|
||||
pItem.pssh_wvd = widevinePssh;
|
||||
}
|
||||
|
||||
if (playreadyPssh)
|
||||
if (playreadyPssh) {
|
||||
pItem.pssh_prd = playreadyPssh;
|
||||
}
|
||||
|
||||
ret[host].audio.push(pItem);
|
||||
}
|
||||
|
|
@ -228,12 +235,19 @@ export async function parse(manifest: string, language?: LanguageItem, url?: str
|
|||
['cenc:pssh', 'mspr:pro']
|
||||
);
|
||||
|
||||
if (playlist.contentProtection &&
|
||||
playlist.contentProtection?.['com.widevine.alpha'].pssh)
|
||||
pItem.pssh_wvd = arrayBufferToBase64(playlist.contentProtection['com.widevine.alpha'].pssh);
|
||||
const widevinePssh = extractPSSH(
|
||||
manifest,
|
||||
'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed',
|
||||
['cenc:pssh']
|
||||
);
|
||||
|
||||
if (playreadyPssh)
|
||||
if (widevinePssh) {
|
||||
pItem.pssh_wvd = widevinePssh;
|
||||
}
|
||||
|
||||
if (playreadyPssh) {
|
||||
pItem.pssh_prd = playreadyPssh;
|
||||
}
|
||||
|
||||
ret[host].video.push(pItem);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue