Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-06-27 16:19:14 +08:00
parent 5d15bf5e59
commit d33d2a1c86
2 changed files with 9 additions and 21 deletions

View File

@@ -1273,9 +1273,13 @@ class PlPlayerController with BlockConfigMixin {
}
}
bool get isCompleted =>
videoPlayerController!.state.completed ||
durationInMilliseconds - positionInMilliseconds <= 50;
// 双击播放、暂停
Future<void> onDoubleTapCenter() async {
if (!isLive && videoPlayerController!.state.completed) {
if (!isLive && isCompleted) {
await videoPlayerController!.seek(Duration.zero);
videoPlayerController!.play();
} else {