mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
Fix typo
This commit is contained in:
@@ -26,9 +26,9 @@ import 'package:universal_platform/universal_platform.dart';
|
||||
import '../../models/video/play/subtitle.dart';
|
||||
// import 'package:wakelock_plus/wakelock_plus.dart';
|
||||
|
||||
Box videoStorage = GStrorage.video;
|
||||
Box setting = GStrorage.setting;
|
||||
Box localCache = GStrorage.localCache;
|
||||
Box videoStorage = GStorage.video;
|
||||
Box setting = GStorage.setting;
|
||||
Box localCache = GStorage.localCache;
|
||||
|
||||
class PlPlayerController {
|
||||
Player? _videoPlayerController;
|
||||
@@ -167,7 +167,7 @@ class PlPlayerController {
|
||||
/// [videoPlayerController] instance of Player
|
||||
Player? get videoPlayerController => _videoPlayerController;
|
||||
|
||||
/// [videoController] instace of Player
|
||||
/// [videoController] instance of Player
|
||||
VideoController? get videoController => _videoController;
|
||||
|
||||
Rx<bool> get isSliderMoving => _isSliderMoving;
|
||||
@@ -640,7 +640,7 @@ class PlPlayerController {
|
||||
}
|
||||
|
||||
Future<void> autoEnterFullscreen() async {
|
||||
bool autoEnterFullscreen = GStrorage.setting
|
||||
bool autoEnterFullscreen = GStorage.setting
|
||||
.get(SettingBoxKey.enableAutoEnter, defaultValue: false);
|
||||
if (autoEnterFullscreen) {
|
||||
Future.delayed(const Duration(milliseconds: 500), () {
|
||||
@@ -735,7 +735,7 @@ class PlPlayerController {
|
||||
}),
|
||||
onPositionChanged.listen((event) {
|
||||
EasyThrottle.throttle(
|
||||
'mediaServicePositon',
|
||||
'mediaServicePosition',
|
||||
const Duration(seconds: 1),
|
||||
() => videoPlayerServiceHandler.onPositionChange(event));
|
||||
}),
|
||||
@@ -951,10 +951,10 @@ class PlPlayerController {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> setBrightness(double brightnes) async {
|
||||
Future<void> setBrightness(double brightness) async {
|
||||
try {
|
||||
brightness.value = brightnes;
|
||||
ScreenBrightness().setScreenBrightness(brightnes);
|
||||
this.brightness.value = brightness;
|
||||
ScreenBrightness().setScreenBrightness(brightness);
|
||||
// setVideoBrightness();
|
||||
} catch (e) {
|
||||
throw 'Failed to set brightness';
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
// ignore: camel_case_types
|
||||
enum BtmProgresBehavior {
|
||||
enum BtmProgressBehavior {
|
||||
alwaysShow,
|
||||
alwaysHide,
|
||||
onlyShowFullScreen,
|
||||
onlyHideFullScreen,
|
||||
}
|
||||
|
||||
extension BtmProgresBehaviorDesc on BtmProgresBehavior {
|
||||
extension BtmProgresBehaviorDesc on BtmProgressBehavior {
|
||||
String get description => ['始终展示', '始终隐藏', '仅全屏时展示', '仅全屏时隐藏'][index];
|
||||
}
|
||||
|
||||
extension BtmProgresBehaviorCode on BtmProgresBehavior {
|
||||
extension BtmProgresBehaviorCode on BtmProgressBehavior {
|
||||
static final List<int> _codeList = [0, 1, 2, 3];
|
||||
int get code => _codeList[index];
|
||||
|
||||
static BtmProgresBehavior? fromCode(int code) {
|
||||
static BtmProgressBehavior? fromCode(int code) {
|
||||
final index = _codeList.indexOf(code);
|
||||
if (index != -1) {
|
||||
return BtmProgresBehavior.values[index];
|
||||
return BtmProgressBehavior.values[index];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ Future<void> verticalScreen() async {
|
||||
|
||||
//全向
|
||||
Future<void> autoScreen() async {
|
||||
if (!GStrorage.setting
|
||||
if (!GStorage.setting
|
||||
.get(SettingBoxKey.allowRotateScreen, defaultValue: true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
final RxDouble _distance = 0.0.obs;
|
||||
final RxBool _volumeInterceptEventStream = false.obs;
|
||||
|
||||
Box setting = GStrorage.setting;
|
||||
Box setting = GStorage.setting;
|
||||
late FullScreenMode mode;
|
||||
late int defaultBtmProgressBehavior;
|
||||
late bool enableQuickDouble;
|
||||
@@ -145,7 +145,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
widget.controller.bottomControl = widget.bottomControl;
|
||||
widget.controller.danmuWidget = widget.danmuWidget;
|
||||
defaultBtmProgressBehavior = setting.get(SettingBoxKey.btmProgressBehavior,
|
||||
defaultValue: BtmProgresBehavior.values.first.code);
|
||||
defaultValue: BtmProgressBehavior.values.first.code);
|
||||
enableQuickDouble =
|
||||
setting.get(SettingBoxKey.enableQuickDouble, defaultValue: true);
|
||||
fullScreenGestureReverse = setting
|
||||
@@ -895,15 +895,15 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
return Container();
|
||||
}
|
||||
if (defaultBtmProgressBehavior ==
|
||||
BtmProgresBehavior.alwaysHide.code) {
|
||||
BtmProgressBehavior.alwaysHide.code) {
|
||||
return const SizedBox();
|
||||
}
|
||||
if (defaultBtmProgressBehavior ==
|
||||
BtmProgresBehavior.onlyShowFullScreen.code &&
|
||||
BtmProgressBehavior.onlyShowFullScreen.code &&
|
||||
!_.isFullScreen.value) {
|
||||
return const SizedBox();
|
||||
} else if (defaultBtmProgressBehavior ==
|
||||
BtmProgresBehavior.onlyHideFullScreen.code &&
|
||||
BtmProgressBehavior.onlyHideFullScreen.code &&
|
||||
_.isFullScreen.value) {
|
||||
return const SizedBox();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user