Skip to content
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

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

Closed
1 task
sid1605 opened this issue Apr 24, 2024 · 3 comments
Assignees

Comments

@sid1605
Copy link

sid1605 commented Apr 24, 2024

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

@sid1605
Copy link
Author

sid1605 commented Apr 24, 2024

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

@oceanjules
Copy link
Contributor

This looks similar to #184 and google/ExoPlayer#10391 (comment), 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.

@google-oss-bot
Copy link
Collaborator

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!

@sid1605 sid1605 closed this as completed May 28, 2024
@androidx androidx locked and limited conversation to collaborators Jul 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants