How to preload multiple Ads on IMA SDK html5

555 views
Skip to first unread message

Kazumasa Toda

unread,
Mar 10, 2017, 4:49:16 AM3/10/17
to Interactive Media Ads SDK
I would like to create a couple of adsManager and preload all of ads before they start.
It is for live streaming player, so it is difficult to decide witch and when the ad will play.
also, many users (more than 400 thousand people at once) connect this live streaming, preloading is necessary. Otherwise the ads server might be down.
so I need to preload a couple of ads before, then if the ads timing will come, choose the specific one.

I tried to create multiple adsManager first, it was OK. But once enabling preloading setting, it doesn't work properly. 

・create an AdsLoader
・create AdsManagerA with adtag A (EnablePreloading) 
・create AdsManagerB with adtag B (EnablePreloading)
・create AdsManagerC with adtag C (EnablePreloading)
・when time to play Ad, diceided to play AdManager B so implement AdsManagerB.start()
・and then when time to play next Ad, diceided to play AdManager A so implement AdsManagerA.start()

when playing AdManagerB, ad will be play but the different sorce. (souce of adTag C)
and then, when playing AdManagerA, it will be error. like..
Uncaught (in promise) DOMException: The element has no supported sources.

I guess, preloading is allowed only one source, even if creating 3 adManegers, the very last one overwrite the preloaded source.
ads are all VAST. I tried all sample adTags but all the same.

Do you have any ideas to solve this?

Deepika Uragayala (IMA SDK Team)

unread,
Mar 10, 2017, 2:00:47 PM3/10/17
to Interactive Media Ads SDK
Hi Toda,

You are not supposed to create multiple AdsManager objects with a single AdsManager. You must have a single AdsLoader and request one AdsManager of the lifecycle of the ads from your Ad Tag. You can reuse the AdsLoader but not have multiple requests and select the AdsManager that you need. Make a single one and then preload.

Regards,
Deepika Uragayala
IMA SDK Team

Kazumasa Toda

unread,
Mar 13, 2017, 8:55:51 PM3/13/17
to Interactive Media Ads SDK
Hello, Deepika. Thank you for the response.

I understood that once the adsManager has been created for a adsLoader, it must be played.

Then I'm curious about what if I create multiple adsLoaders with separated adDisplayContainers and creating a single adsManager for each, does it work?
I will try later, anyways.

Thank you for helping me.

2017年3月11日土曜日 4時00分47秒 UTC+9 Deepika Uragayala (IMA SDK Team):

Deepika Uragayala (IMA SDK Team)

unread,
Mar 14, 2017, 11:39:31 AM3/14/17
to Interactive Media Ads SDK
Hi Toda,

If you create multiple adsLoaders with separated adDisplayContainers and creating a single adsManager, then you must have multiple content players as well. We recommend that you have single instances of adDisplayContainer throughout.

Regards,
Deepika Uragayala
IMA SDK Team
Reply all
Reply to author
Forward
0 new messages