onAdStateChanged callback taking more time than expected

54 views
Skip to first unread message

Ankush Grover

unread,
Jan 22, 2021, 3:06:57 AM1/22/21
to Interactive Media Ads SDK
Hi,

I would like to elaborate on two cases where our team is facing issue

1. For mid-roll ads, when one ad ends and it's time for the second ad to come, the ad audio starts to play but the video is not visible as the callback to STARTED in onAdStateChanged method is not being received. As the view's visibility handling is done in the STARTED callback. The STARTED call back comes after 2 - 4 seconds of the ad playback.

2. Something similar is being observed when we are trying to pre-roll 2 ads back to back. When one ad ends, the IMA SDK takes 2-4 seconds for providing the STARTED callbacks for the next ad. The ad's audio continues to play but the view is not visible as we have handled the viewing logic in the STARTED callback. After a delay of above a few seconds, the callback to STARTED in onAdStateChanged listener is received and the view becomes visible.

Nothing of this sort is happening on the first ad play. The callbacks are normal and there is no delay between the LOADED and STARTED callbacks but the issue comes becomes prevalent when more than 1 ad play is expected.

It will be great if you can provide some insight onto this.

Regards,
Ankush

IMA SDK

unread,
Jan 22, 2021, 4:41:03 AM1/22/21
to ima...@googlegroups.com

Hi Ankush,

Thank you for bringing this to our attention.

I found a similar issue on our forum thread about the IMA callback delays (here). Could you please confirm if this is the same issue? If it is, then let's continue our discussion here instead for better tracking of the case. For us to test the scenarios you have shared, as I’ve mentioned on the other thread we need additional information with regard to this issues. For our reference kindly send the following information to our testing alias: imate...@gmail.com

  • Which SDK platform (HTML5, Android or iOS) is being used where the issue is occurring?
  • VAST ad tag (if client-side) / Asset key or CMS and Video IDs (if DAI)
  • Sample project file that demonstrates this issue preferably based on our sample apps (HTML5, Android, iOS) with minimal code changes.




Regards,


Google Logo
Sherwin Diesta
IMA SDK Team
 


ref:_00D1U1174p._5004Q2B2Sqy:ref

Ankush Grover

unread,
Jan 22, 2021, 6:22:26 AM1/22/21
to Interactive Media Ads SDK
The issue specified in your previous comment has been raised by my teammate. We can continue the discussion here.

As required I have shared the details with testing alias over a mail. Kindly let me know how to pursue.

Regards,
Ankush

IMA SDK

unread,
Jan 22, 2021, 10:57:39 AM1/22/21
to ima...@googlegroups.com

Hi Ankush,

I work with Sherwin and will assist you. Thank you for giving an ad tag in private and for more background on your difficulty in demonstrating your issue.

I tested your ad tag in an unmodified Advanced Example app and the ads didn't run - content resume was called right away.

Note that according to our SDK Architecture Guide, after CONTENT_PAUSE_REQUESTED, the app developer pauses content and gives control to the adsManager to play ads. There's no standard way to adjust playback based on the Started callback. 

Also, buffering issues may make your video player come on line slower than the audio. Is the audio being allowed to start before the video?

To address your use case and use an environment as clean as possible from an implementation standpoint, You may want to follow the guide to Custom Ad Playback to use your ExoPlayer as the ad player. You may use our Advanced Example  with its demonstration of custom playback mostly in the VideoPlayerWithAdPlayback class as an example for integrating your ExoPlayer correctly. Alternatively, you can also try demonstrating the problem with our custom ad player in the Advanced example - just configure video playing as you wish with the Started callback being used to start video. 

If you have modified an Advanced Example to fit your use case and can demonstrate that our callbacks coming late are causing the issue, could you send the project to us via our testing alias imate...@gmail.com with a post on this thread once you have done so?

Regards,

Google Logo
Aryeh Baker
IMA SDK Team
 


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