getAdPodIndex() API return values for the Google DAI Streams for Live and VOD for identifying Preroll/Midroll/Postroll

153 views
Skip to first unread message

Sarath Chandra

unread,
Jul 28, 2020, 11:35:30 AM7/28/20
to Interactive Media Ads SDK
Hi,

When we are looking into the values of the getAdPodIndex() for the Google DAI Live and VOD Streams, here is what we observed:
DAI Live: Always the API returns the value 0
DAI VOD: 
Preroll: The API returns value 0
Midroll: The API returns value 1-n
Postroll: The API return the value n+1...x

How we can identify the Postroll ads with the available details or is there any other API from which we can get to know the position of ad.

DAI live stream: Always returns -1.
DAI VOD: Returns the index of the ad pod. For a preroll pod, returns 0. For midrolls, returns 1, 2,...,N. For a postroll pod, returns N+1...N+X. Defaults to 0 if this ad is not part of a pod, or this pod is not part of a playlist. 

Regards,
Sarath



IMA SDK

unread,
Jul 28, 2020, 6:51:28 PM7/28/20
to sarat...@gmail.com, ima...@googlegroups.com
Hi Sarath,

Thank you for reaching out to us. There's no way for you to identify a Live Stream's Post-roll given the nature of the Live Stream itself, we can never be certain of a stream's duration in advance. There's no API method that you can use to retrieve a post-roll's ad index. I've tested our sample streams (Live and VOD), and the SDK is reporting the ads pod indexes as expected (see screenshot attached).

Regards,
Arnaud Casame
IMA SDK Team


ref:_00D1U1174p._5004Q22ZhLZ:ref
pod_indexes.png

Sarath Chandra

unread,
Jul 28, 2020, 6:56:52 PM7/28/20
to Interactive Media Ads SDK

Thanks for the quick response.
My original question was on identifying the Postroll for DAI VOD Stream, is there any API other then getPodIndex() to identify the Postroll.
For DAI live alway the return value is 0 even though its listed in documentation that its -1 always.

Regards,
Sarath

IMA SDK

unread,
Jul 29, 2020, 1:23:23 AM7/29/20
to sarat...@gmail.com, ima...@googlegroups.com

Hi Sarath,

Thank you for your response. How about using the getTimeOffset() method? For preroll pod, 0 is returned. For midrolls, the scheduled time is returned. For postroll, -1 is returned. In this way you can identify postroll ad. Let me know if this works for you.

Regards,
Sherwin Diesta
IMA SDK Team



ref:_00D1U1174p._5004Q22ZhLZ:ref

Sarath Chandra

unread,
Jul 29, 2020, 2:45:40 AM7/29/20
to Interactive Media Ads SDK
Hi Sherwin Diesta,

Thanks for the prompt reply. I have verified this API return value on the google.ima.dai.api.StreamEvent.Type.STARTED event:
DAI VOD test stream - 2528370/tears-of-steel:
12:06:32.551 getAdPodIndex(): getTimeOffset=0 // preroll
12:06:59.095 getAdPodIndex(): getTimeOffset=79.917 //midroll
12:07:20.801 getAdPodIndex(): getTimeOffset=315.128 / midroll
12:07:48.962 getAdPodIndex(): getTimeOffset=494.837 // midroll
12:08:09.647 getAdPodIndex(): getTimeOffset=774.174 // postroll

DAI Live test stream - sN_IYUG8STe1ZzhIIE_ksA
12:11:14.484 getAdPodIndex(): getTimeOffset=0
12:11:22.504 getAdPodIndex(): getTimeOffset=0
12:11:32.482 getAdPodIndex(): getTimeOffset=0
12:12:12.538 getAdPodIndex(): getTimeOffset=0
12:12:22.485 getAdPodIndex(): getTimeOffset=0
12:12:32.482 getAdPodIndex(): getTimeOffset=0

Still we are unable to find out the Postroll with this API as well.

Regards,
Sarath

IMA SDK

unread,
Jul 29, 2020, 6:39:52 AM7/29/20
to sarat...@gmail.com, ima...@googlegroups.com

Hi Sarath,

Thanks for getting back to us on this and for sharing this information. I was able to replicate this behavior and it seems we need this checked on our end. I’m going to pass this information with the team and will let you know once we have our findings.



Regards,
Sherwin Diesta
IMA SDK Team



ref:_00D1U1174p._5004Q22ZhLZ:ref

Sarath Chandra

unread,
Aug 21, 2020, 11:50:45 AM8/21/20
to Interactive Media Ads SDK
Hi,

I will check the latest behaviour and let you know my findings.

Regards,
Sarath

RE: 
Hi Sarath,

Hope you’re doing well.

As an update, a fix for this issue has been released. Thus, could you please verify on your end if this behavior is still occurring? Please let me know the result.


Regards,
Sherwin Diesta
IMA SDK Team

Sarath Chandra

unread,
Oct 29, 2021, 9:41:49 AM10/29/21
to Interactive Media Ads SDK
Hi Sherwin Diesta,

Thanks for the information on the fix. Haven't been looking into the updates these days. Have verified that the Post-roll is properly detected for the VOD contents and is coming as -1.

Regards,
Sarath

IMA SDK

unread,
Oct 29, 2021, 4:16:09 PM10/29/21
to sarat...@gmail.com, ima...@googlegroups.com
Hi Sarath,

Thank you for reaching out to us again. We would ask if you can share with us more context as it has been quite a long time since we have looked at this case. Not sure if things have changed significantly that this is still valid. So we would ask if you can share more information. I do see that this should have been fixed a while back.

Regards,
Google Logo
William Pescherine
IMA SDK Team
 


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