AdConfigParameters constructor

AdConfigParameters({
  1. required SoundEnabled? sound,
  2. PreloadAdBreaks? preloadAdBreaks,
  3. H5OnReadyCallback? onReady,
})

Parameters for the adConfig method call.

The following parameters are available:

  • sound: Whether the game is currently playing sound.
  • preloadAdBreaks: Whether ads should always be preloaded before the first call to adBreak. See: https://developers.google.com/ad-placement/docs/preload-ads
  • onReady: Called when the API has initialized and has finished preloading ads (if you requested preloading using preloadAdBreaks).

For more information, see: https://developers.google.com/ad-placement/apis/adconfig#adconfig_parameters

Implementation

factory AdConfigParameters({
  required SoundEnabled? sound, // required because: cl/704928576
  PreloadAdBreaks? preloadAdBreaks,
  H5OnReadyCallback? onReady,
}) {
  return AdConfigParameters._toJS(
    sound: sound?.name.toJS,
    preloadAdBreaks: preloadAdBreaks?.name.toJS,
    onReady: onReady?.toJS,
  );
}