-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to know whether an IMA ad being played is Pre-roll, Mid-roll, Post-roll? #5925
Comments
Sorry for being slow to reply. The easiest way is probably via the player API: if |
Hi @andrewlewis , |
Sorry, please try: |
Hi @andrewlewis, This works for pre-roll and mid-roll ads. However with post roll ads, it crashes with the following stack trace. (I'm using DASH with widevine DRM).
To produce this crash I'm using the following code:
|
Are you sure I tried to reproduce using one of the sample ad tags with a postroll in the demo app, but the ad group index was correct and the associated ad group time was |
Hi @andrewlewis, Yes - you are correct. I need to use something like this to determine if the player is playing an ad:
The only problem with this is that is does not fire for pre-rolls which is why I have used the |
Content Description
I would like to find out if there is a way to know if the ad currently being played is Pre-roll, Mid-roll or Post-roll. I can't seem to find a listener that exposes this information.
I am currently using the IMA ads event listener on the
ImaAdsLoader
:ExoPlayer Version
2.9.2
The text was updated successfully, but these errors were encountered: