Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-10-04 11:16:24 +08:00
parent a28db0dd98
commit 32f6d97256

View File

@@ -1436,11 +1436,14 @@ class PlPlayerController {
return (duration.inMilliseconds / 1000).round();
}
bool get _isCompleted =>
videoPlayerController!.state.completed ||
(_durationInSeconds(position.value) ==
_durationInSeconds(duration.value));
// 双击播放、暂停
Future<void> onDoubleTapCenter() async {
if (videoPlayerController!.state.completed ||
(_durationInSeconds(position.value) ==
_durationInSeconds(duration.value))) {
if (!isLive && _isCompleted) {
await videoPlayerController!.seek(Duration.zero);
videoPlayerController!.play();
} else {