File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -83,13 +83,13 @@ class _VideoProgressBarState extends State<VideoProgressBar> {
83
83
if (! controller.value.isInitialized) {
84
84
return ;
85
85
}
86
- if ( Platform .isAndroid) {
87
- // on android, we need to let the player buffer when scrolling
88
- // in order to let the player buffer. https://github.com/flutter/flutter/issues/101409
89
- if ( ! controller.value.isBuffering) {
90
- _seekToRelativePosition (details.globalPosition);
91
- }
92
- } else {
86
+ // Should only seek if it's not running on Android, or if it is,
87
+ // then the VideoPlayerController cannot be buffering.
88
+ // On Android, we need to let the player buffer when scrolling
89
+ // in order to let the player buffer. https://github.com/flutter/flutter/issues/101409
90
+ final shouldSeekToRelativePosition =
91
+ ! Platform .isAndroid || ! controller.value.isBuffering;
92
+ if (shouldSeekToRelativePosition) {
93
93
_seekToRelativePosition (details.globalPosition);
94
94
}
95
95
You can’t perform that action at this time.
0 commit comments