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

    Interface Resolver

    A registered resolver. Disposing it unregisters it and aborts resolutions in flight.

    A registered resolver, from Resolvers.add. Disposing it, its scope or stopping the plugin unregisters it and aborts resolutions in flight; the extensions or hosts are free again for other plugins.

    The plugin tells the user when its .ch8 resolver could not register because another plugin holds that extension. ready rejects with conflict; for another plugin's claim that does not fail activation, so the plugin keeps running without the resolver.

    const resolver = plugin.resolvers.add({
    id: "chip8",
    extensions: ["ch8"],
    async resolve() {
    throw plugin.i18n.error("Not ready yet.");
    },
    });
    // Rejects with `conflict` when the extension is taken.
    resolver.ready.catch((error: PluginError) => {
    if (error.code === "conflict") void plugin.osd.show("Another plugin plays .ch8 files");
    });

    1.0.0

    interface Resolver {
        dispose(): Promise<void>;
        ready: Promise<void>;
    }

    Hierarchy (View Summary)

    Index
    • Release the resource. Resolves once the player confirmed the release (or immediately for purely local resources). Never rejects.

      Returns Promise<void>

      Never.

      A "Turn feature off" item removes the feature's own menu item at once, before the plugin stops. dispose takes the command out of the menu and the binding table and resolves once the player confirmed it; the id can be added again later.

      const extra = plugin.commands.add({ id: "extra", path: ["Tools", "Extra"], run() {} });
      plugin.commands.add({
      id: "extra-off",
      path: ["Tools", "Turn extra off"],
      run: () => extra.dispose(), // never rejects
      });

      1.0.0

    ready: Promise<void>

    Resolves when the player registered it; rejects otherwise: conflict when another resolver has the extension or the scheme + host (another plugin's: activation goes on; this plugin's own: activation fails), invalid for a malformed declaration (a player before 0.4.1 also for extensions).

    conflict (rejects) Another resolver has the extension or the scheme + host, or this plugin already registered this id.

    busy (rejects) The player already holds 16 resolvers.

    invalid (rejects) A malformed declaration.