feat(player): toggle playback on a two-finger tap without raising the chrome
A touch viewer had to raise the chrome to pause, which dims the picture and covers the subtitle line they were trying to finish reading. A two-finger tap now toggles playback with the chrome left down, so the frame that pauses is the frame that was on screen. It fires the moment the chord resolves, in every player state. The two-finger double tap no longer resets the video zoom. Keeping it would mean holding this toggle back for the double-tap window before acting, and pausing late is pausing on the wrong frame. Zoom reset stays in the video settings sheet, its presets and the keyboard shortcut, and pinching back to 100% now snaps exactly within three percent so touch has a one-gesture path too. Both chord actions share _mobileTouchGesturesAllowed, so the chord is inert under screen lock, in PiP and while the content strip is open; the zoom reset previously fired straight through a locked screen. close #1505
This commit is contained in:
@@ -186,7 +186,11 @@ extension _VideoPlayerBuildMethods on VideoPlayerScreenState {
|
||||
final startZoom = _pinchStartZoomScale;
|
||||
final filterManager = _videoFilterManager;
|
||||
if (!_isPinchZooming || startZoom == null || filterManager == null) return;
|
||||
final nextZoomScale = VideoFilterManager.normalizeZoomScale(startZoom * details.scale);
|
||||
// Snap through 100% so pinching back undoes a zoom exactly, which is
|
||||
// the touch path to an unzoomed picture (#1505).
|
||||
final nextZoomScale = VideoFilterManager.normalizeZoomScale(
|
||||
VideoFilterManager.snapPinchZoomScale(startZoom * details.scale),
|
||||
);
|
||||
|
||||
if (!_pinchZoomChanged) {
|
||||
if ((details.scale - 1.0).abs() <= _pinchZoomActivationThreshold) {
|
||||
|
||||
Reference in New Issue
Block a user