Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Black player when exit fullscreen (WEB) #688

Open
J-Dark opened this issue Nov 28, 2022 · 7 comments
Open

Black player when exit fullscreen (WEB) #688

J-Dark opened this issue Nov 28, 2022 · 7 comments

Comments

@J-Dark
Copy link

J-Dark commented Nov 28, 2022

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.

@sujithsa007
Copy link

Is there a solution to this issue yet?

@u382514
Copy link

u382514 commented Mar 10, 2023

Is there a solution to this yet?

1 similar comment
@pankokmu1
Copy link

Is there a solution to this yet?

@u382514
Copy link

u382514 commented Mar 20, 2023

@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.

@toufchuan
Copy link

i have the same problem

@PeLaThai
Copy link

PeLaThai commented Oct 3, 2023

Is there a solution to this yet?

@ToddZeil
Copy link
Contributor

ToddZeil commented Nov 2, 2023

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants