Video caching mechanism

29 views
Skip to first unread message

Maxence Bourdin

unread,
May 10, 2023, 10:28:38 PM5/10/23
to Interactive Media Ads SDK
Hello,

I'm working on an implementation of the IMA SDK that cache the video and play them later on. My mechanism allow me to cache multiples ADS. I was thinking to analyse the file URL return by the IMA SDK to identify if the AD creative that I receive is already in my cache or not.

Is it something that we are allow to do?
If someone directly change the video inside the creative from Google Ads Manager. Would I be able to identify that in the URL?

Here is what I notice from the URL: https://redirector.gvt1.com/videoplayback/id/XXXXX

The "XXXXX" seems to be unique to a creative.

Thanks in advance
Max

Maxence Bourdin

unread,
May 10, 2023, 10:31:13 PM5/10/23
to Interactive Media Ads SDK
Short version: Can I intercept the video URL return by the IMA SDK, analyse it to check if the video file is already stored locally, and download if necessary.

IMA SDK

unread,
May 11, 2023, 6:56:38 AM5/11/23
to maxenceb...@gmail.com, ima...@googlegroups.com

Hi Max,

Thank you for raising your concern to the IMA SDK forum.

If you'd like to get the information regarding the file URL you can try the getMediaUrl() method which returns the URL of the media file chosen from the ad based on the media selection settings currently in use. Returns null if this information is unavailable. Refer here: https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.Ad#getMediaUrl

Take note that is only available for IMA SDK for HTML5[https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side]. The IMA SDK for Android and iOS don't expose their VAST MediaFile URI through their API.

Let me know if you have any questions.

Regards,

Google Logo IMA SDK Team


ref:_00D1U1174p._5004Q2lGoOZ:ref
Reply all
Reply to author
Forward
0 new messages