Skip to content

feat(site): API reference pages for media elements#1342

Merged
decepulis merged 40 commits into
mainfrom
claude/refine-local-plan-ClRzU
Jun 19, 2026
Merged

feat(site): API reference pages for media elements#1342
decepulis merged 40 commits into
mainfrom
claude/refine-local-plan-ClRzU

Conversation

@decepulis

@decepulis decepulis commented Apr 14, 2026

Copy link
Copy Markdown
Collaborator

Adds API reference pages for the media elements.

What you need to know about api references before reviewing this PR.

This is the api reference generator pipeline

  • Input: source code, which is read by...
  • Generator: an AI-generated black box that reads source code and outputs...
  • JSON: which is read by...
  • Astro content pipeline: Standard stuff which reads JSON and enforces a typed schema for...
  • Tables: Astro components that read the contenr and format it nicely for...
  • Astro MDX guides: hand-authored MDX docs that embed tables and code examples
  • Tests: demonstrate the expected shape of the source code and expected JSON output to make sure the black-box generator works and to help debuggers understand if the source code is shaped "correctly"

What's new in this PR?

  • Input: 🤏 Mostly untouched, except for some new JSDoc
  • Generator: 🤏 modified to better support events and methods; some fixes to how attributes are extracted
  • Astro content pipeline: 🆕 but very similar to our other schemas
  • Tables: 🆕 but very similar to our other tables
  • Astro MDX guides: 🆕 and important to review
  • Tests: 🤏 modified to flesh out fixtures and support new generator cases

Ok how do I review this?

  1. I'd definitely check changes to core. The JSDoc and stuff.
  2. I'd definitely check the output -- the guides.
  3. I'd skip everything in between. If the output looks good, imo, the rest is either standard or ai-black-box nonsense that can be validated with a good output

Changes to input

The output

Review prose, code examples, and whether the generated tables are any good.
Oh, and background-video is totally hand-authored because it doesn't adhere to the usual media shape.

Element HTML React
hls-video preview preview
mux-video preview preview
mux-audio preview preview
native-hls-video preview preview
dash-video preview preview
simple-hls-video preview preview
simple-hls-audio-only preview preview
background-video preview preview

Future work

References

Closes #1253. Closes #1507. Closes #1249.
https://claude.ai/code/session_01EQEjBw9Goz81HVbKCk6in3


Note

Low Risk
Changes are mostly documentation, build-time extraction, and JSDoc; runtime playback logic is largely untouched aside from comments.

Overview
Adds generated API reference for streaming media custom elements (HLS, DASH, Mux, SPF audio-only, etc.) and wires them into the docs site, alongside hand-authored background-video reference and HTML/React usage demos.

The api-docs-builder gains a generateMediaElementReferences pipeline that walks host classes through mixin chains and cross-package barrels, maps dist .d.ts back to source for extraction, pulls *DefaultProps defaults, @fires / dispatch for element-specific events, overridesNative vs lib.dom, inferred getter types, and per–media-type methods; output shape drops slots and splits events into native vs element-specific. The builder entry point writes validated JSON under generated-media-reference/.

Site: new mediaReference Astro collection, MediaReference / host props tables, TOC via mediaReferenceModel + remarkConditionalHeadings, a Media Elements nav section, and MDX pages that embed generated tables (React live demos deferred to source-only tabs pending SSR).

Core / SPF: JSDoc on engine, config, live/stream-type APIs, and @fires tags so generated docs carry accurate descriptions.

Reviewed by Cursor Bugbot for commit f1e0720. Bugbot is set up for automated code reviews on this repo. Configure here.

claude added 4 commits April 14, 2026 22:11
Add generateMediaElementReferences() to the builder entry point so
`pnpm api-docs` generates JSON for media elements (hls-video, dash-video,
mux-video, mux-audio, native-hls-video, simple-hls-video). Register a
new mediaReference content collection in Astro with a Zod schema matching
the pipeline output.

https://claude.ai/code/session_01GLtyequo6D3zqeddxsBjzQ
Create MediaReference.astro that loads generated media element JSON and
renders Host Properties, Native Attributes, Events, CSS Custom Properties,
and Slots sections. Add mediaReferenceModel.js for shared heading/id
computation. Wire into remarkConditionalHeadings for table-of-contents
injection.

