IMA SDK html5 "Failed to initialize ad playback element before starting ad playback."

1,145 views
Skip to first unread message

Ariel Kriss

unread,
Nov 29, 2016, 5:20:50 PM11/29/16
to Interactive Media Ads SDK
Hi there, I've just moved from the old Flash version of IMA SDK to the new V3 IMA SDK.
it is working well enough on desktop but on android mobile I am getting this error every time: "Failed to initialize ad playback element before starting ad playback."

this is not an autoplay video, and I couldn't find any solution for this.

Chris Feldman (IMA SDK Team)

unread,
Nov 30, 2016, 9:40:51 AM11/30/16
to Interactive Media Ads SDK
Hi Ariel,

Thank you for reaching out to support. Because the HTML5 IMA SDK does not allow for autoplay on Android or iOS, ad playback must be initialized via user action on these platforms.

This is further outlined in our FAQ :
On mobile devices, you must call adDisplayContainer.initialize() as the result of a user action (e.g. tap). If you're seeing this error, you're most likely calling it on a non-user-initiated context. Note that it must be the direct result of a user action. For example, if you respond to a 'tap' event by playing a video, and then use the video player's 'play' event to call initialize(), you will see this error - you must call initialize() as the result of the tap event itself. 

Regards,
Chris Feldman
IMA SDK Team 

Ariel Kriss

unread,
Nov 30, 2016, 3:39:59 PM11/30/16
to Interactive Media Ads SDK

look at my message, i've said that the video is not! an autoplay video.
בתאריך יום רביעי, 30 בנובמבר 2016 בשעה 00:20:50 UTC+2, מאת Ariel Kriss:

Ariel Kriss

unread,
Nov 30, 2016, 3:50:22 PM11/30/16
to Interactive Media Ads SDK
I'm calling the preroll manager after a user click on the play of the video', it is working great in desktop.
can you take a look at this Example please: whatsapp status

בתאריך יום רביעי, 30 בנובמבר 2016 בשעה 22:39:59 UTC+2, מאת Ariel Kriss:

Chris Feldman (IMA SDK Team)

unread,
Nov 30, 2016, 4:20:45 PM11/30/16
to Interactive Media Ads SDK
Hi Ariel,

I understand that you are not using an autoplay video. Regardless, the adDisplayContainer initialization must be the direct result of a user action.

From the page you linked, I can see that you don't use the adDisplayContainer.initialize() method at all. Take a look at our advanced HTML5 sample. You'll see that playAds(), which invokes adDisplayContainer.initialize(), is called directly after the user presses the play button. This step must not be omitted if the SDK is to behave predictably. Correctly initializing the adDisplayContainer will fix your issues on mobile.

Regards,
Chris Feldman
IMA SDK Team

Ariel Kriss

unread,
Dec 4, 2016, 7:42:49 PM12/4/16
to Interactive Media Ads SDK
Thank you for your help mate, you've saved me!!

בתאריך יום רביעי, 30 בנובמבר 2016 בשעה 23:20:45 UTC+2, מאת Chris Feldman (IMA SDK Team):
Reply all
Reply to author
Forward
0 new messages