mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: 拆分后台播放与AudioService在后台行为的设置
This commit is contained in:
@@ -140,20 +140,20 @@ class _PlaySettingState extends State<PlaySetting> {
|
||||
const SetSwitchItem(
|
||||
title: '后台播放',
|
||||
subTitle: '进入后台时继续播放',
|
||||
setKey: SettingBoxKey.enableBackgroundPlay,
|
||||
setKey: SettingBoxKey.continuePlayInBackground,
|
||||
defaultVal: true,
|
||||
),
|
||||
if (Platform.isAndroid)
|
||||
SetSwitchItem(
|
||||
title: '后台画中画',
|
||||
subTitle: '进入后台时以小窗形式(PiP)播放,建议同时开启【后台播放】,避免没有暂停按钮',
|
||||
subTitle: '进入后台时以小窗形式(PiP)播放',
|
||||
setKey: SettingBoxKey.autoPiP,
|
||||
defaultVal: false,
|
||||
callFn: (val) {
|
||||
if (val &&
|
||||
!setting.get(SettingBoxKey.enableBackgroundPlay,
|
||||
defaultValue: true)) {
|
||||
SmartDialog.showToast('建议开启后台播放');
|
||||
SmartDialog.showToast('建议开启后台音频服务');
|
||||
}
|
||||
}),
|
||||
if (Platform.isAndroid)
|
||||
@@ -227,6 +227,12 @@ class _PlaySettingState extends State<PlaySetting> {
|
||||
}
|
||||
},
|
||||
),
|
||||
const SetSwitchItem(
|
||||
title: '后台音频服务',
|
||||
subTitle: '避免画中画没有播放暂停功能',
|
||||
setKey: SettingBoxKey.enableBackgroundPlay,
|
||||
defaultVal: true,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user