Full screen button don't change on auto rotate of device in exo player with jetpack compsoe.
Version
Media3 1.3.1
More version details
media3_version: 1.3.1
Devices that reproduce the issue
all android devices
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
1- add setFullScreenButtonClickListener in PlayerView inside AndroidView, it will show a fullscreen button that toggles into exit full screen button on click. and i do -
if (!isFullscreen) {
(context as? Activity)?.requestedOrientation =
ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE
isFullscreen = true
} else {
(context as? Activity)?.requestedOrientation =
ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
isFullscreen = false
}
this works when i click on button then its orientation changes.
Problem: how to change button (from full screen to exit full screen and vice versa) when screen auto rotate .
Expected result
Actual result
Media
the video is drmn protected hence background is black
Bug Report
- [ ] You will email the zip file produced by
adb bugreportto [email protected] after filing this issue.
this happen when auto rotate, but when rotate onclick means of full screen button then it is okay
This looks similar to https://github.com/androidx/media/issues/184 and https://github.com/google/ExoPlayer/issues/10391#issuecomment-1336676267, however I am struggling to understand your reproduction steps.
- Do you start off in Portrait mode and rotate your phone, causing the video to change to Landscape automatically?
- Do you press the fullscreen button before or after rotation?
The fullscreen button might be losing its state (i.e. it is "forgetting" that it already moved from smallScreen->fullScreen) and defaulting back to its original value. It is hard to analyse this further without seeing more of your code.
Hey @sid1605. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!