fix(site): surface native media properties on element reference pages#1722
Draft
decepulis wants to merge 1 commit into
Draft
fix(site): surface native media properties on element reference pages#1722decepulis wants to merge 1 commit into
decepulis wants to merge 1 commit into
Conversation
Media element reference pages omitted the common native media properties (currentTime, duration, volume, muted, paused, playbackRate, buffered, textTracks, videoWidth, ...) because property extraction stopped at the base host classes. The Video.js-specific props survived only because engine subclasses re-declare them. Treat native properties like methods: extract the getter/setter names forwarded from the shared base host classes once per media type, filter to genuine native members, dedupe against the rich host-properties table, and surface them with an MDN link. Also align the sections per the issue: rename "Host Properties" to "Properties", describe the custom stream-type attribute inline instead of deferring to MDN, and reorder sections markup-first (Attributes, Properties, Methods, Events, CSS). Closes #1717 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VrDK65hmArBoXZhreQFpz4
✅ 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 (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 (14)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (10)
📦 @videojs/spf — no changesEntries (4)
ℹ️ How to interpretJS sizes are initial static graph totals (minified + brotli). Lazy dynamic chunks are shown separately when present.
Run |
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
Fixes #1717. Media element reference pages (e.g.
hls-video) omitted the common native media properties —currentTime,duration,volume,muted,paused,playbackRate,buffered,textTracks,videoWidth, etc. — even though every element exposes them. Property extraction stopped at the base host classes (HTMLMediaElementHost/HTMLVideoElementHost), so the native passthroughs defined only there were dropped. The Video.js-specific props survived only because engine subclasses re-declare them.The other three sections (attributes, events, methods) already read the supported surface from source and link MDN for detail. This makes properties do the same.
What changed
Treat native properties like methods (the existing model for the
methodsfield):extractAccessorNames()collects getter/setter names from a single class — the property analog ofextractPublicMethodNames().media-host.ts+video-host.ts/audio-host.ts), filtered to genuine native members (∩theHTMLMediaElement/HTMLVideoElement/HTMLAudioElementmember set already collected foroverridesNative), and deduped against the richhostPropertiestable.nativeProperties: string[]field, rendered as an MDN-linked chip list beneath the existing host-properties table.Section alignments from the issue:
host-properties→properties; no MDX anchors reference the old id).stream-typeis now described inline in Attributes (with its allowed values) instead of hiding in the "standard ones behave as MDN" list.Out of scope: the "keep it honest for non-
<video>elements" framing is explicitly deferred by the issue.Verification
pnpm api-docsregenerates the JSON;hls-video.jsonnow includes anativePropertiesarray withcurrentTime,duration,volume,muted,paused,playbackRate,buffered,textTracks,videoWidth, … and excludesstreamType/liveEdgeStart/config(non-native) andsrc/preload(deduped into the rich table). Audio elements correctly exclude video-only props.mediaReferenceModeltests updated and passing (fixtures gained native and non-native accessors to exercise the filter).pnpm typecheck,pnpm astro check(0 errors),pnpm lint, andpnpm check:workspaceall clean.🤖 Generated with Claude Code
Generated by Claude Code