youtube_player_flutter icon indicating copy to clipboard operation
youtube_player_flutter copied to clipboard

[BUG] Progress indicator keeps running even though video has stopped playing long ago

Open sivang opened this issue 1 year ago • 2 comments

Describe the bug image 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 image

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.

sivang avatar Jun 11 '23 21:06 sivang

Describe the bug image 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 image

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

ayodejiEmmanuel avatar Aug 19 '23 16:08 ayodejiEmmanuel

@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())

Jigarmobioxy avatar Feb 29 '24 09:02 Jigarmobioxy