mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: video: long press
Closes #423 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1356,12 +1356,19 @@ class PlPlayerController {
|
||||
if (controlsLock.value) {
|
||||
return;
|
||||
}
|
||||
_doubleSpeedStatus.value = val;
|
||||
if (_doubleSpeedStatus.value == val) {
|
||||
return;
|
||||
}
|
||||
if (val) {
|
||||
await setPlaybackSpeed(
|
||||
enableAutoLongPressSpeed ? playbackSpeed * 2 : longPressSpeed);
|
||||
if (playerStatus.status.value == PlayerStatus.playing) {
|
||||
_doubleSpeedStatus.value = val;
|
||||
HapticFeedback.lightImpact();
|
||||
await setPlaybackSpeed(
|
||||
enableAutoLongPressSpeed ? playbackSpeed * 2 : longPressSpeed);
|
||||
}
|
||||
} else {
|
||||
debugPrint('$playbackSpeed');
|
||||
// debugPrint('$playbackSpeed');
|
||||
_doubleSpeedStatus.value = val;
|
||||
await setPlaybackSpeed(playbackSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:easy_debounce/easy_throttle.dart';
|
||||
import 'package:fl_chart/fl_chart.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:flutter_volume_controller/flutter_volume_controller.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
@@ -1228,7 +1227,6 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
doubleTapFuc(type);
|
||||
},
|
||||
onLongPressStart: (LongPressStartDetails detail) {
|
||||
HapticFeedback.lightImpact();
|
||||
plPlayerController.setDoubleSpeedStatus(true);
|
||||
},
|
||||
onLongPressEnd: (LongPressEndDetails details) {
|
||||
|
||||
Reference in New Issue
Block a user