Skip to content

feat(html): reorganize import paths by use case#480

Merged
mihar-22 merged 1 commit intomainfrom
import-url-changes
Feb 9, 2026
Merged

feat(html): reorganize import paths by use case#480
mihar-22 merged 1 commit intomainfrom
import-url-changes

Conversation

@mihar-22
Copy link
Copy Markdown
Member

@mihar-22 mihar-22 commented Feb 9, 2026

Closes #474

Summary

Restructure @videojs/html subpath exports from <thing>/<use-case> to <use-case>/<thing>, so imports read as natural noun phrases (e.g., @videojs/html/video/player instead of @videojs/html/player/video).

Changes

  • Restructure define/ directory: player/video.tsvideo/player.ts, skin/video.tsvideo/skin.ts
  • Add AudioPlayerElement (<audio-player>) and BackgroundVideoPlayerElement (<background-video-player>) definitions
  • Add BackgroundFeatures type (empty with TODO) and features.background bundle in core
  • Define elements now extend PlayerElement with static readonly tagName
  • Replace ./player/* and ./skin/* package.json exports with ./video/*, ./audio/*, ./background/*
  • Update all RFC docs, site code, and implementation plans with new import paths
Implementation details
  • BackgroundFeatures is an empty tuple ([]) with a TODO — features to be defined later
  • No createPlayer overload for background since the feature set is empty and would surface in autocomplete
  • feature/*, media/*, and ui/* exports are unchanged — they aren't use-case-specific
  • Build config (tsdown.config.ts) auto-discovers via glob so no changes needed

Testing

pnpm -F @videojs/html test   # 5 tests pass (2 new for audio + background)
pnpm typecheck                # clean
pnpm build:packages           # all packages build
pnpm test                     # full suite passes (748 tests)

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 9, 2026

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit a26b8e5
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/6989ad5bbb6f860008dccdef
😎 Deploy Preview https://deploy-preview-480--vjs10-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 9, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
vjs-10-demo-react Ignored Ignored Preview Feb 9, 2026 9:48am

Request Review

@mihar-22 mihar-22 changed the title feat(html)!: restructure import paths from thing/use-case to use-case/thing feat(html): reorganize import paths by use case Feb 9, 2026
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #474

@mihar-22 mihar-22 merged commit 870cbb7 into main Feb 9, 2026
8 of 9 checks passed
@mihar-22 mihar-22 deleted the import-url-changes branch February 9, 2026 09:49
@github-actions github-actions bot mentioned this pull request Feb 9, 2026
@github-actions github-actions bot mentioned this pull request Feb 26, 2026
@github-actions github-actions bot mentioned this pull request Mar 10, 2026
@luwes luwes mentioned this pull request Apr 11, 2026
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.

Import URL changes

1 participant