Amazon Vinyl
    Preparing search index...

    Interface ReadonlyTrackController<TrackLoadOptionsType>

    A readonly interface to the track controller.

    interface ReadonlyTrackController<TrackLoadOptionsType extends TrackLoadOptions> {
        activeTrack: ReadonlyTrack | null;
        queue: readonly TrackLoadOptionsType[];
        getCachedTrack(uri: string): ReadonlyTrack | null;
        getCachedTracks(): IterableIterator<ReadonlyTrack>;
        hasAnyListeners(): boolean;
        hasListeners(
            type: keyof TrackControllerEventMap<TrackLoadOptionsType>,
        ): boolean;
        hasNext(): boolean;
        isTrackCached(uri: string): boolean;
        on<K extends keyof TrackControllerEventMap<TrackLoadOptionsType>>(
            type: K,
            handler: EventHandler<TrackControllerEventMap<TrackLoadOptionsType>[K]>,
            options?: SignalOptions,
        ): Unsubscribe;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index
    activeTrack: ReadonlyTrack | null

    The active track, or null when the selected track has not yet activated (e.g. behind a preroll) or nothing is loaded.

    queue: readonly TrackLoadOptionsType[]

    Returns the current queue of TrackLoadOptions. Observe 'queueChange' for changes to this queue.