media icon indicating copy to clipboard operation
media copied to clipboard

Full screen button don't change on auto rotate of device in exo player with jetpack compsoe.

Open sid1605 opened this issue 1 year ago • 2 comments

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 . Screenshot_2024-04-24-10-52-50-63_6acdc9aa7b878f572c44a02942cb6f60 1 Screenshot_2024-04-24-11-08-04-50_6acdc9aa7b878f572c44a02942cb6f60 1

Expected result

Screenshot_2024-04-24-11-11-30-04_6acdc9aa7b878f572c44a02942cb6f60 1

Actual result

Screenshot_2024-04-24-11-08-04-50_6acdc9aa7b878f572c44a02942cb6f60 1

Media

the video is drmn protected hence background is black

Bug Report

  • [ ] You will email the zip file produced by adb bugreport to [email protected] after filing this issue.

sid1605 avatar Apr 24 '24 05:04 sid1605

this happen when auto rotate, but when rotate onclick means of full screen button then it is okay

sid1605 avatar Apr 24 '24 05:04 sid1605

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.

oceanjules avatar May 08 '24 22:05 oceanjules

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!

google-oss-bot avatar May 28 '24 01:05 google-oss-bot