Android - how to NOT display ad progress in video player progress bar

700 views
Skip to first unread message

nelson ramirez

unread,
Jun 6, 2017, 1:05:59 PM6/6/17
to Interactive Media Ads SDK
For Android DAI,
Consider this scenario: 
When a 30 second preroll ad is inserted and played, once the content begins, the progress is displayed as 30 seconds.
Is there a way to remove the ad progress and durations from the stream via the SDK? or is this something that must be done manually.
The same behavior I described can be seen on the Advanced Sample apps. 

The desired result is that we only want to show content progress and duration, not ads. 


Thanks 

Deepika Uragayala (IMA SDK Team)

unread,
Jun 6, 2017, 4:10:23 PM6/6/17
to Interactive Media Ads SDK
Hi Nelson,

It sounds like you need to update your UI element, which is not controlled by the SDK and you can do this by listening to the VideoProgressUpdate getContentProgress() method via the SDK. Let us know if that helps.

Regards,
Deepika Uragayala
IMA SDK Team
Message has been deleted

nelson ramirez

unread,
Jun 7, 2017, 9:39:06 AM6/7/17
to Interactive Media Ads SDK
Yes, i need to update my UI element. Currently it's updating via the exoplayer itself, but the exoplayer only receives a full duration (which includes ads) and therefore progress including ads. 
We do not wish to include ad durations and progress in progress bar. VideoProgressUpdate.getContentProgress() is just an interface. Is there a specific place to get the ad duration/progress offset from?
What is the recommended approach? Can you please be more specific?

Deepika Uragayala (IMA SDK Team)

unread,
Jun 7, 2017, 2:20:26 PM6/7/17
to Interactive Media Ads SDK
Hi Nelson,

So you can use getDuration() from VideoProgressUpdate class when the getContentProgress() callback is fired and then update your UI. You can review the available methods here.

Regards,
Deepika Uragayala
IMA SDK Team

Phuc Nguyen

unread,
Apr 10, 2018, 9:40:10 PM4/10/18
to Interactive Media Ads SDK
Hi Nelson -- Did you make any progress with the player?

Petr Kuška

unread,
May 4, 2020, 8:11:43 AM5/4/20
to Interactive Media Ads SDK

The getContentProgress() method you mentioned seems to be used the opposite way - to get the progress from player to the ImaWrapper class. We are looking for the opposite way. Could you be more specific, how it should be done, please?

Dne středa 7. června 2017 20:20:26 UTC+2 Deepika Uragayala (IMA SDK Team) napsal(a):

IMA SDK

unread,
May 4, 2020, 2:53:32 PM5/4/20
to kuska...@gmail.com, ima...@googlegroups.com
Hi Petr,

The getContentProgress method is used to track the video content progress, it gives you a continuous update on the video content progress. In our Android DAI AdvancedExample, the getContentProgress method is used to update the video content's progress bar.  Can you provide more details on what you mean by the opposite way?

Regards,
Arnaud Casame
IMA SDK Team


ref:_00D1U1174p._5004Q1zJy28:ref

Petr Kuška

unread,
May 4, 2020, 5:01:48 PM5/4/20
to Interactive Media Ads SDK
I saw both of your examples. THe advanced you mentioned and the basic one as well. Neither of them seems to be solving the original topic of this thread. As for getContentProgress what I meant was that it seems it uses information from exo player to show the progress or the ad itself, but does not change the exo player's progress in any way - which is the topic of this thread - to not include the duration of the ad into the exo player's progress bar. Looking at the method and how it is implemented in the sample you mentioned, there is information extracted from the player (currentPositionPeriod and duration), but the method itself makes no changes to the player's progress. When I tried to use constant values in the VideoProgressUpdate constructor, it had no effect on player's progress bar, only on the ad's own progress (in adUiContainer's web view). If there is a way to start the player's progress from 0:00, could you be more specific how to achieve that, please?

Dne pondělí 4. května 2020 20:53:32 UTC+2 imasdkforumadvisor napsal(a):

IMA SDK

unread,
May 5, 2020, 2:37:22 AM5/5/20
to kuska...@gmail.com, ima...@googlegroups.com

Hi there,

Thank you for your response.

Regarding the exoplayer's progress duration, this is something that you'll need to implement on your own as this involve exoplayer implementation updates which I'm afraid is beyond the scope of this forum.

However, with regard to content time progress without the ads, the IMA SDK has StreamManager.getContentTimeForStreamTime which returns the content time without ads for a given stream time. Our advanced sample app does have getContentTime() method that calls the above method to return the content time value.

Let me know if you can use this method on your end.

Regards,
Sherwin Diesta
IMA SDK Team



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