https://claude.ai/code/session_01GLtyequo6D3zqeddxsBjzQ
Create 7 MDX reference pages: hls-video, dash-video, native-hls-video,
simple-hls-video, mux-video, mux-audio (auto-generated via MediaReference),
and background-video (hand-authored tables). Add "Media Elements" sidebar
section between Components and Hooks & Utilities.

https://claude.ai/code/session_01GLtyequo6D3zqeddxsBjzQ
Add BasicUsage demos (HTML + React) for hls-video, dash-video,
native-hls-video, simple-hls-video, mux-video, mux-audio, and
background-video. Wire demos into each MDX page using FrameworkCase
and StyleCase components.

https://claude.ai/code/session_01GLtyequo6D3zqeddxsBjzQ
@vercel

vercel Bot commented Apr 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v10-sandbox Ready Ready Preview, Comment Jun 19, 2026 2:40am

Request Review

@netlify

netlify Bot commented Apr 14, 2026

Copy link
Copy Markdown

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit f1e0720
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/6a34ac2cc13c6c00083f6ceb
😎 Deploy Preview https://deploy-preview-1342--vjs10-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

The React media components (`@videojs/react/media/*`) import from
`@videojs/core/dom/media/*` which top-level imports dashjs/hls.js —
libraries that access `window` at module load time. This crashes
Astro's SSR prerender. Remove all demos until the underlying SSR
issue is resolved.

https://claude.ai/code/session_01GLtyequo6D3zqeddxsBjzQ
claude added 3 commits April 29, 2026 14:34
…lan-ClRzU

# Conflicts:
#	.gitignore
#	site/scripts/api-docs-builder/src/index.ts
#	site/src/content.config.ts
#	site/src/utils/remarkConditionalHeadings.js
Add BasicUsage demos (HTML + React) for hls-video, dash-video,
native-hls-video, simple-hls-video, mux-video, mux-audio, and
background-video. Wire demos into each MDX page.

Note: React demos currently break the SSR build due to #1343
(top-level hls.js/dashjs imports access `window`). This branch
is parked until that issue is resolved.

