fix(spf): implement preload IDL attribute on SpfMedia#1069
Merged
cjpillsbury merged 1 commit intomainfrom Mar 23, 2026
Merged
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.
|
Contributor
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (5)
Players (3)
Skins (16)
UI Components (21)
Sizes are marginal over the root entry point. ⚛️ @videojs/react — no changesPresets (7)
Media (4)
Skins (14)
UI Components (18)
Sizes are marginal over the root entry point. 🧩 @videojs/core — no changesEntries (6)
🏷️ @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 |
Add a `preload` getter/setter to `SpfMedia` that persists the explicit value across `src` reassignments and takes priority over element-inferred preload in `syncPreloadAttribute`. Also propagates the preload attribute change through `SimpleHlsVideo.attributeChangedCallback` in the html and react packages.
3574733 to
cda7dd2
Compare
Merged
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
SpfMedialacked apreloadgetter/setter, so settingpreloadon aSimpleHlsVideoelement had no effect and was silently dropped. This adds the full IDL attribute implementation — explicit values persist acrosssrcreassignments and take priority over element-inferred preload insyncPreloadAttribute.Changes
preloadgetter/setter toSpfMediathat stores the explicit value and patches engine state immediately; the value is re-applied beforeowners.patchon every new engine (i.e., eachsrcchange) so it survives engine recreationsyncPreloadAttributeto skip element inference when an explicit preload is already set in state, preventing the media element from overriding a user-set valuepreloadattribute changes inSimpleHlsVideo.attributeChangedCallback(html + react packages), forwarding the attribute to the underlyingSpfMediainstanceSimpleHlsVideothat called out the missing preload supportTesting
fixes #1056