Skip to content

fix(core): keep controls visible while tapping controls on touch#1704

Open
R-Delfino95 wants to merge 1 commit into
videojs:mainfrom
R-Delfino95:fix/ios-controls-tap-autohide
Open

fix(core): keep controls visible while tapping controls on touch#1704
R-Delfino95 wants to merge 1 commit into
videojs:mainfrom
R-Delfino95:fix/ios-controls-tap-autohide

Conversation

@R-Delfino95

@R-Delfino95 R-Delfino95 commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

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

  • Added unit tests: a tap on a control now keeps the controls visible; a tap on the video area still defers to the show/hide gesture.
  • All @videojs/core unit tests pass (1545).
  • Worth a real-device check on iOS Safari to confirm the end-to-end behavior.

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 toggleControls touch tap gesture.

On quick touch pointerup, the handler used to return early whenever that gesture exists, so setActive() 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 when isInteractiveTarget(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 toggleControls gesture is registered.

Reviewed by Cursor Bugbot for commit 59dc3d2. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

@R-Delfino95 is attempting to deploy a commit to the Mux Team on Vercel.

A member of the Team first needs to authorize it.

@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit 59dc3d2
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/6a344c883c9dcc000830e04c
😎 Deploy Preview https://deploy-preview-1704--vjs10-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@R-Delfino95 R-Delfino95 marked this pull request as ready for review June 18, 2026 19:55
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v10-sandbox Ready Ready Preview, Comment Jun 18, 2026 7:58pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Bug: Controls Auto-Hide While Tapping Control Buttons on iOS Safari

1 participant