fix(skin): hide volume popover when volume control is unsupported#1025
fix(skin): hide volume popover when volume control is unsupported#1025
Conversation
HTML skins: CSS `:has()` rule hides the volume popover when `data-availability="unsupported"` on the volume slider. The shared stylesheet is injected into all skin shadow roots via `SkinMixin`. React skins: `VolumePopover` component conditionally renders only the mute button (without popover wrapper) when volume is unsupported. The popover's `commandfor` linkage still sets ARIA attributes on the trigger pointing to a hidden element in HTML skins. A proper fix requires popover-level disabled state — tracked in #1023. Closes #961 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (5)
Players (3)
Skins (16)
UI Components (21)
Sizes are marginal over the root entry point. ⚛️ @videojs/react — no changesPresets (7)
Media (4)
Skins (14)
UI Components (18)
Sizes are marginal over the root entry point. 🧩 @videojs/core — no changesEntries (6)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (10)
📦 @videojs/spf — no changesEntries (3)
ℹ️ How to interpretAll sizes are standalone totals (minified + brotli).
Run |
There was a problem hiding this comment.
Pull request overview
This PR hides the volume popover UI when programmatic volume control is reported as unsupported (notably on iOS Safari), preventing users from seeing/interacting with a non-functional volume slider.
Changes:
- HTML/CSS skins: add
:has()-based CSS rules to hide.media-popover--volumewhen itsmedia-volume-sliderreportsdata-availability="unsupported". - React skins: introduce a
VolumePopoverhelper that renders only the mute button (no popover/slider) whenvolumeAvailability === 'unsupported'. - Apply the CSS rule globally for HTML skin shadow roots via
packages/html/src/define/shared.css.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/skins/src/minimal/css/components/popup.css | Hides minimal skin volume popover via :has() when volume slider is unsupported. |
| packages/skins/src/default/css/components/popup.css | Hides default skin volume popover via nested :has() selector when unsupported. |
| packages/react/src/presets/video/skin.tsx | Adds VolumePopover to omit popover/slider when volume is unsupported. |
| packages/react/src/presets/video/skin.tailwind.tsx | Tailwind video skin equivalent VolumePopover conditional rendering. |
| packages/react/src/presets/video/minimal-skin.tsx | Minimal video skin equivalent VolumePopover conditional rendering. |
| packages/react/src/presets/video/minimal-skin.tailwind.tsx | Tailwind minimal video skin equivalent VolumePopover conditional rendering. |
| packages/react/src/presets/audio/skin.tsx | Audio skin equivalent VolumePopover conditional rendering. |
| packages/react/src/presets/audio/skin.tailwind.tsx | Tailwind audio skin equivalent VolumePopover conditional rendering. |
| packages/react/src/presets/audio/minimal-skin.tsx | Minimal audio skin equivalent VolumePopover conditional rendering. |
| packages/react/src/presets/audio/minimal-skin.tailwind.tsx | Tailwind minimal audio skin equivalent VolumePopover conditional rendering. |
| packages/html/src/define/shared.css | Adds shared CSS rule to hide the volume popover in HTML skins when unsupported. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Summary
:has()rule inshared.csshides the volume popover whendata-availability="unsupported"on the volume slider. Injected into all skin shadow roots viaSkinMixin.VolumePopovercomponent conditionally renders only the mute button (no popover) when volume is unsupported.Limitations
CSS-only fix for HTML skins — the popover's
commandforlinkage still setsaria-haspopupon the trigger pointing to a hidden element. Proper fix requires popover-level disabled state (#1021).Closes #961