UNPKG

@wscsports/blaze-rtn-ima-ads

Version:
59 lines 2.49 kB
import { BlazeContentExtraInfo } from "@wscsports/blaze-rtn-sdk"; export type BlazeIMAOnAdEventEventType = 'adStarted' | 'allAdsCompleted' | 'adClicked' | 'adCompleted' | 'adLoaded' | 'adPaused' | 'adResumed' | 'adSkipped' | 'adTapped' | 'adFirstQuartile' | 'adMidpoint' | 'adThirdQuartile' | 'adRequested'; export interface BlazeIMASettings { language?: string; ppid?: string; sessionId?: string; } interface BlazeIMADelegateOnAdEventParams { eventType: BlazeIMAOnAdEventEventType; } interface BlazeIMAAdRequestInfo { extraInfo: BlazeContentExtraInfo; } export interface BlazeIMAAdRequestParams { requestDataInfo: BlazeIMAAdRequestInfo; } export interface BlazeIMADelegate { /** * This function will be triggered every time an event on an ad will happen. * * @param params The data associated with the ad involved in the event. */ onIMAAdEvent?: (params: BlazeIMADelegateOnAdEventParams) => void; /** * Called when an error occurs during ad loading or playback. * * @param errorMessage The error message associated with the error. */ onIMAAdError?: (errorMessage: string) => void; /** * * @param params The request data information provides additional info regarding the current ad request. * @returns Additional query parameters to be included in the ad tag. */ additionalIMATagQueryParams?: (params: BlazeIMAAdRequestParams) => Record<string, string>; /** * * @param params The request data information provides additional info regarding the current ad request. * @returns Custom settings for the IMA SDK. */ customIMASettings?: (params: BlazeIMAAdRequestParams) => BlazeIMASettings | undefined; /** * Overrides the default ad tag URL with a custom one. This URL will be used for the ad request. * * @param params The request data information provides additional info regarding the current ad request. * @returns the override ad tag URL to be used for the ad request. */ overrideAdTagUrl?: (params: BlazeIMAAdRequestParams) => string | undefined; } export declare class BlazeGlobalDelegateHelper { static registerDelegate(delegate?: BlazeIMADelegate | null): void; private static onIMAAdEvent; private static onIMAAdError; private static additionalIMATagQueryParams; private static customIMASettings; private static overrideAdTagUrl; } export {}; //# sourceMappingURL=BlazeIMADelegate.d.ts.map