Skip to content

fix(html): register tooltip label and shortcut in live presets - #1881

Merged
sampotts merged 1 commit into
videojs:mainfrom
mmcc:fix/live-preset-tooltip-elements
Jul 28, 2026
Merged

fix(html): register tooltip label and shortcut in live presets#1881
sampotts merged 1 commit into
videojs:mainfrom
mmcc:fix/live-preset-tooltip-elements

Conversation

@mmcc

@mmcc mmcc commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

Every tooltip in a live-video or live-audio skin throws on first update: the presets register TooltipElement and TooltipGroupElement but never TooltipLabelElement / TooltipShortcutElement, which their skin templates use. Those elements stay unupgraded, so #syncContent calls setSyncedText on a plain HTMLElement.

TypeError: labelEl?.setSyncedText is not a function
    at #syncContent (ui/tooltip/tooltip-element.ts)

The video and audio presets already register both — only the four live-* entries were missed.

Changes

  • Register TooltipLabelElement and TooltipShortcutElement in live-video/ui.ts, live-video/minimal-ui.ts, live-audio/ui.ts, and live-audio/minimal-ui.ts, in the same order the video preset uses (label and shortcut before their parent TooltipElement).

No behavior change beyond the tooltips starting to work: label text and keyboard-shortcut hints now render instead of throwing, so hovering any control in a live skin no longer floods the console.

Testing

pnpm typecheck clean · pnpm -F @videojs/html test 231 pass · pnpm check:workspace 8/8.

Manual, before and after (Chromium):

pnpm -F @videojs/sandbox dev
# → http://localhost:5173/html-simple-hls-video/?source=hls-live

Built @videojs/html at unpatched main and captured pageerror events on load: ['labelEl?.setSyncedText is not a function']. With this commit applied and rebuilt: []. Hover any control to see the tooltip label and shortcut render.


Note

Low Risk
Small registration parity fix aligned with existing video/audio presets; no new behavior beyond fixing broken tooltips.

Overview
Live audio and live video UI entry points (live-audio/ui, live-audio/minimal-ui, live-video/ui, live-video/minimal-ui) now register TooltipLabelElement and TooltipShortcutElement, matching the non-live audio / video presets.

Without those definitions, tooltip markup in live skins stayed unupgraded, so TooltipElement’s content sync called setSyncedText on plain elements and threw on hover. Tooltips in live skins should render labels and shortcut hints instead of erroring.

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

All four `live-*` define entries registered `TooltipElement` and
`TooltipGroupElement` but never `TooltipLabelElement` /
`TooltipShortcutElement`, which their skin templates use. The elements
stayed unupgraded, so every tooltip threw `setSyncedText is not a
function` on first update.

Reproduces on the existing `html-simple-hls-video/?source=hls-live`
sandbox page; the `video` and `audio` presets already registered both.
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

@mmcc 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 Jul 28, 2026

Copy link
Copy Markdown

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit 45da515
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/6a692602e407d40008603295
😎 Deploy Preview https://deploy-preview-1881--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.

@cjpillsbury
cjpillsbury requested a review from sampotts July 28, 2026 22:00
@sampotts
sampotts merged commit fa54f75 into videojs:main Jul 28, 2026
23 of 25 checks passed
@luwes luwes mentioned this pull request Jul 28, 2026
@mmcc
mmcc deleted the fix/live-preset-tooltip-elements branch July 30, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants