Ad break method

break(
  o: {
     type: '<type>',
     name: '<name>',
     beforeAd: () => {},
     afterAd: () => {},
     beforeReward: (showAdFn) => {},
     adDismissed: () => {},
     adViewed: () => {},
     adBreakDone: (placementInfo) => {},
  }
): void;

Places interstitial and rewarded ads in your game.

This method wraps adBreak from the Ad Placement API and supports the same parameters. o should be an object containing the parameters of adBreak.

Your game shouldn't inject adsbygoogle.js or use the Ad Placement API directly.

Requirements

See monetization requirements.

Examples

Interstitial ad between levels:

GameSnacks.ad.break({type: 'next', ...});

Rewarded ad:

GameSnacks.ad.break({type: 'reward', ...});