fix: replay

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-06 12:09:21 +08:00
parent b2c3b1ff95
commit c6e229d571
2 changed files with 22 additions and 8 deletions

View File

@@ -125,8 +125,13 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
}
// 双击播放、暂停
void onDoubleTapCenter() {
plPlayerController.videoPlayerController!.playOrPause();
void onDoubleTapCenter() async {
if (plPlayerController.videoPlayerController!.state.completed) {
await plPlayerController.videoPlayerController!.seek(Duration.zero);
plPlayerController.videoPlayerController!.play();
} else {
plPlayerController.videoPlayerController!.playOrPause();
}
}
void doubleTapFuc(String type) {
@@ -283,7 +288,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
/// 播放暂停
BottomControlType.playOrPause: PlayOrPauseButton(
controller: plPlayerController,
plPlayerController: plPlayerController,
),
/// 下一集