Merge branch 'feature-media_kit' into alpha
This commit is contained in:
@ -185,6 +185,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
videoIntroController.isPaused = false;
|
||||
if (_extendNestCtr.position.pixels == 0 && autoplay) {
|
||||
await Future.delayed(const Duration(milliseconds: 300));
|
||||
plPlayerController!.seekTo(videoDetailController.defaultST);
|
||||
plPlayerController?.play();
|
||||
}
|
||||
plPlayerController?.addStatusLister(playerListener);
|
||||
|
@ -678,9 +678,9 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
),
|
||||
child: Slider(
|
||||
min: 1,
|
||||
max: 6,
|
||||
max: 8,
|
||||
value: danmakuSpeedVal,
|
||||
divisions: 10,
|
||||
divisions: 14,
|
||||
label: danmakuSpeedVal.toString(),
|
||||
onChanged: (double val) {
|
||||
danmakuSpeedVal = val;
|
||||
|
@ -428,6 +428,8 @@ class PlPlayerController {
|
||||
// 设置倍速
|
||||
if (_playbackSpeed.value != 1.0) {
|
||||
await setPlaybackSpeed(_playbackSpeed.value);
|
||||
} else {
|
||||
await setPlaybackSpeed(1.0);
|
||||
}
|
||||
|
||||
// if (_looping) {
|
||||
|
@ -478,19 +478,13 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
return;
|
||||
}
|
||||
final tapPosition = details.localPosition.dx;
|
||||
int curSliderPosition = _.sliderPosition.value.inSeconds;
|
||||
late int result;
|
||||
if (tapPosition - _initTapPositoin > 0) {
|
||||
// 快进
|
||||
/// TODO 优化屏幕越小效果越明显
|
||||
result = (curSliderPosition + 1)
|
||||
.clamp(0, _.duration.value.inSeconds);
|
||||
} else {
|
||||
// 快退
|
||||
result = (curSliderPosition - 1)
|
||||
.clamp(0, _.duration.value.inSeconds);
|
||||
}
|
||||
_.onUodatedSliderProgress(Duration(seconds: result));
|
||||
int curSliderPosition = _.sliderPosition.value.inMilliseconds;
|
||||
double scale = 60000 / MediaQuery.of(context).size.width;
|
||||
Duration pos = Duration(
|
||||
milliseconds:
|
||||
curSliderPosition + (details.delta.dx * scale).round());
|
||||
Duration result = pos.clamp(Duration.zero, _.duration.value);
|
||||
_.onUodatedSliderProgress(result);
|
||||
_.onChangedSliderStart();
|
||||
_initTapPositoin = tapPosition;
|
||||
},
|
||||
|
Reference in New Issue
Block a user