THEOplayer Web SDK
    Preparing search index...

    Interface ServerSideAdIntegrationController

    A controller to be used by your ServerSideAdIntegrationHandler to update the state of your custom server-side ad integration.

    interface ServerSideAdIntegrationController {
        adBreaks: readonly AdBreak[];
        ads: readonly Ad[];
        content: ReadonlyContentPlayer;
        integration: CustomAdIntegrationKind;
        beginAd(ad: Ad): void;
        createAd(init: AdInit, adBreak?: AdBreak): Ad;
        createAdBreak(init: AdBreakInit): AdBreak;
        endAd(ad: Ad): void;
        endAdBreak(adBreak: AdBreak): void;
        error(error: Error): void;
        fatalError(error: Error, code?: ErrorCode): void;
        removeAd(ad: Ad): void;
        removeAdBreak(adBreak: AdBreak): void;
        removeAllAds(): void;
        skipAd(ad: Ad): void;
        updateAd(ad: Ad, init: Partial<AdInit>): void;
        updateAdBreak(adBreak: AdBreak, init: Partial<AdBreakInit>): void;
        updateAdProgress(ad: Ad, progress: number): void;
    }

    Hierarchy (View Summary)

    Index
    adBreaks: readonly AdBreak[]

    The scheduled ad breaks managed by this integration.

    Use createAdBreak and removeAdBreak to add or remove ad breaks.

    ads: readonly Ad[]

    The scheduled ads managed by this integration.

    Use createAd and removeAd to add or remove ads.

    The playback state of the content.

    Use this instead of ChromelessPlayer.currentTime and friends to decide when to load or play ads, so your integration never observes the playback state of a linear ad from another integration.

    The identifier for this integration, as it was passed to Ads.registerServerSideIntegration or Ads.registerClientSideIntegration.