chewie
chewie copied to clipboard
Black player when exit fullscreen (WEB)
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:
- start Chewie example app
- Go fullscreen
- Exit fullscreen
I'm on Flutter 3.3.8. Chewie and video_player up-to-date with latest pub.dev versions.
Is there a solution to this issue yet?
Is there a solution to this yet?
Is there a solution to this yet?
@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.
i have the same problem
Is there a solution to this yet?
@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(); } }); }