-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[video_player_android] Fix incorrect dimensions swap #9199
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
base: main
Are you sure you want to change the base?
Conversation
…270 rotation Since flutter#6535 `VideoSize` is used to get width and height instead of getting them from the video `Format`. My testing concluded that `VideoSize` dimension values are post rotation and do not need to be swapped when there is a 90 or 270 degree rotation present.
Just an FYI that I'm working on #9107, which will change the API >= 29 check (that gates the usage of |
Just tested out a Pixel Tablet running API 34 (handles crop and rotation automatically) and it appears to work on the main branch and in this PR (with the videos provided in the example app--not sure if this makes a difference). Will do more testing on physical devices. |
return RotatedBox( | ||
quarterTurns: rotation ~/ 90, | ||
child: child, | ||
); |
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.
Why this change?
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.
This is just to mirror the changes that were done in #8685 to the _VideoPlayerWithRotation
of the main video_player
package.
I can revert that change if it doesn't make sense in this PR...But the example is broken otherwise.
Thanks for bringing that up. I also thought about that, but I don't see any reason for conflict. |
Appreciate it! They will definitely reflect if this PR messed anything up with videos that do not need a rotation, but I don't think any of the example videos require rotation to begin with. Maybe we can add a new video that would meet that requirement? |
Fixes flutter/flutter#166097
List which issues are fixed by this PR. You must list at least one issue.
Pre-Review Checklist
[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3