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

Expose aspect ratio deformation #3736

Closed
denizmveli opened this issue Jan 22, 2018 · 3 comments
Closed

Expose aspect ratio deformation #3736

denizmveli opened this issue Jan 22, 2018 · 3 comments
Assignees

Comments

@denizmveli
Copy link

Feature request

Expose the aspect ratio deformation in a useful way for our UI to know if we should show a button to toggle resize modes.

Scenario = 18:9 wide phones like the s8 / pixel 2 XL need a custom feature to allow users to toggle between resize modes (ZOOM and FIT). Similarly viewing 4:3 content on a 16:9 device. It's great that Exo supports these zoom modes....but....

I don't want to show a full screen resize button if the aspect ratio isn't deformed. I'd like to know if the video aspect ratio and the view aspect ratio are the same (within a given tolerance like MAX_ASPECT_RATIO_DEFORMATION_FRACTION).

The code for all this logic exists across SimpleExoPlayerView and AspectRatioFrameLayout. It's tricky to replicate.

Request would be for a property on the SimpleExoPlayerView called aspectRatioDeformation()

@denizmveli
Copy link
Author

Any milestone planned for adding this?

@botaydotcom
Copy link
Contributor

Hi @denizmveli,
Sorry for the late update. This is currently being worked on and will be pushed to dev branch in the next few days.

andrewlewis pushed a commit that referenced this issue Mar 2, 2018
…date

Currently, AspectRatioFrameLayout may need to resize itself if it could not
satisfy a target aspect ratio. User may want to know when this happen, or
whether this can happen, so they can update their UI accordingly. For
example: show/hide a button to toggle different resize mode only when the
aspect ratio of the view and the content is very different.

GitHub: #3736

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187484241
@botaydotcom
Copy link
Contributor

Hi @denizmveli,
The mentioned change has now been pushed to dev-v2. Please help me to test it and see if it can solve your issue. Thank you.

@google google locked and limited conversation to collaborators Aug 10, 2018
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

2 participants