Amazon Vinyl
    Preparing search index...

    Interface ReadonlyAdController

    Read-only view of the ad breaks for the current media and which break, if any, currently contains the playhead.

    interface ReadonlyAdController {
        currentAd: AdInfo | null;
        currentAdBreak: AdBreakInfo | null;
        currentTrackAds: TrackAds | null;
        hasAnyListeners(): boolean;
        hasListeners(type: keyof AdEventMap): boolean;
        on<K extends keyof AdEventMap>(
            type: K,
            handler: EventHandler<AdEventMap[K]>,
            options?: SignalOptions,
        ): Unsubscribe;
    }

    Hierarchy (View Summary)

    Index
    currentAd: AdInfo | null

    The ad currently playing within the active break, or null.

    currentAdBreak: AdBreakInfo | null

    The ad break currently containing the playhead, or null when the playhead is in primary content. Either an interstitial break, which has replaced the content track with its ad tracks, or a stitched break, which is part of the content.

    currentTrackAds: TrackAds | null

    The ad breaks known for the current media.