提交 aa705212 authored 作者: jungleiOS's avatar jungleiOS

iOS 退出播放器恢复竖屏

上级 c95b4dc9
...@@ -233,6 +233,7 @@ class GZVideoPlayerState extends State<GZVideoPlayer> ...@@ -233,6 +233,7 @@ class GZVideoPlayerState extends State<GZVideoPlayer>
if (widget.restoreVertical) { if (widget.restoreVertical) {
if (Platform.isIOS) { if (Platform.isIOS) {
GzOrientation.forceOrientation(DeviceOrientation.portraitUp); GzOrientation.forceOrientation(DeviceOrientation.portraitUp);
GzOrientation.setPreferredOrientations([DeviceOrientation.portraitUp]);
} else { } else {
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论