Add specific, per-output-format data callbacks & rewrite some logic in the process

This commit is contained in:
Vanilagy
2025-03-22 20:30:24 +01:00
parent bbc2e088ca
commit ceb2528014
14 changed files with 458 additions and 100 deletions
+6
View File
@@ -374,6 +374,12 @@ export class Conversion {
}
}
const unintentionallyDiscardedTracks = this.discardedTracks.filter(x => x.reason !== 'discardedByUser');
if (unintentionallyDiscardedTracks.length > 0) {
// Let's give the user a notice/warning about discarded tracks so they aren't confused
console.warn('Some tracks had to be discarded from the conversion:', unintentionallyDiscardedTracks);
}
if (this._options.computeProgress) {
this._totalDuration = Math.min(
await this._input.computeDuration() - this._startTimestamp,