Amazon Vinyl
    Preparing search index...

    Interface VinylDependencyOptions

    Configuration used by the default dependency factories for Vinyl.

    These options are used during player construction, changes after construction will have no effect.

    interface VinylDependencyOptions {
        abr?: {
            bandwidthMultiplierHigh?: number;
            bandwidthMultiplierLow?: number;
            highBufferThreshold?: number;
            lowBufferThreshold?: number;
            maxBandwidth?: Maybe<number>;
            maxHeight?: Maybe<number>;
            maxWidth?: Maybe<number>;
            restrictDecoderChangeOnAudioAbrUp?: boolean;
            strategy?: AbrStrategy;
        };
        adController?: Partial<AdControllerImplOptions>;
        autoReset?: Partial<AutoResetControllerImplOptions>;
        drm?: Partial<DrmOptions>;
        media: HTMLMediaElement;
        playbackController?: Partial<PlaybackControllerImplOptions>;
        streaming?: {
            buffering?: {
                maxAppendSize?: { audio?: number; text?: number; video?: number };
                minBuffer?: number;
            };
            segmentController?: {
                prefetchActive?: number;
                prefetchInactive?: number;
                retainTail?: number;
            };
        };
        textTrackRenderer?: TextTrackRenderer;
        trackController?: Partial<TrackControllerImplOptions>;
    }
    Index
    abr?: {
        bandwidthMultiplierHigh?: number;
        bandwidthMultiplierLow?: number;
        highBufferThreshold?: number;
        lowBufferThreshold?: number;
        maxBandwidth?: Maybe<number>;
        maxHeight?: Maybe<number>;
        maxWidth?: Maybe<number>;
        restrictDecoderChangeOnAudioAbrUp?: boolean;
        strategy?: AbrStrategy;
    }

    Configuration for adaptive bitrate switching.

    Type Declaration

    • Optional ReadonlybandwidthMultiplierHigh?: number

      A multiplier applied to the estimated bandwidth when the fetched buffer is at or above highBufferThreshold. Higher values are more optimistic and allow selection of higher qualities once enough data is buffered to absorb short-term bandwidth dips.

      As the fetched buffer fills from 0 toward highBufferThreshold, the effective multiplier linearly interpolates between bandwidthMultiplierLow and this value.

      Default: 0.9

    • Optional ReadonlybandwidthMultiplierLow?: number

      A multiplier applied to the estimated bandwidth when the fetched buffer is empty (0 seconds). Lower values are more conservative (reduce the bandwidth used for quality selection) and help avoid rebuffers when the buffer is low.

      As the fetched buffer fills toward highBufferThreshold, the effective multiplier linearly interpolates between this value and bandwidthMultiplierHigh.

      Default: 0.4

    • Optional ReadonlyhighBufferThreshold?: number

      If at least this amount of time (in seconds) is currently fetched, don't consider an ABR-down. Also used as the upper bound for interpolating between bandwidthMultiplierLow and bandwidthMultiplierHigh based on the current fetched time. Default: 15

    • Optional ReadonlylowBufferThreshold?: number

      If less than this amount of time (in seconds) is currently fetched, don't consider an ABR-up. Default: 4

    • Optional ReadonlymaxBandwidth?: Maybe<number>

      Maximum bandwidth in bits per second a quality may use to be selectable.

      Soft cap: if no qualities fit within the limit (including when set to 0), the quality with the lowest bandwidth is selected so playback is still possible.

      Has no effect when strategy is AbrStrategy.LOWEST or AbrStrategy.HIGHEST, since those strategies pin the selection regardless of bandwidth.

      Default: null (no limit).

    • Optional ReadonlymaxHeight?: Maybe<number>

      Maximum video height, in pixels, a quality may have to be selectable. Mirrors Shaka's restrictions.maxHeight.

      Only affects video qualities; audio (and other non-video) qualities are never restricted by resolution. Qualities with an unknown height (null) are treated as within the cap.

      Soft cap: if no video quality fits within the resolution limit, the quality with the smallest bandwidth is selected so video still plays.

      Has no effect when strategy is AbrStrategy.LOWEST or AbrStrategy.HIGHEST, since those strategies pin the selection regardless of resolution.

      Default: null (no limit).

    • Optional ReadonlymaxWidth?: Maybe<number>

      Maximum video width, in pixels, a quality may have to be selectable. Mirrors Shaka's restrictions.maxWidth. Behaves like maxHeight but constrains the width dimension.

      Default: null (no limit).

    • Optional ReadonlyrestrictDecoderChangeOnAudioAbrUp?: boolean

      When true, avoids changing codecs when considering choosing a higher audio bitrate than what is currently playing. A decoder re-initialization is often an audible change, so consumers that prefer to avoid audible artifacts may enable this. ABR-down is still allowed across decoders because the subtle audio artifact is more desirable than a rebuffer. Default: false

    • Optional Readonlystrategy?: AbrStrategy

      Defines the strategy used for quality selection.

      Default: BEST (ABR will be enabled)

    adController?: Partial<AdControllerImplOptions>

    Configuration for the ad controller.

    autoReset?: Partial<AutoResetControllerImplOptions>

    Configuration for auto-reset behavior.

    drm?: Partial<DrmOptions>

    Configuration for all drm-related components.

    media: HTMLMediaElement

    The media element.

    playbackController?: Partial<PlaybackControllerImplOptions>

    Configuration for the playback controller.

    streaming?: {
        buffering?: {
            maxAppendSize?: { audio?: number; text?: number; video?: number };
            minBuffer?: number;
        };
        segmentController?: {
            prefetchActive?: number;
            prefetchInactive?: number;
            retainTail?: number;
        };
    }

    Configuration for segmented streaming tracks (hls / dash).

    Type Declaration

    • Optional Readonlybuffering?: {
          maxAppendSize?: { audio?: number; text?: number; video?: number };
          minBuffer?: number;
      }

      Configuration for the buffering controller.

      • Optional ReadonlymaxAppendSize?: { audio?: number; text?: number; video?: number }

        The maximum number of bytes to append at a time per content type. Default: { audio: 1MiB, video: 15MiB }

      • Optional ReadonlyminBuffer?: number

        When the buffer falls below this time threshold, the next segment will be requested from the segment controller and appended. Default: 4s

    • Optional ReadonlysegmentController?: { prefetchActive?: number; prefetchInactive?: number; retainTail?: number }

      Configuration for the segment controller.

      • Optional ReadonlyprefetchActive?: number

        The amount of time ahead of the playhead to prefetch when the track is active. Default: 240

      • Optional ReadonlyprefetchInactive?: number

        The amount of time to prefetch when the track is not active. Default: 20

      • Optional ReadonlyretainTail?: number

        The number of seconds behind the playhead to retain segments. Default: 30

    textTrackRenderer?: TextTrackRenderer

    Optional renderer for text-track cues (an HTML overlay). When provided, captions are painted by the renderer and the DOM text track is kept 'hidden'; without one they render natively. See TextTrackRenderer.

    trackController?: Partial<TrackControllerImplOptions>

    Configuration for the track controller.