-
Notifications
You must be signed in to change notification settings - Fork 49
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
[video_player_avplay] Automatically rotates video player based on device orientation #817
[video_player_avplay] Automatically rotates video player based on device orientation #817
Conversation
@xiaowei-guan |
The app side must call setState after initialized: _controller.initialize().then((_) => setState())); |
I waiting for #814 merge |
Done |
…ice orientation We already provide rotate API for video player, but it seems like a bug that the video player's video image doesn't rotate according to the device orientation. So we should automatically change this inside video_player. When user call the API, the video image may rotate, but when the device's orientation changes, the rotation may change again.
b98dd97
to
e5ea2c1
Compare
Rebased PR |
If we want to reduce the call times of MediaQuery.orientationOf, We can also use this:
|
When I tested it, the build() calls from calling MediaQuery.orientationOf and OrientationBuilder both had the same call count. This is probably an effect of the prograssbar UI. When we provided a guide about setDisplayRotate(), we did so by using OrientationBuilder(). |
We already provide rotate API for video player,
but it seems like a bug that the video player's video image doesn't rotate according to the device orientation. So we should automatically change this inside video_player. When user call the API, the video image may rotate, but when the device's orientation changes, the rotation may change again.