interface IInterstitialsParams {
    adBreakDone?: ((placementInfo: IPlacementInfo) => void);
    afterAd?: (() => void);
    beforeAd?: (() => void);
    name?: string;
    type:
        | "start"
        | "pause"
        | "next"
        | "browse";
}

Properties

adBreakDone?: ((placementInfo: IPlacementInfo) => void)

(OPTIONAL) Always called as the last step in an adBreak(), even if there was no ad shown. Function takes as argument a placementInfo object

Type declaration

    • (placementInfo): void
    • Parameters

      Returns void

afterAd?: (() => void)

Type declaration

    • (): void
    • Returns void

      (OPTIONAL) Called after the ad is finished (for any reason). For rewarded ads, it is called after either adDismissed or adViewed, depending on player actions. This function should be used to resume game flow. For example, use to unmute the sound and start the next level.

beforeAd?: (() => void)

(OPTIONAL) Called before the ad is displayed. The game should pause and mute the sound. These actions must be done synchronously. The ad will be displayed immediately after this callback finishes.

Type declaration

    • (): void
    • Returns void

name?: string

(OPTIONAL) a name for this particular ad placement within your game. It is an internal identifier, and is not shown to the player. In future releases this identifier may be used to enable additional reporting and optimization features.

We recommend you name all of your placements.

type:
    | "start"
    | "pause"
    | "next"
    | "browse"

'start' before the gameplay starts (after UI has rendered) 'pause' the player pauses the game 'next' player navigates to the next level 'browse' the player explores options outside of the gameplay