Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@videojs/cdn
@videojs/cli
@videojs/core
@videojs/element
@videojs/html
@videojs/media
@videojs/react
@videojs/spf
@videojs/store
@videojs/utils
@videojs/cloudflare-video
@videojs/dash-video
@videojs/hlsjs-video
@videojs/mux-audio
@videojs/mux-video
@videojs/native-hls-video
@videojs/shaka-video
@videojs/spotify-audio
@videojs/tiktok-video
@videojs/twitch-video
@videojs/vimeo-video
@videojs/wistia-video
@videojs/youtube-video
@videojs/google-cast
@videojs/mux-data
commit: |
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for vjs-registry ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (18)
Players (5)
Skins (29)
UI Components (62)
⚛️ @videojs/react — no changesPresets (7)
Media (22)
Extensions (2)
Players (5)
Skins (18)
UI Components (39)
🧩 @videojs/core — no changesEntries (76)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (13)
📦 @videojs/cdn — no changes📦 @videojs/cloudflare-video — no changes📦 @videojs/dash-video — no changes📦 @videojs/google-cast — no changes📦 @videojs/hlsjs-video — no changes📦 @videojs/media — no changesEntries (3)
📦 @videojs/mux — no changes📦 @videojs/mux-audio — no changesEntries (2)
📦 @videojs/mux-data — no changes📦 @videojs/mux-video — no changesEntries (2)
📦 @videojs/native-hls-video — no changes📦 @videojs/shaka-video — no changes📦 @videojs/spf — no changesEntries (7)
📦 @videojs/spotify-audio — no changes📦 @videojs/tiktok-video — no changes📦 @videojs/twitch-video — no changes📦 @videojs/other — no changesEntries (3)
📦 @videojs/vimeo-video — no changes📦 @videojs/wistia-video — no changesEntries (2)
📦 @videojs/youtube-video — no changesℹ️ How to interpretEach 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 |
<mux-video> loads its storyboard as a <track> from image.mux.com, which browsers only load from a CORS-enabled media element. Generated Mux video snippets had no crossorigin, so timeline hover previews never appeared. Add crossorigin="anonymous" (crossOrigin in React) to every generated Mux video element, through a renderer catalog flag.
58ffc79 to
bede862
Compare
luwes
left a comment
There was a problem hiding this comment.
👍
I'm partial to adding the crossorigin attribute without value which is the same as anonymous but either way works
|
Moved to videojs/video.js#9471 |
Fixes videojs/video.js#9413
Summary
<mux-video>andMuxVideoadd their storyboard as a<track>fromimage.mux.com, and browsers only load a cross-origin track on a CORS-enabled media element. Generated Mux video snippets had nocrossorigin, so timeline hover previews never loaded. Firefox logs a security error for it. Every generated Mux video element now setscrossorigin="anonymous"(crossOrigin="anonymous"in React).Changes
agents initplans and the installation guides addcrossoriginto Mux video media in every output: React and HTML, packaged, CDN, and Shadcn source, plus Vue, Svelte, and Astro usage.mux-audioandmux-background-video, which add no storyboard track. AcrossOriginflag in the renderer catalog marks which media need it, next toplaysInline.crossOriginand explains why previews need it, matching the Mux video reference page.Why not default CORS in the adapter
The Mux video reference page documents
crossOriginas the user's responsibility, and the media elements don't set it by default. Changing that default would change runtime behavior for every user, so this PR only fixes the generated snippets.Testing
pnpm -F @videojs/installation test, with new cases for each generated output and for media that must not get the attribute.agents init --framework react --template next --media mux-videorepro, plus an HTML CDN variant, against the built package. Both now emitcrossOrigin/crossorigin.Stacked on #3103.
🤖 Generated with Claude Code
Note
Low Risk
Scoped to installation snippet generation and docs; runtime Mux adapters are unchanged and only
mux-videooutput gains an attribute.Overview
Generated Mux video install snippets were missing CORS on the media element, so browsers blocked the storyboard
<track>fromimage.mux.comand timeline hover previews never worked.The renderer catalog now has a
crossOriginflag (onlymux-videoistrue) andneedsCrossOrigin(), with sharedhtmlMediaAttributes/reactMediaPropshelpers that emitcrossorigin="anonymous"orcrossOrigin="anonymous"alongside existingplaysinline/playsInline. All installation codegen paths that build media markup (HTML, React create/source, Vue, Svelte, source HTML) use those helpers instead of inliningplaysInlinealone.Tests assert Mux video gets CORS and other renderers (including
mux-audioandmux-background-video) do not. The Media sources guide’s storyboard example and copy now requirecrossOrigin/crossoriginand explain why previews need it.Reviewed by Cursor Bugbot for commit bede862. Bugbot is set up for automated code reviews on this repo. Configure here.