Bitmovin Player API 8.268.0
    Preparing search index...

    Interface PlayerAdvertisingAPI

    interface PlayerAdvertisingAPI {
        discardAdBreak(adBreakId: string): void;
        getActiveAd(): Ad;
        getActiveAdBreak(): AdBreak;
        getModuleInfo(): ModuleInfo;
        isLinearAdActive(): boolean;
        list(): AdBreak[];
        schedule(adConfig: AdConfig): Promise<AdBreak[]>;
        skip(): Promise<void>;
    }
    Index
    • 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

      v8.0

    • Returns the currently active ad, or null if no ad is active.

      Returns Ad

      the active Ad, or null if none is active

      v8.1

    • Returns the currently active ad break, or null if no ad break is active.

      Returns AdBreak

      the active AdBreak, or null if none is active

      v8.0

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

      Returns ModuleInfo

      v8.1

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

      Returns boolean

      v8.0

    • Returns all scheduled ad breaks. Does not include currently active ad breaks.

      Returns AdBreak[]

      Array containing all the scheduled ad breaks.

      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.

      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.

      v8.0