You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the container mixin with one concrete ContainerElement, move its registration path to @videojs/html/ui/container, and make player/media/container attachment safe when elements connect, disconnect, reorder, or upgrade late.
This replaces #2244, which GitHub marked merged into the old feature branch rather than main when that stack was rebuilt.
<media-container> keeps the same tag name. Registration and lifecycle docs, demos, the VJSC HTML target, and API-doc fixtures move with the implementation.
Testing
pnpm -F @videojs/html test — 401 tests
pnpm -F @videojs/html build
pnpm --dir packages/skins exec vitest run vjsc/tests/vite.test.ts — 6 tests
pnpm --dir site test — 608 tests
pnpm typecheck
pnpm check:workspace
Note
High Risk
Breaking public HTML API: mixin removal, import path change, and attach lifecycle rewrite can mis-attach media or containers if registration/release is wrong.
Overview
Replaces HTML ContainerMixin with a concrete ContainerElement (<media-container>). Custom containers now subclass that class instead of composing mixins, and registration moves from @videojs/html/media/container to @videojs/html/ui/container.
Media and container attach now use identity-safe register* callbacks that return a release function, so disconnecting an older element cannot clear a newer one. Native <video>/<audio> are tracked with a subtree MutationObserver instead of a one-shot querySelector fallback.
Docs, demos, skins targeting, and API-doc fixtures follow the new import path and drop the mixin composition examples.
Reviewed by Cursor Bugbot for commit 1539ad6. Bugbot is set up for automated code reviews on this repo. Configure here.
Each entry is independently bundled, minified, and brotli-compressed. Initial size includes its static import graph; lazy dynamic chunks are reported separately.
Entries are not additive because their dependency graphs overlap. Preset rows represent realistic combined bundles.
Changes of 300 B or less across initial, lazy, and total size are collapsed, not discarded.
Run pnpm size locally to check current initial sizes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #2364
Summary
Replace the container mixin with one concrete
ContainerElement, move its registration path to@videojs/html/ui/container, and make player/media/container attachment safe when elements connect, disconnect, reorder, or upgrade late.This replaces #2244, which GitHub marked merged into the old feature branch rather than
mainwhen that stack was rebuilt.Before
After
<media-container>keeps the same tag name. Registration and lifecycle docs, demos, the VJSC HTML target, and API-doc fixtures move with the implementation.Testing
pnpm -F @videojs/html test— 401 testspnpm -F @videojs/html buildpnpm --dir packages/skins exec vitest run vjsc/tests/vite.test.ts— 6 testspnpm --dir site test— 608 testspnpm typecheckpnpm check:workspaceNote
High Risk
Breaking public HTML API: mixin removal, import path change, and attach lifecycle rewrite can mis-attach media or containers if registration/release is wrong.
Overview
Replaces HTML
ContainerMixinwith a concreteContainerElement(<media-container>). Custom containers now subclass that class instead of composing mixins, and registration moves from@videojs/html/media/containerto@videojs/html/ui/container.Media and container attach now use identity-safe
register*callbacks that return a release function, so disconnecting an older element cannot clear a newer one. Native<video>/<audio>are tracked with a subtreeMutationObserverinstead of a one-shot querySelector fallback.Docs, demos, skins targeting, and API-doc fixtures follow the new import path and drop the mixin composition examples.
Reviewed by Cursor Bugbot for commit 1539ad6. Bugbot is set up for automated code reviews on this repo. Configure here.