fix: 改善全屏体验,增加额外横屏设置,替换全屏实现方法

This commit is contained in:
orz12
2024-02-23 15:57:19 +08:00
parent 8e9778cfb0
commit 69d88fbeb1
6 changed files with 21 additions and 38 deletions

View File

@@ -15,16 +15,14 @@ Future<void> landScape() async {
if (kIsWeb) {
await document.documentElement?.requestFullscreen();
} else if (Platform.isAndroid || Platform.isIOS) {
// await SystemChrome.setEnabledSystemUIMode(
// SystemUiMode.immersiveSticky,
// overlays: [],
// );
// await SystemChrome.setPreferredOrientations(
// [
// DeviceOrientation.landscapeLeft,
// DeviceOrientation.landscapeRight,
// ],
// );
if (setting.get(SettingBoxKey.lockLandscape, defaultValue: false)) {
await SystemChrome.setPreferredOrientations(
[
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
],
);
}
await AutoOrientation.landscapeAutoMode(forceSensor: true);
} else if (Platform.isMacOS || Platform.isWindows || Platform.isLinux) {
await const MethodChannel('com.alexmercerind/media_kit_video')