-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow app to update StyledPlayerView fullscreen state 'out of band' #10391
Comments
I could be misunderstanding, but there seems to be an implicit assumption here that when an app rotates into landscape the video will always be made fullscreen. I don't think that's a reasonable assumption in the general case. I understand that some apps will have this behaviour. More generally, it seems reasonable that an app will want to enter fullscreen mode without the user hitting the UI fullscreen button (whether that's due to rotation, or another signal), and in that case needs a way to indicate to the UI to update the 'mode' of the button. I think this is also what you're pointing out is missing here (emphasis mine):
So if we changed this enhancement into allowing apps to indicate the fullscreen state has changed (without the UI fullscreen button being pressed), would that resolve your concern? |
I agree that the video will not always be fullscreen, but that I'm assuming this is a common use case. So this would be a feature developers would opt into.
Yes, that would. |
Thanks for confirming my proposal would work. I'm afraid I don't know when we'll implement this, but we would accept a high quality PR for this. |
Stumbled upon this issue, but also using expolayer in a jetpack compose app, and it seems that due the nature of compose and how views are torn down and recomposed if state changes, the act of triggering a non-fullscreen to fullscreen with the fullscreen button in At least that's what we are seeing in our app, and it has nothing todo with orientation change. We just simply hit the button, which causes the rendering to change, and then the player no longer displays as full screen. Are there any examples of a working fullscreen button in jetpack compose with expo player? Maybe our approach at making the player full screen is just wrong? Thanks. |
Duplicate of androidx/media#1590 (duping against the newer issue since it's in the currently-maintained media3 project). |
Use case description
When using StyledPlayerControlView's fullscreen button, it should be able to follow the orientation of the device. If the user rotates into landscape, the button should exit fullscreen. Not try to enter fullscreen again.
Proposed solution
StyledPlayerControlView should watch for orientation changes and trigger fullscreen updates if the device enters landscape.
Alternatives considered
Not using StyledPlayerControlView's fullscreen button. Fullscreen cannot be manually set, so there is no way to tell it that the orientation has changed.
The text was updated successfully, but these errors were encountered: