chewie icon indicating copy to clipboard operation
chewie copied to clipboard

Black player when exit fullscreen (WEB)

Open J-Dark opened this issue 3 years ago • 7 comments

On web, the video player turns black whenever you exits fullscreen. The video starts fine, you go on fullscreen and it's fine here too. Then, you exit fullscreen and the video is now black (with audio playing).

To reproduce:

  1. start Chewie example app
  2. Go fullscreen
  3. Exit fullscreen

I'm on Flutter 3.3.8. Chewie and video_player up-to-date with latest pub.dev versions.

J-Dark avatar Nov 28 '22 13:11 J-Dark

Is there a solution to this issue yet?

sujithsa007 avatar Jan 11 '23 12:01 sujithsa007

Is there a solution to this yet?

u382514 avatar Mar 10 '23 17:03 u382514

Is there a solution to this yet?

pankokmu1 avatar Mar 20 '23 14:03 pankokmu1

@pankokmu1 Try listening for Fullscreen with a state variable and replace your original widget, temporarily, with a dummy (like an empty SizedBox). When exiting fullscreen, put the widget back and force a rebuild. It seems the issue is sharing the controller with the overlay that gets generated on fullscreen. Note, I ended up writing my own video player for the web as there are multiple issues, especially concerning mobile. I took after how youtube treats theirs.

u382514 avatar Mar 20 '23 15:03 u382514

i have the same problem

toufchuan avatar Aug 23 '23 08:08 toufchuan

Is there a solution to this yet?

PeLaThai avatar Oct 03 '23 03:10 PeLaThai

@pankokmu1 Try listening for Fullscreen with a state variable and replace your original widget, temporarily, with a dummy (like an empty SizedBox). When exiting fullscreen, put the widget back and force a rebuild. It seems the issue is sharing the controller with the overlay that gets generated on fullscreen. Note, I ended up writing my own video player for the web as there are multiple issues, especially concerning mobile. I took after how youtube treats theirs.

Code example created from tip, it works only draw back is once exits full screen video is back to start

if (chewieController != null) { chewieController!.addListener(() { if (chewieController!.isFullScreen) { _isFullScreen = true; } if (!chewieController!.isFullScreen && _isFullScreen) { _isFullScreen = false; initialize(); } }); }

ToddZeil avatar Nov 02 '23 04:11 ToddZeil