-
Notifications
You must be signed in to change notification settings - Fork 1k
Add workaround for invalid buffering info on android #912
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 workaround for invalid buffering info on android #912
Conversation
bd70415
to
ecea260
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #912 +/- ##
==========================================
- Coverage 44.95% 44.74% -0.22%
==========================================
Files 22 22
Lines 1546 1569 +23
==========================================
+ Hits 695 702 +7
- Misses 851 867 +16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@timoxd7 can you add that additional workaround in the README so that it doesn't get lost after this version is eventually released? Thanks in advance. |
For information until the bug is fixed, and for chewie users only : it is possible to use a simple and complete workaround. The thing is to add a long duration for the loader to appear. Then nothing is blocked anymore even at the end of the video! No need for looping too. It just shows the video paused and played each time seek to is called...
For non chewie users suffering from it, maybe wrapping with chewie could be a temporary solution... |
@timoxd7 @diegotori |
@naghinezhad i am a bit in two minds about this pr. I will incorporate the requested changes, but it still is not a complete fix. I don't know if it works good with live streams. As @yann-elpyoo wrote, you could fix it by disabling indirectly the loading spinner for android, but this also removes the feedback to the user that something is buffering. @diegotori i updated according to your review. I also tested @yann-elpyoo solution and added it to the readme, both work together too (as my workaround will just be hidden by disabling the loader anyway). As maintainer you can decide wether to merge this, as the root problem is not relying in chewie itself. However, we now have it documented here at least and if someone needs a fix, can use it util it is fixed in flutter itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the new utility method, add comments related to the issue your changes are trying to address.
Thanks.
@timoxd7 other than the final nit that I called out, the rest LGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Info
As already described in multiple issues, there is currently a problem with android reporting "isBuffering" with true even if the video is already playing, preventing the video controls to be displayed. This is a workaround, checking (on android only) if the video is actually buffering. Tested with a network- and file-based video.
Additional Issues not solved
If pausing the video and seeking to some point (using seekTo, so clicking on the progress bar) still leads to the infinit loading bar, as no callback is called by the video controller and thus the buffering not updated.
As workaround, just start playing on seekTo like this:
Related to
#909
#907
#906
#903