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

    Interface BackdropSlot

    The backdrop position (plugin.panels.backdrop): whether a backdrop is mounted and whether it is shown now.

    The player decides when the backdrop shows: while the source is empty or loading, and while ready media has no video picture (audio files). The plugin decides what to draw, from Player.state and Player.stats. While an onChange listener exists state follows every change; otherwise it refreshes only when this plugin mounts.

    The OSD says "Video is playing" when the backdrop gives way to a video picture. The player decides when the backdrop shows (nothing open, loading, audio without a picture); effective turns false when a video frame replaces it.

    plugin.panels.backdrop.onChange((state) => {
    // `null`: no backdrop is mounted.
    if (state?.effective === false) void plugin.osd.show("Video is playing");
    });

    1.0.0

    interface BackdropSlot {
        state: { effective: boolean } | null;
        onChange(
            listener: (state: { effective: boolean } | null) => void,
        ): Disposable;
    }
    Index
    • Run code when a backdrop appears or disappears, or when it is shown or hidden.

      Parameters

      • listener: (state: { effective: boolean } | null) => void

        Receives the new state (null: no backdrop).

      Returns Disposable

      A handle that removes the listener.

      The plugin's log records each change of the backdrop position. The listener runs when the player starts or stops showing the backdrop and with null when it is unmounted.

      plugin.panels.backdrop.onChange((state) => console.log("backdrop", state));
      

      1.0.0

    state: { effective: boolean } | null

    null while no plugin has a backdrop; otherwise effective tells whether it is shown now.

    Type Declaration

    • { effective: boolean }
      • Readonlyeffective: boolean

        The backdrop is shown now (there is no video picture).

    • null