opt: PlPlayerController (#1832)

* opt: audio uri

* opt: PlPlayerController
This commit is contained in:
My-Responsitories
2026-02-10 16:33:02 +08:00
committed by GitHub
parent ed2bd069ee
commit 9411785d26
6 changed files with 91 additions and 132 deletions

View File

@@ -184,10 +184,9 @@ class _PostPanelState extends State<PostPanel>
late final List<PostSegmentModel> list = videoDetailController.postList;
late final double videoDuration =
plPlayerController.durationSeconds.value.inMilliseconds / 1000;
plPlayerController.duration.value.inMilliseconds / 1000;
double get currentPos =>
plPlayerController.position.value.inMilliseconds / 1000;
double currentPos() => plPlayerController.position.inMilliseconds / 1000;
@override
Widget buildPage(ThemeData theme) {
@@ -211,7 +210,7 @@ class _PostPanelState extends State<PostPanel>
PostSegmentModel(
segment: Pair(
first: 0,
second: currentPos,
second: currentPos(),
),
category: SegmentType.sponsor,
actionType: ActionType.skip,
@@ -350,7 +349,7 @@ class _PostPanelState extends State<PostPanel>
PostPanel.segmentWidget(
theme,
item: item,
currentPos: () => currentPos,
currentPos: currentPos,
videoDuration: videoDuration,
),
Wrap(