enablePreloading config does nothing

154 views
Skip to first unread message

Yair Ansbacher

unread,
Aug 29, 2018, 6:10:09 AM8/29/18
to Interactive Media Ads SDK
Hi,

I used the simple sample, and I added a single line  - adsRenderingSettings.enablePreloading = true (line #89).
However, as I see in the network tab, no media is preloaded and the adStart time is same as without enablePreloading.
When I replaced the adTagUrl to VMAP Pre-roll from IMA Sample Tags, I see the ad is indeed preloaded, but is loaded again on adsManager.init(), so the adStart time remains as without enablePreloading.
Please advise.

Thanks,
Yair

ima-sdk-adv...@google.com

unread,
Aug 30, 2018, 7:31:32 AM8/30/18
to ima...@googlegroups.com
Hi Yair,

Make sure to initialize the AdsManager when the Ad Request returns successfully on the ADS_MANAGER_LOADED event to properly preload the ad. You may, then, call start() if you are ready to play the ad.

Let me know if these resolves your queries.

Regards,
Steven Balan
IMA SDK Team

--
You received this message because you are subscribed to the Google Groups "Interactive Media Ads SDK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ima-sdk+unsubscribe@googlegroups.com.
To post to this group, send email to ima...@googlegroups.com.
Visit this group at https://groups.google.com/group/ima-sdk.
For more options, visit https://groups.google.com/d/optout.

Yair Ansbacher

unread,
Aug 30, 2018, 6:19:00 PM8/30/18
to Interactive Media Ads SDK
Hi Steven, Thanks for your response.

initialize the AdsManager on the ADS_MANAGER_LOADED event doesn't solve the issue, because the ad is loading again in adDisplayContainer Initialization which must be called only as the result of a user action.
In addition, in VMAP, initialize the AdsManager starts to play the ad. If I'm calling it on the ADS_MANAGER_LOADED event, the ad is playing before I'm ready.

Thanks, 
Yair 

ima-sdk-adv...@google.com

unread,
Aug 31, 2018, 3:56:04 PM8/31/18
to ima...@googlegroups.com
Hi Yair,

For your first concern, I tried to test on my end using the simple sample page and enabled preloading as you described in your initial post. I don't see another Ad Request being sent upon calling AdDisplayContainer.initialize(), and I see the file being preloaded from the Network tab upon initializing the AdsManager. 

Can you try and double-check on your end? If possible, can you provide us the tag you are using? For reference, I am using our sample Single Linear Pre-roll tag.

As for your second concern, please note that it is intended behavior that calling AdsManager.init() automatically plays Ad Rules Playlists (VMAP) tags. Enabling pre-loading will load the media file a few seconds before actually showing the ad.

Regards,
Joshua Lagonera
IMA SDK Team

--

Yair Ansbacher

unread,
Jan 29, 2019, 5:45:51 AM1/29/19
to Interactive Media Ads SDK
Hi, 
I have double checked again, and my result is as follows:  
  • When I remained the adsManager initialization on Play Clicking:
    • No preload at all.
  • When I moved the adsManager initialization to ADS_MANAGER_LOADED event:
    • For VAST - the media preloaded BUT reloaded again and consumed download time upon clicking play. example here and please see the attached screenshot.
    • For VMAP - the media preloaded BUT start to play immediately, which is bad for me. I only want to prepare the ad, but still wait for user gesture. example here (you may need to update the adTagUrl but use VMAP).
Yair
Screen Shot 2019-01-29 at 11.41.56 AM.png

ima-sdk-fo...@google.com

unread,
Jan 29, 2019, 5:36:21 PM1/29/19
to ima...@googlegroups.com
Hi Yair,

Your implementation of the preloading media feature seems to be incomplete. I've investigated the test pages you shared and noticed that Autoplay was not enabled. Autoplay must be enabled for preloading to work properly. We would recommend you to take a look at the preloading limitations documentation in order to successfully implement preloading.

Regards,
Arnaud Casame
IMA SDK Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Yair Ansbacher

unread,
Jan 30, 2019, 6:30:14 AM1/30/19
to Interactive Media Ads SDK
Hi, 
Thanks for your response. 
However, I've updated the test pages and added Autoplay using setAdWillAutoPlay and setAdWillPlayMuted. But same result. updated links: VASTVMAP.

Thanks,
Yair

Yair Ansbacher

unread,
Jan 30, 2019, 8:03:18 AM1/30/19
to Interactive Media Ads SDK

ima-sdk-fo...@google.com

unread,
Jan 30, 2019, 3:55:26 PM1/30/19
to ima...@googlegroups.com
Hi Yair,

Your implementation of IMA SDK is working as intented, the media files are successfully preloaded. The reason why you see two file.mp4 is because when streaming media files, not the whole file is returned at once. As you can see in the screenshot I shared with you, the HTTP request code is 206 meaning the first chunk of the ad is successfully requested, ready to be played. We have 2 chunks of the ad successfully requested by the SDK and weighting respectively 16.4 and 572 kb. Having said that, the SDK doesn't request the same file twice but requests the same file in multiple chunks to be play one after the other. For more information on the http request code, take a look at the Mozilla Documentation.


Regards,

Arnaud Casame

IMA SDK Team



=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

chunks_of_files.png

Yair Ansbacher

unread,
Jan 31, 2019, 6:19:44 AM1/31/19
to Interactive Media Ads SDK
Hi Arnaud,
No, The 2 loaded chunks are same.
You can try to set enablePreloading to false and you will see that only one chunk is loaded (also with 206 code) upon Play clicking.
So I would expected to exactly same result before Play clicking with enablePreloading-true.

Yair

ima-sdk-fo...@google.com

unread,
Jan 31, 2019, 3:59:39 PM1/31/19
to ima...@googlegroups.com
Hi Yair,

The second chunk you see in the network tab with 206 http code (partial content) when play is clicked is the remaining of the file.mp4 (the final chunk). You can verify by clicking on the chunk and search for the loaded range value in the request headers. The way the server delivers the chunks has nothing to do with the IMA SDK, the media is requested once by the SDK but delivered per chunks by the server.

Regards,
Arnaud Casame
IMA SDK Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Yair Ansbacher

unread,
Feb 3, 2019, 6:01:36 AM2/3/19
to Interactive Media Ads SDK
Hi Arnaud,

So how the chunk is loaded only once when enablePreloading is false ?? 
Actually, the ad-load timing is same as when enablePreloading false because the additional loaded chunk, so why to use this feature at all ?? 
Also, what's about the VMAP issue above?

Thanks,
Yair

ima-sdk-fo...@google.com

unread,
Feb 4, 2019, 3:59:46 PM2/4/19
to ima...@googlegroups.com
Hi Yair,

When preloading is not enabled, the media file is not preloaded (see screenshots of the Simple Example).

As for your second concern, please note that it is intended behavior that calling AdsManager.init() automatically plays Ad Rules Playlists (VMAP) tags. Since your VMAP ad is supposed to autoplay, it gets stuck on the browser because Safari and Chrome use an automatic inference engine to block media elements with sound from auto-playing. Please, feel free to take a look at our Autoplay guide for more details.

Regards,
Arnaud Casame
IMA SDK Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

preloadingNotCalled.png
no_preloading.png
Reply all
Reply to author
Forward
0 new messages