interface PlayerAdvertisingAPI {
    discardAdBreak(adBreakId): void;
    getActiveAd(): Ad;
    getActiveAdBreak(): AdBreak;
    getModuleInfo(): ModuleInfo;
    isLinearAdActive(): boolean;
    list(): AdBreak[];
    schedule(adConfig): Promise<AdBreak[]>;
    skip(): Promise<void>;
}

Methods

  • Discards all scheduled ad breaks with the given ID. Also stops the current ad break if it has the same ID.

    Parameters

    • adBreakId: string

      The ID of the ad break which shall be removed from the scheduled ad breaks.

    Returns void

    Since

    v8.0

  • Returns the currently active ad.

    Returns Ad

    Since

    v8.1

  • Returns the currently active ad break.

    Returns AdBreak

    AdBreak

    Since

    v8.0

  • Returns the name and version of the currently used advertising module.

    Returns ModuleInfo

    Since

    v8.1

  • Returns true if a linear ad is currently active (playing or paused). Returns false otherwise.

    Returns boolean

    Since

    v8.0

  • Returns all scheduled ad breaks.

    Returns AdBreak[]

    Array containing all the scheduled ad breaks.

    Since

    v8.0

  • Schedules resulting ad break(s) of an ad config for playback.

    Parameters

    • adConfig: AdConfig

      The ad configuration used to schedule one or more ad breaks.

    Returns Promise<AdBreak[]>

    Promise that resolves with the ad breaks that were scheduled as a result of the given ad config.

    Since

    v8.0

  • Skips the current ad. Has no effect if the ad is not skippable, if no ad is active or if the IMA module is used (disabled by IMA in version 3.607.0).

    Returns Promise<void>

    Promise that resolves when the ad has been skipped and the ad player is done with cleanup of events and states.

    Since

    v8.0