mod: iOS端隐藏自动pip设置
This commit is contained in:
@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:hive/hive.dart';
|
import 'package:hive/hive.dart';
|
||||||
@ -95,12 +97,13 @@ class _PlaySettingState extends State<PlaySetting> {
|
|||||||
setKey: SettingBoxKey.enableBackgroundPlay,
|
setKey: SettingBoxKey.enableBackgroundPlay,
|
||||||
defaultVal: false,
|
defaultVal: false,
|
||||||
),
|
),
|
||||||
const SetSwitchItem(
|
if (Platform.isAndroid)
|
||||||
title: '自动PiP播放',
|
const SetSwitchItem(
|
||||||
subTitle: '进入后台时画中画播放',
|
title: '自动PiP播放',
|
||||||
setKey: SettingBoxKey.autoPiP,
|
subTitle: '进入后台时画中画播放',
|
||||||
defaultVal: false,
|
setKey: SettingBoxKey.autoPiP,
|
||||||
),
|
defaultVal: false,
|
||||||
|
),
|
||||||
const SetSwitchItem(
|
const SetSwitchItem(
|
||||||
title: '自动全屏',
|
title: '自动全屏',
|
||||||
subTitle: '视频开始播放时进入全屏',
|
subTitle: '视频开始播放时进入全屏',
|
||||||
@ -154,9 +157,12 @@ class _PlaySettingState extends State<PlaySetting> {
|
|||||||
int? result = await showDialog(
|
int? result = await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return SelectDialog<int>(title: '默认画质', value: defaultVideoQa, values: VideoQuality.values.reversed.map((e) {
|
return SelectDialog<int>(
|
||||||
return {'title': e.description, 'value': e.code};
|
title: '默认画质',
|
||||||
}).toList());
|
value: defaultVideoQa,
|
||||||
|
values: VideoQuality.values.reversed.map((e) {
|
||||||
|
return {'title': e.description, 'value': e.code};
|
||||||
|
}).toList());
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
@ -177,9 +183,12 @@ class _PlaySettingState extends State<PlaySetting> {
|
|||||||
int? result = await showDialog(
|
int? result = await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return SelectDialog<int>(title: '默认音质', value: defaultAudioQa, values: AudioQuality.values.reversed.map((e) {
|
return SelectDialog<int>(
|
||||||
return {'title': e.description, 'value': e.code};
|
title: '默认音质',
|
||||||
}).toList());
|
value: defaultAudioQa,
|
||||||
|
values: AudioQuality.values.reversed.map((e) {
|
||||||
|
return {'title': e.description, 'value': e.code};
|
||||||
|
}).toList());
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
@ -200,9 +209,12 @@ class _PlaySettingState extends State<PlaySetting> {
|
|||||||
String? result = await showDialog(
|
String? result = await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return SelectDialog<String>(title: '默认解码格式', value: defaultDecode, values: VideoDecodeFormats.values.map((e) {
|
return SelectDialog<String>(
|
||||||
return {'title': e.description, 'value': e.code};
|
title: '默认解码格式',
|
||||||
}).toList());
|
value: defaultDecode,
|
||||||
|
values: VideoDecodeFormats.values.map((e) {
|
||||||
|
return {'title': e.description, 'value': e.code};
|
||||||
|
}).toList());
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
@ -223,9 +235,12 @@ class _PlaySettingState extends State<PlaySetting> {
|
|||||||
int? result = await showDialog(
|
int? result = await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return SelectDialog<int>(title: '默认全屏方式', value: defaultFullScreenMode, values: FullScreenMode.values.map((e) {
|
return SelectDialog<int>(
|
||||||
return {'title': e.description, 'value': e.code};
|
title: '默认全屏方式',
|
||||||
}).toList());
|
value: defaultFullScreenMode,
|
||||||
|
values: FullScreenMode.values.map((e) {
|
||||||
|
return {'title': e.description, 'value': e.code};
|
||||||
|
}).toList());
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
@ -246,9 +261,12 @@ class _PlaySettingState extends State<PlaySetting> {
|
|||||||
int? result = await showDialog(
|
int? result = await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return SelectDialog<int>(title: '底部进度条展示', value: defaultBtmProgressBehavior, values: BtmProgresBehavior.values.map((e) {
|
return SelectDialog<int>(
|
||||||
return {'title': e.description, 'value': e.code};
|
title: '底部进度条展示',
|
||||||
}).toList());
|
value: defaultBtmProgressBehavior,
|
||||||
|
values: BtmProgresBehavior.values.map((e) {
|
||||||
|
return {'title': e.description, 'value': e.code};
|
||||||
|
}).toList());
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
|
Reference in New Issue
Block a user