Skip to content
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

屏幕旋转问题Screen rotation problem #281

Open
2 tasks done
iris1598 opened this issue Sep 3, 2024 · 2 comments
Open
2 tasks done

屏幕旋转问题Screen rotation problem #281

iris1598 opened this issue Sep 3, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@iris1598
Copy link

iris1598 commented Sep 3, 2024

Brief summary

安卓端的软件横屏和竖屏都适配了,但是看完视频就锁定成横屏(平板)/竖屏(手机)了,我觉得这样做不值得,因为平板端竖屏阅读小说和漫画明显是一个更好的选择。
The software on the Android end has been adapted for both landscape and portrait modes, but after watching a video, it locks into landscape mode (for tablets) / portrait mode (for phones). I don't think this approach is worthwhile, because reading novels and comics in portrait mode on tablets is obviously a better choice.

Steps to reproduce

1、观看视频
2、退出视频

1、Watch video
2、Exit video

Miru version

1.8.1

Device

No response

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • If this is an issue with a extension, I should be opening an issue in the extension repository.
@iris1598 iris1598 added the help wanted Extra attention is needed label Sep 3, 2024
@iris1598
Copy link
Author

iris1598 commented Sep 3, 2024

好吧,我还没有看dev分支的新播放器有没有这个问题,旧的播放器确实是有这个问题。

@iris1598
Copy link
Author

iris1598 commented Sep 3, 2024

新版应该还是有这个问题,问题出在lib\controllers\watch\video_controller.dart上的

@OverRide
void onClose() {
if (Platform.isAndroid) {
SystemChrome.setEnabledSystemUIMode(
SystemUiMode.edgeToEdge,
);
// 如果是平板则不改变
if (LayoutUtils.isTablet) {
return;
}
// 切换回竖屏
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
}
事实上限制了屏幕的选择方向,鉴于手机上横屏体验并不怎么样,推荐直接在整个软件除了播放页的地方限制竖屏使用,或者在横屏时使用平板模式,回到竖屏时使用手机模式。(事实上,如果你在安卓手机中横着打开软件,就会变成平板模式,因为现在判断的逻辑是如果宽度大于800就是平板,但是横着打开时,读取到的宽度是长边,所以很有可能大于800。实际使用体验我觉得比纯粹的手机横屏使用好很多),而平板则取消这个限制。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
1 participant