-
Notifications
You must be signed in to change notification settings - Fork 47
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] Add setDisplayMode and setDisplayRotate API #789
[video_player_avplay] Add setDisplayMode and setDisplayRotate API #789
Conversation
xiaowei-guan
commented
Dec 26, 2024
I tested the setDisplayRotate() API, but there was no change in the video output. --- a/packages/video_player_avplay/example/lib/main.dart
+++ b/packages/video_player_avplay/example/lib/main.dart
@@ -80,6 +80,7 @@ class _HlsRomoteVideoState extends State<_HlsRomoteVideo> {
}
setState(() {});
});
+ _controller.setDisplayRotate(DisplayRotation.rotation_180);
_controller.setLooping(true);
_controller.initialize().then((_) => setState(() {}));
_controller.play();
@@ -202,6 +203,7 @@ class _Mp4RemoteVideoState extends State<_Mp4RemoteVideo> {
}
setState(() {});
});
+ _controller.setDisplayRotate(DisplayRotation.rotation_90);
_controller.setLooping(true);
_controller.initialize().then((_) => setState(() {}));
_controller.play(); |
Future _checkAndUpdateVideoRotate() async { Need convert screen degree to video degree. |
thanks i tested with flutter-tizen/embedder#79 But why is setDisplayMode() needed? Should all items in enum DisplayMode be supported? |
app can set the video screen mode in the specified display area. |