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: Readonly<Omit<Set<ContentType>, "clear" | "delete" | "add">>;
        disposed: boolean;
        error: null | Error;
        extra: any;
        fetchedRanges: ReadonlyRanges;
        logPrefix: string;
        type: string;
        uri: string;
        getBufferingQuality(contentType: ContentType): null | MediaQualityMetadata;
        getPlaybackQuality(contentType: ContentType): null | MediaQualityMetadata;
        getStreamingQuality(contentType: ContentType): null | MediaQualityMetadata;
        hasAnyListeners(): boolean;
        hasListeners(type: keyof StreamingEventMap): boolean;
        on<K extends keyof StreamingEventMap>(
            type: K,
            handler: EventHandler<StreamingEventMap[K]>,
            options?: SignalOptions,
        ): Unsubscribe;
    }

    Hierarchy (View Summary)

    Index

    Properties

    active: boolean

    True if the track is the currently playing track.

    contentTypes: Readonly<Omit<Set<ContentType>, "clear" | "delete" | "add">>

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

    disposed: boolean

    True if the track has been disposed.

    error: null | Error

    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.

    type: string

    The type of track.

    uri: string

    The track identifier.

    Methods

    • Returns true if the event host has any listeners.

      Returns boolean