OGPlayer Web SDK
    Preparing search index...

    Interface AdsProviderCallbacks

    Events an AdsProvider reports back to the player — the web counterpart of the Android/iOS AdsProviderCallbacks. Implemented by OGPlayer. In addition to the ad lifecycle, the provider drives content pause/resume (client-side ads play while the content element is paused).

    interface AdsProviderCallbacks {
        onAdBreakCompleted(breakType: AdBreakType): void;
        onAdBreakStarted(breakType: AdBreakType, totalAds: number): void;
        onAdCompleted(ad: AdInfo): void;
        onAdCuePoints(cuePointsSeconds: number[]): void;
        onAdError(error: OGAdError): void;
        onAdPaused(ad: AdInfo): void;
        onAdProgress(ad: AdInfo, positionMs: number, durationMs: number): void;
        onAdResumed(ad: AdInfo): void;
        onAdSkipped(ad: AdInfo): void;
        onAdStarted(ad: AdInfo): void;
        onAllAdsCompleted?(): void;
        onContentPauseRequested(): void;
        onContentResumeRequested(): void;
    }
    Index
    • VMAP cue-point times (seconds into content; negative = postroll).

      Parameters

      • cuePointsSeconds: number[]

      Returns void

    • Parameters

      • ad: AdInfo
      • positionMs: number
      • durationMs: number

      Returns void

    • The whole ad schedule for this session finished (no breaks remain).

      Returns void

    • A break is about to play — pause and hide the content.

      Returns void

    • The break finished — resume content.

      Returns void