The stable failure code (see the table above).
The plugin seeks to 0:30 and stays quiet when another file was opened in
between. Every failure is an Error with a stable code; stale means
the source changed since the state the call was based on and nothing
was done, so it is safe to drop. Other codes are real failures.
try {
await plugin.player.seek(30);
} catch (error) {
if ((error as PluginError).code === "stale") return; // someone else changed the source
throw error;
}
Every API failure is an ordinary
Errorwith a stable stringcode. Branch oncode, never onmessage(the message is for logs and may change).stalebuiltin-onlycommands.list,commands.run,palette.lead,app.openWindow) and this plugin is not one.invalidmissingbusyconflictunavailableunsupportedbackendmessageis the backend's reason.refusedmessagenames it and why.failedmedia.ready()load error, a non-zerotools.runexit, the system refused).replacedendednoSourcereleased,disposedrelease(); an ExportJob handle disposed while something still waited for it.abortedAbortSignalfired (error.name === "AbortError").timeoutopenStreamstart-up,tools.run,system.*after 10 s).stream,deviceopenStream: the producer failed / the audio device is not ready.backend-uncertainretry().limitreservedvestraor starts withvestra.(any case), which only the player's built-in plugins use.versionMismatchminPlayerVersion).ui-preparemessagehas the diagnostics. A panel shown at once rejects itsready; a tab mounted in the background is compiled when it is first shown, and its failure goes to Scope.onError without a request (see Panel.ready).uimessagehas Slint's reason. Also reported to Scope.onError without a request: a callback whose arguments the player could not convert, a property it could not show again when it rebuilt a view (an image file removed since).hostmessageis the player's reason.disabledmessagehas its reason.ticketunknown,rejected,expiredactivationcommandexport-failed,source-missing,source-changed,no-spaceoutcome.error, not a rejection;messagehas the worker's or FFmpeg's reason. An export of parts (MediaCapture.export) endssource-missingwhen a part's file is gone andsource-changedwhen it changed since it was remembered; MediaSources.open rejects with them. An export of parts endsno-spacewhen the disk has less room than its estimate.input-overflowopenStreaminput: the player's queue of physical key transitions was full; the input was revoked and its keys released.internalmessagehas the reason.javascript,slintnode --check/ one of its Slint files does not compile;messagehas the diagnostics.ownerpendingproduceropenStream: the player refused or lost the generated stream;messagehas the reason.resolutionmessagehas the reason.revisionConflictsource-geometry,source-geometry-unsupportedprevious-crashshaders: plugin shaders are off because the player ended abnormally while they were drawing; clearing still works. Do not retry while refused (the player shows its own OSD line).source-unavailableunknown-expiredunknownExpiredresults where it can; do not resubmit the operation blindly.Errors thrown by handlers the SDK invokes go to Scope.onError. A rejected promise you forgot to
awaitis only logged; it never crashes the plugin process. Requests have no client-side timeout: the player answers every request or stops the plugin.