Post roll issue on Android and iOS HTML5 SDK

386 views
Skip to first unread message

Arnaud Leyder

unread,
Aug 8, 2015, 10:12:00 AM8/8/15
to Interactive Media Ads SDK
Hi, 

It works fine in Desktop but on Android 5 Chrome (Nexus) and iPad iOS 8 Safari I have an issue that I can reproduce with your GitHub example "advanced" (v 2.2).
- to start the content I have to touch twice the play button
- then the video starts and goes to the post roll. Post roll starts ok but when it finishes it does not give back the handle to the content for the video player and stays stuck with the ads.  

I do call the contentComplete() method with my code so I know the issue is not coming from here and as I said it can be reproduced with your sample code.

My early testing seems to indicate the onContentResumeRequested event is not fired when a post-roll only ads is played on mobile where it does fire on desktop.

Maybe the post-roll from your sample page is not compatible with mobile. Is there anything else I need to do to better handle post roll on Android and iOS?

Thanks
Arnaud

Vu Chau (IMA SDK Team)

unread,
Aug 10, 2015, 4:31:53 PM8/10/15
to Interactive Media Ads SDK
Hi Arnaud,

As per this footnote, there are known issues surrounding the ad rule/VMAP playback on mobile devices.  For this reason we recommend implementing custom ad playback.  That should also resolve the issue with having to tap the play button twice (as the first tap might have been wrongly consumed without notifying the SDK).  

When you call contentComplete(), you are telling the SDK it is time to play post-roll ads, if one is scheduled.  As a result, at this time onContentResumeRequested should not be fired, since you have already left the content and begun ad playback.  There would be no need to know when the content has resumed again, as post-rolls are the last chunk to be played.  That should be why the video player does not give back the handle to the content, but instead it stays with the ads.  At this time you should be able to observe ALL_ADS_COMPLETED being fired.

Vu Chau
IMA SDK Team

Arnaud Leyder

unread,
Aug 11, 2015, 5:40:00 AM8/11/15
to ima...@googlegroups.com

Hi Vu,

Sorry I did not provide enough information I think.
Following our past conversation about my iPhone playback issue last week I did implement the new custom playback. I am now using option 1 with adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakComplete = true; as described here https://developers.google.com/interactive-media-ads/docs/sdks/html5/custom-playback

I can play VMAP content on both Desktop and mobile fine. My issue is specifically with post roll video ads on mobile (Android and iOS).
When my video content ends I have the HTML5 video 'ended' event firing. This calls a function which execute the contentComplete(); method from the SDK.
I then see the following SDK events (in order) LOADED CONTENT_PAUSE_REQUESTED STARTED ... ALL_ADS_COMPLETED

When CONTENT_PAUSE_REQUESTED fires I remove the 'ended' event listener and I restore it only when ALL_ADS_COMPLETED fires.

The ALL_ADS_COMPLETED event fires and I also restore my controls (show the seek-bar ...) for the content video player BUT the src from the video tag stays stuck with the src of the ads (which is something like http://redirector.gvt1.com/videoplayback/id/f4890b9f60d85691/itag/15/source/gfp_video_ads/ip/0.0.0.0/ipbits/0/expire/1439306397/sparams/ip,ipbits,expire,id,itag,source/signature/32849A56574E14A563844ADBABAB2D60B4D198D7.5D28994D0625B5733A85B5FC8219B9E161C90D52/key/ck2/file/file.mp4).

No matter what I do I am never getting back the src of the content video (unless of course if I do it myself but that would defeat the setting
adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakComplete = true).

My question is what do I need to do to get the SDK to give back the src of the video content to the video tag in this case scenario?

This issue can be reproduced with your GitHub examples
https://github.com/googleads/googleads-ima-html5/tree/master/advanced

I have put it online here: http://www.radiantmedialyzer.net/advanced/

Just enter this URL on an Android or iOS device and use the sample post roll tag:
http://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp&output=vmap&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ar%3Dpostonly&cmsid=496&vid=short_onecue&correlator=

This ad tag is taken from https://developers.google.com/interactive-media-ads/docs/sdks/html5/tags

You will see the issue.

Thanks
Arnaud

--
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/o1Q_gV1AEcM/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.

-- 
Arnaud Leyder
JavaScript and Streaming Media Engineer
mobile: +33 (0) 6 59 87 06 55 
email: arnaud...@gmail.com
skype: arnaud.leyder

Vu Chau (IMA SDK Team)

unread,
Aug 11, 2015, 4:40:50 PM8/11/15
to Interactive Media Ads SDK
Hi Arnaud,

I'm not sure why, but when I tried playing the ad on mobile (Android), I got the following error:

AdError 1009: The response does not contain any valid ads.

However, when I tried on desktop, it worked fine and I was able to see the post-roll.  Could you look into this?

Meanwhile, back to the original issue, the logic of the events fired as you described is as intended.  However, why do you specifically want the SDK to return the content video handler to you at the end of the post-roll?  It makes sense that at this time, the src of the video is the post-roll ad itself, since you have already called contentComplete() prior to the post-roll.  There should be no access to the non-ad content at this time.

Have you tried Option 2 from the custom playback guide?  The following sounds like what your case is:

function onContentResumeRequested() {
videoContent.addEventListener('ended', contentEndedListener);
videoContent.src = contentSrc;
videoContent.addEventListener('loadedmetadata', loadedMetadataHandler);
videoContent.load();
}
 
Vu Chau
IMA SDK Team

Arnaud Leyder

unread,
Aug 13, 2015, 3:57:12 AM8/13/15
to ima...@googlegroups.com
Hi Vu,

I want the SDK to give back the src of  the content when the post roll ads has completed not before.
I have to work on something else for now and aside of this issue I have everything rolling with the SDK. I will have a look at option 2 which indeed seems to offer a valid alternative to my issue.

Thanks for your help
Arnaud
Reply all
Reply to author
Forward
0 new messages