Vinyl
    Preparing search index...

    Interface ReadonlyAmznPlaybackStreamingState

    Extends ReadonlyPlaybackStreamingState with Amazon-specific streaming metadata.

    This interface provides additional metadata around Amazon-specific playback behavior, such as:

    • Internal playback quality metadata (nerd stats)
    • The reason behind current quality selection

    All properties are read-only and reflect the current snapshot of the active Amazon track. These values will be null for non-Amazon tracks.

    interface ReadonlyAmznPlaybackStreamingState {
        contentTypes: Readonly<
            Omit<Set<ContentType>, "clear" | "delete" | "add">,
        >;
        fetchedRanges: ReadonlyRanges;
        fetchedTime: number;
        fetchedTimePercent: number;
        playbackQualityAmzn: null | AmazonPlaybackQuality;
        trackNerdStats: null | TrackNerdStats;
        getBufferingQuality(contentType: ContentType): null | MediaQualityMetadata;
        getPlaybackQuality(contentType: ContentType): null | MediaQualityMetadata;
        getQualitySelectionReason(): null | QualitySelectionReason;
        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)

    Implemented by

    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.

    fetchedTime: number

    Returns the time of the prefetch end. If no data has been prefetched for the current track, 0 will be returned.

    The time given will be in seconds according to the media timeline. It will represent the ending time of the continuous prefetch range from the current playhead time.

    fetchedTimePercent: number

    Returns current fetched time as a percent of the total duration.

    A number between 0-1

    playbackQualityAmzn: null | AmazonPlaybackQuality

    Extracts Amazon-specific metadata out of the playbackQuality supplemental properties.

    playbackQuality

    trackNerdStats: null | TrackNerdStats

    This object provides Amazon-specific metadata about the current track. If the track is not an Amazon track (asin, coid, sample), null will be returned.

    Methods

    • Gets the reason for the current quality selection.

      Returns null if media is not currently playing.

      Returns null | QualitySelectionReason