Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
840395bb69 |
@ -34,20 +34,21 @@ class _VideoControlsOverlayState extends State<VideoControlsOverlay> {
|
||||
}
|
||||
|
||||
void _handleDoubleTap(TapDownDetails details) {
|
||||
final screenWidth = MediaQuery.of(context).size.width;
|
||||
final isRewind = details.globalPosition.dx < screenWidth / 2;
|
||||
final double screenWidth = MediaQuery.of(context).size.width;
|
||||
final bool isRewind = details.globalPosition.dx < screenWidth / 2;
|
||||
widget.onOverlayTap();
|
||||
|
||||
Future(() {
|
||||
if (isRewind) {
|
||||
final newPosition =
|
||||
final Duration newPosition =
|
||||
widget.controller.value.position - const Duration(seconds: 10);
|
||||
widget.controller.seekTo(
|
||||
newPosition < Duration.zero ? Duration.zero : newPosition,
|
||||
);
|
||||
} else {
|
||||
final newPosition =
|
||||
final Duration newPosition =
|
||||
widget.controller.value.position + const Duration(seconds: 10);
|
||||
final duration = widget.controller.value.duration;
|
||||
final Duration duration = widget.controller.value.duration;
|
||||
widget.controller.seekTo(
|
||||
newPosition > duration ? duration : newPosition,
|
||||
);
|
||||
|
@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 1.4.2+63
|
||||
version: 1.4.3+64
|
||||
|
||||
environment:
|
||||
sdk: ^3.9.0-100.2.beta
|
||||
|
Reference in New Issue
Block a user