fix(site): update use-media reference for mediahost architecture#1702
Conversation
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 619f562. Configure here.
| </> | ||
| )} | ||
| </dl> | ||
| ); |
There was a problem hiding this comment.
Demo panel stale after load
Medium Severity
The Basic Usage demo renders currentSrc, videoWidth, and videoHeight from Player.useMedia() during render, but that hook only exposes the media reference from context and does not re-render when the underlying element fires events like loadedmetadata. The info panel can keep showing empty or zero values after playback starts.
Reviewed by Cursor Bugbot for commit 619f562. Configure here.
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (10)
Players (5)
Skins (30)
UI Components (38)
Sizes are marginal over the root entry point. ⚛️ @videojs/react — no changesPresets (7)
Media (9)
Skins (27)
UI Components (32)
Sizes are marginal over the root entry point. 🧩 @videojs/core — no changesEntries (13)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (10)
📦 @videojs/spf — no changesEntries (4)
ℹ️ How to interpretAll sizes are standalone totals (minified + brotli).
Run |
decepulis
left a comment
There was a problem hiding this comment.
This is great, thanks!
Co-authored-by: Darius Cepulis <dcepulis@mux.com>


Closes #1405
Refs #1405
Summary
Update the
Player.useMediareference docs to reflect the new mediahost architecture, where the hook returns a runtime-agnosticMediaobject rather than anHTMLMediaElement.Changes
Mediainterface (capabilities likeplay()and event subscription) instead of the native media elementTesting
Docs-only change; covered by the existing site build.
Note
Low Risk
Documentation, demo assets, and a barrel re-export only; no playback or hook runtime behavior changes.
Overview
Updates
Player.useMediareference copy to match the mediahost model: the hook returns a runtime-agnosticMediaobject (capabilities likeplay()and events), not a directHTMLMediaElement, and trims the standalone-import note in favor of linkingcreatePlayeranduseMediaAttach.Adds a Basic Usage live demo (React + CSS) that reads
Player.useMedia()and gates UI withisMediaSourceCapable/isMediaVideoDimensionsCapable. Re-exports./media/predicatefrompackages/core/src/domso those helpers are available from the public package surface used by the demo.Reviewed by Cursor Bugbot for commit 0647699. Bugbot is set up for automated code reviews on this repo. Configure here.