HTML5 IMA SDK - Retry on 206 Partial Content

93 views
Skip to first unread message

kaderdib

unread,
Jan 26, 2023, 9:58:20 AM1/26/23
to Interactive Media Ads SDK
Hi,

I am using hls to stream ads
Here is an example of a VAST Ad MediaFile :

<MediaFile id="GDFP" delivery="streaming" width="426" height="240" type="application/x-mpegURL" minBitrate="49" maxBitrate="258" scalable="true" maintainAspectRatio="true">
<![CDATA[ https://redirector.gvt1.com/api/manifest/hls_variant/requiressl/yes/source/dclk_video_ads/id/37685dc1cfc45f63/itag/0/playlist_type/LIVE/acao/yes/mime/application%2Fx-mpegURL/ctier/L/ip/0.0.0.0/ipbits/0/expire/1706280065/sparams/ip,ipbits,expire,requiressl,source,id,itag,playlist_type,acao,mime,ctier/signature/582A3DDCD8DD14F3CB9423E350660EAD0B20BF27.305061CF3900A3099BBDF9E63630A0E2F21560AE/key/ck2/file/index.m3u8 ]]>
</MediaFile>

To download the Ad, IMA is adding the headers below :
Request :
Range: bytes=0-
Accept-Encoding: identity

Response :
HTTP/1.1 206 Partial Content

Then, IMA seems do not accepting the 206 response.
So is  doing a retry without the header range
Request :
Accept-Encoding: deflate, gzip

Response :
HTTP/1.1 200 OK

In this case, IMA download play the Ad


Do you think there a way to avoid this retry ?

Best regards,
kaderdib

IMA SDK

unread,
Jan 26, 2023, 2:10:25 PM1/26/23
to ab...@bouyguestelecom.fr, ima...@googlegroups.com
Hello,

Thank you for reaching out to us.

Would it be possible for you to provide the following details via reply privately to author option? This will greatly help us to fully understand the reported use case on our end and to provide precise guidance accourdingly.
  • Ad tag
  • test project that shows the reported issue
  • Screen recording

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

 

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=IMA+SDK&entry.460850823=5004Q00002iO563QAC&entry.80707362=00164929

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.



Regards,
Google Logo
Teejay Wennie
IMA SDK Team
 


ref:_00D1U1174p._5004Q2iO563:ref

kaderdib

unread,
Feb 6, 2023, 5:28:30 AM2/6/23
to Interactive Media Ads SDK
Hi Edessa,

Thak you for this feedback.

This issue is encontred when downloading the ad (the .m3u8 manifest).
To reproduce it, you have to use a cdn responding with http 206 and not http 200.
In fact, IMA is adding the headers below in the request :
Request :
Range: bytes=0-
Accept-Encoding: identity

Response :
HTTP/1.1 206 Partial Content

Then, IMA seems do not accepting the 206 response.
So is  doing a retry without the header range
Request :
Accept-Encoding: deflate, gzip

Response :
HTTP/1.1 200 OK

In this case, IMA download play the Ad


Do you think there a way to avoid this retry ?  
Best regards,
kaderdib

IMA SDK

unread,
Feb 6, 2023, 11:48:33 AM2/6/23
to ab...@bouyguestelecom.fr, ima...@googlegroups.com

Hello,

 

Thank you for all the shared information. I have raised this concern and all the discussion thus far to our wider team for further insights. We will ask to kindly wait patiently for their response.

 

Regards,
 

Google Logo
Michael Angelo
IMA SDK Team
 


ref:_00D1U1174p._5004Q2iO563:ref

IMA SDK

unread,
Feb 15, 2023, 11:30:12 AM2/15/23
to ima...@googlegroups.com, ab...@bouyguestelecom.fr
Hi kaderdib,

The IMA SDK doesn't actually control the loading process for the ad itself. That is automatically managed by the embedded video element within the ad container. As a result, the requests made to load the media file may be dependent on the default feature set of the browser's video element. That said, under certain circumstances, the IMA SDK may need to request the response HEADERS of an ad, before passing it to the video element to be loaded. This is often required to verify mimetype or bitrate. On some limited platforms, HEADERS requests might appear as a full request.

Is this second request causing a specific issue?

Thanks,

Greg Schoppe

kaderdib

unread,
Feb 20, 2023, 7:47:30 AM2/20/23
to Interactive Media Ads SDK
Hi Greg Schoppe,

Thank you for this feedback !
No, the second request is not causing a specific issue. It is just causing a 2 session reservation on our cdn.
We just wondered why we have it on html and not on android or ios for example. 

Do you mean that html5 ima sdk is using the element <video> to play ads ?

Best regards,
kaderdib

IMA SDK

unread,
Feb 24, 2023, 1:23:38 PM2/24/23
to ab...@bouyguestelecom.fr, ima...@googlegroups.com
Hi kaderdib,

The IMA SDK does use an <video> element to play back ads, but in most cases it will be a separate video element from the one used to play content. As such, the IMA SDK's behavior with requesting and playing video streams should match the default behavior of your browser.

Thanks
Reply all
Reply to author
Forward
0 new messages