media icon indicating copy to clipboard operation
media copied to clipboard

Enable the developer to set the default state of isFullscreen

Open helomri opened this issue 1 year ago • 2 comments

Use case description

When multiple video players views are chained, if the user presses the fullscreen button in the PlayerControlView (the state of the button would go from fullScreenButton to minimalFullScreenButton) and then navigates to a second PlayerControlView while still being in fullscreen, the button will be in its default position (fullScreenButton) in this new PlayerControlView.

Proposed solution

Create a public facing method in PlayerView called setIsFullscreen which would call PlayerControlView.updateFullScreenButtonForState with the new state (also add the corresponding fullScreenButton and would update isFullscreen)

helomri avatar Aug 02 '24 10:08 helomri

This is the same request as https://github.com/google/ExoPlayer/issues/10391, which I will dupe here.

icbaker avatar Aug 02 '24 11:08 icbaker

I have the same need, the problem is different but the solution would be the same. I use a dialog to present the video in fullscreen. If I use the player fullscreen button to enter and exit fullscreen, everything works as expected. But if I'm in fullscreen and press back, the video exits fullscreen, but the fullscreen button stays out of sync. Which means that I need to press it twice to enter in fullscreen mode again.

4brunu avatar Aug 20 '24 12:08 4brunu