mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
fix(m3u): accept standard Base64 ClearKey values (#1575)
* fix(m3u): accept standard Base64 ClearKey values * refactor(release): move M3U fixture generation out of capture driver
This commit is contained in:
1 parent
c952b55da1
commit
93e759e1da
11 files changed
+178
-52
No files matched your search
@@ -16,12 +16,27 @@ const FIXTURE_HOST = 'https://dash-fixture.local';
|
||||
|
||||
const CLEARKEY_KID = '00112233445566778899aabbccddeeff';
|
||||
const CLEARKEY_KEY = 'ffeeddccbbaa99887766554433221100';
|
||||
// Regression for #1466: accept standard Base64 JSON without padding in PWA.
|
||||
const CLEARKEY_LICENSE = JSON.stringify({
|
||||
keys: [
|
||||
{
|
||||
kty: 'oct',
|
||||
kid: Buffer.from(CLEARKEY_KID, 'hex')
|
||||
.toString('base64')
|
||||
.replace(/=+$/, ''),
|
||||
k: Buffer.from(CLEARKEY_KEY, 'hex')
|
||||
.toString('base64')
|
||||
.replace(/=+$/, ''),
|
||||
},
|
||||
],
|
||||
type: 'temporary',
|
||||
});
|
||||
|
||||
const DASH_PLAYLIST = [
|
||||
'#EXTM3U',
|
||||
'#EXTINF:-1 tvg-id="ck-dash" group-title="DASH",ClearKey DASH',
|
||||
'#KODIPROP:inputstream.adaptive.license_type=clearkey',
|
||||
`#KODIPROP:inputstream.adaptive.license_key=${CLEARKEY_KID}:${CLEARKEY_KEY}`,
|
||||
`#KODIPROP:inputstream.adaptive.license_key=${CLEARKEY_LICENSE}`,
|
||||
`${FIXTURE_HOST}/clearkey.mpd`,
|
||||
'#EXTINF:-1 tvg-id="clear-dash" group-title="DASH",Clear DASH',
|
||||
`${FIXTURE_HOST}/clear.mpd`,
|
||||
|
||||
Reference in new issue
Block a user