mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-02 13:23:51 +02:00
Merge branch 'main' into hls
This commit is contained in:
+5
-1
@@ -801,9 +801,13 @@ export class Conversion {
|
|||||||
this._executed = true;
|
this._executed = true;
|
||||||
|
|
||||||
if (this.onProgress) {
|
if (this.onProgress) {
|
||||||
|
// Compute duration using only the utilized tracks
|
||||||
|
const durationPromises = this.utilizedTracks.map(x => x.computeDuration());
|
||||||
|
const duration = Math.max(0, ...await Promise.all(durationPromises));
|
||||||
|
|
||||||
this._computeProgress = true;
|
this._computeProgress = true;
|
||||||
this._totalDuration = Math.min(
|
this._totalDuration = Math.min(
|
||||||
(await this.input.computeDuration()) - this._startTimestamp,
|
duration - this._startTimestamp,
|
||||||
this._endTimestamp - this._startTimestamp,
|
this._endTimestamp - this._startTimestamp,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user