Amazon Vinyl
    Preparing search index...

    Interface ReadonlyTrack

    Represents the streaming-related state for a single track.

    Provides read-only access to:

    • The currently fetched media time ranges
    • The current streaming, buffering, and playback quality metadata

    To observe changes over time, listen to events defined in StreamingEventMap, including:

    • streamingQualityChange
    • bufferingQualityChange
    • playbackQualityChange
    interface ReadonlyTrack {
        active: boolean;
        contentTypes: ReadonlySet<ContentType>;
        disposed: boolean;
        error: Error | null;
        extra: any;
        fetchedRanges: ReadonlyRanges;
        logPrefix: string;
        qualities: readonly MediaQualityMetadata[] | null;
        qualitiesUnfiltered: readonly MediaQualityMetadata[] | null;
        seekRange: SeekRange | null;
        textTrackController: ReadonlyTextTrackController | null;
        type: string;
        uri: string;
        getAds(): Promise<TrackAds>;
        getBufferingQuality(contentType: ContentType): MediaQualityMetadata | null;
        getPlaybackQuality(contentType: ContentType): MediaQualityMetadata | null;
        getStreamingQuality(contentType: ContentType): MediaQualityMetadata | null;
        hasAnyListeners(): boolean;
        hasListeners(type: (keyof StreamingEventMap) | "adsChange"): boolean;
        on<K extends (keyof StreamingEventMap) | "adsChange">(
            type: K,
            handler: EventHandler<TrackEventMap[K]>,
            options?: SignalOptions,
        ): Unsubscribe;
    }

    Hierarchy (View Summary)

    Index
    active: boolean

    True if the track is the currently playing track.

    contentTypes: ReadonlySet<ContentType>

    The current content types for the active streams, e.g. Set(['audio', 'video'])

    disposed: boolean

    True if the track has been disposed.

    error: Error | null

    The last error that occurred in this track, or null if no error.

    extra: any

    Returns the extra object from the load configuration's config when this track is active, or null if this track is not active.

    fetchedRanges: ReadonlyRanges

    The time ranges the track has fetched. This will be a snapshot of the fetched ranges at the time this property is accessed.

    logPrefix: string

    A string prefix for all log statements made by this target.

    qualities: readonly MediaQualityMetadata[] | null

    The available qualities for the current period, after filtering. Null if the timeline is not yet available.

    qualitiesUnfiltered: readonly MediaQualityMetadata[] | null

    The available unfiltered qualities for the current period. Null if the timeline is not yet available.

    seekRange: SeekRange | null

    The seekable range on the media timeline, or null when not yet known (e.g. before the manifest is loaded). Based on the media timeline, not the element's native seekable ranges.

    textTrackController: ReadonlyTextTrackController | null

    Controller for text tracks discovered for this track, or null if the track type does not surface text tracks.

    type: string

    The type of track.

    uri: string

    The track identifier.