IMA SDK HTML5 fallback logic

665 views
Skip to first unread message

Glen Scott

unread,
Jun 22, 2015, 9:29:36 AM6/22/15
to ima...@googlegroups.com
Hi,

I am using the IMA SDK HTML5 in a web application.

I am experiencing an issue with video ad playback and wondered if it was standard behaviour or not:

1. A VAST XML response contains two adverts:  one wrapper ad and an inline ad
2. The wrapper ad tag is used to get another VAST XML response, which contains one ad that has the type "application/x-shockwave-flash".  

Because the Flash advert is not playable in the HTML5, should the SDK fallback to the second advert in the initial VAST response?

Thanks in advance,


Glen


Tyler Sidell (IMA SDK Team)

unread,
Jun 22, 2015, 5:18:17 PM6/22/15
to ima...@googlegroups.com
Hi Glen,

Can you try passing the ad tag through the Video Suite Inspector to see if there is an error?  If so, could you please provide us with your ad tag so that we can look into it on our end?

Thanks,
Tyler Sidell
IMA SDK Team

Glen Scott

unread,
Jun 23, 2015, 1:00:20 AM6/23/15
to ima...@googlegroups.com
Hi Taylor,

Thanks for your response.

Using the VAST XML returned from the tag (https://gist.github.com/glenscott/9c0bc514469f04e39d6d), I did get the second advert to play as expect in the Video Suite Inspector.

However, this is not working in our client which suggests something wrong with our implementation.  We’re not doing anything out of the ordinary in our code, so can you think of anything obvious that we can check?

Thanks in advance,

Glen

-- 
Glen Scott






--
You received this message because you are subscribed to a topic in the Google Groups "Interactive Media Ads SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ima-sdk/snWSxg5li0E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ima-sdk+u...@googlegroups.com.
To post to this group, send email to ima...@googlegroups.com.
Visit this group at http://groups.google.com/group/ima-sdk.
For more options, visit https://groups.google.com/d/optout.

Tyler Sidell (IMA SDK Team)

unread,
Jun 23, 2015, 4:07:51 PM6/23/15
to ima...@googlegroups.com
Hi Glen,

Thank you for passing along your ad tag. 
 
However, when I ran it through the Video Suite Inspector, I got the following message:
Ad Error: Ad request reached a timeout.
 
Did you click "Switch to HTML5 player"?  If you are also receiving this timeout, you could also check with your DFP account manager to make sure that CORS headers are set up correctly.

Cheers,
Tyler Sidell
IMA SDK Team

Glen Scott

unread,
Jun 24, 2015, 4:46:41 AM6/24/15
to ima...@googlegroups.com
Hi Tyler,

Thanks for your feedback.  

To help debug this issue further, I’ve switched to using the ima3_debug.js script and its thrown up some interesting information.

For the VAST XML that I posted (https://gist.github.com/glenscott/9c0bc514469f04e39d6d) there is a difference in behaviour when using the IMA SDK (HTML5) on Safari and Firefox (both on Mac):

As a reminder, there are two ad blocks in this VAST XML :  1/ wrapper ad 2/ inline ad

1. Safari:  fails to load the wrapper ad and falls back to playing the inline ad — this is the behaviour I would expect since the wrapper ad points to a Flash advert that is unplayable in the HTML5 player

bridge3.101.2_debug_en.html:502:174 [  3.037s] [ima.loader.VastAdSource] processWrapperAd, adsRequest.adTagUrl: http://as.tubemogul.com/vast/javiyaKoVctWqlOb9Z9r?ad_id=9uHk5tNFBI0xrVu9kegd&site_id=yASkYONirZAZUs1LpLGQ&price=30.00&bi=B07oxHwNPXO87Jg_KvcuEhDfIswwJPewqN8hIKT18kQX68DkteTMO6BKXiNbZgvYZC63Xar-2GBIb0_sAOX4YBqc659Oo8yu8se7EZjYV8Ga4rxYWST8uuEhEux4ZrFhKchCZkYK_SawqtsHoRAPyzu3w&bt=f&ip_address=82.20.25.60&page_url=http%3A%2F%2Fwww.audiomack.com%2Fsong%2Fdj-day-day%2Fmarco-bandit-gang-feat-dro-nasty&cd=%7B%22zip%22%3A%22NR1%22%2C%22fbd%22%3A%7B%22ssb%22%3A%22F%22%2C%22psb%22%3A%22F%22%2C%22pd%22%3A%22audiomack.com%22%2C%22mpw%22%3A%220%22%2C%22mph%22%3A%220%22%2C%22aburl%22%3A%22%22%7D%7D&tm_user_cntry=231&auction_id=A1urmafIQq-Ap2Vlx_wFMg.0&ns_device_id=&ns_platform=DSK&tm_device_group=computer&tm_os_group=other&tm_user_id=-6203930527230381964
bridge3.101.2_debug_en.html:502:174 [  3.136s] [ima.loader.UrlLoader] Failed! retrying without credentials
bridge3.101.2_debug_en.html:502:174 [  3.223s] [ima.loader.AdSourceFetcher] errorCallback for errorCode: 6

2. Firefox: loads the wrapper ad and tries to play it.  It fails because it is flash, and the SDK exits.

" [  2.297s] [ima.loader.VastAdSource] processWrapperAd, adsRequest.adTagUrl: http://as.tubemogul.com/vast/javiyaKoVctWqlOb9Z9r?ad_id=9uHk5tNFBI0xrVu9kegd&site_id=yASkYONirZAZUs1LpLGQ&price=30.00&bi=B07w0TxJyR4DJNe5vg52gyZHyebC1TEClMem4Of9-waWSsDkteTMO6BKXiNbZgvYZC63Xar-2GBIb0_sAOX4YBqc659Oo8yu8se7EZjYV8Ga4rxYWST8uuEhEux4ZrFhKchCZkYK_SawqtsHoRAPyzu3w&bt=f&ip_address=82.20.25.60&page_url=http%3A%2F%2Fwww.audiomack.com%2Fsong%2Fdj-day-day%2Fmarco-bandit-gang-feat-dro-nasty&cd=%7B%22zip%22%3A%22NR1%22%2C%22fbd%22%3A%7B%22ssb%22%3A%22F%22%2C%22psb%22%3A%22F%22%2C%22pd%22%3A%22audiomack.com%22%2C%22mpw%22%3A%220%22%2C%22mph%22%3A%220%22%2C%22aburl%22%3A%22%22%7D%7D&tm_user_cntry=231&auction_id=0u0HhW6fQKKMqrg-M1aniA.0&ns_device_id=&ns_platform=DSK&tm_device_group=computer&tm_os_group=other&tm_user_id=6007724480473937111" bridge3.101.2_debug_en.html:502:168
" [  2.840s] [ima.loader.AdSourceFetcher] Creating VastAdSource." bridge3.101.2_debug_en.html:502:168
" [  2.932s] [ima.managers.VastVideoAdsManager] Ad error: AdError 403: Linear assets were found in the VAST ad response, but none of them matched the video player's capabilities." bridge3.101.2_debug_en.html:502:168

So, there are two questions that I have:

1. Why the difference in behaviour between the two browsers?
2. Why does Firefox not use the inline ad after the first ad has failed? 

Thanks in advance

Glen Scott

unread,
Jun 24, 2015, 8:24:03 AM6/24/15
to ima...@googlegroups.com
Tyler,

I’ve created a simple test case that exhibits the different behaviour:


On Safari, the second ad in the VAST document plays (vodka), and then the video content starts as expected.

On Chrome, the ad doesn’t play and the video content doesn’t start.

Tyler Sidell (IMA SDK Team)

unread,
Jun 24, 2015, 5:47:11 PM6/24/15
to ima...@googlegroups.com
Hi Glen,

Thank you for supplying this additional information. The SDK behavior should be consistent across browsers, so well look into this further. 
These are the results I found when testing your VAST tag:

Chrome Version 43.0.2357

Ad Error: Ad request reached a timeout.
Content Played: Yes

Firefox Version 38.0.5
Inline advertisement played: Yes
Content Played: Yes

Safari Version 8.0.6
Ad Error: Linear assets were found in the VAST ad response, but none of them matched the video player's capabilities.
Content Played: Yes

The expected behavior is that if an error is thrown, the adsManager would call destroy and remove all of its assets.  Thus, in the situations above, when an error is thrown the ads stop playing and the content resumes. 

One suggestion I would make is to add additional mimeTypes to the inline ad.  Right now in the VAST tag there is only mp4.  There is no single format supported by all major browsers at this time.  Adding additional mimeTypes, if possible (such as webm) might help resolve the issue that you are seeing and provide consistency across browsers.

Cheers,
Tyler Sidell
IMA SDK Team

Glen Scott

unread,
Jun 26, 2015, 3:11:55 AM6/26/15
to ima...@googlegroups.com
Hi Tyler,

Please see my comments inline below:


One suggestion I would make is to add additional mimeTypes to the inline ad.  Right now in the VAST tag there is only mp4.  There is no single format supported by all major browsers at this time.  Adding additional mimeTypes, if possible (such as webm) might help resolve the issue that you are seeing and provide consistency across browsers.


Unfortunately, as the ads are served by a third party we do not have control of the mimeTypes.

Also, I think the inconsistency is caused by the wrapper ad rather than the inline ad.  If you follow the trail for the wrapper ad, you’ll eventually come to a VAST document like this:

<?xml version="1.0" encoding="UTF-8"?>
<VAST version="2.0"><Ad
                id="9uHk5tNFBI0xrVu9kegd"><InLine><AdSystem
                version="1.0">PlayTime</AdSystem><AdTitle>iPR Bonsai_15_HD_Rev2015_NoSlate_YouTube.mov (32.0 MB) (1)</AdTitle><Impression
                    id="TM_BLANK_IMPRESSION"><![CDATA[http://ad-audit.tubemogul.com/audit/e.png?event=blank]]></Impression><Creatives><Creative
                                id="9uHk5tNFBI0xrVu9kegd"><Linear><Duration>00:00:15</Duration><MediaFiles><MediaFile
                                delivery="progressive"
                                type="application/x-shockwave-flash"
                                bitrate="500" width="400" height="300" apiFramework="VPAID"><![CDATA[http://playtime.tubemogul.com/flash/tunit-v1.43.1.swf?feedURL=http%3A%2F%2Fas.tubemogul.com%2Ffeed%2Fplacement.js%3Fad_id%3D9uHk5tNFBI0xrVu9kegd%26id%3DjaviyaKoVctWqlOb9Z9r%26tm_auction_id%3DLXj_XefuQVKp-N9GJ3qM3g.0%26barefeed%3DT%26rand%3D1694440482%26psId%3DyASkYONirZAZUs1LpLGQ&paId=9uHk5tNFBI0xrVu9kegd&framework=vpaid&psId=yASkYONirZAZUs1LpLGQ&cd=%7B%22zip%22%3A%22L6E%22%2C%22fbd%22%3A%7B%22ssb%22%3A%22F%22%2C%22psb%22%3A%22F%22%2C%22pd%22%3A%22audiomack.com%22%2C%22mpw%22%3A%220%22%2C%22mph%22%3A%220%22%2C%22aburl%22%3A%22%22%7D%7D&price=30.00&bi=B072y9qIzXLOWGorfS6BLoGEjqEuyMYYoRf9FFGlDZDkT4DkteTMO6BKXiNbZgvYZC63Xar-2GBIb0_sAOX4YBqc659Oo8yu8se7EZjYV8Ga4rxYWST8uuEhEux4ZrFhKchCZkYK_SawqtsHoRAPyzu3w&pt=imp&cpId=529915&plcId=604345&mpId=42573&adId=433932503&psIdNum=10981&iasMon=F&vpaidFlag=true]]></MediaFile></MediaFiles></Linear></Creative></Creatives></InLine></Ad></VAST>


This has the type “application/x-shockwave-flash” which is not playable in the HTML5 player, and presumably the cause of the “none of them matched the video player’s capabilities” error in Safari.

Glen

Tyler Sidell (IMA SDK Team)

unread,
Jun 26, 2015, 2:57:42 PM6/26/15
to ima...@googlegroups.com
Hi Glen,

The natural behavior of the SDK is to destroy the adsManager once an error is thrown. 
  • When the HTML5 player receives the request for a the flash creative, it can not play that type and an AdError event is fired.
  • The adsManager assets are removed and no further ads will play.
  • The content will start.
There is no guaranteed fallback after the Flash wrapper fails to play the inline ad. 

If possible, I would suggest to reach out to the server team to see if they can add different types of creatives.

Thanks,
Tyler Sidell
IMA SDK Team

Glen Scott

unread,
Jun 26, 2015, 4:03:20 PM6/26/15
to ima...@googlegroups.com
Thanks Tyler.

Do you have any insights into why there is different behaviour across the 3 browsers when processing this VAST document? 

Tyler Sidell (IMA SDK Team)

unread,
Jun 26, 2015, 5:26:40 PM6/26/15
to ima...@googlegroups.com
Hi Glen,

The SDK should carry the same functionality across all browsers.  The intended behavior of the SDK does not guarantee inline fallback, thus could be the reasoning behind the different activity.  

Thank you,
Tyler Sidell
IMA SDK Team

...

Glen Scott

unread,
Jun 27, 2015, 9:01:13 AM6/27/15
to ima...@googlegroups.com
Hi Tyler,

Chrome Version 43.0.2357
Ad Error: Ad request reached a timeout.
Content Played: Yes


This is not the behaviour I’m seeing in Chrome for Mac (Version 43.0.2357.130 (64-bit)).

In mine, the ad does not play and neither does the content.


Did you use a Mac too?  Or PC? I’m wondering if there is a difference here?

Glen

Tyler Sidell (IMA SDK Team)

unread,
Jun 29, 2015, 2:08:21 PM6/29/15
to ima...@googlegroups.com
Hi Glen,

Going to http://www.glenscott.co.uk/wrapperads/ today, I was able to see the inline ad play on Firefox (PC & Mac), Chrome (PC & Mac), and Safari (Mac).  Did anything change in the setup?

Since you are using the HTML5 player, would it be possible to work with your ads team to remove the Flash wrapper creative?  That way the VAST XML only includes the inline ad.

Thanks,
Tyler Sidell
IMA SDK Team

Reply all
Reply to author
Forward
0 new messages