mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 23:58:13 +08:00
@@ -1436,11 +1436,14 @@ class PlPlayerController {
|
|||||||
return (duration.inMilliseconds / 1000).round();
|
return (duration.inMilliseconds / 1000).round();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool get _isCompleted =>
|
||||||
|
videoPlayerController!.state.completed ||
|
||||||
|
(_durationInSeconds(position.value) ==
|
||||||
|
_durationInSeconds(duration.value));
|
||||||
|
|
||||||
// 双击播放、暂停
|
// 双击播放、暂停
|
||||||
Future<void> onDoubleTapCenter() async {
|
Future<void> onDoubleTapCenter() async {
|
||||||
if (videoPlayerController!.state.completed ||
|
if (!isLive && _isCompleted) {
|
||||||
(_durationInSeconds(position.value) ==
|
|
||||||
_durationInSeconds(duration.value))) {
|
|
||||||
await videoPlayerController!.seek(Duration.zero);
|
await videoPlayerController!.seek(Duration.zero);
|
||||||
videoPlayerController!.play();
|
videoPlayerController!.play();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user