Amazon 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: ReadonlySet<ContentType>;
        fetchedRanges: ReadonlyRanges;
        qualities: readonly MediaQualityMetadata[] | null;
        qualitiesUnfiltered: readonly MediaQualityMetadata[] | null;
        clearPrefetch(): void;
        getBufferingQuality(contentType: ContentType): MediaQualityMetadata | null;
        getPlaybackQuality(contentType: ContentType): MediaQualityMetadata | null;
        getStreamingQuality(contentType: ContentType): MediaQualityMetadata | null;
        hasAnyListeners(): boolean;
        hasListeners(type: keyof StreamingEventMap): boolean;
        on<K extends keyof StreamingEventMap>(
            type: K,
            handler: EventHandler<StreamingEventMap[K]>,
            options?: SignalOptions,
        ): Unsubscribe;
        reset(hard?: boolean): void;
    }

    Hierarchy (View Summary)

    Index
    contentTypes: ReadonlySet<ContentType>

    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.

    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.

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

      Parameters

      • Optionalhard: boolean

        If true, the track will reset the playback state and recreate media sources.

      Returns void