GuidesAPI ReferenceRelease Notes
HomeLog InHome
Guides

BlazeIMADelegate - React Native

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;

}

Functions

onIMAAdEvent

This function will be triggered by our SDK whenever there's an event related to ads. You can find more about the params here.


onIMAAdError

Called when an error occurs during ad operations.


Did this page help you?