Repository navigation
Player: touch gestures (tap, double-tap seek, hold for 2×, pinch zoom) and casting - #37
Merged
Merged
Conversation
…) and casting - Touch: tap toggles the controls, double tap right/left seeks +/-10 s (further quick taps add 10 s), press and hold on the right plays at 2x, two-finger pinch zooms up to 4x with one-finger panning and a reset badge. - Mouse keeps click = play/pause and double click = fullscreen; holding on the right also plays at 2x. - The control bar's gradient no longer swallows taps on small screens; only its buttons and sliders take touches. - Cast button: Chromecast via the Google Cast sender SDK (Chrome/Edge on HTTPS), AirPlay in Safari, or the Remote Playback API. While casting, the player's controls drive the TV; stopping resumes locally at the same position. - Gesture recognizer and zoom maths in src/player-gestures.ts with unit tests; verified in Chromium with touch emulation. README documents gestures and casting requirements.
…) and casting - Touch: tap toggles the controls, double tap right/left seeks +/-10 s (further quick taps add 10 s), press and hold on the right plays at 2x, two-finger pinch zooms up to 4x with one-finger panning and a reset badge. - Mouse keeps click = play/pause and double click = fullscreen; holding on the right also plays at 2x. - The control bar's gradient no longer swallows taps on small screens; only its buttons and sliders take touches. - Cast button: Chromecast via the Google Cast sender SDK (Chrome/Edge on HTTPS), AirPlay in Safari, or the Remote Playback API. While casting, the player's controls drive the TV; stopping resumes locally at the same position. - Gesture recognizer and zoom maths in src/player-gestures.ts with unit tests; verified in Chromium with touch emulation. README documents gestures and casting requirements.
Owner
|
Reviewed the changes at The gesture recognizer is well separated from the UI. I found and fixed several integration regressions before merging:
The fixes are in Validation: Merging with these fixes included. Thank you for the contribution! |
raccommode
added a commit
that referenced
this pull request
Oct 27, 2026
Add player gestures and casting, preserving audio boost and fixing session and gesture cleanup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds mobile-style gestures to the video player and a cast button.
Gestures
src/player-gestures.ts) has no React/DOM dependency and is unit-tested (tap vs double tap, streaks, hold, pinch, pan, cancel, zoom maths).Casting
webkitShowPlaybackTargetPicker), also over HTTP.localhostaddress is detected and explained. Unsupported formats show a hint about the re-encoding presets.Testing
npm run check: 551 tests pass, TypeScript and build OK.src/player-gestures.test.ts,src/player-cast.test.ts, and a render check insrc/Player.test.tsx.playbackRate2, release → 1