youtube_player_flutter
youtube_player_flutter copied to clipboard
[BUG] Progress indicator keeps running even though video has stopped playing long ago
Describe the bug
As seen in the SS, CircularProgressBar keeps running even though video has long finished playing
To Reproduce Create a flutter app from VSCode using template, add the youtue player widget with a hard coded video id. let video play Expected behavior CircularProgressBar should stop showing after video has finished playing.
Screenshots
Technical Details:
- Device: iOS Simulator
- OS: iOS
- Version 16.x
Additional context
A way to stop it is to trigger an exception inside the onEnd
callback but that breaks some of the rest of the UI.
Describe the bug
As seen in the SS, CircularProgressBar keeps running even though video has long finished playing
To Reproduce Create a flutter app from VSCode using template, add the youtue player widget with a hard coded video id. let video play Expected behavior CircularProgressBar should stop showing after video has finished playing.
Screenshots
Technical Details:
- Device: iOS Simulator
- OS: iOS
- Version 16.x
Additional context A way to stop it is to trigger an exception inside the
onEnd
callback but that breaks some of the rest of the UI.
have you been able to resolve this? currently experiencing this too
@sivang @ayodejiEmmanuel We can resolve bug by editing following file lib/src/widgets/play_pause_button.dart need to add condition where CircularProgressIndicator will not show on _playerState != PlayerState.ended
replace code from
return widget.bufferIndicator ?? Container( width: 70.0, height: 70.0, child: const CircularProgressIndicator( valueColor: AlwaysStoppedAnimation(Colors.white), ), );
to
return widget.bufferIndicator ?? ( _playerState != PlayerState.ended ? Container( width: 70.0, height: 70.0, child: const CircularProgressIndicator( valueColor: AlwaysStoppedAnimation(Colors.white), ), ): Container())