-
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
Video with preroll stuck in BUFFERING state when resuming playback #7508
Comments
Thanks for reporting this. In the recent IMA SDK API changes VideoAdPlayer now has a |
@andrewlewis I know it's soon to ask, but are you able to tell if this is something that could be easily fixed, and maybe a possible ETA on when could we be seeing a release with this fix? |
The release() method was added in the recent IMA API changes for preloading and now 'collides' with the ExoPlayer AdsLoader release method. This led to all ads completing being treated as a call to completely release the ads loader, which meant that the ad playback state was not updated on resuming after all ads had completed, which in turn led to playback getting stuck buffering on returning from the background after all ads played. Move the IMA callbacks into an inner class to avoid this. Issue: #7508 PiperOrigin-RevId: 316834561
The release() method was added in the recent IMA API changes for preloading and now 'collides' with the ExoPlayer AdsLoader release method. This led to all ads completing being treated as a call to completely release the ads loader, which meant that the ad playback state was not updated on resuming after all ads had completed, which in turn led to playback getting stuck buffering on returning from the background after all ads played. Move the IMA callbacks into an inner class to avoid this. Issue: #7508 PiperOrigin-RevId: 316834561
Fixed in the commits referenced above. This will be part of 2.11.6, which should be released today or tomorrow. |
I updated to 2.11.6 but I cannot compile my app because this method in ImaAdsLoader don't exist anymore: I scanned through the source code but I'm failing to see where I'm supposed to register my VideoAdPlayerCallback. I specifically use the onPlay and onError callbacks. |
I moved those into an inner class which isn't visible (it wasn't really intentional to expose Using Are you able to use the player event listener to detect the cases you need? There is some sample code to know what ad is playing based on position discontinuities in #6249. For the error case you can look for errors reported via |
[REQUIRED] Issue description
I'm having a bug which I think is related to prerolls/IMA, and I was able to reproduce it in the demo app.
It happens when I play a video that has a preroll, wait for the preroll to end, minimize the app by pressing the home button and then return to the app. The playback won't resume, as the player will get stuck in buffering forever.
The last exo related logs after I re-foreground the app are:
[REQUIRED] Reproduction steps
In the Exoplayer demo app, go to the "IMA sample ad tags" section and pick an option that has a preroll (for example: "VMAP pre-roll").
Wait for the preroll to finish, and then press the home button to minimize the app.
Reopen the app.
Player will get stuck in the buffering state forever.
[REQUIRED] Version of ExoPlayer being used
This started happening in version 2.11.5.
[REQUIRED] Device(s) and version(s) of Android being used
I am using Android Emulators API 25, and a Samsung Galaxy S20. I can reproduce the issue everytime.
The text was updated successfully, but these errors were encountered: