Skip to content

docs(site): document thumbnail CORS inheritance - #2298

Merged
luwes merged 1 commit into
mainfrom
docs/2290-thumbnail-cors
Aug 21, 2026
Merged

docs(site): document thumbnail CORS inheritance#2298
luwes merged 1 commit into
mainfrom
docs/2290-thumbnail-cors

Conversation

@luwes

@luwes luwes commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Closes #2290

Summary

#2273 gave Thumbnail a new crossOrigin contract: left unset it inherits the media element's CORS mode, since a cross-origin thumbnail <track> only loads when the media is CORS-enabled. The docs never said so, and two copy-pasteable Quick Start snippets paired a cross-origin Mux storyboard.vtt with a media element that had no crossorigin — so they produced no thumbnails as written.

Changes

  • Thumbnail Quick Start now sets crossOrigin="anonymous" / crossorigin="anonymous" on the media element, matching the page's own demos and HeroVideo.tsx, with a line on why and a note that same-origin tracks need none of it.
  • Thumbnail Behavior gains a "Cross-origin images" subsection: inherit-from-media by default, the null opt-out, that leaving the HTML attribute off is not the opt-out, that an empty value reads as Anonymous per the CORS settings attribute, and that thumbnails sources never inherit.
  • MuxVideo "Thumbnails and storyboards" now says the element must be CORS-enabled for the auto-injected cross-origin storyboard track and its sprite sheets.
  • Text tracks prose introduces the new thumbnailTrackCrossOrigin state field alongside the generated table.
  • Migrate from Plyr notes when the React example needs crossOrigin on <Video>.
Two judgment calls
  • migrate-from-plyr.mdx gets a note rather than a hardcoded crossOrigin="anonymous". The example's origin prop is often same-origin, and adding crossorigin unconditionally breaks playback when the host sends no CORS headers. The note says when to add it.
  • poster.mdx is untouched. fix(packages): load posters and storyboard thumbnails in cross-origin-isolated pages #2273's title covers posters, but there is no crossOrigin anywhere in the Poster core/React/HTML sources — that half of the fix landed in sandbox templates, so the public API did not move.

Testing

  • pnpm -F site astro check — 0 errors
  • pnpm build:site — complete; spot-checked the rendered thumbnail reference page for the new prose and snippets
  • Confirmed the generated reference JSON already picks up the new JSDoc, so the ComponentReference and FeatureReference tables need no hand edits

Note

Low Risk
Documentation-only updates to CORS usage for thumbnails; no runtime or API code changes.

Overview
Documents Thumbnail CORS inheritance so copy-paste examples actually load Mux storyboards.

Quick Start now sets crossOrigin="anonymous" on the media element for the cross-origin Mux VTT, and notes same-origin tracks need none of that. A new Cross-origin images section explains inherit-from-media by default, crossOrigin={null} as the only opt-out, empty/absent attributes, and that JSON thumbnails never inherit.

MuxVideo storyboard docs require CORS on the element; text-track docs mention thumbnailTrackCrossOrigin; the Plyr React migration notes when to add crossOrigin on <Video> instead of hardcoding it.

Reviewed by Cursor Bugbot for commit b101bee. Bugbot is set up for automated code reviews on this repo. Configure here.

A cross-origin thumbnail <track> only loads when the media element is
CORS-enabled, and Thumbnail now inherits that mode for the sprite sheets
its cues point at. The Quick Start snippets paired a cross-origin Mux
storyboard.vtt with a media element that had no crossorigin, so they
produced no thumbnails as written.

Refs #2290
@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
v10-sandbox Ready Ready Preview Aug 21, 2026 12:14am

Request Review

@netlify

netlify Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit b101bee
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/6a8798735262580007f29a0b
😎 Deploy Preview https://deploy-preview-2298--vjs10-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@pkg-pr-new

pkg-pr-new Bot commented Aug 21, 2026

Copy link
Copy Markdown
@videojs/core

pnpm add https://pkg.pr.new/@videojs/core@2298

@videojs/element

pnpm add https://pkg.pr.new/@videojs/element@2298

@videojs/html

pnpm add https://pkg.pr.new/@videojs/html@2298

@videojs/media

pnpm add https://pkg.pr.new/@videojs/media@2298

@videojs/react

pnpm add https://pkg.pr.new/@videojs/react@2298

