Skip to content

feat(packages): add live-video and live-audio presets#1399

Merged
luwes merged 4 commits intomainfrom
feat/live-video-preset
Apr 22, 2026
Merged

feat(packages): add live-video and live-audio presets#1399
luwes merged 4 commits intomainfrom
feat/live-video-preset

Conversation

@luwes
Copy link
Copy Markdown
Collaborator

@luwes luwes commented Apr 22, 2026

Design #1395
fix #1398

Summary

Add live-video and live-audio presets to @videojs/html and @videojs/react, and teach the sandbox to swap in the live skin automatically when a live source is selected. Players pick up the live UI (trimmed controls, no seek/rate, autoplay muted, no storyboard) purely based on source metadata, so existing HLS / Mux apps light up live playback without any code changes.

Changes

  • Packages — new live-video and live-audio preset entries in @videojs/html and @videojs/react (default + minimal skins, CSS + Tailwind variants). Live skins omit duration-oriented UI: no TimeSlider, no seek buttons, no playback-rate menu, and no seek hotkeys/gestures — a flex spacer keeps start/end button groups pinned to the edges of the control bar.
  • Core — export distinct liveVideoFeatures / liveAudioFeatures that mirror the VOD presets but drop playbackRateFeature (not meaningful on a live edge). Also drops streamTypeFeature from the base videoFeatures / audioFeatures presets; consumers that need stream-type state can opt in explicitly.
  • CDN — new @videojs/html/cdn/live-video and live-video-minimal bundles, wired into the HTML package build and the sandbox CDN demo.
  • SandboxisLiveSource(id) helper reads a live: true flag on sources; existing HLS / Mux / native-HLS / simple-HLS templates (HTML + React) plus the CDN demo now detect live sources, load the live skin variant, set autoplay muted on the media element, and skip storyboards (the Mux image service doesn't generate them for live).

Testing

  1. pnpm -F @videojs/html -F @videojs/react build
  2. pnpm -F sandbox dev, open any HLS / Mux sandbox, switch the source to HLS - Live Stream Big Buck Bunny, and verify: live skin renders (no seek bar, no rate menu), playback starts muted, storyboard is absent, and arrow-key/j/l/</> hotkeys are no-ops.

Made with Cursor

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 22, 2026

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

Project Deployment Actions Updated (UTC)
v10-sandbox Ready Ready Preview, Comment Apr 22, 2026 7:25pm

Request Review

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 22, 2026

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit 5bbed81
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/69e9209dd2111c00080266eb
😎 Deploy Preview https://deploy-preview-1399--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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

📦 Bundle Size Report

🎨 @videojs/html

Path Base PR Diff %
/live-video/minimal-skin.css 3.50 kB 🆕
/live-video/skin.css 3.53 kB 🆕
/live-video/minimal-skin 25.96 kB 🆕
/live-video/minimal-skin.tailwind 26.04 kB 🆕
/live-video/skin 28.39 kB 🆕
/live-video/skin.tailwind 28.46 kB 🆕
/live-audio/minimal-skin.css 2.54 kB 🆕
/live-audio/skin.css 2.50 kB 🆕
/live-audio/minimal-skin 23.96 kB 🆕
/live-audio/minimal-skin.tailwind 23.96 kB 🆕
/live-audio/skin 26.33 kB 🆕
/live-audio/skin.tailwind 26.37 kB 🆕
Presets (7)
Entry Size
/video (default) 28.72 kB
/video (default + hls) 161.18 kB
/video (minimal) 26.23 kB
/video (minimal + hls) 158.84 kB
/audio (default) 26.62 kB
/audio (minimal) 24.17 kB
/background 4.16 kB
Media (8)
Entry Size
/media/background-video 1.04 kB
/media/container 1.73 kB
/media/dash-video 236.54 kB
/media/hls-video 133.86 kB
/media/mux-audio 160.01 kB
/media/mux-video 159.87 kB
/media/native-hls-video 3.77 kB
/media/simple-hls-video 15.80 kB
Players (3)
Entry Size
/video/player 7.05 kB
/audio/player 5.13 kB
/background/player 3.86 kB
Skins (29)
Entry Type Size
/video/minimal-skin.css css 3.50 kB
/video/skin.css css 3.53 kB
/video/minimal-skin js 26.22 kB
/video/minimal-skin.tailwind js 26.43 kB
/video/skin js 28.68 kB
/video/skin.tailwind js 28.81 kB
/audio/minimal-skin.css css 2.54 kB
/audio/skin.css css 2.50 kB
/audio/minimal-skin js 24.18 kB
/audio/minimal-skin.tailwind js 24.37 kB
/audio/skin js 26.58 kB
/audio/skin.tailwind js 26.73 kB
/background/skin.css css 117 B
/background/skin js 1.14 kB
/live-video/minimal-skin.css css 3.50 kB
/live-video/skin.css css 3.53 kB
/live-video/minimal-skin js 25.96 kB
/live-video/minimal-skin.tailwind js 26.04 kB
/live-video/skin js 28.39 kB
/live-video/skin.tailwind js 28.46 kB
/live-audio/minimal-skin.css css 2.54 kB
/live-audio/skin.css css 2.50 kB
/live-audio/minimal-skin js 23.96 kB
/live-audio/minimal-skin.tailwind js 23.96 kB
/live-audio/skin js 26.33 kB
/live-audio/skin.tailwind js 26.37 kB
/base.css css 157 B
/shared.css css 88 B
/skin-element js 1.35 kB
UI Components (25)
Entry Size
/ui/alert-dialog 1.01 kB
/ui/alert-dialog-close 466 B
/ui/alert-dialog-description 393 B
/ui/alert-dialog-title 412 B
/ui/buffering-indicator 2.49 kB
/ui/captions-button 2.66 kB
/ui/cast-button 2.67 kB
/ui/compounds 4.16 kB
/ui/controls 2.35 kB
/ui/error-dialog 3.09 kB
/ui/fullscreen-button 2.67 kB
/ui/hotkey 1.91 kB
/ui/mute-button 2.69 kB
/ui/pip-button 2.67 kB
/ui/play-button 2.65 kB
/ui/playback-rate-button 2.69 kB
/ui/popover 1.84 kB
/ui/poster 2.25 kB
/ui/seek-button 2.69 kB
/ui/slider 1.53 kB
/ui/thumbnail 2.92 kB
/ui/time 2.52 kB
/ui/time-slider 3.96 kB
/ui/tooltip 2.03 kB
/ui/volume-slider 2.65 kB

Sizes are marginal over the root entry point.

⚛️ @videojs/react

Path Base PR Diff %
/live-video/minimal-skin.css 3.44 kB 🆕
/live-video/skin.css 3.46 kB 🆕
/live-video/minimal-skin 17.74 kB 🆕
/live-video/minimal-skin.tailwind 21.15 kB 🆕
/live-video/skin 20.14 kB 🆕
/live-video/skin.tailwind 21.32 kB 🆕
/live-audio/minimal-skin.css 2.44 kB 🆕
/live-audio/skin.css 2.39 kB 🆕
/live-audio/minimal-skin 15.72 kB 🆕
/live-audio/minimal-skin.tailwind 18.03 kB 🆕
/live-audio/skin 17.21 kB 🆕
/live-audio/skin.tailwind 18.12 kB 🆕
Presets (7)
Entry Size
/video (default) 23.48 kB
/video (default + hls) 154.67 kB
/video (minimal) 21.11 kB
/video (minimal + hls) 152.60 kB
/audio (default) 19.06 kB
/audio (minimal) 17.61 kB
/background 755 B
Media (7)
Entry Size
/media/background-video 575 B
/media/dash-video 235.04 kB
/media/hls-video 132.64 kB
/media/mux-audio 158.59 kB
/media/mux-video 158.53 kB
/media/native-hls-video 2.26 kB
/media/simple-hls-video 14.36 kB
Skins (26)
Entry Type Size
/video/minimal-skin.css css 3.44 kB
/video/skin.css css 3.46 kB
/video/minimal-skin js 21.04 kB
/video/minimal-skin.tailwind js 24.53 kB
/video/skin js 23.40 kB
/video/skin.tailwind js 24.66 kB
/audio/minimal-skin.css css 2.44 kB
/audio/skin.css css 2.39 kB
/audio/minimal-skin js 17.52 kB
/audio/minimal-skin.tailwind js 20.04 kB
/audio/skin js 18.98 kB
/audio/skin.tailwind js 19.97 kB
/background/skin.css css 90 B
/background/skin js 272 B
/live-video/minimal-skin.css css 3.44 kB
/live-video/skin.css css 3.46 kB
/live-video/minimal-skin js 17.74 kB
/live-video/minimal-skin.tailwind js 21.15 kB
/live-video/skin js 20.14 kB
/live-video/skin.tailwind js 21.32 kB
/live-audio/minimal-skin.css css 2.44 kB
/live-audio/skin.css css 2.39 kB
/live-audio/minimal-skin js 15.72 kB
/live-audio/minimal-skin.tailwind js 18.03 kB
/live-audio/skin js 17.21 kB
/live-audio/skin.tailwind js 18.12 kB
UI Components (20)
Entry Size
/ui/alert-dialog 1.09 kB
/ui/buffering-indicator 1.79 kB
/ui/captions-button 2.02 kB
/ui/cast-button 2.04 kB
/ui/controls 1.76 kB
/ui/error-dialog 2.25 kB
/ui/fullscreen-button 2.06 kB
/ui/mute-button 2.03 kB
/ui/pip-button 2.00 kB
/ui/play-button 1.99 kB
/ui/playback-rate-button 1.89 kB
/ui/popover 1.86 kB
/ui/poster 1.67 kB
/ui/seek-button 2.10 kB
/ui/slider 2.66 kB
/ui/thumbnail 2.07 kB
/ui/time 2.06 kB
/ui/time-slider 2.36 kB
/ui/tooltip 2.17 kB
/ui/volume-slider 3.18 kB

Sizes are marginal over the root entry point.

🧩 @videojs/core — no changes
Entries (9)
Entry Size
. 4.96 kB
/dom 11.87 kB
/dom/media/custom-media-element 1.90 kB
/dom/media/dash 234.13 kB
/dom/media/google-cast 4.07 kB
/dom/media/hls 131.89 kB
/dom/media/mux 158.01 kB
/dom/media/native-hls 1.61 kB
/dom/media/simple-hls 13.73 kB
🏷️ @videojs/element — no changes
Entries (2)
Entry Size
. 999 B
/context 943 B
📦 @videojs/store — no changes
Entries (3)
Entry Size
. 1.39 kB
/html 695 B
/react 360 B
🔧 @videojs/utils — no changes
Entries (10)
Entry Size
/array 104 B
/dom 1.92 kB
/events 319 B
/function 327 B
/object 275 B
/predicate 265 B
/string 148 B
/style 190 B
/time 478 B
/number 158 B
📦 @videojs/spf — no changes
Entries (3)
Entry Size
. 40 B
/dom 13.33 kB
/playback-engine 13.24 kB

ℹ️ How to interpret

All sizes are standalone totals (minified + brotli).

Icon Meaning
No change
🔺 Increased ≤ 10%
🔴 Increased > 10%
🔽 Decreased
🆕 New (no baseline)

Run pnpm size locally to check current sizes.

Drop streamTypeFeature from the video/audio presets and drop
playbackRateFeature from the live presets since playback rate isn't
meaningful for live streams. Consumers that need either feature can
still opt in explicitly.

Made-with: Cursor
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8a66d43. Configure here.

Comment thread packages/html/src/define/live-video/skin.ts Outdated
Live playback doesn't benefit from a seek bar by default, so the live
video and audio presets no longer render a TimeSlider. A flex spacer
sits between the start/end button groups so the controls still stretch
to opposite edges of the control bar. Applies to both the React and
HTML presets, across default/minimal and CSS/Tailwind variants.

Made-with: Cursor
The live video and live audio skins still shipped `speedUp`/`speedDown`
and `seekStep` hotkeys (and doubletap seek gestures) even though
`liveVideoFeatures` and `liveAudioFeatures` intentionally omit the
playback-rate feature and seek actions aren't meaningful on a live edge.
Strip them so no hotkey/gesture dispatches an action that isn't in the
store.

Made-with: Cursor
@luwes luwes merged commit d9c0049 into main Apr 22, 2026
26 checks passed
@luwes luwes deleted the feat/live-video-preset branch April 22, 2026 19:43
@luwes luwes mentioned this pull request Apr 22, 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.

Feature: Add Live Presets and Skins

1 participant