feat(skin): port the publisher skin to VJSC
Merged
MM
2mo ago+2862+2862+0123456789012345678901234567890123456789-5676-5676-0123456789012345678901234567890123456789
Closes #54. Stacked on #56 (#55 renames). Retarget to mmcc/moq-publisher once #56 lands.
What changed
- Skin source:
packages/skins/src/presets/publisher/(skin.tsx,capture-controls.tsx,publisher.styles.ts,base.css). It reuses the shared Container, ErrorDialog, Button, ButtonTooltip, FullscreenButton, RadioItem, and the menu/popup styles. - Build:
packages/skins/build/publisher.tsis owned by the fork. The publisher compiles through the shared VJSC graph under its ownskin=default-publishervariant.parseVariantrejects that variant, so the publisher stays out ofskinStyles, the catalog, the registry, andinstallation. Changes to upstream files are small hooks:- transform and config fallbacks
- camera/mic radio-group parts in both targets
- one i18n render alias
- two helper exports
- the plugin call
- Generated output:
- HTML:
internal/skins/default-publisher/{template,register,skin.css} - React:
internal/skins/default-publisher/**pluspresets/publisher/skin.{tsx,css}
- HTML:
- core: added
component.tsfor the 11 publisher UI modules. - react: added
CameraRadioGroup/MicRadioGroupRoot/Value/Optionsparts, mirroringCaptionsRadioGroup. - Removed:
- both
legacy-skin/copies andgaps.md; the retry gap is closed because a failed publish keeps the Go live look - the generate-cache exclusion
- the sandbox
media-pulsetoken and the@sourcelines for the publisher packages PublisherSkinTailwind/PublisherSkinTailwindElement: breaking, because the packages now ship CSS only, as upstream does
- both
Behavior notes
- The look moves toward upstream's default skin: the shared surface, menus, tooltips and dialog. The publisher-specific parts carry over: the status capsule, Go live / live red, the split device controls, and the placeholder.
- The device caret is hidden through the
data-availabilitythe menu forwards to its trigger, no longer by leaving it out of the React render. The React skin test was updated to match. - The status dot uses
animate-pulse. The package CSS declares the matching keyframes, because VJSC's CSS output leaves keyframes out. - Preview mirroring works for a slotted
<video>(React). The HTML sandbox slots a custom media element whose<video>lives in its own shadow root. The legacy::slotted(video)rule couldn't reach it either, so that behavior is unchanged. - The React sandbox also needed
createPlayer().ProviderโPlayer. Upstream renamed it during the sync, and that rename broke this sandbox page.
Verification
pnpm build:packages, cleanpnpm typecheck,pnpm lint@videojs/skins77 tests pass, including the browser-support audit, which now covers 18 stylesheets with the publisher's included.@videojs/html543,@videojs/react633: all pass.- Checked headless Chromium with a fake camera and mic:
- HTML
/moq-publisher/and React/react-moq-publisher/, in both CSS and?styling=tailwind - the placeholder, enable devices, the mic picker menu, and Go live โ LIVE badge, timer, and red "Stop stream"
- no page errors
- HTML
๐ค Generated with Claude Code
Summary by cubic
Ports the publisher skin to VJSC, authoring it in packages/skins/src/presets/publisher and removing the duplicated legacy skin copies from packages/html and packages/react. The skin compiles through the shared VJSC graph under its own default-publisher variant and stays out of the catalog, registry, and skinStyles.
Breaking Changes
PublisherSkinTailwindandPublisherSkinTailwindElementare removed; the publisher packages now ship CSS only, like upstream.- Core and React gain component declarations for the 11 publisher UI modules, plus
CameraRadioGroupandMicRadioGroupparts mirroringCaptionsRadioGroup.
Bug Fixes
- A failed publish keeps the Go live look, closing the retry gap.
- The device caret is hidden via
data-availabilityforwarded by the menu instead of being dropped from the React render. - Device option groups are named by their translated group label unless the caller supplies one.
- Publisher controls stay pinned visible so their state matches the bar that never hides.
- The status dot uses
animate-pulse, with matching keyframes declared in the package CSS since VJSC's CSS output omits keyframes. - The HTML skin entry registers
VideoPublisherElementitself, so<video-publisher>works from the single skin import. - The React sandbox was fixed for the
createPlayer().ProviderโPlayerrename from the upstream sync.