This repository was archived by the owner on Oct 21, 2026. It is now read-only.
Repository navigation
Conversation
`SliderCore.setProps` filled props against the static base-class `defaultProps`, and `defaults()` only copies keys owned by its defaults argument. `VolumeSliderCore` extends `defaultProps` with `wheelStep`, so that key was dropped from `#props` even when the subclass pre-filled it, and `getWheelStepPercent()` returned `NaN`. Both the HTML and React volume sliders then called `setVolume(NaN)` on wheel input. The same static lookup in the field initializer also left a no-arg `new VolumeSliderCore()` with the base `step` instead of the volume step. Resolve `defaultProps` through the instantiated class so subclass keys survive both construction and `setProps`, and drop the now-redundant re-defaulting in `VolumeSliderCore.setProps`. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
✅ 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.
|
@videojs/core
@videojs/element
@videojs/html
@videojs/media
@videojs/react
@videojs/spf
@videojs/store
@videojs/utils
commit: |
Contributor
📦 Bundle Size Report🎨 @videojs/html — 17 small size changes
Presets (7)
Media (18)
Extensions (2)
Players (5)
Skins (29)
UI Components (50)
⚛️ @videojs/react — 25 small size changes
Presets (7)
Media (22)
Extensions (2)
Players (5)
Skins (26)
UI Components (39)
🧩 @videojs/core — 1 small size change
Entries (76)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (13)
📦 @videojs/media
Entries (23)
📦 @videojs/spf — no changesEntries (10)
ℹ️ 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 |
This branch was successfully deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Scrolling the mouse wheel over the volume slider called
setVolume(NaN)in both the HTML and React players.SliderCore.setPropsresolved defaults against the static base-classSliderCore.defaultProps, anddefaults()(@videojs/utils/object) only copies keys owned by its defaults argument.VolumeSliderCoredeclaresstatic override defaultPropswith an extrawheelStep, and its ownsetPropsoverride did pre-fill it, but handing the result tosuper.setPropsre-randefaults()against the base defaults and strippedwheelStepfrom#props.getWheelStepPercent()then computedundefined / range * 100 = NaN, whichcreateWheelStepfed straight intosetVolume.The same static lookup in the
#propsfield initializer also meant a no-argnew VolumeSliderCore()kept the basestep: 1instead of the volume default5.TimeSliderCoreis not affected: it shadows#propswith its own copy and readspauseOnDrag/changeThrottlefrom there.Surfaced while writing the tests for #2595.
Changes
packages/core/src/core/ui/slider/core.ts: resolvedefaultPropsthrough the instantiated class (this.constructor) via a private#defaultPropsgetter, used by both the#propsinitializer andsetProps. No public API shape changes; thepropsgetter type is unchanged.packages/core/src/core/ui/volume-slider/core.ts: drop the now-redundant re-defaulting insetProps; the override remains only to widen the accepted props type.packages/core/src/core/ui/volume-slider/tests/core.test.ts: addgetWheelStepPercenttests for the default step, an explicitwheelStep, and no-arg construction. All three fail onmain.packages/react/src/ui/volume-slider/tests/volume-slider.test.tsx: the existing wheel tests only assertedsetVolumewas called; add one that asserts the value (0.8volume + default 5% step =0.85). Verified it fails withReceived: NaNagainst the pre-fix core.Testing
pnpm -F @videojs/core test src/core/ui: 45 files, 585 tests passedpnpm exec vp run @videojs/core#buildpnpm -F @videojs/html test src/ui/volume-slider: 9 passedpnpm -F @videojs/react test src/ui/volume-slider: 13 passedpnpm lint:fix:fileon touched files: 0 errorspnpm typecheck: cleangit diff --check: clean🤖 Generated with Claude Code