Interface TheoAds

The THEOads API.


- Available since v8.12.0.

interface TheoAds {
    currentInterstitials: readonly Interstitial[];
    scheduledInterstitials: readonly Interstitial[];
    addEventListener<TType extends keyof TheoAdsEventsMap>(
        type: TType | readonly TType[],
        listener: EventListener<TheoAdsEventsMap[TType]>,
    ): void;
    removeEventListener<TType extends keyof TheoAdsEventsMap>(
        type: TType | readonly TType[],
        listener: EventListener<TheoAdsEventsMap[TType]>,
    ): void;
    replaceAdTagParameters(adTagParameters?: Record<string, string>): void;
}

Hierarchy (View Summary)

Properties

currentInterstitials: readonly Interstitial[]

The currently playing interstitials.

scheduledInterstitials: readonly Interstitial[]

List of interstitials which still need to be played.

Methods

  • Replaces all the ad tag parameters used for upcoming ad requests for a live stream.

    Parameters

    • OptionaladTagParameters: Record<string, string>

      The new ad tag parameters.

    Returns void


    - If set, this value overrides any parameters set on the TheoAdDescription.adTagParameters.