Add isValid field to Conversion if output track counts haven't been reached, improve error messages to be more clear (closes #148)

This commit is contained in:
Vanilagy
2025-09-26 13:11:35 +02:00
parent 1b8e4f9f4b
commit be151d3494
4 changed files with 133 additions and 15 deletions
+8 -1
View File
@@ -484,7 +484,14 @@ const output = new Output({
});
const conversion = await Conversion.init({ input, output });
conversion.discardedTracks; // List of tracks that won't make it into the output
if (!conversion.isValid) {
// The conversion isn't possible and would error upon execution.
// Check `discardedTracks` for the reasons.
return;
}
// List of tracks that won't make it into the output:
conversion.discardedTracks;
conversion.onProgress = (progress) => {
progress; // Number between 0 and 1, inclusive