Vinyl
    Preparing search index...

    Interface StreamingState

    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 StreamingState {
        contentTypes: Readonly<
            Omit<Set<ContentType>, "clear" | "delete" | "add">,
        >;
        fetchedRanges: ReadonlyRanges;
        clearPrefetch(): void;
        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;
        reset(): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

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

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

    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.

    Methods

    • Clears any buffered or prefetched data, if applicable.

      Returns void

    • Returns true if the event host has any listeners.

      Returns boolean

    • Resets the track to recover from error states. This will reset failed segments and clear error conditions to allow streaming to resume.

      Returns void