dasha 4.0.0-alpha.11 → 4.0.0-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dasha.cjs +2 -2
- package/dist/dasha.mjs +2 -2
- package/package.json +5 -5
package/dist/dasha.cjs
CHANGED
|
@@ -1157,7 +1157,7 @@ var DashExtractor = class DashExtractor {
|
|
|
1157
1157
|
const schemeIdUri = contentProtection.getAttribute("schemeIdUri");
|
|
1158
1158
|
const drmData = {
|
|
1159
1159
|
keyId: contentProtection.getAttribute("cenc:default_KID") || void 0,
|
|
1160
|
-
pssh: contentProtection.getElementsByTagName("cenc:pssh")[0]?.textContent || void 0
|
|
1160
|
+
pssh: (contentProtection.getElementsByTagName("cenc:pssh")[0]?.textContent || void 0)?.trim()
|
|
1161
1161
|
};
|
|
1162
1162
|
if (schemeIdUri?.includes(widevineSystemId)) encryptInfo.drm.widevine = drmData;
|
|
1163
1163
|
else if (schemeIdUri?.includes(playreadySystemId)) encryptInfo.drm.playready = drmData;
|
|
@@ -1165,7 +1165,7 @@ var DashExtractor = class DashExtractor {
|
|
|
1165
1165
|
}
|
|
1166
1166
|
if (streamInfo.playlist.mediaInit) streamInfo.playlist.mediaInit.encryptInfo = encryptInfo;
|
|
1167
1167
|
const segments = streamInfo.playlist.mediaParts[0].mediaSegments;
|
|
1168
|
-
for (const segment of segments) if (!segment.encryptInfo) segment.encryptInfo = encryptInfo;
|
|
1168
|
+
for (const segment of segments) if (!segment.encryptInfo || segment.encryptInfo.method === "unknown") segment.encryptInfo = encryptInfo;
|
|
1169
1169
|
}
|
|
1170
1170
|
const _index = streamInfos.findIndex((item) => item.type === streamInfo.type && item.periodId !== streamInfo.periodId && item.groupId === streamInfo.groupId && (item.type === "video" && streamInfo.type === "video" ? item.width === streamInfo.width && item.height === streamInfo.height : true));
|
|
1171
1171
|
if (_index > -1) if (isLive) {} else if (streamInfos[_index].playlist.mediaParts.at(-1).mediaSegments.at(-1).url !== streamInfo.playlist.mediaParts[0].mediaSegments.at(-1)?.url) {
|
package/dist/dasha.mjs
CHANGED
|
@@ -1131,7 +1131,7 @@ var DashExtractor = class DashExtractor {
|
|
|
1131
1131
|
const schemeIdUri = contentProtection.getAttribute("schemeIdUri");
|
|
1132
1132
|
const drmData = {
|
|
1133
1133
|
keyId: contentProtection.getAttribute("cenc:default_KID") || void 0,
|
|
1134
|
-
pssh: contentProtection.getElementsByTagName("cenc:pssh")[0]?.textContent || void 0
|
|
1134
|
+
pssh: (contentProtection.getElementsByTagName("cenc:pssh")[0]?.textContent || void 0)?.trim()
|
|
1135
1135
|
};
|
|
1136
1136
|
if (schemeIdUri?.includes(widevineSystemId)) encryptInfo.drm.widevine = drmData;
|
|
1137
1137
|
else if (schemeIdUri?.includes(playreadySystemId)) encryptInfo.drm.playready = drmData;
|
|
@@ -1139,7 +1139,7 @@ var DashExtractor = class DashExtractor {
|
|
|
1139
1139
|
}
|
|
1140
1140
|
if (streamInfo.playlist.mediaInit) streamInfo.playlist.mediaInit.encryptInfo = encryptInfo;
|
|
1141
1141
|
const segments = streamInfo.playlist.mediaParts[0].mediaSegments;
|
|
1142
|
-
for (const segment of segments) if (!segment.encryptInfo) segment.encryptInfo = encryptInfo;
|
|
1142
|
+
for (const segment of segments) if (!segment.encryptInfo || segment.encryptInfo.method === "unknown") segment.encryptInfo = encryptInfo;
|
|
1143
1143
|
}
|
|
1144
1144
|
const _index = streamInfos.findIndex((item) => item.type === streamInfo.type && item.periodId !== streamInfo.periodId && item.groupId === streamInfo.groupId && (item.type === "video" && streamInfo.type === "video" ? item.width === streamInfo.width && item.height === streamInfo.height : true));
|
|
1145
1145
|
if (_index > -1) if (isLive) {} else if (streamInfos[_index].playlist.mediaParts.at(-1).mediaSegments.at(-1).url !== streamInfo.playlist.mediaParts[0].mediaSegments.at(-1)?.url) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dasha",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.12",
|
|
4
4
|
"description": "Streaming manifest parser",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
}
|
|
59
59
|
],
|
|
60
60
|
"engines": {
|
|
61
|
-
"node": ">=
|
|
61
|
+
"node": ">=22.16"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@xmldom/xmldom": "^0.9.8",
|
|
65
65
|
"barsic": "^0.2.0",
|
|
66
|
-
"ky": "^1.14.
|
|
67
|
-
"temporal-polyfill": "^0.3.
|
|
66
|
+
"ky": "^1.14.3",
|
|
67
|
+
"temporal-polyfill": "^0.3.2"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@eslint/js": "^9.39.1",
|
|
@@ -77,6 +77,6 @@
|
|
|
77
77
|
"tsdown": "^0.16.1",
|
|
78
78
|
"typescript": "^5.9.3",
|
|
79
79
|
"typescript-eslint": "^8.46.3",
|
|
80
|
-
"vitest": "^4.0
|
|
80
|
+
"vitest": "^4.1.0"
|
|
81
81
|
}
|
|
82
82
|
}
|