-
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
Unable to start content playback while ad is playing. #3303
Comments
I'm not sure I follow the suggestion here. You can If playWhenReady is false when an ad starts playing it looks like we currently drop any requests to change the value made while the ad is playing, so perhaps you're reporting this as a bug. This was intentional because the user shouldn't be able to interact with playback controls while an ad is playing. If you have a use case for being able to toggle playWhenReady while an ad is playing, please describe it and we can take a look at changing how this works. Thanks! |
Marking as a bug. The app should be able to set playWhenReady programmatically while an ad is playing and have the state reflected when the content resumes. |
Thank you for the prompt response. For clarification, the use-case is that we want to wait for an external event before starting the content, but want to have it pre-buffered while waiting. |
This means the content is played after that ads is finished? |
No, the problem is the opposite. If I call setPlayWhenReady(true) while the ad is playing, the state of the content playback is not affected, so it stays paused after the ad has finished. I would expect the ad video and the content video to be in the same logical state at all times (playing or paused). Maybe I'm looking at it wrong, but that would imply two things:
|
We have a potential fix in review that will make |
Controls are still hidden while playing ads, but if the app pauses the player, controls will be shown. During ads, the player is not seekable. When the player enters the background then returns to the foreground, the content period may not be prepared, so also cache the content window duration. This means that if the app reenters the foreground while an ad is paused the time bar can be populated. Issue: #3303 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=171123428
Issue description
Unable to start content player while ad is playing. If both the IMA ad source and the content source is buffered, a preroll ad would start automatically. After it has been started, the player is in an altered state (refer to ImaAdsLoader.playWhenReadyOverriddenForAds), and the setPlayWhenReady() call does not have an effect on the content.
Reproduction steps
On commit 792f046 (dev-v2 at this moment)
Apply this diff at PlayerActivity.java:304
Start the demo app with extensions, and select [IMA sample ad tags] / [VMAP pre-roll]
After ad finishes, the last ad frame is visible and player is in paused state. Needs to be started manually. This can be a problem if there is some external event
Link to test content
Test content is included in the demo app.
Version of ExoPlayer being used
Commit 792f046, but also reproducible on release-v2.
Device(s) and version(s) of Android being used
Device independent.
A full bug report captured from the device
N/A.
The text was updated successfully, but these errors were encountered: