fix(core): keep controls visible while tapping controls on touch#1704
Open
R-Delfino95 wants to merge 1 commit into
Open
fix(core): keep controls visible while tapping controls on touch#1704R-Delfino95 wants to merge 1 commit into
R-Delfino95 wants to merge 1 commit into
Conversation
|
@R-Delfino95 is attempting to deploy a commit to the Mux Team on Vercel. A member of the Team first needs to authorize it. |
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What's this?
On iOS Safari, the player controls would auto-hide after a couple of seconds even while you were actively tapping the controls — for example, repeatedly tapping mute or the skip ±10s buttons. The controls would vanish mid-tap, which felt broken.
The reason: the controls hide after a short period of "inactivity", and that timer is meant to reset whenever you interact. A tap on a control button wasn't being counted as activity, so the timer kept running and hid the controls while you were still using them. Android wasn't affected — it reports touch interactions slightly differently, which happened to keep the timer alive.
The fix
Count a tap on any control as user activity, so the controls stay visible while you're interacting and only hide once you actually stop. Tapping the video area to show/hide the controls works exactly as before.
Testing
@videojs/coreunit tests pass (1545).Closes #1682
Note
Low Risk
Narrow touch pointer-up branch in the controls feature with new unit tests; no auth, data, or API surface changes.
Overview
Fixes iOS Safari controls auto-hiding during repeated taps on control buttons (mute, skip ±10s) when the skin registers a
toggleControlstouch tap gesture.On quick touch
pointerup, the handler used to return early whenever that gesture exists, sosetActive()never ran and the idle timer kept counting down. The gesture coordinator skips interactive targets, so those button taps never toggled controls either—only the timer bug showed up on iOS.The change calls
setActive()and returns whenisInteractiveTarget(event)is true, so control taps count as user activity. Non-interactive taps on the video area still defer to the gesture path unchanged.Unit tests cover button tap resets idle vs container tap does not when a
toggleControlsgesture is registered.Reviewed by Cursor Bugbot for commit 59dc3d2. Bugbot is set up for automated code reviews on this repo. Configure here.