fix(react): thumbnails broken when using hls media#1210
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
ProxyMixin only copied own properties from each explicitly-passed class prototype. Methods inherited further up the chain (e.g. querySelectorAll on Element.prototype) were silently missing, causing text-track features to fail on React media components. Walk the full BaseClass prototype chain, stopping before prototypes the proxy already extends. Remove the AdditionalClasses rest parameter since the chain walk covers everything. Also enable disabled metadata/chapters tracks in the text-track feature so browsers load their cues — previously handled by the custom element's #enableDefaultTrack, which the React path lacks. Closes #1095 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d3c8e57 to
a3cddc3
Compare
Contributor
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (7)
Players (3)
Skins (17)
UI Components (22)
Sizes are marginal over the root entry point. ⚛️ @videojs/react — no changesPresets (7)
Media (6)
Skins (14)
UI Components (19)
Sizes are marginal over the root entry point. 🧩 @videojs/core — no changesEntries (8)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (10)
📦 @videojs/spf — no changesEntries (3)
ℹ️ How to interpretAll sizes are standalone totals (minified + brotli).
Run |
Merged
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
querySelectorAllonElement.prototype) were silently missing, causing storyboard<track>elements to not work on React media components (HlsVideo,SimpleHlsVideo, etc.).BaseClassprototype chain, stopping before prototypes the proxy already extends. Removes theAdditionalClassesrest parameter since the chain walk covers everything.#enableDefaultTrack, which the React path lacks.Test plan
pnpm typecheckpassespnpm -F @videojs/core test— 735 tests passpnpm build:packagessucceeds<track>— thumbnails appear on time sliderCloses #1095
🤖 Generated with Claude Code
Note
Medium Risk
Changes core
ProxyMixinbehavior by walking prototype chains, which can affect method/property proxying across multiple media components. Also forces metadata/chapters tracks out ofdisabledmode, potentially impacting track loading behavior across browsers.Overview
Fixes broken React HLS thumbnails by making
ProxyMixinproxy inherited methods/properties via a prototype-chain walk (and simplifies the API to a singleBaseClass), with new tests covering ancestor proxying and avoiding overwriting proxy-defined methods.Moves default metadata/chapters track enabling into the DOM text-track store (sets
modetohiddenwhendisabled) and removes the custom element’s per-<track>enabling logic; React thumbnail resolution is adjusted to avoid accessingthumbnailCueswhen no text-track state is present.Written by Cursor Bugbot for commit a3cddc3. This will update automatically on new commits. Configure here.