foo-webview-sdk
    Preparing search index...

    Interface SelectionChangedPayload

    Payload of the selection:changed event. foobar2000's global selection changed. A change less than 50 ms after the previous event is dropped, not delayed, so the last of several quick changes may go unannounced; read selection.get when the current value matters.

    interface SelectionChangedPayload {
        count: number;
        handles: string[];
        nowPlaying?: Track;
        track?: Track;
        truncated: boolean;
        type:
            | "unknown"
            | "now_playing"
            | "active_playlist_selection"
            | "active_playlist"
            | "playlist_manager"
            | "media_library_viewer";
    }
    Index
    count: number

    Number of selected tracks.

    handles: string[]

    Handles of the first 100 selected tracks, in selection order: native paths with |subsong:N appended when the subsong is not 0.

    nowPlaying?: Track

    The track loaded for playback, playing or paused; absent when none is.

    track?: Track

    The selected track; present only when exactly one track is selected.

    truncated: boolean

    Whether more than 100 tracks are selected, so that handles lists only the first 100.

    type:
        | "unknown"
        | "now_playing"
        | "active_playlist_selection"
        | "active_playlist"
        | "playlist_manager"
        | "media_library_viewer"

    Where the selection comes from, as typeName in the selection.getType answer.