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

    Interface FakeBarButton

    A command's bottom-bar button (CommandOptions.button) as the player shows it: an entry of TestHost.barButtons.

    1.5.29

    A bottom-bar button as the player would show it, derived from the command's declaration and state each time it is read: clickable while the command is enabled and not busy, accent-coloured while checked, with the command's title (and reason) as the tooltip.

    The test checks that the Export button shows why it cannot be clicked. The tooltip is the command's title; while the command is disabled or busy and has a non-empty reason, the reason follows on a second line.

    const [button] = host.barButtons;
    assert.equal(button?.enabled, false);
    assert.match(button?.tooltip ?? "", /\n/); // the command declares a reason
    interface FakeBarButton {
        command: string;
        icon: string;
        image: boolean;
        order: number;
        enabled: boolean;
        checked: boolean;
        tooltip: string;
        click(): Promise<void>;
    }
    Index
    • Click the button, then wait until the host is idle: runs the command as its menu item would. Rejects (with a HostError) while the button is disabled, and once the command is gone.

      Returns Promise<void>

      command (rejects) A HostError: the command is disabled or busy.

      missing (rejects) A HostError: the command is gone.

      The test clicks the plugin's button and checks the OSD. click runs the command like its menu item and resolves once the host is idle.

      await host.barButtons[0]?.click();
      assert.ok(host.osd.length > 0);

      1.5.29

    command: string

    The command's local id.

    icon: string

    The icon name, or the image's path for a plugin.ui.image icon.

    image: boolean

    true when the icon is the plugin's image.

    order: number

    The declared order.

    enabled: boolean

    Clickable: the command is enabled and not busy.

    checked: boolean

    Shown with the on dot under its icon: the command is checked.

    tooltip: string

    The tooltip without the key: the command's shown title (trailing "…" removed), then, while it cannot run, its reason on a second line.