-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Android] Add a delay before displaying progress indicator #623
[Android] Add a delay before displaying progress indicator #623
Conversation
@henri2h so that linked PR is currently awaiting testing, so until that one gets merged into the next |
However, if that Linked PR doesn't get approved, then I'll review. Can you modify the example app so that it's able to play content that evaluates this proposed change? |
Ideally speaking, if this was controlled by the |
Will do this on monday :) |
dc356b5
to
1f51318
Compare
Lint is failing due to import from git repo but that's due to waiting for the upstream PR |
1f51318
to
b2ea6eb
Compare
After some discussion, it was pointed out that the same effect could be achieved in the callback of the seekbar which is simpler and more elegant. So this PR doesn't require anymore external PR. @diegotori what do you think ? Do you want me to add the support for the |
@henri2h is this occurring on iOS as well? If so, it would make sense to also add the delay there if and only if it occurs on iOS. |
I don't think so, but I don't have a mac so can't really test it. |
In that case, I'll have to take a look at it later today. |
@@ -302,9 +310,78 @@ class _ChewieDemoState extends State<ChewieDemo> { | |||
), | |||
], | |||
), | |||
if (Platform.isAndroid) |
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.
Why not using it for iOS and Android?
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.
I don't have any apple device so I can't test on iOS and don't want to modify things that I'm not sure it properly works / is needed.
LGTM |
@brianegan I'm curious about your thoughts on this change, whenever you're able to chime in. Thanks in advance. |
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.
Overall I think the solution makes sense, but it would be cool to see it applied to both Cupertino and Material controls. That will ensure feature parity and make future maintenence easier.
Please re-sync your changes with master's current changes. Thanks. |
Once you re-sync the branch, I'm gonna attempt to smoke test these changes on my end, in particular with an iOS Simulator. If all works well after that, then I would say this PR is ready for release. |
1e62c9f
to
79bfde8
Compare
Changes re synced with master, did you had time to review the changes ? Thanks ! |
@henri2h not yet. Will attempt to do so today or tonight. Thank you for your patience. |
@henri2h After running your changes, looks like the |
However, when I replaced the suspect video link with this one, it did work. So far no issues when I used that video. Please edit the example app and replace the current |
Done ;) |
LGTM. Thanks for all of your hard work, @henri2h. |
thanks! |
* commit '3948d23733638d8a58ea5ff065abfe96934d2373': (110 commits) Version 1.3.4. Addresses PRs fluttercommunity#623 and fluttercommunity#646. Update pubspec.yaml version updates fix: change video type fix: format and migration artifacts fix: apply diegotori suggestion feat: added support for apple and desktop version feat: Make progressIndicatorDelay a Duration fix: simplify assignation fix: name fix: let the android player buffer before seeking once more fix: removed old code fix: lint feat: added method to set progress delay feat: added example debug feat: add a delay before displaying progress indicator Version 1.3.3. Adds PR fluttercommunity#634. Update pubspec.yaml chore: remove unused dependency Version 1.3.2. Adds PR fluttercommunity#626. ... # Conflicts: # example/ios/Runner.xcodeproj/project.pbxproj # example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme # example/ios/Runner/Info.plist # example/lib/main.dart # example/pubspec.yaml # lib/src/chewie_player.dart # pubspec.yaml
After a bit of digging in the
video_player
, I managed to enhance the seeking performance.However, with this when seeking, it's frequent to have dozen of milliseconds between
STATE_BUFFERING
andSTATE_READY
. This makes theCircularProgressIndicator
be displayed during a few milliseconds.To prevent this, we propose to introduce a bit of temporization between the first
isBuffering
status and displaying theCircularProgressIndicator
.Currently, an arbitrary timeout of 200ms has been chosen.
Linked pull request : flutter/plugins#5145
NB: This proposal only edit the
material_control
version of the player. I can edit the other view if you are willing to accept this proposal.