foo-webview-sdk
    Preparing search index...

    Variable selectionConst

    selection: {
        get: (opts?: SelectionGetParams) => Promise<SelectionGetResponse>;
        getType: () => Promise<SelectionGetTypeResponse>;
        getViewerMode: () => Promise<SelectionGetViewerModeResponse>;
        getViewingTrack: (
            opts?: SelectionGetViewingTrackParams,
        ) => Promise<SelectionGetViewingTrackResponse>;
        set: (handles: string[]) => Promise<SelectionSetResponse>;
        setPlaylistTracking: (
            mode?: NonNullable<"playlist" | "selection" | undefined>,
        ) => Promise<SelectionSetPlaylistTrackingResponse>;
    } = ...

    selection — current selection / viewer-mode namespace.

    Type Declaration

    • get: (opts?: SelectionGetParams) => Promise<SelectionGetResponse>

      Omitting limit caps the page at 100 and reports truncated; limit: 0 returns everything.

    • getType: () => Promise<SelectionGetTypeResponse>

      Report the type of the current global selection, as a numeric index and name.

    • getViewerMode: () => Promise<SelectionGetViewerModeResponse>

      Report which source the user's Selection Viewer preference favours (prefer_playing or prefer_selection).

    • getViewingTrack: (
          opts?: SelectionGetViewingTrackParams,
      ) => Promise<SelectionGetViewingTrackResponse>

      With includeTrackInfo the response carries the shared Track row as track.

    • set: (handles: string[]) => Promise<SelectionSetResponse>

      Replace the global selection with the given track paths. Handles can have |subsong:N suffixes.

    • setPlaylistTracking: (
          mode?: NonNullable<"playlist" | "selection" | undefined>,
      ) => Promise<SelectionSetPlaylistTrackingResponse>

      Takes the selection from the active playlist: its selected rows with 'selection' (default), all of it with 'playlist'. Taken once; the host does not keep tracking after the call.