Add defaultKID opt
This commit is contained in:
2
index.js
2
index.js
@@ -378,7 +378,6 @@ const parseMPDStream = async (mpdUrl) => {
|
|||||||
targetProp: 'subtitles'
|
targetProp: 'subtitles'
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
|
||||||
toParse.forEach(({ rootProp, subProp, targetProp }) => {
|
toParse.forEach(({ rootProp, subProp, targetProp }) => {
|
||||||
try {
|
try {
|
||||||
for (const [key, value] of Object.entries(parsedManifest?.mediaGroups?.[rootProp]?.[subProp])) {
|
for (const [key, value] of Object.entries(parsedManifest?.mediaGroups?.[rootProp]?.[subProp])) {
|
||||||
@@ -400,6 +399,7 @@ const parseMPDStream = async (mpdUrl) => {
|
|||||||
name: `${parsedManifest.playlists?.[i]?.attributes?.RESOLUTION?.width || 'N/C'}x${parsedManifest.playlists?.[i]?.attributes?.RESOLUTION?.height || 'N/C'}`,
|
name: `${parsedManifest.playlists?.[i]?.attributes?.RESOLUTION?.width || 'N/C'}x${parsedManifest.playlists?.[i]?.attributes?.RESOLUTION?.height || 'N/C'}`,
|
||||||
codec: parsedManifest.playlists?.[i]?.attributes?.CODECS,
|
codec: parsedManifest.playlists?.[i]?.attributes?.CODECS,
|
||||||
bandwidth: parsedManifest.playlists?.[i]?.attributes?.BANDWIDTH,
|
bandwidth: parsedManifest.playlists?.[i]?.attributes?.BANDWIDTH,
|
||||||
|
defaultKID: parsedManifest.playlists?.[i]?.contentProtection?.mp4protection?.attributes['cenc:default_KID']?.replaceAll('-', '') || null,
|
||||||
fps: parsedManifest.playlists?.[i]?.attributes?.['FRAME-RATE'],
|
fps: parsedManifest.playlists?.[i]?.attributes?.['FRAME-RATE'],
|
||||||
resolution: {
|
resolution: {
|
||||||
width: parsedManifest.playlists?.[i]?.attributes?.RESOLUTION?.width,
|
width: parsedManifest.playlists?.[i]?.attributes?.RESOLUTION?.width,
|
||||||
|
|||||||
Reference in New Issue
Block a user