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
[expo-av][android] fix video width same as video height #15579
Conversation
Hi there! 👋 I'm a bot whose goal is to ensure your contributions meet our guidelines. I've found some issues in your pull request that should be addressed (click on them for more details) 👇
|
why does this PR still open? does the issue fixed? |
thanks for this PR. I am using this changes with patch package and it fixed my issue, related to #12839 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as this PR does the job I'm ok with that, but it looks fishy that origianl height
is not reported correctly and it's needed to be calculated from the pixelWidthHeightRatio
and width
.
cc @lukmccall, @tsapeta
The PR itself lacks proper CHANGELOG entry.
It doesn't seem right. Can you provide more context about your solution? |
Doesn't the linked ExoPlayer github issue and the reproducible demo give enough context ? |
Ok, you convinced me that is enough information. It seems very weird that we have to calculate the video width. I'll merge that, but please add a changelog entry to https://github.com/expo/expo/blob/main/packages/expo-av/CHANGELOG.md |
@mtroskot Any chance you could add the changelog entry? Would be nice to finally have that issue resolved 🙂 |
That issue should be fixed by #19332. We bumped the ExoPlayer. The current version should return the correct video size. |
@lukmccall It still seems to be broken in Expo47. I have tweaked the snack from @mtroskot and upgraded the npm modules to the latest versions. As you can see it shows a popup with the same width and height. Snack: https://snack.expo.dev/@cgavrilete/android-video-size-wrong |
According to the https://github.com/google/ExoPlayer/blob/release-v2/RELEASENOTES.md#2140-2021-05-13 changelog, the fix which was pointed out in the description should be applied to the ExoPlayer codebase. It may not be enough, but it also means that this PR won't fix that either. I'll take a closer look later to check if that's true. |
Why
On Android for some videos the width is the same as the video height. This PR fixes that issue.
#12839
How
Using pixelWidthHeightRatio as described in google/ExoPlayer#3690
Test Plan
Tested on emulator with reproducible example https://snack.expo.dev/@trokiize/android-video-size-wrong.