fluttercommunity / chewie

The video player for Flutter with a heart of gold
MIT License
1.94k stars 1k forks source link

Option to customize the overlay colour during hover. #799

Open sanalkv opened 11 months ago

sanalkv commented 11 months ago

Screenshot 2023-11-30 at 1 43 39 PM

There should be an option inside chewie controller to mention the color for overlay. Currently it's Colors.black54 and can't be changed.

alexeyinkin commented 4 months ago

A workaround to remove that overlay is to wrap the player into a Theme widget with iOS target platform:

final themeData = Theme.of(context);
return Theme(
  data: themeData.copyWith(platform: TargetPlatform.iOS),
  child: Chewie(controller: chewieController),
);

As a side effect, you will get CupertinoControls so set the controls class explicitly if you care.

If you want an overlay of a different color, you can add it through ChewieController.overlay.

Martin-QPT commented 2 weeks ago

That solution works pretty well - but they should expose the overlay color (at least) so that we can modify it in some way. If the user happens to mouse over the video the overlay stays in place for 3 seconds and it's not received well.