Amazon Vinyl
    Preparing search index...

    Interface AdBreakInfo

    A provider-agnostic description of a single ad break on the media timeline.

    An ad break is a span of the presentation that carries advertising rather than primary content. The same shape is produced from HLS Interstitials (EXT-X-DATERANGE with CLASS="com.apple.hls.interstitial") and, in the future, from DASH SCTE-35 splice signals, so applications observe one interface regardless of the streaming protocol.

    Times are expressed on the player's media timeline, in seconds, so they can be compared directly against the media's current time.

    interface AdBreakInfo {
        ads: ValueProvider<AdList>;
        duration: number | null;
        id: string;
        once: boolean;
        placement: AdBreakPlacement;
        playoutLimit: number | null;
        resolutionTimeOffset: number | null;
        restrict: AdRestriction;
        resumeOffset: number | null;
        skipControl: ValueProvider<SkipControl | null>;
        startTime: number;
    }
    Index

    The individual ad assets that make up this break, in playback order.

    duration: number | null

    The duration of the ad break in seconds, or null when unknown (e.g. a still-open live break that has not yet resolved its end).

    id: string

    A stable identifier for this ad break, unique within the current media presentation. Derived from the source signal (e.g. the HLS DATERANGE ID).

    once: boolean

    When true, this break plays at most once for the presentation and is not replayed even if the playhead re-crosses it (e.g. after a seek back). When false, the break may replay each time the playhead re-enters its region.

    (An HLS interstitial sets this from a CUE=ONCE hint.)

    placement: AdBreakPlacement

    The scheduled placement of the break relative to primary content.

    playoutLimit: number | null

    The maximum total playout time of the whole break, in seconds, summed across all of its ads, or null when the break's playout is uncapped. Distinct from duration (the break's timeline span) and from an individual AdInfo.duration.

    (An HLS interstitial sets this from X-PLAYOUT-LIMIT.)

    resolutionTimeOffset: number | null

    How far ahead of this break's startTime, in seconds, the player should resolve and preload the break's ad assets so they are ready when the playhead reaches it. null when the source specifies no offset, in which case the controller falls back to its preloadAheadTime option. Applies to midroll and postroll breaks; prerolls are preloaded up front.

    (An HLS interstitial sets this from X-RESOLUTION-TIME-OFFSET.)

    restrict: AdRestriction

    Restrictions on user interaction during this ad break.

    resumeOffset: number | null

    The offset, in seconds, from this break's scheduled startTime at which primary content resumes after the break. A signed value: 0 resumes in place (the break is purely additive). null means no resume offset was specified, in which case content resumes advanced by the break's actual playout duration (i.e. the break replaces that much primary content) — this is distinct from an explicit 0.

    (An HLS interstitial sets this from X-RESUME-OFFSET.)

    skipControl: ValueProvider<SkipControl | null>

    The window during which the user may skip this break, or a provider resolving to null when the break carries no skip window (skippability is then governed by AdRestriction.skip). Resolved lazily because, like ads, it may require fetching the break's asset list.

    (An HLS interstitial sets this from the X-ASSET-LIST SKIP-CONTROL.)

    startTime: number

    The start time of the ad break on the media timeline, in seconds.