https://claude.ai/code/session_01GLtyequo6D3zqeddxsBjzQ
The React demos for HLS, DASH, Mux, NativeHLS, and SimpleHLS media
elements import from @videojs/react/media/* which chains into top-level
hls.js/dashjs imports that access `window` at module evaluation time,
breaking Astro's SSR prerender. HTML demos and background-video React
demo are unaffected.

Refs #1343

https://claude.ai/code/session_01GLtyequo6D3zqeddxsBjzQ
@github-actions

github-actions Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

🎨 @videojs/html — no changes
Presets (7)
Entry Size
/video (default) 44.32 kB
/video (default + hls) 183.79 kB
/video (minimal) 43.98 kB
/video (minimal + hls) 183.63 kB
/audio (default) 37.83 kB
/audio (minimal) 36.61 kB
/background 4.20 kB
Media (10)
Entry Size
/media/background-video 1.14 kB
/media/container 1.72 kB
/media/dash-video 242.78 kB
/media/hls-video 141.27 kB
/media/mux-audio 163.91 kB
/media/mux-video 163.68 kB
/media/native-hls-video 9.05 kB
/media/simple-hls-audio-only 16.99 kB
/media/simple-hls-video 18.83 kB
/media/vimeo-video 12.31 kB
Players (5)
Entry Size
/video/player 8.07 kB
/audio/player 5.38 kB
/background/player 3.92 kB
/live-video/player 7.64 kB
/live-audio/player 5.39 kB
Skins (30)
Entry Type Size
/video/minimal-skin.css css 5.45 kB
/video/skin.css css 5.43 kB
/video/minimal-skin js 44.01 kB
/video/minimal-skin.tailwind js 44.58 kB
/video/skin js 44.28 kB
/video/skin.tailwind js 45.00 kB
/audio/minimal-skin.css css 3.60 kB
/audio/skin.css css 3.53 kB
/audio/minimal-skin js 36.62 kB
/audio/minimal-skin.tailwind js 37.04 kB
/audio/skin js 37.80 kB
/audio/skin.tailwind js 38.17 kB
/background/skin.css css 133 B
/background/skin js 1.14 kB
/live-video/minimal-skin.css css 5.45 kB
/live-video/skin.css css 5.43 kB
/live-video/minimal-skin js 43.12 kB
/live-video/minimal-skin.tailwind js 43.58 kB
/live-video/skin js 43.08 kB
/live-video/skin.tailwind js 43.62 kB
/live-audio/minimal-skin.css css 3.60 kB
/live-audio/skin.css css 3.53 kB
/live-audio/minimal-skin js 29.73 kB
/live-audio/minimal-skin.tailwind js 29.20 kB
/live-audio/skin js 31.04 kB
/live-audio/skin.tailwind js 30.66 kB
/global.css css 176 B
/shared.css css 88 B
/tailwind.css css 228 B
/skin-element js 1.44 kB
UI Components (38)
Entry Size
/ui/airplay-button 3.59 kB
/ui/alert-dialog 1.23 kB
/ui/alert-dialog-close 483 B
/ui/alert-dialog-description 423 B
/ui/alert-dialog-title 348 B
/ui/buffering-indicator 2.93 kB
/ui/captions-button 3.68 kB
/ui/captions-radio-group 3.34 kB
/ui/cast-button 3.64 kB
/ui/compounds 8.69 kB
/ui/controls 2.40 kB
/ui/error-dialog 3.34 kB
/ui/fullscreen-button 3.60 kB
/ui/hotkey 2.21 kB
/ui/menu 5.60 kB
/ui/mute-button 3.67 kB
/ui/pip-button 3.61 kB
/ui/play-button 3.61 kB
/ui/playback-rate-button 3.66 kB
/ui/playback-rate-radio-group 3.03 kB
/ui/popover 1.98 kB
/ui/poster 2.28 kB
/ui/quality-radio-group 2.41 kB
/ui/seek-button 3.61 kB
/ui/seek-indicator 3.81 kB
/ui/seek-indicator-value 180 B
/ui/slider 1.52 kB
/ui/status-announcer 3.56 kB
/ui/status-indicator 3.69 kB
/ui/status-indicator-value 211 B
/ui/thumbnail 3.28 kB
/ui/time 2.96 kB
/ui/time-slider 4.01 kB
/ui/tooltip 2.24 kB
/ui/volume-indicator 3.88 kB
/ui/volume-indicator-fill 178 B
/ui/volume-indicator-value 201 B
/ui/volume-slider 2.88 kB

Sizes are marginal over the root entry point.

⚛️ @videojs/react — no changes
Presets (7)
Entry Size
/video (default) 36.83 kB
/video (default + hls) 175.18 kB
/video (minimal) 36.91 kB
/video (minimal + hls) 175.13 kB
/audio (default) 29.97 kB
/audio (minimal) 30.04 kB
/background 754 B
Media (9)
Entry Size
/media/background-video 575 B
/media/dash-video 241.23 kB
/media/hls-video 139.80 kB
/media/mux-audio 162.26 kB
/media/mux-video 162.26 kB
/media/native-hls-video 7.39 kB
/media/simple-hls-audio-only 15.44 kB
/media/simple-hls-video 17.18 kB
/media/vimeo-video 10.58 kB
Skins (27)
Entry Type Size
/tailwind.css css 228 B
/video/minimal-skin.css css 5.37 kB
/video/skin.css css 5.34 kB
/video/minimal-skin js 36.81 kB
/video/minimal-skin.tailwind js 42.58 kB
/video/skin js 36.73 kB
/video/skin.tailwind js 42.46 kB
/audio/minimal-skin.css css 3.47 kB
/audio/skin.css css 3.39 kB
/audio/minimal-skin js 29.98 kB
/audio/minimal-skin.tailwind js 31.76 kB
/audio/skin js 29.91 kB
/audio/skin.tailwind js 33.75 kB
/background/skin.css css 90 B
/background/skin js 272 B
/live-video/minimal-skin.css css 5.37 kB
/live-video/skin.css css 5.34 kB
/live-video/minimal-skin js 32.56 kB
/live-video/minimal-skin.tailwind js 38.22 kB
/live-video/skin js 32.58 kB
/live-video/skin.tailwind js 38.27 kB
/live-audio/minimal-skin.css css 3.47 kB
/live-audio/skin.css css 3.39 kB
/live-audio/minimal-skin js 21.74 kB
/live-audio/minimal-skin.tailwind js 24.64 kB
/live-audio/skin js 21.78 kB
/live-audio/skin.tailwind js 24.78 kB
UI Components (32)
Entry Size
/ui/airplay-button 2.74 kB
/ui/alert-dialog 1.27 kB
/ui/buffering-indicator 2.44 kB
/ui/captions-button 2.77 kB
/ui/captions-radio-group 2.87 kB
/ui/cast-button 2.71 kB
/ui/controls 2.47 kB
/ui/error-dialog 2.68 kB
/ui/fullscreen-button 2.73 kB
/ui/gesture 2.21 kB
/ui/hotkey 2.11 kB
/ui/live-button 3.33 kB
/ui/menu 7.28 kB
/ui/mute-button 2.71 kB
/ui/pip-button 3.06 kB
/ui/play-button 2.77 kB
/ui/playback-rate 2.85 kB
/ui/playback-rate-button 2.73 kB
/ui/popover 2.37 kB
/ui/poster 2.40 kB
/ui/quality 2.99 kB
/ui/seek-button 2.74 kB
/ui/seek-indicator 2.17 kB
/ui/slider 3.70 kB
/ui/status-announcer 1.93 kB
/ui/status-indicator 2.17 kB
/ui/thumbnail 2.68 kB
/ui/time 3.30 kB
/ui/time-slider 4.23 kB
/ui/tooltip 2.68 kB
/ui/volume-indicator 2.13 kB
/ui/volume-slider 4.13 kB

Sizes are marginal over the root entry point.

🧩 @videojs/core — no changes
Entries (14)
Entry Size
. 9.08 kB
/dom 17.02 kB
/dom/media/custom-media-element 2.09 kB
/dom/media/dash 236.88 kB
/dom/media/google-cast 4.04 kB
/dom/media/hls 135.63 kB
/dom/media/media-host 1.25 kB
/dom/media/media-played-ranges 576 B
/dom/media/mux 151.26 kB
/dom/media/native-hls 3.05 kB
/dom/media/simple-hls 16.56 kB
/dom/media/simple-hls-audio-only 14.75 kB
/dom/media/vimeo 9.86 kB
/media/predicate 573 B
🏷️ @videojs/element — no changes
Entries (2)
Entry Size
. 996 B
/context 943 B
📦 @videojs/store — no changes
Entries (3)
Entry Size
. 1.39 kB
/html 696 B
/react 360 B
🔧 @videojs/utils — no changes
Entries (10)
Entry Size
/array 104 B
/dom 2.26 kB
/events 319 B
/function 327 B
/object 275 B
/predicate 265 B
/string 231 B
/style 190 B
/time 478 B
/number 158 B
📦 @videojs/spf — no changes
Entries (4)
Entry Size
. 4.45 kB
/dom 6.33 kB
/hls 15.44 kB
/background-looping-video 12.95 kB

ℹ️ How to interpret

All sizes are standalone totals (minified + brotli).

Icon Meaning
No change
🔺 Increased ≤ 10%
🔴 Increased > 10%
🔽 Decreased
🆕 New (no baseline)

Run pnpm size locally to check current sizes.

@decepulis

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 1e05bd7. Configure here.

Move custom properties before regular properties per useSortedProperties
rule. Add aspect-ratio: 16/9 to video demos to prevent flat layout
before video loads. Mux-audio excluded (audio element).

https://claude.ai/code/session_01GLtyequo6D3zqeddxsBjzQ
Switch to the standard BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM
playback ID used by all other demos. Update DASH URL per reviewer
preference. Add predefined height to mux-audio demos to prevent
layout shift.

https://claude.ai/code/session_01GLtyequo6D3zqeddxsBjzQ

Copy link
Copy Markdown
Collaborator Author

I found two docs-generation issues that look worth fixing before this lands:

  1. [P2] Mixin host properties are skipped

    In media-element-handler.ts lines 294-297, host inheritance only follows identifier extends clauses. MuxVideoMedia, MuxAudioMedia, NativeHlsMedia, and SimpleHlsMedia all extend mixin call expressions, so extractHostProperties() stops before HlsMedia, Google Cast, Mux Data, Native HLS, and SPF properties. After running pnpm -F site api-docs, mux-video.json and native-hls-video.json have empty hostProperties, so the new reference pages omit public properties such as castSrc, castReceiver, streamType, liveEdgeStart, and targetLiveWindow.

  2. [P2] Element-specific events are omitted

    In media-element-handler.ts lines 616-619, events are generated once from generic VideoEvents or AudioEvents and reused for every media element. HLS and native HLS hosts also dispatch streamtypechange and targetlivewindowchange, and tests listen for those events, but the generated JSON omits them from the Events section. The media references need to merge element- or host-specific events instead of using only the base media event set.

I tried to leave these as inline review comments, but GitHub would not anchor them because this file is not currently part of the PR diff.

Match the convention used in existing HTML demos (e.g. play-button)
where each attribute is on its own line for readability.

https://claude.ai/code/session_01GLtyequo6D3zqeddxsBjzQ

Copy link
Copy Markdown
Collaborator Author

One docs-content suggestion for the media reference pages: the generated Native Attributes and Events chip lists may be less useful than a short explanation of the forwarding behavior.

For attributes, the accurate statement is not quite “all native attributes are forwarded,” but rather that these elements accept common native media attributes and forward the supported set from CustomMediaElement.properties to the internal <video>/<audio> element. Something like:

Accepts common native media attributes and forwards them to the internal <video> element, including src, controls, autoplay, muted, loop, playsinline, poster, and preload.

For events, the runtime behavior is more useful than the exhaustive list: native media events are re-dispatched from the internal media element, so consumers can listen on the custom element directly. Something like:

el.addEventListener('play', onPlay);
el.addEventListener('timeupdate', onTimeUpdate);

Then list the element-specific events separately, e.g. for HLS/native HLS:

  • streamtypechange
  • targetlivewindowchange

That would probably read better than a large wall of event chips like canplaythrough, loadeddata, emptied, etc., while still being more accurate about what the component actually guarantees.

…d events

PR #1342 shipped 7 media element reference pages, but the api-docs-builder
emitted empty `hostProperties: {}` for any element whose host extends a
mixin call expression (mux-video, mux-audio, native-hls-video,
simple-hls-video) — `extractClassProperties` only followed `Identifier`
extends. Element-specific events (`streamtypechange`,
`targetlivewindowchange`) dispatched in mixin code were also missing.

This commit:

- Generalizes `extractClassProperties` to walk mixin call expressions.
  Mixins are applied innermost-first so outer overrides win. Supports the
  three mixin shapes used in the codebase (function declaration, const
  arrow with named type, const arrow with inline generic) plus parens / as
  casts and re-exports through barrel files.
- Adds dist→source remapping: workspace imports via `package.json#exports`
  resolve to `dist/dev/*.d.ts` files where TypeScript collapses mixin
  chains into opaque `_base` aliases. We remap to the corresponding source
  `.ts` so the chain remains walkable.
- Tags host properties whose name matches a member of HTMLMediaElement /
  HTMLVideoElement / HTMLAudioElement with `overridesNative: true`. The
  field is omitted (not `false`) when not an override; presentation can
  decide what to do with it.
- Adds description fallback through the chain — child overrides without
  JSDoc inherit the closest ancestor's description.
- Splits `events` into `{ native, elementSpecific }`. Native still comes
  from the VideoEvents/AudioEvents capability contracts; element-specific
  is collected by AST-scanning host + mixin files for
  `this.dispatchEvent(new Event('name'))` and deduping against native.
- Adds a `MixinVideo` e2e fixture (function-declaration + const-arrow
  mixins, native overrides, description fallback, dispatched events) and
  matching assertions. Existing event assertions updated for the new shape.
- Updates the rendered Events section + TOC model to read the new shape.
@decepulis decepulis changed the title feat(site): add media element API reference pages feat(site): add media element API reference pages and demos May 4, 2026
Audit of the rendered prose against the data surfaced several claims
that didn't hold:

- Attributes were labeled "native media attributes" but the list
  includes stream-type (custom) and loading (not a native <video>
  attribute). Drop the "native" claim; reference MDN for the standard
  ones.
- The "Lower-level options ... Set them in JavaScript" note was both
  redundant with Host Properties and wrong: most of the props it named
  are read-only. Removed.
- React events claimed every native event maps to a React prop, but
  addtrack/removetrack/change and the Picture-in-Picture events have
  none. Split into prop-backed events and ref + addEventListener
  events, mirroring the element-specific section.
- Methods were linked as "HTMLMediaElement methods" but fullscreen and
  Picture-in-Picture methods live on Element/Document/HTMLVideoElement.
  Reworded to point at HTMLMediaElement for the core methods.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EQEjBw9Goz81HVbKCk6in3
The comma-separated code chips rendered the separator as a text node
on a line of its own (the formatter splits the chip and the separator
across lines inside the .map() callback). Astro turned that newline
into a space *before* the comma, so the comma could wrap to the start
of the next line.

Render each chip through a small CodeChip component whose markup stays
on one line, and emit the separator as a ::after pseudo-element. The
comma is glued to its chip with no preceding text node, and the only
break opportunity is the trailing space inside the separator — so a
wrap always lands after the comma, never before it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EQEjBw9Goz81HVbKCk6in3
@decepulis decepulis marked this pull request as ready for review June 19, 2026 01:34
The `error` getters described `null` behavior the `| null` type already
conveys; drop it. The track/rendition getters led with the property name;
lead with the non-obvious availability condition instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EQEjBw9Goz81HVbKCk6in3
for (const candidate of candidates) {
if (fs.existsSync(candidate)) return candidate;
}
return resolvedPath;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dist remap fails Windows paths

Medium Severity

mapDistToSource only matches module paths with forward slashes. On Windows, TypeScript resolution often returns backslash paths, so workspace imports stay on rolled-up dist/dev .d.ts files. Mixin host extraction then reads collapsed declarations instead of source, producing incomplete or wrong media API JSON.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6c7555a. Configure here.

`error` of type `... | null` is self-documenting; the description only
restated the name. The reference table still surfaces "Read-only." for
the row, so nothing of value is lost.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EQEjBw9Goz81HVbKCk6in3

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1edc544. Configure here.

const programOptions: ts.CompilerOptions = {
...compilerOptions,
lib: dedupeStrings([...(compilerOptions.lib ?? []), 'lib.dom.d.ts']),
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid DOM lib compiler option

Medium Severity

The media reference program adds 'lib.dom.d.ts' to compilerOptions.lib, but TypeScript expects lib entries such as 'DOM', not a declaration filename. With an invalid lib entry, DOM types may not load, so collectNativeMemberNames can fail to resolve HTMLMediaElement members and overridesNative may never be set in generated JSON.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1edc544. Configure here.

The demo loaded `highest.mp4` (~161 MB) of an asset with no smaller
rendition, so the decorative background was slow to start. Point it at a
~29 MB clip instead. (background-video plays through a native <video>,
so HLS isn't an option outside Safari.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EQEjBw9Goz81HVbKCk6in3
claude added 2 commits June 19, 2026 02:21
The two one-line snippets duplicated the Basic Usage demo right below them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EQEjBw9Goz81HVbKCk6in3
`height: 100%` doesn't resolve reliably against an `aspect-ratio`-sized
parent, so the host could collapse and the absolutely-positioned shadow
<video> had nothing to fill. Lay the container out as a single-track grid
so the element stretches to fill instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EQEjBw9Goz81HVbKCk6in3
The React live demos for engine-backed media elements can't render: the
media classes instantiate DOM globals during render, which throws under
SSR (#1343). Until that's fixed, render the demo source in tabbed code
blocks via <ServerCode> so React readers still get the bare, copyable
example. HTML keeps its live <Demo>. Restore <Demo> once #1343 lands.

Also converts simple-hls-audio-only, whose live React demo was left
active and hit the same SSR break.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EQEjBw9Goz81HVbKCk6in3

@luwes luwes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great start, thank you! There's many native media / video props missing from the base classes, maybe intentional.

@decepulis

decepulis commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator Author

Hah not intentional. What are you noticing? I'll ship this as is and we'll follow up in a different scope!

@decepulis decepulis merged commit d799be1 into main Jun 19, 2026
26 checks passed
@decepulis decepulis deleted the claude/refine-local-plan-ClRzU branch June 19, 2026 16:44
@luwes luwes mentioned this pull request Jun 19, 2026
@luwes

luwes commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

https://github.com/videojs/v10/blob/main/packages/core/src/dom/media/media-host.ts#L128-L328
https://github.com/videojs/v10/blob/main/packages/core/src/dom/media/video-host.ts#L9-L85

most of these props and methods should be available for media based on the native browser <audio> or <video>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

3 participants