mod: 倍速&底栏样式
This commit is contained in:
@ -2,11 +2,23 @@ enum PlaySpeed {
|
||||
pointTwoFive,
|
||||
pointFive,
|
||||
pointSevenFive,
|
||||
|
||||
one,
|
||||
onePointTwoFive,
|
||||
onePointFive,
|
||||
onePointSevenFive,
|
||||
two
|
||||
|
||||
two,
|
||||
twoPointTwoFive,
|
||||
twoPointFive,
|
||||
twoPointSevenFive,
|
||||
|
||||
twhree,
|
||||
threePointTwoFive,
|
||||
threePointFive,
|
||||
threePointSevenFive,
|
||||
|
||||
four,
|
||||
}
|
||||
|
||||
extension PlaySpeedExtension on PlaySpeed {
|
||||
@ -17,8 +29,15 @@ extension PlaySpeedExtension on PlaySpeed {
|
||||
'正常速度',
|
||||
'1.25倍',
|
||||
'1.5倍',
|
||||
'1.75倍',
|
||||
'2.0倍',
|
||||
'2.25倍',
|
||||
'2.5倍',
|
||||
'2.75倍',
|
||||
'3.0倍',
|
||||
'3.25倍',
|
||||
'3.5倍',
|
||||
'3.75倍',
|
||||
'4.0倍'
|
||||
];
|
||||
get description => _descList[index];
|
||||
|
||||
@ -30,7 +49,15 @@ extension PlaySpeedExtension on PlaySpeed {
|
||||
1.25,
|
||||
1.5,
|
||||
1.75,
|
||||
2.0
|
||||
2.0,
|
||||
2.25,
|
||||
2.5,
|
||||
2.75,
|
||||
3.0,
|
||||
3.25,
|
||||
3.5,
|
||||
3.75,
|
||||
4.0,
|
||||
];
|
||||
get value => _valueList[index];
|
||||
get defaultValue => _valueList[3];
|
||||
|
||||
@ -199,22 +199,11 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
context: Get.context!,
|
||||
useSafeArea: false,
|
||||
builder: (context) => Dialog.fullscreen(
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.black,
|
||||
appBar: AppBar(
|
||||
primary: false,
|
||||
toolbarHeight: 0,
|
||||
backgroundColor: Colors.black,
|
||||
systemOverlayStyle: SystemUiOverlayStyle.light,
|
||||
backgroundColor: Colors.black,
|
||||
child: PLVideoPlayer(
|
||||
controller: _,
|
||||
headerControl: _.headerControl,
|
||||
),
|
||||
body: SafeArea(
|
||||
bottom: false,
|
||||
child: PLVideoPlayer(
|
||||
controller: _,
|
||||
headerControl: _.headerControl,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
if (result == null) {
|
||||
|
||||
@ -30,12 +30,12 @@ class BottomControl extends StatelessWidget implements PreferredSizeWidget {
|
||||
elevation: 0,
|
||||
scrolledUnderElevation: 0,
|
||||
primary: false,
|
||||
toolbarHeight: 73,
|
||||
toolbarHeight: 85,
|
||||
automaticallyImplyLeading: false,
|
||||
titleSpacing: 14,
|
||||
title: Column(
|
||||
children: [
|
||||
const SizedBox(height: 23),
|
||||
const SizedBox(height: 17),
|
||||
Obx(
|
||||
() {
|
||||
final int value = _.sliderPosition.value.inSeconds;
|
||||
@ -45,7 +45,7 @@ class BottomControl extends StatelessWidget implements PreferredSizeWidget {
|
||||
return Container();
|
||||
}
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(left: 5, right: 5, bottom: 5),
|
||||
padding: const EdgeInsets.only(left: 7, right: 5, bottom: 6),
|
||||
child: ProgressBar(
|
||||
progress: Duration(seconds: value),
|
||||
buffered: Duration(seconds: buffer),
|
||||
|
||||
Reference in New Issue
Block a user