mediabunny 1.14.0 → 1.14.2
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/bundles/mediabunny.cjs +8 -2
- package/dist/bundles/mediabunny.min.cjs +1 -1
- package/dist/bundles/mediabunny.min.mjs +1 -1
- package/dist/bundles/mediabunny.mjs +8 -2
- package/dist/modules/src/conversion.d.ts.map +1 -1
- package/dist/modules/src/conversion.js +6 -3
- package/dist/modules/src/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/conversion.ts +11 -3
|
@@ -21846,6 +21846,9 @@ ${cue.notes ?? ""}`;
|
|
|
21846
21846
|
await this.input.computeDuration() - this._startTimestamp,
|
|
21847
21847
|
this._endTimestamp - this._startTimestamp
|
|
21848
21848
|
);
|
|
21849
|
+
for (const track of this.utilizedTracks) {
|
|
21850
|
+
this._maxTimestamps.set(track.id, 0);
|
|
21851
|
+
}
|
|
21849
21852
|
this.onProgress?.(0);
|
|
21850
21853
|
}
|
|
21851
21854
|
await this.output.start();
|
|
@@ -21972,7 +21975,7 @@ ${cue.notes ?? ""}`;
|
|
|
21972
21975
|
tempOutput.addVideoTrack(tempSource);
|
|
21973
21976
|
await tempOutput.start();
|
|
21974
21977
|
const sink = new VideoSampleSink(track);
|
|
21975
|
-
const firstSample = await sink.getSample(
|
|
21978
|
+
const firstSample = await sink.getSample(firstTimestamp);
|
|
21976
21979
|
if (firstSample) {
|
|
21977
21980
|
try {
|
|
21978
21981
|
await tempSource.add(firstSample);
|
|
@@ -22291,7 +22294,10 @@ ${cue.notes ?? ""}`;
|
|
|
22291
22294
|
return;
|
|
22292
22295
|
}
|
|
22293
22296
|
assert(this._totalDuration !== null);
|
|
22294
|
-
this._maxTimestamps.set(
|
|
22297
|
+
this._maxTimestamps.set(
|
|
22298
|
+
trackId,
|
|
22299
|
+
Math.max(endTimestamp, this._maxTimestamps.get(trackId))
|
|
22300
|
+
);
|
|
22295
22301
|
const minTimestamp = Math.min(...this._maxTimestamps.values());
|
|
22296
22302
|
const newProgress = clamp(minTimestamp / this._totalDuration, 0, 1);
|
|
22297
22303
|
if (newProgress !== this._lastProgress) {
|