-
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
Add option to show buffering view when setPlayWhenReady=false #4304
Comments
Hi @Gidex, |
I can confirm the current behavior is intentional. Displaying a buffering spinner when the user intention isn't to start playback immediately feels like extra UI noise that doesn't provide the user with useful information. We could probably make the behavior configurable, but I'm not convinced it's important. |
As a user, I find it common for the user to use the buffering spinner to know when the player is ready to play. When watching and the player starts buffering, if the user pauses and the buffering spinner disappears, he may think the player is ready, but if the buffering spinner appears again when playing, it may seem confusing. In slow or unstable connections it is common for the user to pause to wait for the player to load enough so that he can continue without problems, so if he pauses and leaves his cell phone on the couch to go to drink water, when he returns and does not see the buffering spinner, no doubt he will think that the player is ready to play. |
@ojw28 |
Feel free to work on this! I think I'd envisage a new
Open to other approaches also. |
Thank you, I do not see any better approach at the moment. |
This will be merged shortly. Let's use the pull request for tracking. |
#4304 - Add option to show buffering view when setPlayWhenReady is false
private void updateBuffering() {
if (bufferingView != null) {
boolean showBufferingSpinner =
showBuffering
&& player != null
&& player.getPlaybackState() == Player.STATE_BUFFERING
&&
player.getPlayWhenReady();
bufferingView.setVisibility(showBufferingSpinner ? View.VISIBLE : View.GONE);
}
}
I think PlayerView.getPlayWhenReady() should not interfere with the visibility of the bufferingView, since the player keeps buffering even when paused...
The text was updated successfully, but these errors were encountered: