dasha 4.5.0 → 4.5.1
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/index.mjs +2 -13
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1888,7 +1888,6 @@ var SegmentedMediabunnyInput = class SegmentedMediabunnyInput extends Input$1 {
|
|
|
1888
1888
|
//#endregion
|
|
1889
1889
|
//#region src/dash/dash-segmented-input.ts
|
|
1890
1890
|
const roundToDivisor = (value, multiple) => Math.round(value * multiple) / multiple;
|
|
1891
|
-
const isEncryptedSamplesError = (error) => error instanceof Error && error.message.startsWith("Encrypted media samples encountered");
|
|
1892
1891
|
const binarySearchLessOrEqual = (array, value, getValue) => {
|
|
1893
1892
|
let left = 0;
|
|
1894
1893
|
let right = array.length - 1;
|
|
@@ -2153,12 +2152,7 @@ var DashSegmentedInput = class {
|
|
|
2153
2152
|
if (!firstSegment) return null;
|
|
2154
2153
|
const track = await this.getTrackForSegment(firstSegment);
|
|
2155
2154
|
if (!track) return null;
|
|
2156
|
-
|
|
2157
|
-
try {
|
|
2158
|
-
packet = await track._backing.getFirstPacket(options);
|
|
2159
|
-
} catch (error) {
|
|
2160
|
-
if (!isEncryptedSamplesError(error)) throw error;
|
|
2161
|
-
}
|
|
2155
|
+
const packet = await track._backing.getFirstPacket(options);
|
|
2162
2156
|
if (!packet) return null;
|
|
2163
2157
|
return this.createAdjustedPacket(packet, firstSegment, track);
|
|
2164
2158
|
}
|
|
@@ -2207,12 +2201,7 @@ var DashSegmentedInput = class {
|
|
|
2207
2201
|
}
|
|
2208
2202
|
const input = track.input;
|
|
2209
2203
|
const offsetTimestamp = timestamp - await this.getMediaOffset(currentSegment, input, track);
|
|
2210
|
-
|
|
2211
|
-
try {
|
|
2212
|
-
packet = keyframesOnly ? await track._backing.getKeyPacket(offsetTimestamp, options) : await track._backing.getPacket(offsetTimestamp, options);
|
|
2213
|
-
} catch (error) {
|
|
2214
|
-
if (!keyframesOnly || !isEncryptedSamplesError(error)) throw error;
|
|
2215
|
-
}
|
|
2204
|
+
const packet = keyframesOnly ? await track._backing.getKeyPacket(offsetTimestamp, options) : await track._backing.getPacket(offsetTimestamp, options);
|
|
2216
2205
|
if (!packet) {
|
|
2217
2206
|
currentSegment = await this.getPreviousSegment(currentSegment);
|
|
2218
2207
|
continue;
|