@vestra-player/sdk - v1.11.3
    Preparing search index...

    Interface FileResolverOptions

    A resolver for local files by extension: when anyone opens such a file with Player.open (the Open dialog, the playlist, next / previous, the recent list, a drop that calls open), the player asks this plugin for a stream it generates instead of playing the file.

    The open keeps everything of the original call: its ifCurrent, its operation (the opener's open and media.ready() settle as for any file), paused (the stream starts paused), and its path as state.source, with state.kind "stream". A thrown error fails that open: phase "error" with the error's message as state.error, word for word. The stream belongs to this plugin, as with Player.openStream.

    Cancellation: signal aborts when the open is replaced, closed (player.close(), F4) or times out (30 seconds), or this resolver is disposed. Cancelled after resolve returned but before the stream ran, the SDK releases the stream and never calls started.

    One extension has one resolver: another plugin's resolver for it makes Resolver.ready reject with conflict without failing activation (the player shows a warning). When this plugin stops, its extensions are free again and such files go to the player as before.

    Opening a .ch8 file anywhere in the player (Open dialog, playlist, recent list) runs it in the plugin's emulator instead of failing as an unknown format. The player calls resolve with the path; the plugin reads the program and returns a stream whose frame() the SDK pulls on the audio clock, one 1/60 s frame per call. started runs once the stream plays; signal aborts the read when the open is replaced or closed.

    plugin.resolvers.add({
    id: "chip8",
    extensions: ["ch8"], // lower case, no dot; matches Game.CH8 too
    async resolve(path, signal) {
    const frame = emulator(await readFile(path, { signal }));
    return {
    kind: "stream",
    width: 64, // CHIP-8's display
    height: 32,
    frame,
    started: (stream) => stream.onStop((error) => error && plugin.osd.show(error.message)),
    };
    },
    });

    1.5.3

    interface FileResolverOptions {
        id: string;
        extensions: string[];
        resolve(path: string, signal: AbortSignal): Promise<ResolvedStream>;
    }
    Index
    id: string

    Local id, unique within the plugin.

    extensions: string[]

    Lower case, without the dot: 1–16 entries of 1–16 lower-case letters or digits (not "folder"). Only absolute local paths match, by their extension in any case (/roms/Game.NES); URLs never do.