@videojs/spf

pnpm add https://pkg.pr.new/@videojs/spf@2298

@videojs/store

pnpm add https://pkg.pr.new/@videojs/store@2298

@videojs/utils

pnpm add https://pkg.pr.new/@videojs/utils@2298

commit: b101bee

@github-actions

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

🎨 @videojs/html — no changes
Presets (7)
Entry Initial Lazy
/video (default) 58.69 kB 56.87 kB
/video (default + hls) 197.58 kB 56.87 kB
/video (minimal) 58.56 kB 56.87 kB
/video (minimal + hls) 197.52 kB 56.87 kB
/audio (default) 48.53 kB 56.87 kB
/audio (minimal) 44.72 kB 56.87 kB
/background 5.75 kB 56.87 kB
Media (20)
Entry Initial Lazy
/media/mux-video 142.29 kB
/media/mux-audio 142.00 kB
/media/background-video 1.14 kB
/media/cloudflare-video 6.25 kB
/media/container 3.12 kB 56.87 kB
/media/dash-video 211.89 kB
/media/google-cast 6.46 kB
/media/hls-audio 21.81 kB
/media/hls-background-video 16.75 kB
/media/hls-video 27.79 kB
/media/hlsjs-video 141.16 kB
/media/mux-background-video 16.75 kB
/media/mux-data 26.66 kB
/media/native-hls-video 7.51 kB
/media/shaka-video 199.34 kB
/media/spotify-audio 6.23 kB
/media/tiktok-video 6.32 kB
/media/twitch-video 6.20 kB
/media/vimeo-video 13.01 kB
/media/youtube-video 6.76 kB
Players (5)
Entry Initial Lazy
/video/player 10.36 kB 56.87 kB
/audio/player 7.08 kB 56.87 kB
/background/player 5.45 kB 56.87 kB
/live-video/player 9.75 kB 56.87 kB
/live-audio/player 7.10 kB 56.87 kB
Skins (29)
Entry Type Initial Lazy
/video/minimal-skin.css css 6.43 kB
/video/skin.css css 6.22 kB
/video/minimal-skin js 58.43 kB 56.87 kB
/video/minimal-skin.tailwind js 59.24 kB 56.87 kB
/video/skin js 58.67 kB 56.87 kB
/video/skin.tailwind js 59.47 kB 56.87 kB
/audio/minimal-skin.css css 4.71 kB
/audio/skin.css css 4.63 kB
/audio/minimal-skin js 44.71 kB 56.87 kB
/audio/minimal-skin.tailwind js 45.26 kB 56.87 kB
/audio/skin js 48.57 kB 56.87 kB
/audio/skin.tailwind js 49.28 kB 56.87 kB
/background/skin.css css 145 B
/background/skin js 1.14 kB
/live-video/minimal-skin.css css 6.43 kB
/live-video/skin.css css 6.22 kB
/live-video/minimal-skin js 52.63 kB 56.87 kB
/live-video/minimal-skin.tailwind js 52.98 kB 56.87 kB
/live-video/skin js 55.03 kB 56.87 kB
/live-video/skin.tailwind js 55.68 kB 56.87 kB
/live-audio/minimal-skin.css css 4.71 kB
/live-audio/skin.css css 4.63 kB
/live-audio/minimal-skin js 38.65 kB 56.87 kB
/live-audio/minimal-skin.tailwind js 38.08 kB 56.87 kB
/live-audio/skin js 42.13 kB 56.87 kB
/live-audio/skin.tailwind js 41.79 kB 56.87 kB
/global.css css 183 B
/shared.css css 99 B
/skin-element js 1.38 kB
UI Components (43)
Entry Initial Lazy
/ui/airplay-button 11.05 kB 56.87 kB
/ui/alert-dialog 4.24 kB 56.87 kB
/ui/alert-dialog-close 1.94 kB 56.87 kB
/ui/alert-dialog-description 1.63 kB 56.87 kB
/ui/alert-dialog-title 1.65 kB 56.87 kB
/ui/audio-track-radio-group 11.21 kB 56.87 kB
/ui/buffering-indicator 8.50 kB 56.87 kB
/ui/captions-button 11.31 kB 56.87 kB
/ui/captions-radio-group 11.30 kB 56.87 kB
/ui/cast-button 11.04 kB 56.87 kB
/ui/compounds 35.08 kB 56.87 kB
/ui/controls 8.65 kB 56.87 kB
/ui/error-dialog 11.53 kB 56.87 kB
/ui/fullscreen-button 11.02 kB 56.87 kB
/ui/gesture 9.30 kB 56.87 kB
/ui/hotkey 9.74 kB 56.87 kB
/ui/menu 18.94 kB 56.87 kB
/ui/mute-button 11.06 kB 56.87 kB
/ui/pip-button 11.03 kB 56.87 kB
/ui/play-button 11.01 kB 56.87 kB
/ui/playback-rate-button 11.12 kB 56.87 kB
/ui/playback-rate-radio-group 11.20 kB 56.87 kB
/ui/popover 8.23 kB 56.87 kB
/ui/poster 8.56 kB 56.87 kB
/ui/quality-radio-group 11.79 kB 56.87 kB
/ui/seek-button 11.06 kB 56.87 kB
/ui/seek-indicator 12.45 kB 56.87 kB
/ui/seek-indicator-value 1.03 kB
/ui/slider 11.86 kB 56.87 kB
/ui/status-announcer 10.42 kB 56.87 kB
/ui/status-indicator 12.76 kB 56.87 kB
/ui/status-indicator-value 1.02 kB
/ui/thumbnail 9.68 kB 56.87 kB
/ui/time 10.76 kB 56.87 kB
/ui/time-slider 14.81 kB 56.87 kB
/ui/time-slider-chapter-title 8.66 kB 56.87 kB
/ui/time-slider-chapters 9.63 kB 56.87 kB
/ui/title 8.07 kB 56.87 kB
/ui/tooltip 9.58 kB 56.87 kB
/ui/volume-indicator 12.78 kB 56.87 kB
/ui/volume-indicator-fill 1.03 kB
/ui/volume-indicator-value 1.02 kB
/ui/volume-slider 12.51 kB 56.87 kB
⚛️ @videojs/react — no changes
Presets (7)
Entry Initial Lazy
/video (default) 46.03 kB 56.87 kB
/video (default + hls) 183.85 kB 56.87 kB
/video (minimal) 46.15 kB 56.87 kB
/video (minimal + hls) 183.97 kB 56.87 kB
/audio (default) 35.52 kB 56.87 kB
/audio (minimal) 35.63 kB 56.87 kB
/background 580 B 56.87 kB
Media (23)
Entry Initial
/media/mux-video/hls-js 140.58 kB
/media/mux-video/spf 27.09 kB
/media/mux-audio/hls-js 140.38 kB
/media/mux-audio/spf 21.07 kB
/media/background-video 394 B
/media/cloudflare-video 4.34 kB
/media/dash-video 210.24 kB
/media/google-cast 5.34 kB
/media/hls-audio 20.09 kB
/media/hls-background-video 16.37 kB
/media/hls-video 26.06 kB
/media/hlsjs-video 139.41 kB
/media/mux-audio 140.41 kB
/media/mux-background-video 16.36 kB
/media/mux-data 25.50 kB
/media/mux-video 140.47 kB
/media/native-hls-video 5.75 kB
/media/shaka-video 197.53 kB
/media/spotify-audio 4.21 kB
/media/tiktok-video 4.18 kB
/media/twitch-video 4.29 kB
/media/vimeo-video 11.21 kB
/media/youtube-video 4.87 kB
Players (5)
Entry Initial Lazy
/video/player 7.51 kB 56.87 kB
/audio/player 3.95 kB 56.87 kB
/background/player 2.26 kB 56.87 kB
/live-video/player 6.90 kB 56.87 kB
/live-audio/player 3.95 kB 56.87 kB
Skins (26)
Entry Type Initial Lazy
/video/minimal-skin.css css 6.34 kB
/video/skin.css css 6.11 kB
/video/minimal-skin js 46.01 kB 56.87 kB
/video/minimal-skin.tailwind js 52.87 kB 56.87 kB
/video/skin js 45.98 kB 56.87 kB
/video/skin.tailwind js 52.61 kB 56.87 kB
/audio/minimal-skin.css css 4.56 kB
/audio/skin.css css 4.48 kB
/audio/minimal-skin js 35.49 kB 56.87 kB
/audio/minimal-skin.tailwind js 40.50 kB 56.87 kB
/audio/skin js 35.47 kB 56.87 kB
/audio/skin.tailwind js 40.47 kB 56.87 kB
/background/skin.css css 90 B
/background/skin js 277 B
/live-video/minimal-skin.css css 6.34 kB
/live-video/skin.css css 6.11 kB
/live-video/minimal-skin js 38.11 kB 56.87 kB
/live-video/minimal-skin.tailwind js 44.70 kB 56.87 kB
/live-video/skin js 38.16 kB 56.87 kB
/live-video/skin.tailwind js 44.65 kB 56.87 kB
/live-audio/minimal-skin.css css 4.56 kB
/live-audio/skin.css css 4.48 kB
/live-audio/minimal-skin js 27.66 kB 56.87 kB
/live-audio/minimal-skin.tailwind js 31.48 kB 56.87 kB
/live-audio/skin js 27.71 kB 56.87 kB
/live-audio/skin.tailwind js 31.62 kB 56.87 kB
UI Components (37)
Entry Initial Lazy
/ui/airplay-button 10.27 kB 56.87 kB
/ui/alert-dialog 3.32 kB 56.87 kB
/ui/audio-track 7.88 kB 56.87 kB
/ui/audio-track-radio-group 9.04 kB 56.87 kB
/ui/buffering-indicator 7.72 kB 56.87 kB
/ui/captions-button 10.23 kB 56.87 kB
/ui/captions-radio-group 9.17 kB 56.87 kB
/ui/cast-button 10.25 kB 56.87 kB
/ui/controls 7.43 kB 56.87 kB
/ui/error-dialog 10.30 kB 56.87 kB
/ui/fullscreen-button 10.21 kB 56.87 kB
/ui/gesture 7.80 kB 56.87 kB
/ui/hotkey 8.22 kB 56.87 kB
/ui/live-button 8.68 kB 56.87 kB
/ui/menu 18.30 kB 56.87 kB
/ui/mute-button 10.25 kB 56.87 kB
/ui/pip-button 10.22 kB 56.87 kB
/ui/play-button 10.18 kB 56.87 kB
/ui/playback-rate 7.94 kB 56.87 kB
/ui/playback-rate-button 10.19 kB 56.87 kB
/ui/playback-rate-radio-group 9.08 kB 56.87 kB
/ui/popover 7.91 kB 56.87 kB
/ui/poster 7.49 kB 56.87 kB
/ui/quality 8.38 kB 56.87 kB
/ui/quality-radio-group 9.53 kB 56.87 kB
/ui/seek-button 10.22 kB 56.87 kB
/ui/seek-indicator 11.77 kB 56.87 kB
/ui/slider 12.53 kB 56.87 kB
/ui/status-announcer 9.95 kB 56.87 kB
/ui/status-indicator 12.05 kB 56.87 kB
/ui/thumbnail 8.63 kB 56.87 kB
/ui/time 9.73 kB 56.87 kB
/ui/time-slider 14.02 kB 56.87 kB
/ui/title 7.19 kB 56.87 kB
/ui/tooltip 8.65 kB 56.87 kB
/ui/volume-indicator 12.15 kB 56.87 kB
/ui/volume-slider 11.94 kB 56.87 kB
🧩 @videojs/core — no changes
Entries (76)
Entry Initial Lazy
. 12.88 kB
/dom 20.76 kB 56.87 kB
/vjsc 1.61 kB
/i18n 3.20 kB 56.87 kB
/i18n/locales/all 34.97 kB
/i18n/locales/ar 1.22 kB
/i18n/locales/az 1.09 kB
/i18n/locales/bg 1.29 kB
/i18n/locales/bn 1.23 kB
/i18n/locales/bs 1.00 kB
/i18n/locales/ca 1.07 kB
/i18n/locales/cs 1.07 kB
/i18n/locales/cy 1.02 kB
/i18n/locales/da 1006 B
/i18n/locales/de 1.09 kB
/i18n/locales/el 1.49 kB
/i18n/locales/en 785 B
/i18n/locales/es 1018 B
/i18n/locales/et 1.05 kB
/i18n/locales/eu 1.03 kB
/i18n/locales/fa 1.22 kB
/i18n/locales/fi 1.04 kB
/i18n/locales/fr 1.07 kB
/i18n/locales/gd 1.10 kB
/i18n/locales/gl 1022 B
/i18n/locales/he 1.14 kB
/i18n/locales/hi 1.30 kB
/i18n/locales/hr 1.02 kB
/i18n/locales/hu 1.10 kB
/i18n/locales/id 919 B
/i18n/locales/it 1.01 kB
/i18n/locales/ja 1.18 kB
/i18n/locales/ko 1.14 kB
/i18n/locales/lt 1.02 kB
/i18n/locales/lv 1.09 kB
/i18n/locales/mr 1.30 kB
/i18n/locales/nb 987 B
/i18n/locales/ne 1.29 kB
/i18n/locales/nl 1.00 kB
/i18n/locales/nn 987 B
/i18n/locales/oc 1.08 kB
/i18n/locales/pl 1.14 kB
/i18n/locales/pt 1.03 kB
/i18n/locales/pt-BR 1.03 kB
/i18n/locales/pt-PT 1.01 kB
/i18n/locales/ro 1.07 kB
/i18n/locales/ru 1.40 kB
/i18n/locales/sk 1.10 kB
/i18n/locales/sl 1.04 kB
/i18n/locales/sr 1.07 kB
/i18n/locales/sv 1.01 kB
/i18n/locales/te 1.32 kB
/i18n/locales/th 1.29 kB
/i18n/locales/tr 1.08 kB
/i18n/locales/uk 1.41 kB
/i18n/locales/vi 1.11 kB
/i18n/locales/zh 1.02 kB
/i18n/locales/zh-CN 1.02 kB
/i18n/locales/zh-TW 1.02 kB
/i18n/text/airplay 101 B
/i18n/text/buttons 137 B
/i18n/text/captions 93 B
/i18n/text/cast 114 B
/i18n/text/common 90 B
/i18n/text/container 75 B
/i18n/text/errors 285 B
/i18n/text/fullscreen 98 B
/i18n/text/live 126 B
/i18n/text/menu 249 B
/i18n/text/pip 101 B
/i18n/text/playback 80 B
/i18n/text/seek 105 B
/i18n/text/slider 65 B
/i18n/text/status 222 B
/i18n/text/time 280 B
/i18n/text/volume 133 B
🏷️ @videojs/element — no changes
Entries (2)
Entry Initial
. 996 B
/context 943 B
📦 @videojs/store — no changes
Entries (3)
Entry Initial
. 1.72 kB
/html 703 B
/react 365 B
🔧 @videojs/utils — no changes
Entries (13)
Entry Initial
/array 271 B
/dom 4.73 kB
/events 320 B
/function 386 B
/i18n 194 B
/jwt 176 B
/object 535 B
/predicate 297 B
/percent 281 B
/string 239 B
/style 212 B
/time 1.01 kB
/number 199 B
📦 @videojs/media — no changes
Entries (20)
Entry Initial
. 1.07 kB
/dom 121 B
/dom/audio-host 1.10 kB
/dom/cloudflare 3.69 kB
/dom/custom-media-element 2.09 kB
/dom/dash 209.84 kB
/dom/google-cast 4.06 kB
/dom/hls-js 139.04 kB
/dom/media-host 1.20 kB
/dom/media-played-ranges 576 B
/dom/mux 162.50 kB
/dom/native-hls 5.25 kB
/dom/shaka 197.02 kB
/dom/spotify 3.58 kB
/dom/tiktok 3.56 kB
/dom/twitch 3.62 kB
/dom/video-host 1.39 kB
/dom/vimeo 10.62 kB
/dom/youtube 4.25 kB
/media-tracks 2.05 kB
📦 @videojs/spf — no changes
Entries (10)
Entry Initial
. 4.53 kB
/dom 6.58 kB
/hls 21.81 kB
/media-tracks 504 B
/hls-background-video 15.80 kB
/hls-audio 19.61 kB
/hls-video 25.55 kB
/mux-audio 20.52 kB
/mux-background-video 15.83 kB
/mux-video 26.47 kB

ℹ️ How to interpret

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.

@luwes
luwes merged commit 7d2ac58 into main Aug 21, 2026
33 checks passed
@luwes
luwes deleted the docs/2290-thumbnail-cors branch August 21, 2026 15:04
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.

docs(site): stale docs from #2273

2 participants