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

    Interface Palette

    plugin.palette: the command palette's lead row.

    The palette's first row hands what the user typed to a plugin: a calculator ("3.5 GB in MB"), a library or history search, jump to a time, an assistant that runs commands for a sentence. There is one lead in the player, and only a built-in plugin can hold it.

    The palette's first row reads "Go to: 12:30"; Enter seeks there. lead puts the row up; the player sends the typed text with Enter, and the plugin ends the request with done.

    // Put up the row once, in activate: the player keeps it while stopped.
    const lead = plugin.palette.lead({ title: "Go to", icon: "search" });
    lead.onRun(async ({ query, ticket }) => {
    const [minutes = 0, seconds = 0] = query.split(":").map(Number); // "12:30"
    await plugin.player.seek(minutes * 60 + seconds);
    await lead.done(ticket); // this request needs no command runs
    });

    0.7.6

    1.7.9

    interface Palette {
        lead(options: PaletteLeadOptions): PaletteLead;
    }
    Index
    • Put up the palette's lead row. Built-in plugins only.

      The player keeps the row while the plugin is stopped and starts the plugin for a run, so call it in activate. Disposing the handle (or its scope) removes the row.

      Parameters

      Returns PaletteLead

      Palette

      builtin-only (through ready) The plugin is not built into the player.

      conflict (through ready) Another plugin holds the lead.

      invalid (through ready) A text over its length.

      0.7.6

      1.7.9