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

    Type Alias Bindable<T>

    Bindable: T | (() => T)

    A value, or a function the SDK re-evaluates on every full update pass, and after a player state change only if it read a field of plugin.player.state that changed (see Scope.update); only changes are sent to the player.

    Type Parameters

    • T

    Only a command with at least one function field takes part in the update passes: a command whose fields are all values or plugin.when conditions is registered once and evaluated again only when Command.set changes it.

    The Shuffle item carries a check mark while the plugin's own shuffle is on and is always enabled. A function is evaluated again in every full update pass (after each handler); only changes are sent, and a plain value never changes. A state of the player is a plugin.when condition instead, which the player evaluates itself.

    let shuffle = false;
    plugin.commands.add({
    id: "shuffle",
    path: ["Playback", "Shuffle"],
    checked: () => shuffle, // re-evaluated after the handler
    enabled: true, // a fixed value
    run: () => void (shuffle = !shuffle),
    });

    1.0.0