Skip to content
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

File Buffering callback #408

Closed
ReaganRealones opened this issue Jan 31, 2020 · 7 comments
Closed

File Buffering callback #408

ReaganRealones opened this issue Jan 31, 2020 · 7 comments

Comments

@ReaganRealones
Copy link

How do I get a callback or listen to audio file buffering while playing a remote file such that I can customize and show the user a preloader if it's buffering more while playing already

@pobrejuanito
Copy link
Contributor

Maybe show the preloader until you get a duration info? Maybe listen to AudioPlayerState value?

@ReaganRealones
Copy link
Author

@pobrejuanito I get what you're saying and that's what I do but while it's playing and starts buffering again, the audio suddenly stops playing, however the audio player state is still PLAYING. In such a scenario, I want to display a preloaded to indicate to the user the audio is buffering.

@volgin
Copy link
Contributor

volgin commented Feb 1, 2020

just_audio plugin has two more player states: "connecting" and "buffering". "buffering" state is very valuable. Playback can stop at any moment if a player cannot load the file, but there is no way to alert the user if a player remains in the "playing" state. It is also very useful at the beginning of the playback: "paused -> buffering -> playing" sequence leads to a better UX.

@ReaganRealones
Copy link
Author

@volgin ,that's another plugin right?

@ReaganRealones
Copy link
Author

@volgin , Do you think it's better than Audioplayers plugin?

@pobrejuanito
Copy link
Contributor

At quick glance, it appears an equivalent of "buffering" implementation in audioplayers compared to just_audio is implementing seekCompleteHandler and indicate buffering is done inside handler? I'm going to try that when I get a chance.

@erickzanardo
Copy link
Member

Closing in favor of #361

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants