mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: play speed
Closes #11 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -251,7 +251,7 @@ class PlPlayerController {
|
||||
late double strokeWidth;
|
||||
late int fontWeight;
|
||||
late double danmakuDurationVal;
|
||||
late List<double> speedsList;
|
||||
late List<double> speedList;
|
||||
double? defaultDuration;
|
||||
late bool enableAutoLongPressSpeed = false;
|
||||
late bool enableLongShowControl;
|
||||
@@ -374,12 +374,7 @@ class PlPlayerController {
|
||||
}
|
||||
enableLongShowControl =
|
||||
setting.get(SettingBoxKey.enableLongShowControl, defaultValue: false);
|
||||
speedsList = List<double>.from(videoStorage
|
||||
.get(VideoBoxKey.customSpeedsList, defaultValue: <double>[]));
|
||||
for (final PlaySpeed i in PlaySpeed.values) {
|
||||
speedsList.add(i.value);
|
||||
}
|
||||
speedsList.sort();
|
||||
speedList = GStorage.speedList;
|
||||
|
||||
// _playerEventSubs = onPlayerStatusChanged.listen((PlayerStatus status) {
|
||||
// if (status == PlayerStatus.playing) {
|
||||
|
||||
@@ -461,7 +461,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
initialValue: plPlayerController.playbackSpeed,
|
||||
color: Colors.black.withOpacity(0.8),
|
||||
itemBuilder: (BuildContext context) {
|
||||
return plPlayerController.speedsList.map((double speed) {
|
||||
return plPlayerController.speedList.map((double speed) {
|
||||
return PopupMenuItem<double>(
|
||||
height: 35,
|
||||
padding: const EdgeInsets.only(left: 30),
|
||||
|
||||
Reference in New Issue
Block a user