Repository navigation
chore(packages): sync mmcc/moq-publisher with upstream main via mmcc/moq - #40
Conversation
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ges (videojs#2222) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Darius Cepulis <dcepulis@mux.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sync with upstream videojs/v10 main (d083950, 10.0.0-beta.32). Resolutions beyond the textual conflicts: - Port the tsdown entries to the Vite+ pack configs: `moq` entry in packages/spf/vite.config.ts; keep simple-moq-video off the CDN via an exclusion in the auto-discovered media entries (html/vite.config.ts). - switchVideoTrack: keep the all-sets candidate pool and confineToActiveSwitchingSet ahead of upstream's stickToSelectedCodecs; merge preferCodecFamilies and playerResolutionCap into the rules. - safeDefine moved to registration/safe-define. - Migrate MoQ tests from 'vitest' to 'vite-plus/test'; run the new jsdoc formatter and padding rule over the MoQ sources. - Move .claude/plans/moq-engine-implementation.md to .agents/plans (.claude/plans is now a generated alias).
Brings the publisher stack onto upstream videojs/v10 main (d083950, 10.0.0-beta.32) via mmcc/moq. Publisher-side ports beyond the textual conflicts: - html: move the publisher preset to presets/publisher/{index,player,skin, skin.tailwind}.ts with registration-only define/publisher modules (upstream's presets/define split); VideoPublisherElement now extends createPlayer().PlayerElement and exports a PlayerController. - Skins: adopt the dialog/controls-backdrop split (media-dialog-*, media-controls-backdrop/-content, Menu.Popup + Menu.Content / media-menu-content) in all four publisher skins; rename publisher CSS custom properties to the --media-* prefix; replace the removed error/overlay tailwind + css components with dialog/controls-backdrop. - Renames: MediaElement -> UIElement, safeDefine -> registration/, ui/compounds -> registration/ui-compounds, MediaContainerElement -> ContainerElement, publishMenuMetadata -> publishMenuTriggerState, hotkey action names live in core/ui/hotkey/core. - Toolchain: port tsdown/vitest configs to vite.config.ts (moq-publish pack entries, publish test projects, test-time __DEV__ define); migrate tests to 'vite-plus/test'; run the jsdoc formatter and padding rule. - Sandbox: @videojs/skins is no longer a sandbox dependency upstream, so the publisher's media-pulse Tailwind theme is inlined in app/styles.css.
📦 Bundle Size Report🎨 @videojs/html
Small changes (56, ≤ 300 B)
Presets (7)
Media (21)
Players (6)
Skins (41)
UI Components (60)
⚛️ @videojs/react
Small changes (51, ≤ 300 B)
Presets (7)
Media (24)
Players (5)
Skins (29)
UI Components (50)
🧩 @videojs/core
Small changes (3, ≤ 300 B)
Entries (77)
🏷️ @videojs/element — 1 small size change
Entries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils
Small changes (4, ≤ 300 B)
Entries (13)
📦 @videojs/media
Small changes (8, ≤ 300 B)
Entries (21)
📦 @videojs/spf
Small changes (6, ≤ 300 B)
Entries (13)
📦 @videojs/jsx
ℹ️ 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd5b316447
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -105,7 +106,7 @@ export const controls = cn( | |||
| 'peer-data-open/error:hidden!', | |||
There was a problem hiding this comment.
Hide controls through a selector that can match
When the publisher error dialog opens, this variant never hides the controls: neither publisher template creates a peer/error, and in the HTML template the dialog is a sibling of <media-controls> while this class is applied to the nested <media-controls-content>. Consequently peer-data-open/error:hidden! cannot match in either the HTML or React Tailwind skin, leaving the control bar visible beneath every publish-error dialog; use a container/:has() condition or otherwise propagate the dialog state to the controls.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
27 issues found across 3000 files
Not reviewed (too large): site/scripts/api-docs-builder/src/media-element-handler.ts (~2,408 lines) - if these are generated or fixture files, add them to ignored paths to exclude them from future reviews.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sandbox/templates/react-shaka-video/main.tsx">
<violation number="1" location="apps/sandbox/templates/react-shaka-video/main.tsx:33">
P2: For Mux-backed Shaka sources, this template omits the poster and storyboard track, so the React Shaka sandbox loses its poster and seek-preview thumbnails. Add the shared poster/storyboard hooks and pass/render their values as the other React video templates do.</violation>
</file>
<file name=".github/workflows/issue-to-pr.yml">
<violation number="1" location=".github/workflows/issue-to-pr.yml:39">
P1: When a maintainer labels an issue containing prompt-injection content, the network-enabled Codex process can exfiltrate its write-scoped `GH_TOKEN`. Do not expose write credentials to the coding agent; perform GitHub writes in a separate trusted step or use an isolated, tightly scoped token and restricted network.</violation>
</file>
<file name="apps/sandbox/templates/html-spotify-audio/main.ts">
<violation number="1" location="apps/sandbox/templates/html-spotify-audio/main.ts:14">
P2: When the user changes Language in the sandbox, this iframe keeps the initial locale because the template never initializes, wraps, or subscribes to HTML i18n. Add the standard HTML i18n setup and `bindSandboxHtmlLocaleChange(render)` used by `html-audio`.</violation>
</file>
<file name="apps/sandbox/templates/html-hlsjs-video/main.ts">
<violation number="1" location="apps/sandbox/templates/html-hlsjs-video/main.ts:43">
P3: When `source=none` is combined with any playback override, this creates a non-null `{ src: '' }` source and initializes hls.js for an empty URL. Only synthesize an initial source when `url` is non-empty.</violation>
</file>
<file name="apps/sandbox/templates/html-shaka-video/main.ts">
<violation number="1" location="apps/sandbox/templates/html-shaka-video/main.ts:26">
P2: When `hls-live` is selected, this keeps the standard VOD skin and player. Compute `live` and pass it to `loadVideoSkinTag` and the player wrapper, as the other HTML HLS templates do.</violation>
<violation number="2" location="apps/sandbox/templates/html-shaka-video/main.ts:39">
P2: When `hls-7` is selected, the sandbox never mounts its chapter track, so the skin cannot show chapter markers or titles. Import and render `getChapters`/`renderChapters` before the storyboard, matching the other HTML video templates.</violation>
</file>
<file name="apps/sandbox/templates/html-hls-background-video/main.ts">
<violation number="1" location="apps/sandbox/templates/html-hls-background-video/main.ts:25">
P2: When this template is opened directly without the shell-generated `source` query parameter, `getInitialSource()` selects `hls-1`, an MPEG-TS stream that SPF cannot play, so the demo starts in a permanent error state. Use the playable `hls-4k` background source as the no-query default while preserving an explicitly selected source.</violation>
</file>
<file name="apps/sandbox/templates/html-mux-background-video/main.ts">
<violation number="1" location="apps/sandbox/templates/html-mux-background-video/main.ts:24">
P2: When this template is opened directly without a `source` query parameter, `getInitialSource()` selects `hls-1`, an MPEG-TS stream that the background SPF engine cannot play. Initialize the standalone page with `DEFAULT_BACKGROUND_SOURCE` when no explicit source is provided, while preserving an explicit `source` query.</violation>
</file>
<file name="packages/cli/vite.config.ts">
<violation number="1" location="packages/cli/vite.config.ts:53">
P2: CLI tests resolve CDN metadata from a seven-entry fixture, while production builds generate metadata for every non-excluded CDN media bundle. Update the fixture to match the generated manifest, otherwise CDN availability and URL-generation tests cannot cover the production data.</violation>
</file>
<file name=".agents/skills/write-docs/SKILL.md">
<violation number="1" location=".agents/skills/write-docs/SKILL.md:16">
P3: The new 'reference page' artifact category has no matching scaffold: write-docs/templates/ only ships concept.md, how-to.md, and readme.md, while Workflow step 3 directs 'New artifact scaffold: the matching file in templates/'. Add a reference.md template (or note that none exists) so the skill's guidance and its templates stay aligned.</violation>
</file>
<file name=".github/workflows/issue-triage.yml">
<violation number="1" location=".github/workflows/issue-triage.yml:26">
P2: When an external contributor opens or reopens an issue, `openai/codex-action@v1` fails its write-access check before running Codex because `allow-users` is empty. Allow the intended external users, or set `allow-users: '*'` for this public issue-triage workflow.</violation>
</file>
<file name=".github/workflows/forward-port-changelog.yml">
<violation number="1" location=".github/workflows/forward-port-changelog.yml:67">
P1: When an older changelog-prose PR merges while a newer release is still publishing, this job copies the newer raw changelog to `site/v10` before its packages reach npm. Synchronize this job with the release deployment or exclude release versions until publication completes.</violation>
</file>
<file name="apps/sandbox/vercel.json">
<violation number="1" location="apps/sandbox/vercel.json:3">
P2: Vercel's monorepo deployment needs a `root` field to point at `apps/sandbox`. Without it, Vercel treats the repository root as the project directory, so the default output directory `dist` is resolved to `<repo>/dist` instead of `apps/sandbox/dist` that the Vite build (outDir: `resolve(__dirname, 'dist')`) produces, and the deploy serves nothing. Add `"root": "apps/sandbox"` (the `pnpm --workspace-root build:sandbox` command still works from there).</violation>
</file>
<file name="apps/sandbox/templates/html-audio/main.ts">
<violation number="1" location="apps/sandbox/templates/html-audio/main.ts:33">
P2: When the audio sandbox selects `hls-mixed-codec`, this `crossorigin` attribute enables anonymous CORS and the Apple playlist fails without `Access-Control-Allow-Origin`. Remove the attribute for this plain audio element or add it only for CORS-enabled sources.</violation>
</file>
<file name="apps/sandbox/app/shared/sandbox-listener.ts">
<violation number="1" location="apps/sandbox/app/shared/sandbox-listener.ts:44">
P3: When a resolution query contains an excessively long digit string, `Number.parseInt` returns `Infinity` and this check accepts it. `resolutionToPixelArea` then treats it as unbounded, disabling the requested cap or floor; reject non-finite parsed heights.</violation>
</file>
<file name="internal/decisions/player/provider-attach.md">
<violation number="1" location="internal/decisions/player/provider-attach.md:12">
P3: Attach doesn't require both media and container. In `#tryAttach()`, only `#media` is mandatory — when media is present the store attaches even with a null container (confirmed by the `store.attach({ media, container: null })` core tests). Saying "when both are available" misstates the invariant; the prior wording ("when it has a media element") was accurate. Reword to reflect that media is required and container is optional.</violation>
</file>
<file name=".github/workflows/issue-sync.yml">
<violation number="1" location=".github/workflows/issue-sync.yml:39">
P2: When a merged PR contains prompt-injection text, Codex can run network-enabled commands with the issue-writing `GH_TOKEN`, allowing token exfiltration or unauthorized issue changes. Do not expose this token to the model; route approved issue mutations through a narrow wrapper, or isolate the agent from outbound network access.</violation>
</file>
<file name=".github/workflows/e2e-failure-triage.yml">
<violation number="1" location=".github/workflows/e2e-failure-triage.yml:39">
P1: Because this agent feeds attacker-controlled PR evidence to Codex, enabling unrestricted network access while exporting the write-scoped `GH_TOKEN` lets prompt-injected commands exfiltrate the token or mutate GitHub. Keep the agent off the open network and route only narrowly scoped GitHub operations through a separate, least-privileged step or token.</violation>
</file>
<file name=".github/workflows/api-reference-sync.yml">
<violation number="1" location=".github/workflows/api-reference-sync.yml:281">
P3: The stale-docs job is documented as GPT-5.6 Sol but runs GPT-5.6 Terra, so its configured model does not match the stated rollout. Use `gpt-5.6-sol` here or update the job description to the intended model.</violation>
<violation number="2" location=".github/workflows/api-reference-sync.yml:285">
P2: Because Codex reads PR-derived artifacts and has `GH_TOKEN` plus network access, prompt-injected content can exfiltrate the token or perform unintended issue operations. Keep the agent network-isolated and create the issue in a trusted workflow step from Codex's output instead.</violation>
</file>
<file name="packages/cli/package.json">
<violation number="1" location="packages/cli/package.json:22">
P2: Removing the `build` script (which ran `copy-docs`) orphaned cli's `copy-docs` script: nothing calls it now. html and react migrated the same copy-docs step into a `prepack` script; cli did not, so the CLI package docs are no longer generated into the `docs` dir that `files` publishes. Wire `copy-docs` into `prepack` like the sibling packages.</violation>
</file>
<file name="internal/design/spf/use-cases/audio-only-mode-override.md">
<violation number="1" location="internal/design/spf/use-cases/audio-only-mode-override.md:315">
P3: The File column points to `media/hls-audio/element.ts`, which does not exist in the repo. `HlsAudioElement` is defined in `define/media/hls-audio.ts` (extending the `HlsAudio` class in `media/hls-audio/media.ts`); the prior `define/media/hls-audio.ts` reference was correct. Point the row at the real file so the doc link resolves.</violation>
</file>
<file name=".agents/skills/write-api-reference/references/demo-patterns.md">
<violation number="1" location=".agents/skills/write-api-reference/references/demo-patterns.md:108">
P3: The example registers <media-container> via the new import but the .html markup never uses it, so a reader following the doc gets no effect from the import. Add a <media-container> wrapper around <video> and <media-mute-button> in the .html example (mirroring the real demos, e.g. mute-button/html/css/BasicUsage.html) so the import matches the markup.</violation>
</file>
<file name="apps/sandbox/package.json">
<violation number="1" location="apps/sandbox/package.json:43">
P2: The stackblitz startCommand runs `pnpm dev`, but this diff deletes the sandbox's `dev` script. Because the same command installs with `--ignore-scripts`, `prepare`/`vp config` never runs, so no script is regenerated and `pnpm dev` fails with "Missing script: dev", breaking the published StackBlitz sandbox. Restore a `dev` script (e.g. `"dev": "vp dev --host"`, which triggers the `setup` task in vite.config.ts and recreates `src/`), or point the startCommand at `vp dev --host` directly. This also keeps the README's statement that "the `dev` script runs `setup.ts` first" accurate.</violation>
</file>
<file name=".zed/settings.json">
<violation number="1" location=".zed/settings.json:16">
P2: The oxlint LSP here runs without the repo's lint config: the rule set, the anti-slop custom plugin, and the per-path overrides all live in vite.config.ts and are only applied by `vp lint`. Without a configPath to that config, editor diagnostics use default oxlint rules and won't match CI (`pnpm lint`), so warnings/errors shown in Zed may not reflect what CI enforces (and vice versa). Wire the oxlint server to the same config used by `vp lint` so editor and CI lint agree.</violation>
<violation number="2" location=".zed/settings.json:23">
P2: The repo's formatting settings (singleQuote, semi, printWidth 120, custom overrides) are defined inside vite.config.ts as a vite-plus defineConfig and applied by `vp fmt`. The standalone oxfmt LSP reading `fmt.configPath: "./vite.config.ts"` can't consume that vite-plus config, so format-on-save falls back to oxfmt defaults (double quotes / no semicolons), which conflict with the repo settings. Editor-saved files would then be rewritten by CI `vp fmt`, causing churn. Confirm the oxfmt LSP actually resolves the repo's settings from that path, and if not, point it at a real oxfmt config or the generated config that mirrors vite.config.ts.</violation>
</file>
<file name=".github/workflows/ci.yml">
<violation number="1" location=".github/workflows/ci.yml:224">
P2: The Vite task cache save uses a primary key that embeds github.run_id/run_attempt, so every CI run stores a new cache entry instead of reusing one. Over a long-lived PR or busy main that means re-uploading the full node_modules/.vite/task-cache each run and accumulating entries, which churns GitHub's 10GB/5k-entry cache budget and can evict the setup-node and pnpm caches alongside it. Keep the restore-keys prefix match but make the save key durable across runs (e.g. key on github.ref and/or a date bucket instead of run_id) so subsequent runs restore and overwrite the same entry rather than minting a new one each time.</violation>
</file>
Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
Re-trigger cubic
| effort: high | ||
| sandbox: workspace-write | ||
| safety-strategy: drop-sudo | ||
| codex-args: '["--config", "sandbox_workspace_write.network_access=true"]' |
There was a problem hiding this comment.
P1: When a maintainer labels an issue containing prompt-injection content, the network-enabled Codex process can exfiltrate its write-scoped GH_TOKEN. Do not expose write credentials to the coding agent; perform GitHub writes in a separate trusted step or use an isolated, tightly scoped token and restricted network.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/issue-to-pr.yml, line 39:
<comment>When a maintainer labels an issue containing prompt-injection content, the network-enabled Codex process can exfiltrate its write-scoped `GH_TOKEN`. Do not expose write credentials to the coding agent; perform GitHub writes in a separate trusted step or use an isolated, tightly scoped token and restricted network.</comment>
<file context>
@@ -19,24 +18,25 @@ jobs:
+ effort: high
+ sandbox: workspace-write
+ safety-strategy: drop-sudo
+ codex-args: '["--config", "sandbox_workspace_write.network_access=true"]'
prompt: |
You are the issue-to-PR implementation agent for this repository.
</file context>
| # merges. So there is nothing here to reconcile, and no unreleased | ||
| # changelog to leak into production. | ||
| rm -rf site/src/content/changelog | ||
| git checkout origin/main -- site/src/content/changelog |
There was a problem hiding this comment.
P1: When an older changelog-prose PR merges while a newer release is still publishing, this job copies the newer raw changelog to site/v10 before its packages reach npm. Synchronize this job with the release deployment or exclude release versions until publication completes.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/forward-port-changelog.yml, line 67:
<comment>When an older changelog-prose PR merges while a newer release is still publishing, this job copies the newer raw changelog to `site/v10` before its packages reach npm. Synchronize this job with the release deployment or exclude release versions until publication completes.</comment>
<file context>
@@ -0,0 +1,83 @@
+ # merges. So there is nothing here to reconcile, and no unreleased
+ # changelog to leak into production.
+ rm -rf site/src/content/changelog
+ git checkout origin/main -- site/src/content/changelog
+ git add -A site/src/content/changelog
+
</file context>
| effort: medium | ||
| sandbox: workspace-write | ||
| safety-strategy: drop-sudo | ||
| codex-args: '["--config", "sandbox_workspace_write.network_access=true"]' |
There was a problem hiding this comment.
P1: Because this agent feeds attacker-controlled PR evidence to Codex, enabling unrestricted network access while exporting the write-scoped GH_TOKEN lets prompt-injected commands exfiltrate the token or mutate GitHub. Keep the agent off the open network and route only narrowly scoped GitHub operations through a separate, least-privileged step or token.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/e2e-failure-triage.yml, line 39:
<comment>Because this agent feeds attacker-controlled PR evidence to Codex, enabling unrestricted network access while exporting the write-scoped `GH_TOKEN` lets prompt-injected commands exfiltrate the token or mutate GitHub. Keep the agent off the open network and route only narrowly scoped GitHub operations through a separate, least-privileged step or token.</comment>
<file context>
@@ -25,17 +26,17 @@ jobs:
+ effort: medium
+ sandbox: workspace-write
+ safety-strategy: drop-sudo
+ codex-args: '["--config", "sandbox_workspace_write.network_access=true"]'
prompt: |
You are diagnosing a failed Video.js E2E workflow for a pull request.
</file context>
| return ( | ||
| <SandboxI18nProvider> | ||
| <VideoPlayer> | ||
| <VideoSkinComponent skin={skin} styling={styling} className="mx-auto aspect-video max-w-4xl"> |
There was a problem hiding this comment.
P2: For Mux-backed Shaka sources, this template omits the poster and storyboard track, so the React Shaka sandbox loses its poster and seek-preview thumbnails. Add the shared poster/storyboard hooks and pass/render their values as the other React video templates do.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/sandbox/templates/react-shaka-video/main.tsx, line 33:
<comment>For Mux-backed Shaka sources, this template omits the poster and storyboard track, so the React Shaka sandbox loses its poster and seek-preview thumbnails. Add the shared poster/storyboard hooks and pass/render their values as the other React video templates do.</comment>
<file context>
@@ -0,0 +1,51 @@
+ return (
+ <SandboxI18nProvider>
+ <VideoPlayer>
+ <VideoSkinComponent skin={skin} styling={styling} className="mx-auto aspect-video max-w-4xl">
+ {/* Shaka plays DASH and HLS from the same element, so the source list here is not
+ narrowed to one manifest format the way the dash.js sandbox is. */}
</file context>
| const state = createHtmlSandboxState(); | ||
| const loadLatest = createLatestLoader(); | ||
|
|
||
| async function render() { |
There was a problem hiding this comment.
P2: When the user changes Language in the sandbox, this iframe keeps the initial locale because the template never initializes, wraps, or subscribes to HTML i18n. Add the standard HTML i18n setup and bindSandboxHtmlLocaleChange(render) used by html-audio.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/sandbox/templates/html-spotify-audio/main.ts, line 14:
<comment>When the user changes Language in the sandbox, this iframe keeps the initial locale because the template never initializes, wraps, or subscribes to HTML i18n. Add the standard HTML i18n setup and `bindSandboxHtmlLocaleChange(render)` used by `html-audio`.</comment>
<file context>
@@ -0,0 +1,35 @@
+const state = createHtmlSandboxState();
+const loadLatest = createLatestLoader();
+
+async function render() {
+ const tag = await loadLatest(() => loadAudioSkinTag(state.skin, state.styling));
+ if (!tag) return;
</file context>
|
|
||
| function readResolution(name: string): MediaResolution | undefined { | ||
| const value = params.get(name); | ||
| if (!value || !RESOLUTION_PATTERN.test(value) || Number.parseInt(value, 10) <= 0) return undefined; |
There was a problem hiding this comment.
P3: When a resolution query contains an excessively long digit string, Number.parseInt returns Infinity and this check accepts it. resolutionToPixelArea then treats it as unbounded, disabling the requested cap or floor; reject non-finite parsed heights.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/sandbox/app/shared/sandbox-listener.ts, line 44:
<comment>When a resolution query contains an excessively long digit string, `Number.parseInt` returns `Infinity` and this check accepts it. `resolutionToPixelArea` then treats it as unbounded, disabling the requested cap or floor; reject non-finite parsed heights.</comment>
<file context>
@@ -27,9 +35,31 @@ function readBoolean(name: string): boolean {
+function readResolution(name: string): MediaResolution | undefined {
+ const value = params.get(name);
+ if (!value || !RESOLUTION_PATTERN.test(value) || Number.parseInt(value, 10) <= 0) return undefined;
+
+ return value as MediaResolution;
</file context>
| if (!value || !RESOLUTION_PATTERN.test(value) || Number.parseInt(value, 10) <= 0) return undefined; | |
| if (!value || !RESOLUTION_PATTERN.test(value) || !Number.isFinite(Number.parseInt(value, 10)) || Number.parseInt(value, 10) <= 0) return undefined; |
| @@ -9,7 +9,7 @@ date: 2026-03-13 | |||
|
|
|||
| The provider (`<video-player>` / React `Provider`) owns the `store.attach()` lifecycle. The container (`<media-container>` / React `Container`) no longer discovers media or calls `store.attach()` — it registers itself with the provider via context and serves only as a layout reference element. | |||
|
|
|||
| Media and container elements register themselves with the provider through attach contexts — setter callbacks that flow downward from provider to descendants. The provider calls `store.attach({ media, container })` when it has a media element. As a fallback for plain `<video>`/`<audio>` elements that can't consume context, the provider queries its subtree. | |||
| Media and container elements register themselves with the provider through attach contexts. Each registration returns an identity-specific release callback, so an older element cannot clear a newer registration when it disconnects. The provider calls `store.attach({ media, container })` when both are available. Plain `<video>` and `<audio>` descendants are tracked with a `MutationObserver` because they cannot consume context. | |||
There was a problem hiding this comment.
P3: Attach doesn't require both media and container. In #tryAttach(), only #media is mandatory — when media is present the store attaches even with a null container (confirmed by the store.attach({ media, container: null }) core tests). Saying "when both are available" misstates the invariant; the prior wording ("when it has a media element") was accurate. Reword to reflect that media is required and container is optional.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At internal/decisions/player/provider-attach.md, line 12:
<comment>Attach doesn't require both media and container. In `#tryAttach()`, only `#media` is mandatory — when media is present the store attaches even with a null container (confirmed by the `store.attach({ media, container: null })` core tests). Saying "when both are available" misstates the invariant; the prior wording ("when it has a media element") was accurate. Reword to reflect that media is required and container is optional.</comment>
<file context>
@@ -9,7 +9,7 @@ date: 2026-03-13
The provider (`<video-player>` / React `Provider`) owns the `store.attach()` lifecycle. The container (`<media-container>` / React `Container`) no longer discovers media or calls `store.attach()` — it registers itself with the provider via context and serves only as a layout reference element.
-Media and container elements register themselves with the provider through attach contexts — setter callbacks that flow downward from provider to descendants. The provider calls `store.attach({ media, container })` when it has a media element. As a fallback for plain `<video>`/`<audio>` elements that can't consume context, the provider queries its subtree.
+Media and container elements register themselves with the provider through attach contexts. Each registration returns an identity-specific release callback, so an older element cannot clear a newer registration when it disconnects. The provider calls `store.attach({ media, container })` when both are available. Plain `<video>` and `<audio>` descendants are tracked with a `MutationObserver` because they cannot consume context.
## Context
</file context>
| --max-turns 25 | ||
| --allowedTools "Read" "Glob" "Grep" "Bash(gh:*)" "Bash(cat:*)" "Bash(jq:*)" "Bash(diff:*)" "Bash(ls:*)" "Bash(head:*)" "Bash(tail:*)" "Bash(wc:*)" "Bash(sort:*)" | ||
| openai-api-key: ${{ secrets.OPENAI_API_KEY }} | ||
| model: gpt-5.6-terra |
There was a problem hiding this comment.
P3: The stale-docs job is documented as GPT-5.6 Sol but runs GPT-5.6 Terra, so its configured model does not match the stated rollout. Use gpt-5.6-sol here or update the job description to the intended model.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/api-reference-sync.yml, line 281:
<comment>The stale-docs job is documented as GPT-5.6 Sol but runs GPT-5.6 Terra, so its configured model does not match the stated rollout. Use `gpt-5.6-sol` here or update the job description to the intended model.</comment>
<file context>
@@ -269,18 +273,24 @@ jobs:
- --max-turns 25
- --allowedTools "Read" "Glob" "Grep" "Bash(gh:*)" "Bash(cat:*)" "Bash(jq:*)" "Bash(diff:*)" "Bash(ls:*)" "Bash(head:*)" "Bash(tail:*)" "Bash(wc:*)" "Bash(sort:*)"
+ openai-api-key: ${{ secrets.OPENAI_API_KEY }}
+ model: gpt-5.6-terra
+ effort: high
+ sandbox: workspace-write
</file context>
| model: gpt-5.6-terra | |
| model: gpt-5.6-sol |
| @@ -312,7 +312,7 @@ Public re-export: `@videojs/spf/hls-audio`. | |||
| | Export | File | Purpose | | |||
| |---|---|---| | |||
| | `HlsAudio` | `media/hls-audio/media.ts` | Applies `MediaAttachMixin` + `CustomMediaElement('audio', HlsAudioMedia)` | | |||
| | `HlsAudioElement` (tag `hls-audio`) | `define/media/hls-audio.ts` | Custom-element definition; registers `<hls-audio>` via `safeDefine` | | |||
| | `HlsAudioElement` (tag `hls-audio`) | `media/hls-audio/element.ts` | Custom-element implementation; `define/media/hls-audio.ts` registers it via `safeDefine` | | |||
There was a problem hiding this comment.
P3: The File column points to media/hls-audio/element.ts, which does not exist in the repo. HlsAudioElement is defined in define/media/hls-audio.ts (extending the HlsAudio class in media/hls-audio/media.ts); the prior define/media/hls-audio.ts reference was correct. Point the row at the real file so the doc link resolves.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At internal/design/spf/use-cases/audio-only-mode-override.md, line 315:
<comment>The File column points to `media/hls-audio/element.ts`, which does not exist in the repo. `HlsAudioElement` is defined in `define/media/hls-audio.ts` (extending the `HlsAudio` class in `media/hls-audio/media.ts`); the prior `define/media/hls-audio.ts` reference was correct. Point the row at the real file so the doc link resolves.</comment>
<file context>
@@ -312,7 +312,7 @@ Public re-export: `@videojs/spf/hls-audio`.
|---|---|---|
| `HlsAudio` | `media/hls-audio/media.ts` | Applies `MediaAttachMixin` + `CustomMediaElement('audio', HlsAudioMedia)` |
-| `HlsAudioElement` (tag `hls-audio`) | `define/media/hls-audio.ts` | Custom-element definition; registers `<hls-audio>` via `safeDefine` |
+| `HlsAudioElement` (tag `hls-audio`) | `media/hls-audio/element.ts` | Custom-element implementation; `define/media/hls-audio.ts` registers it via `safeDefine` |
CDN entry: `packages/html/src/cdn/media/hls-audio.ts` →
</file context>
| | `HlsAudioElement` (tag `hls-audio`) | `media/hls-audio/element.ts` | Custom-element implementation; `define/media/hls-audio.ts` registers it via `safeDefine` | | |
| | `HlsAudioElement` (tag `hls-audio`) | `define/media/hls-audio.ts` | Defines `HlsAudioElement` (extends `HlsAudio` in `media/hls-audio/media.ts`), registers `<hls-audio>` via `safeDefine` | |
|
|
||
| ```ts | ||
| import '@videojs/html/video/player'; | ||
| import '@videojs/html/ui/container'; |
There was a problem hiding this comment.
P3: The example registers via the new import but the .html markup never uses it, so a reader following the doc gets no effect from the import. Add a wrapper around
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .agents/skills/write-api-reference/references/demo-patterns.md, line 108:
<comment>The example registers <media-container> via the new import but the .html markup never uses it, so a reader following the doc gets no effect from the import. Add a <media-container> wrapper around <video> and <media-mute-button> in the .html example (mirroring the real demos, e.g. mute-button/html/css/BasicUsage.html) so the import matches the markup.</comment>
<file context>
@@ -105,12 +105,14 @@ The `.astro` wrapper is required because only Astro `<script>` tags go through V
```ts
import '@videojs/html/video/player';
+import '@videojs/html/ui/container';
import '@videojs/html/ui/mute-button';
</file context>
</details>
…rols The publisher Tailwind controls carried `peer-data-open/error:hidden!` from the pre-dialog error markup. After the dialog port the error dialog root no longer declares `peer/error`, and the controls class sits on the nested `media-controls-content`, so the variant could never match. Remove it: the dialog backdrop overlays the bar while an error is open, the same behavior the CSS flavor and the video skins have now.
Depends on #39 (merge that first; this branch contains its merge commit).
Summary
Sync
mmcc/moq-publisherwith upstream main (d08395023, 10.0.0-beta.32) viammcc/moq. Beyond the textual conflicts this ports the publisher UI onto several upstream restructurings: the html presets/define split, the dialog and controls-backdrop surface separation, the--media-*CSS variable prefix, and the Vite+ toolchain.Reviewing this PR
The "Files changed" tab is the whole upstream delta. Review the merge commit's manual work instead:
Changes
presets/publisher/{index,player,skin,skin.tailwind}.ts;define/publisher/*modules are registration-only.VideoPublisherElementextendscreatePlayer().PlayerElementand the preset exports aPlayerController, matching the other presets.media-dialog-*/ErrorDialog.Backdrop+Popup; controls wrap amedia-controls-backdrop+media-controls-content; device-picker menus wrap items inMenu.Popup+Menu.Content/media-menu-content; the removederror/overlayprimitives are replaced bydialog/controls-backdrop.--media-*prefix, including the publisher's own tokens (--media-publish-live-color,--media-quality-*-color,--media-publish-status-background).MediaElement→UIElement,MediaContainerElement→ContainerElement,publishMenuMetadata→publishMenuTriggerState, hotkey action names incore/ui/hotkey/core.ts(toggleMicMuted/toggleCameraMutedadded there).moq-publish/moq-publish-videopack entries and thepublish*test projects move topackages/spf/vite.config.ts; tests import fromvite-plus/test.@videojs/skinsis no longer a sandbox dependency upstream, so themedia-pulseTailwind theme is inlined inapps/sandbox/app/styles.css(source of truth stayspackages/skins/src/shared/tailwind.css).Known follow-up
Upstream renamed core UI modules to
<component>/core.ts/data.ts/vars.ts(videojs#2064). The publisher's eleven components still use the older<name>-core.ts/<name>-data-attrs.tsnames. They compile and are exported correctly; the rename is left for a separate PR to keep this merge reviewable.Testing
pnpm typecheck,pnpm lint,pnpm check:workspace,pnpm build:packages,pnpm build:sandbox— all greenpnpm -F @videojs/spf test: 151 files / 2344 tests passed (publish browser projects included)pnpm -F @videojs/html test: 70 files / 513 passed ·@videojs/react: 69 / 537 ·@videojs/core: 115 / 1641 ·@videojs/skins: 7 / 20Note: the merge commit was made with
--no-verifybecause lint-staged cannot run on merge commits; the full repo lint ran green beforehand.🤖 Generated with Claude Code
Summary by cubic
Syncs
mmcc/moq-publisherwith upstream main at10.0.0-beta.32throughmmcc/moq, porting the publisher onto upstream's split component surfaces,--media-*conventions, and Vite+ toolchain without changing its core behavior.Migration
preset/definesplit,PlayerElement,PlayerController, dialog and controls-backdrop parts, and renamed UI APIs.site/v10, and concurrency groups that cancel stale runs.<name>-core.ts/<name>-data-attrs.tsfilenames remain unchanged for a follow-up.Review
git show --remerge-diff dd5b31644; the regular file list mostly shows the upstream delta.pnpm typecheck,pnpm lint,pnpm check:workspace, package and sandbox builds, and the affected test suites pass.Written for commit 5622191. Summary will update on new commits.