The API for advertisements.

Remarks


- Integrates with 'theo', 'google-ima', 'google-dai' or 'freewheel'.

interface Ads {
    currentAdBreak: null | AdBreak;
    currentAds: Ad[];
    dai?: GoogleDAI;
    playing: boolean;
    scheduledAdBreaks: AdBreak[];
    scheduledAds: Ad[];
    addEventListener<TType>(type, listener): void;
    removeEventListener<TType>(type, listener): void;
    schedule(adDescription): void;
    skip(): void;
}

Hierarchy (view full)

Properties

currentAdBreak: null | AdBreak

The currently playing ad break.

currentAds: Ad[]

List of currently playing ads.

dai?: GoogleDAI

The Google DAI API.

Remarks


- Only available with the feature 'google-dai'.

playing: boolean

Whether a linear ad is currently playing.

scheduledAdBreaks: AdBreak[]

List of ad breaks which still need to be played.

scheduledAds: Ad[]

List of ads which still need to be played.

Remarks


- Only available in the 'theo' ad integration.

Deprecated

Superseded by Ads.scheduledAdBreaks.

Methods

  • Add an ad break request.

    Parameters

    • adDescription: AdDescription

      Describes the ad break to be scheduled.

    Returns void

    Remarks


    - Available since v2.18.0.
    - Prefer scheduling ad breaks up front through SourceConfiguration.ads.

  • Skip the current linear ad.

    Returns void

    Remarks


    - This will have no effect when the current linear ad is (not yet) skippable.

Generated using TypeDoc