1

I have successfully implemented IMA SDK for HTML5 and my pre-roll plays successfully.

As a user navigates the content videos on my page, the source is changed without a page refresh, thus I need to manually tell IMA to fire another ad. The question is how do I tell the code to do this?

I followed the example here: https://developers.google.com/interactive-media-ads/docs/sdks/html5/ and I can see this function:

function requestAds() {
adsLoader.requestAds(adsRequest);
}

However it seems that this can only be fired once. After that, calling it again does not to show more ads. I'm guess since this contains a bunch of initialization code. Any ideas on the code to fire more ads?

Thank you!

Gene Ellis
  • 313
  • 1
  • 4
  • 11

1 Answers1

1

I figured it out. I need to call:

adsManager.destroy();
adsLoader.contentComplete();

https://developers.google.com/interactive-media-ads/docs/sdks/html5/faq#8

Gene Ellis
  • 313
  • 1
  • 4
  • 11