mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -1432,10 +1432,21 @@ class PlPlayerController {
|
||||
}
|
||||
}
|
||||
|
||||
int _durationInSeconds(Duration duration) {
|
||||
return (duration.inMilliseconds / 1000).round();
|
||||
}
|
||||
|
||||
// 双击播放、暂停
|
||||
Future<void> onDoubleTapCenter() async {
|
||||
if (videoPlayerController!.state.completed ||
|
||||
(_durationInSeconds(position.value) ==
|
||||
_durationInSeconds(duration.value))) {
|
||||
await videoPlayerController!.seek(Duration.zero);
|
||||
videoPlayerController!.play();
|
||||
} else {
|
||||
videoPlayerController!.playOrPause();
|
||||
}
|
||||
}
|
||||
|
||||
final RxBool mountSeekBackwardButton = false.obs;
|
||||
final RxBool mountSeekForwardButton = false.obs;
|
||||
|
||||
Reference in New Issue
Block a user