mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 19:03:46 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user