opt: video progressbar

Closes #507
Closes #514

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-24 21:29:28 +08:00
parent a611a88f69
commit bf464994df
2 changed files with 46 additions and 42 deletions

View File

@@ -450,7 +450,9 @@ class _PostPanelState extends CommonCollapseSlidePageState<PostPanel> {
updateSegment(
isFirst: isFirst,
index: index,
value: isFirst ? 0 : plPlayerController.duration.value.inSeconds,
value: isFirst
? 0
: plPlayerController.durationSeconds.value.inSeconds,
);
});
},

View File

@@ -1393,7 +1393,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
return const SizedBox.shrink();
}
return Positioned(
bottom: -1,
bottom: -2.2,
left: 0,
right: 0,
child: Semantics(
@@ -1410,7 +1410,8 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
if (plPlayerController.viewPointList.isNotEmpty &&
plPlayerController.showVP.value)
buildViewPointWidget(plPlayerController, 4.25),
ProgressBar(
IgnorePointer(
child: ProgressBar(
progress: Duration(seconds: value),
buffered: Duration(seconds: buffer),
total: Duration(seconds: max),
@@ -1451,6 +1452,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
// type: 'slider');
// },
),
),
if (plPlayerController.segmentList.isNotEmpty)
Positioned(
left: 0,