mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
@@ -32,11 +32,12 @@ import 'package:PiliPlus/plugin/pl_player/models/video_fit_type.dart';
|
||||
import 'package:PiliPlus/plugin/pl_player/utils/fullscreen.dart';
|
||||
import 'package:PiliPlus/services/service_locator.dart';
|
||||
import 'package:PiliPlus/utils/accounts.dart';
|
||||
import 'package:PiliPlus/utils/extension.dart';
|
||||
import 'package:PiliPlus/utils/extension/string_ext.dart';
|
||||
import 'package:PiliPlus/utils/feed_back.dart';
|
||||
import 'package:PiliPlus/utils/image_utils.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart' show PageUtils;
|
||||
import 'package:PiliPlus/utils/path_utils.dart';
|
||||
import 'package:PiliPlus/utils/platform_utils.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart';
|
||||
import 'package:PiliPlus/utils/storage_key.dart';
|
||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
@@ -105,7 +106,7 @@ class PlPlayerController {
|
||||
|
||||
/// 音量控制条
|
||||
final RxDouble volume = RxDouble(
|
||||
Utils.isDesktop ? Pref.desktopVolume : 1.0,
|
||||
PlatformUtils.isDesktop ? Pref.desktopVolume : 1.0,
|
||||
);
|
||||
final setSystemBrightness = Pref.setSystemBrightness;
|
||||
|
||||
@@ -223,7 +224,7 @@ class PlPlayerController {
|
||||
late final bool autoPiP = Pref.autoPiP;
|
||||
bool get isPipMode =>
|
||||
(Platform.isAndroid && Floating().isPipMode) ||
|
||||
(Utils.isDesktop && isDesktopPip);
|
||||
(PlatformUtils.isDesktop && isDesktopPip);
|
||||
late bool isDesktopPip = false;
|
||||
late Rect _lastWindowBounds;
|
||||
|
||||
@@ -320,7 +321,7 @@ class PlPlayerController {
|
||||
}
|
||||
|
||||
/// 弹幕权重
|
||||
late final enableTapDm = Utils.isMobile && Pref.enableTapDm;
|
||||
late final enableTapDm = PlatformUtils.isMobile && Pref.enableTapDm;
|
||||
late int danmakuWeight = Pref.danmakuWeight;
|
||||
late RuleFilter filters = Pref.danmakuFilterRule;
|
||||
// 关联弹幕控制器
|
||||
@@ -402,7 +403,7 @@ class PlPlayerController {
|
||||
|
||||
late final bool tempPlayerConf = Pref.tempPlayerConf;
|
||||
|
||||
late int? cacheVideoQa = Utils.isMobile ? null : Pref.defaultVideoQa;
|
||||
late int? cacheVideoQa = PlatformUtils.isMobile ? null : Pref.defaultVideoQa;
|
||||
late int cacheAudioQa = Pref.defaultAudioQa;
|
||||
bool enableHeart = true;
|
||||
|
||||
@@ -797,7 +798,7 @@ class PlPlayerController {
|
||||
);
|
||||
final pp = player.platform!;
|
||||
if (_videoPlayerController == null) {
|
||||
if (Utils.isDesktop) {
|
||||
if (PlatformUtils.isDesktop) {
|
||||
pp.setVolume(this.volume.value * 100);
|
||||
}
|
||||
if (isAnim) {
|
||||
@@ -1339,7 +1340,7 @@ class PlPlayerController {
|
||||
if (this.volume.value != volume) {
|
||||
this.volume.value = volume;
|
||||
try {
|
||||
if (Utils.isDesktop) {
|
||||
if (PlatformUtils.isDesktop) {
|
||||
_videoPlayerController!.setVolume(volume * 100);
|
||||
} else {
|
||||
FlutterVolumeController.updateShowSystemUI(false);
|
||||
@@ -1355,7 +1356,7 @@ class PlPlayerController {
|
||||
volumeTimer = Timer(const Duration(milliseconds: 200), () {
|
||||
volumeIndicator.value = false;
|
||||
volumeInterceptEventStream.value = false;
|
||||
if (Utils.isDesktop) {
|
||||
if (PlatformUtils.isDesktop) {
|
||||
setting.put(SettingBoxKey.desktopVolume, volume.toPrecision(3));
|
||||
}
|
||||
});
|
||||
@@ -1548,7 +1549,7 @@ class PlPlayerController {
|
||||
this.isManualFS = isManualFS;
|
||||
|
||||
if (status) {
|
||||
if (Utils.isMobile) {
|
||||
if (PlatformUtils.isMobile) {
|
||||
hideStatusBar();
|
||||
if (mode == FullScreenMode.none) {
|
||||
return;
|
||||
@@ -1570,7 +1571,7 @@ class PlPlayerController {
|
||||
await enterDesktopFullscreen(inAppFullScreen: inAppFullScreen);
|
||||
}
|
||||
} else {
|
||||
if (Utils.isMobile) {
|
||||
if (PlatformUtils.isMobile) {
|
||||
showStatusBar();
|
||||
if (mode == FullScreenMode.none) {
|
||||
return;
|
||||
@@ -1737,7 +1738,7 @@ class PlPlayerController {
|
||||
// playerStatus.close();
|
||||
// dataStatus.status.close();
|
||||
|
||||
if (Utils.isDesktop && isAlwaysOnTop.value) {
|
||||
if (PlatformUtils.isDesktop && isAlwaysOnTop.value) {
|
||||
windowManager.setAlwaysOnTop(false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user