mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: 移除冗余额外横屏功能
This commit is contained in:
@@ -26,7 +26,6 @@ class _PlaySettingState extends State<PlaySetting> {
|
|||||||
late dynamic defaultAudioQa;
|
late dynamic defaultAudioQa;
|
||||||
late dynamic defaultDecode;
|
late dynamic defaultDecode;
|
||||||
late int defaultFullScreenMode;
|
late int defaultFullScreenMode;
|
||||||
late bool lockLandscape;
|
|
||||||
late int defaultBtmProgressBehavior;
|
late int defaultBtmProgressBehavior;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -40,8 +39,6 @@ class _PlaySettingState extends State<PlaySetting> {
|
|||||||
defaultValue: VideoDecodeFormats.values.last.code);
|
defaultValue: VideoDecodeFormats.values.last.code);
|
||||||
defaultFullScreenMode = setting.get(SettingBoxKey.fullScreenMode,
|
defaultFullScreenMode = setting.get(SettingBoxKey.fullScreenMode,
|
||||||
defaultValue: FullScreenMode.values.first.code);
|
defaultValue: FullScreenMode.values.first.code);
|
||||||
lockLandscape = setting.get(SettingBoxKey.lockLandscape,
|
|
||||||
defaultValue: false);
|
|
||||||
defaultBtmProgressBehavior = setting.get(SettingBoxKey.btmProgressBehavior,
|
defaultBtmProgressBehavior = setting.get(SettingBoxKey.btmProgressBehavior,
|
||||||
defaultValue: BtmProgresBehavior.values.first.code);
|
defaultValue: BtmProgresBehavior.values.first.code);
|
||||||
}
|
}
|
||||||
@@ -136,12 +133,6 @@ class _PlaySettingState extends State<PlaySetting> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
const SetSwitchItem(
|
|
||||||
title: '额外横屏',
|
|
||||||
subTitle: '执行播放器横屏前,额外施加屏幕旋转方向限制',
|
|
||||||
setKey: SettingBoxKey.lockLandscape,
|
|
||||||
defaultVal: false,
|
|
||||||
),
|
|
||||||
const SetSwitchItem(
|
const SetSwitchItem(
|
||||||
title: '开启硬解',
|
title: '开启硬解',
|
||||||
subTitle: '以较低功耗播放视频',
|
subTitle: '以较低功耗播放视频',
|
||||||
|
|||||||
@@ -5,9 +5,6 @@ import 'package:auto_orientation/auto_orientation.dart';
|
|||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
import '../../../common/widgets/custom_toast.dart';
|
|
||||||
import '../../../utils/storage.dart';
|
|
||||||
|
|
||||||
//横屏
|
//横屏
|
||||||
Future<void> landScape() async {
|
Future<void> landScape() async {
|
||||||
dynamic document;
|
dynamic document;
|
||||||
@@ -15,14 +12,6 @@ Future<void> landScape() async {
|
|||||||
if (kIsWeb) {
|
if (kIsWeb) {
|
||||||
await document.documentElement?.requestFullscreen();
|
await document.documentElement?.requestFullscreen();
|
||||||
} else if (Platform.isAndroid || Platform.isIOS) {
|
} else if (Platform.isAndroid || Platform.isIOS) {
|
||||||
if (setting.get(SettingBoxKey.lockLandscape, defaultValue: false)) {
|
|
||||||
await SystemChrome.setPreferredOrientations(
|
|
||||||
[
|
|
||||||
DeviceOrientation.landscapeLeft,
|
|
||||||
DeviceOrientation.landscapeRight,
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
await AutoOrientation.landscapeAutoMode(forceSensor: true);
|
await AutoOrientation.landscapeAutoMode(forceSensor: true);
|
||||||
} else if (Platform.isMacOS || Platform.isWindows || Platform.isLinux) {
|
} else if (Platform.isMacOS || Platform.isWindows || Platform.isLinux) {
|
||||||
await const MethodChannel('com.alexmercerind/media_kit_video')
|
await const MethodChannel('com.alexmercerind/media_kit_video')
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ class SettingBoxKey {
|
|||||||
defaultAudioQa = 'defaultAudioQa',
|
defaultAudioQa = 'defaultAudioQa',
|
||||||
autoPlayEnable = 'autoPlayEnable',
|
autoPlayEnable = 'autoPlayEnable',
|
||||||
fullScreenMode = 'fullScreenMode',
|
fullScreenMode = 'fullScreenMode',
|
||||||
lockLandscape = 'lockLandscape',
|
|
||||||
defaultDecode = 'defaultDecode',
|
defaultDecode = 'defaultDecode',
|
||||||
danmakuEnable = 'danmakuEnable',
|
danmakuEnable = 'danmakuEnable',
|
||||||
defaultToastOp = 'defaultToastOp',
|
defaultToastOp = 'defaultToastOp',
|
||||||
|
|||||||
Reference in New Issue
Block a user