fix(html): restore deprecated slot="media" for backwards compatibility#1020
fix(html): restore deprecated slot="media" for backwards compatibility#1020
Conversation
PR #997 removed slot="media" from all skin templates. This restores the named slot alongside the new default slot so users who haven't migrated yet don't break. The slot is marked @deprecated with a comment. Co-Authored-By: Claude Sonnet 4.6 <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
Restores the deprecated slot="media" named slot across HTML skin templates to maintain backward compatibility for users still slotting their media element by name, while keeping the newer default-slot approach.
Changes:
- Added a deprecated
<slot name="media"></slot>alongside the default<slot></slot>in all affected skins. - Annotated the named slot with a deprecation HTML comment to guide migration.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/html/src/define/video/skin.ts | Adds deprecated media named slot before the default slot in the video default skin template. |
| packages/html/src/define/video/skin.tailwind.ts | Adds deprecated media named slot before the default slot in the Tailwind video default skin template. |
| packages/html/src/define/video/minimal-skin.ts | Adds deprecated media named slot before the default slot in the video minimal skin template. |
| packages/html/src/define/video/minimal-skin.tailwind.ts | Adds deprecated media named slot before the default slot in the Tailwind video minimal skin template. |
| packages/html/src/define/audio/skin.ts | Adds deprecated media named slot before the default slot in the audio default skin template. |
| packages/html/src/define/audio/skin.tailwind.ts | Adds deprecated media named slot before the default slot in the Tailwind audio default skin template. |
| packages/html/src/define/audio/minimal-skin.ts | Adds deprecated media named slot before the default slot in the audio minimal skin template. |
| packages/html/src/define/audio/minimal-skin.tailwind.ts | Adds deprecated media named slot before the default slot in the Tailwind audio minimal skin template. |
| packages/html/src/define/background/skin.ts | Adds deprecated media named slot before the default slot in the background skin template. |
💡 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
slot="media"from all HTML skin templates in favor of context-based media discovery<slot name="media"></slot>alongside the new<slot></slot>in all 9 skin templates to avoid breaking users who passslot="media"on their media elements<!-- @deprecated slot="media" is no longer required, use the default slot instead -->to signal migrationHow it works: Web Components named slots take priority over the default slot. Elements with
slot="media"are captured by the named slot; everything else falls into the default slot. Both work simultaneously.Affected files
All in
packages/html/src/define/:video/skin.ts,video/minimal-skin.ts,video/skin.tailwind.ts,video/minimal-skin.tailwind.tsaudio/skin.ts,audio/minimal-skin.ts,audio/skin.tailwind.ts,audio/minimal-skin.tailwind.tsbackground/skin.tsTest plan
pnpm -F @videojs/html buildslot="media"still renders correctly inside skinslot="media"(default slot) also works🤖 Generated with Claude Code