Repository navigation
Conversation
## Description This PR resolves #8486 by building upon the work that was done to address comment https://github.com/videojs/video.js/pull/8486/files#r1635782771. --------- Co-authored-by: Jason Olson <jolson88@outlook.com>
…tensions. (#8980)
…orkflow without it (#9121)
Co-authored-by: mister-ben <1676039+mister-ben@users.noreply.github.com>
Co-authored-by: mister-ben <1676039+mister-ben@users.noreply.github.com>
Co-authored-by: mister-ben <1676039+mister-ben@users.noreply.github.com>
The API-stability check from videojs/video.js requires an @internal tag on public exports no reference page documents; none of the publisher surface has site reference pages yet. Claude-Session: https://claude.ai/code/session_01DaH4iixnBQbNchnez2h4ZG
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 92f1064f15
ℹ️ 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".
| const request = (this.#request = new AbortController()); | ||
|
|
||
| try { | ||
| const playlist = await fetchPlaylist(src, { signal: request.signal }); |
There was a problem hiding this comment.
Forward credential mode when loading native HLS chapters
For a cross-origin, cookie-gated HLS source using crossorigin="use-credentials", native playback sends credentials, but this additional manifest request uses fetch's default same-origin mode. It therefore fails authentication and silently leaves the player without chapters even though playback works. The subsequent loadChaptersTracks call also omits its supported credentials option, so protecting only the chapters document produces the same failure. Derive the credential mode from target.crossOrigin and pass it to both requests, as HlsJsChaptersMixin does.
Useful? React with 👍 / 👎.
📦 Bundle Size Report🎨 @videojs/html
Small changes (44, ≤ 300 B)
Presets (7)
Media (21)
Players (6)
Skins (56)
UI Components (73)
⚛️ @videojs/react
Small changes (29, ≤ 300 B)
Presets (7)
Media (24)
Extensions (2)
Players (5)
Skins (36)
UI Components (50)
🧩 @videojs/core
Small changes (48, ≤ 300 B)
Entries (77)
🏷️ @videojs/element — 1 small size change
Entries (2)
📦 @videojs/store — 1 small size change
Entries (3)
🔧 @videojs/utils — 1 small size change
Entries (13)
📦 @videojs/cdn — 1 small size change
📦 @videojs/cloudflare-video — 1 small size change
📦 @videojs/dash-video — 1 small size change
📦 @videojs/google-cast
📦 @videojs/hlsjs-video
📦 @videojs/media
Small changes (1, ≤ 300 B)
Entries (3)
📦 @videojs/mux — 1 small size change
📦 @videojs/mux-audio
Entries (2)
📦 @videojs/mux-data
📦 @videojs/mux-video
Entries (2)
📦 @videojs/native-hls-video
📦 @videojs/playerjs-video
📦 @videojs/shaka-video — 1 small size change
📦 @videojs/spf
Small changes (4, ≤ 300 B)
Entries (65)
📦 @videojs/spotify-audio — 1 small size change
📦 @videojs/tiktok-video — 1 small size change
📦 @videojs/twitch-video — 1 small size change
📦 @videojs/other
Small changes (2, ≤ 300 B)
Entries (3)
📦 @videojs/vimeo-video — 1 small size change
📦 @videojs/wistia-video — 1 small size change
Entries (2)
📦 @videojs/youtube-video
ℹ️ 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.
31 issues found across 2746 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/ISSUE_TEMPLATE/config.yml">
<violation number="1" location=".github/ISSUE_TEMPLATE/config.yml:4">
P2: This link misroutes Video.js 8 vulnerability reports to the Video.js 10 repository. Make the existing link explicitly cover Video.js 10 and add a separate private-reporting link for `videojs/videojs-v8`.</violation>
</file>
<file name="packages/adapters/shaka-video/CHANGELOG.md">
<violation number="1" location="packages/adapters/shaka-video/CHANGELOG.md:8">
P3: Remove this HLS.js bug-fix entry from the Shaka changelog; it is already documented under `@videojs/hlsjs-video` and does not apply to this package.</violation>
</file>
<file name=".github/scripts/changelog-prose-verify.sh">
<violation number="1" location=".github/scripts/changelog-prose-verify.sh:52">
P2: This check only detects any matching heading anywhere in the file, rather than the required `## Breaking changes` section directly after the opening. Parse the Markdown body while excluding fenced code and enforce the exact heading level and placement, otherwise malformed prose can pass or valid prose can fail.</violation>
</file>
<file name="internal/design/spf/features/moq-publish.md">
<violation number="1" location="internal/design/spf/features/moq-publish.md:109">
P2: This inventory no longer matches `MoqPublishEngineState`, so readers will look for a nonexistent `captureSource` signal and miss the actual capture-selection and preview intents. Replace the list with the keys declared by `moqPublishEngineExternalSignals`.</violation>
<violation number="2" location="internal/design/spf/features/moq-publish.md:121">
P3: `previewElement` is a context binding, not an intent state slot. Document it as being written through `engine.context`; otherwise this inventory misstates the adapter contract.</violation>
</file>
<file name="internal/design/spf/evaluation-axes.md">
<violation number="1" location="internal/design/spf/evaluation-axes.md:78">
P3: `defineExternalSignals` is now the canonical SPF primitive for declaring external signals, but this criterion drops it when removing obsolete `shareSignals`. Add `defineExternalSignals` so the simplicity review still points readers to the standard solution instead of leaving external-signal wiring unrepresented.</violation>
<violation number="2" location="internal/design/spf/evaluation-axes.md:94">
P2: `pnpm size` reports Brotli-compressed sizes, not gzipped sizes, and the Bundle Size workflow posts the same Brotli measurement. Change this wording so reviewers use the metric that actually determines the reported size deltas.</violation>
</file>
<file name=".agents/skills/review-branch/SKILL.md">
<violation number="1" location=".agents/skills/review-branch/SKILL.md:17">
P2: This verification gate can suppress real regressions in newly introduced APIs or unique behavior: no prior working use may exist even when the reviewer has a concrete source trace and reproducible trigger. Make the comparison conditional on an applicable analogue instead of dropping candidates that lack one.</violation>
</file>
<file name="AGENTS.md">
<violation number="1" location="AGENTS.md:66">
P3: This rule omits `@deprecated`, which `check:api-stability` explicitly accepts for otherwise internal or experimental exports. Include `@deprecated` so the guidance does not instruct authors to replace valid deprecation documentation with `@internal` or `@experimental`.</violation>
</file>
<file name="internal/design/spf/use-cases/moq-live-publish.md">
<violation number="1" location="internal/design/spf/use-cases/moq-live-publish.md:74">
P3: This is not the engine's complete behavior list: the factory composes three separate acquisition behaviors and places `setupTrackPublishers` before `openPublishSession`. Update the composition record to use the actual behavior names and order so it remains a reliable description of the engine.</violation>
</file>
<file name="internal/design/ui/playback-rate-button.md">
<violation number="1" location="internal/design/ui/playback-rate-button.md:32">
P3: This describes the shortcut hint and `aria-keyshortcuts` as unconditional, but standalone or custom uses only expose them when a `speedUp` hotkey is registered. Qualify the behavior so the design record does not promise metadata that the component does not provide by itself.</violation>
</file>
<file name="internal/design/spf/conventions/config.md">
<violation number="1" location="internal/design/spf/conventions/config.md:60">
P3: This fenced TypeScript example is syntactically invalid because the anonymous object shape has no type or variable declaration. Prefix the shape with a type declaration so the documented config example can be parsed.</violation>
</file>
<file name=".agents/skills/implement-spf-use-case/references/workflow.md">
<violation number="1" location=".agents/skills/implement-spf-use-case/references/workflow.md:235">
P2: This entry-point pattern does not exist, so the workflow can direct implementers to an unresolvable import when exposing a variant engine. Refer to the engine-specific `@videojs/spf/engines/...` entry point instead.</violation>
<violation number="2" location=".agents/skills/implement-spf-use-case/references/workflow.md:438">
P2: This path points implementers at the shared HLS barrel rather than the engine composition module, so variant wiring may be added to the wrong file. Point to the corresponding file under `packages/spf/src/playback/engines/` instead.</violation>
</file>
<file name="apps/e2e/suites/browserstack/connect.ts">
<violation number="1" location="apps/e2e/suites/browserstack/connect.ts:12">
P1: `redact` only replaces raw credential strings, but the caller embeds credentials in an encoded endpoint. Email usernames or keys containing URL-special characters can therefore appear in warning and final errors; redact encoded secret forms too.</violation>
</file>
<file name="packages/adapters/playerjs-video/src/props.ts">
<violation number="1" location="packages/adapters/playerjs-video/src/props.ts:8">
P3: This comment overstates the URL contract: the providers do not write every listed prop for every recognized service. Describe that each service receives only the URL parameters it supports, so consumers are not misled about `preload`, mute, or controls behavior.</violation>
</file>
<file name="internal/design/spf/features/rendition-selection-caps.md">
<violation number="1" location="internal/design/spf/features/rendition-selection-caps.md:28">
P2: The updated `hls-video` status entry is inaccurate: its default `switchVideoTrack` chain also applies capability, codec-family, CDN, player-resolution, and bandwidth filtering. Describe those defaults, or limit the claim to the screen-size cap not being composed there.</violation>
</file>
<file name=".github/workflows/e2e.yml">
<violation number="1" location=".github/workflows/e2e.yml:46">
P2: Changes to the generated player packages do not trigger this job. Include `packages/html` and `packages/react` (and their packed runtime dependency closure), or match the relevant `packages/` paths so this check cannot silently miss player regressions.</violation>
</file>
<file name="apps/sandbox/templates/react-youtube-video/main.tsx">
<violation number="1" location="apps/sandbox/templates/react-youtube-video/main.tsx:11">
P2: Directly opening this standalone template without a `source` query now defaults to `hls-1`, so `YouTubeVideo` receives an HLS URL and cannot load it. Fall back to `DEFAULT_YOUTUBE_SOURCE` when the sandbox state is not a YouTube source.</violation>
</file>
<file name="packages/adapters/hlsjs-video/src/preload.ts">
<violation number="1" location="packages/adapters/hlsjs-video/src/preload.ts:58">
P2: `autoplay` set before the adapter is attached is lost because the inherited setter only writes to an existing target; after attach, `#init()` sees `target.autoplay === false` and `preload="none"` remains idle. Cache the autoplay intent and mirror it during attach/init so pre-attachment configuration also starts hls.js loading.</violation>
<violation number="2" location="packages/adapters/hlsjs-video/src/preload.ts:60">
P1: The new setter does not handle the normal public `HlsJsAdapter.autoplay` path: that facade writes the target directly and never reaches `HlsJsPreload.#init()`. With `preload="none"`, setting `autoplay` after the source is loaded therefore leaves hls.js stopped, so forward the autoplay change to the HLS delegate or otherwise trigger preload initialization from the public setter.</violation>
</file>
<file name="apps/sandbox/templates/react-spotify-audio/main.tsx">
<violation number="1" location="apps/sandbox/templates/react-spotify-audio/main.tsx:16">
P2: The sandbox mute setting is now forwarded to `SpotifyAudio`, but Spotify does not support mute and the prop only becomes an inert iframe attribute. Filter `muted` before spreading these generic media props, or hide the unsupported setting for this sandbox.</violation>
</file>
<file name="apps/sandbox/templates/react-wistia-video/main.tsx">
<violation number="1" location="apps/sandbox/templates/react-wistia-video/main.tsx:15">
P2: `mediaProps.muted` is only applied on the first render because `WistiaVideo` treats it as initial mute state. Toggling the sandbox's Muted setting after load therefore has no effect; update the adapter to apply changes to the live player or otherwise handle this setting dynamically.</violation>
</file>
<file name="apps/sandbox/app/media.ts">
<violation number="1" location="apps/sandbox/app/media.ts:244">
P2: Direct links entering `youtube-video` without `?source` still boot the iframe with the global HLS source instead of this media's `DEFAULT_YOUTUBE_SOURCE`. Use the descriptor fallback when computing the initial source, while continuing to preserve an explicit query source, so the YouTube adapter does not make an incorrect initial request before the post-mount repair.</violation>
</file>
<file name="packages/adapters/mux-video/src/spf/mixin.ts">
<violation number="1" location="packages/adapters/mux-video/src/spf/mixin.ts:93">
P2: This early return suppresses the `sourcechange` event that keeps `<mux-video>`'s `src` attribute synchronized with the adapter. Changing an existing canonical URL to its equivalent extensionless form therefore leaves the host attribute inconsistent with the active canonical source; reflect the URL even when playback metadata must remain unchanged.</violation>
</file>
<file name="packages/adapters/mux-video/src/adapter.ts">
<violation number="1" location="packages/adapters/mux-video/src/adapter.ts:76">
P3: `createMuxVideoURL` warns in development for inverted resolution bounds, so this equality check logs before `source` rebuilds the URL and logs again. Compare with a side-effect-free canonicalizer, or otherwise avoid using the warning-producing builder for equality checks.</violation>
</file>
<file name="packages/adapters/playerjs-video/src/source.ts">
<violation number="1" location="packages/adapters/playerjs-video/src/source.ts:13">
P3: Fix the malformed engine-option sentence so consumers can understand how values are stringified. For example, write `Values are stringified as given (`true` becomes `'true'`), ...`.</violation>
</file>
<file name="internal/design/spf/conventions/README.md">
<violation number="1" location="internal/design/spf/conventions/README.md:35">
P3: The index omits external context writes even though `signals.md` documents them alongside state writes. Mention both state and context so the index accurately describes the convention.</violation>
</file>
<file name="apps/sandbox/templates/cdn/main.ts">
<violation number="1" location="apps/sandbox/templates/cdn/main.ts:168">
P1: The CDN preview accepts `compat` and `scaffold`, but `loadCdnPlayer` imports only neutral and default bundles. It then emits variant tags such as `video-compat-skin` without registering them, so those selections render as unregistered custom elements. Add explicit compat/scaffold imports for every video/audio live branch, or restrict those skin options on CDN.</violation>
</file>
<file name="packages/adapters/native-hls-video/src/chapters.ts">
<violation number="1" location="packages/adapters/native-hls-video/src/chapters.ts:69">
P2: `NativeHlsChapters` does not propagate `crossorigin="use-credentials"` to either manual playlist or chapters-document request. Cookie-authenticated cross-origin native HLS can play while these requests omit cookies and silently produce no chapters; pass `credentials: 'include'` for both requests when `target.crossOrigin` is `use-credentials`.</violation>
</file>
<file name="packages/adapters/hlsjs-video/src/adapter.ts">
<violation number="1" location="packages/adapters/hlsjs-video/src/adapter.ts:23">
P2: `PlaybackType` accepts arbitrary strings, but the engine-selection logic treats every value except `'native'` as MSE. A typo such as `preferPlayback: 'nativ'` now compiles and silently bypasses native playback; keep this a two-value type or validate unknown values before selecting MSE.</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.
View guided diff | Turn on auto-fix | Re-trigger cubic
| { name, secrets }: { name: string; secrets: string[] } | ||
| ): Promise<T> { | ||
| // Connection errors can include the endpoint, which contains the credentials. | ||
| const redact = (message: string) => secrets.reduce((text, secret) => text.replaceAll(secret, '***'), message); |
There was a problem hiding this comment.
P1: redact only replaces raw credential strings, but the caller embeds credentials in an encoded endpoint. Email usernames or keys containing URL-special characters can therefore appear in warning and final errors; redact encoded secret forms too.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At apps/e2e/suites/browserstack/connect.ts, line 12:
<comment>`redact` only replaces raw credential strings, but the caller embeds credentials in an encoded endpoint. Email usernames or keys containing URL-special characters can therefore appear in warning and final errors; redact encoded secret forms too.</comment>
<file context>
@@ -0,0 +1,30 @@
+ { name, secrets }: { name: string; secrets: string[] }
+): Promise<T> {
+ // Connection errors can include the endpoint, which contains the credentials.
+ const redact = (message: string) => secrets.reduce((text, secret) => text.replaceAll(secret, '***'), message);
+ const failures: string[] = [];
+
</file context>
| const redact = (message: string) => secrets.reduce((text, secret) => text.replaceAll(secret, '***'), message); | |
| const redact = (message: string) => secrets.reduce((text, secret) => text.replaceAll(secret, '***').replaceAll(encodeURIComponent(secret), '***'), message); |
| // Set after the source as often as before it, so turning it on starts a load that `preload` deferred. | ||
| override set autoplay(value: boolean) { | ||
| super.autoplay = value; | ||
| this.#init(); |
There was a problem hiding this comment.
P1: The new setter does not handle the normal public HlsJsAdapter.autoplay path: that facade writes the target directly and never reaches HlsJsPreload.#init(). With preload="none", setting autoplay after the source is loaded therefore leaves hls.js stopped, so forward the autoplay change to the HLS delegate or otherwise trigger preload initialization from the public setter.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At packages/adapters/hlsjs-video/src/preload.ts, line 60:
<comment>The new setter does not handle the normal public `HlsJsAdapter.autoplay` path: that facade writes the target directly and never reaches `HlsJsPreload.#init()`. With `preload="none"`, setting `autoplay` after the source is loaded therefore leaves hls.js stopped, so forward the autoplay change to the HLS delegate or otherwise trigger preload initialization from the public setter.</comment>
<file context>
@@ -47,6 +50,16 @@ export function HlsJsPreloadMixin<Base extends Constructor<HlsEngineHost>>(BaseC
+ // Set after the source as often as before it, so turning it on starts a load that `preload` deferred.
+ override set autoplay(value: boolean) {
+ super.autoplay = value;
+ this.#init();
+ }
+
</file context>
| else await import('@videojs/cdn/live-video'); | ||
| } else { | ||
| if (skin === 'minimal') await import('@videojs/cdn/video-minimal'); | ||
| if (skin === 'neutral') await import('@videojs/cdn/video-neutral'); |
There was a problem hiding this comment.
P1: The CDN preview accepts compat and scaffold, but loadCdnPlayer imports only neutral and default bundles. It then emits variant tags such as video-compat-skin without registering them, so those selections render as unregistered custom elements. Add explicit compat/scaffold imports for every video/audio live branch, or restrict those skin options on CDN.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At apps/sandbox/templates/cdn/main.ts, line 168:
<comment>The CDN preview accepts `compat` and `scaffold`, but `loadCdnPlayer` imports only neutral and default bundles. It then emits variant tags such as `video-compat-skin` without registering them, so those selections render as unregistered custom elements. Add explicit compat/scaffold imports for every video/audio live branch, or restrict those skin options on CDN.</comment>
<file context>
@@ -162,20 +162,20 @@ async function loadCdnPlayer(skin: Skin, live: boolean) {
else await import('@videojs/cdn/live-video');
} else {
- if (skin === 'minimal') await import('@videojs/cdn/video-minimal');
+ if (skin === 'neutral') await import('@videojs/cdn/video-neutral');
else await import('@videojs/cdn/video');
}
</file context>
| about: Report vulnerabilities in any version privately, not in a public issue. | ||
| url: https://github.com/videojs/video.js/security/advisories/new |
There was a problem hiding this comment.
P2: This link misroutes Video.js 8 vulnerability reports to the Video.js 10 repository. Make the existing link explicitly cover Video.js 10 and add a separate private-reporting link for videojs/videojs-v8.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/ISSUE_TEMPLATE/config.yml, line 4:
<comment>This link misroutes Video.js 8 vulnerability reports to the Video.js 10 repository. Make the existing link explicitly cover Video.js 10 and add a separate private-reporting link for `videojs/videojs-v8`.</comment>
<file context>
@@ -1,7 +1,17 @@
+blank_issues_enabled: false
contact_links:
+ - name: 🔒 Report a Security Vulnerability
+ about: Report vulnerabilities in any version privately, not in a public issue.
+ url: https://github.com/videojs/video.js/security/advisories/new
+ - name: 🐛 Video.js 8 Issue
</file context>
| about: Report vulnerabilities in any version privately, not in a public issue. | |
| url: https://github.com/videojs/video.js/security/advisories/new | |
| about: Report Video.js 10 vulnerabilities privately, not in a public issue. | |
| url: https://github.com/videojs/video.js/security/advisories/new | |
| - name: 🔒 Report a Video.js 8 Security Vulnerability | |
| about: Report Video.js 8 vulnerabilities privately, not in a public issue. | |
| url: https://github.com/videojs/videojs-v8/security/advisories/new |
| exit 1 | ||
| fi | ||
|
|
||
| if grep -qiE '^#+[[:space:]]+breaking changes[[:space:]]*$' "$FILE"; then |
There was a problem hiding this comment.
P2: This check only detects any matching heading anywhere in the file, rather than the required ## Breaking changes section directly after the opening. Parse the Markdown body while excluding fenced code and enforce the exact heading level and placement, otherwise malformed prose can pass or valid prose can fail.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/scripts/changelog-prose-verify.sh, line 52:
<comment>This check only detects any matching heading anywhere in the file, rather than the required `## Breaking changes` section directly after the opening. Parse the Markdown body while excluding fenced code and enforce the exact heading level and placement, otherwise malformed prose can pass or valid prose can fail.</comment>
<file context>
@@ -34,6 +36,34 @@ if ! grep -q "^version: \"${VERSION}\"$" "$FILE"; then
+ exit 1
+fi
+
+if grep -qiE '^#+[[:space:]]+breaking changes[[:space:]]*$' "$FILE"; then
+ HAS_BREAKING_SECTION=true
+else
</file context>
| ```ts | ||
| interface HlsVideoEngineConfig { | ||
| // Combined from `SwitchVideoTrackConfig`, `SegmentLoaderActorConfig`, `TextTrackActorsConfig`, … | ||
| { |
There was a problem hiding this comment.
P3: This fenced TypeScript example is syntactically invalid because the anonymous object shape has no type or variable declaration. Prefix the shape with a type declaration so the documented config example can be parsed.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At internal/design/spf/conventions/config.md, line 60:
<comment>This fenced TypeScript example is syntactically invalid because the anonymous object shape has no type or variable declaration. Prefix the shape with a type declaration so the documented config example can be parsed.</comment>
<file context>
@@ -53,10 +53,11 @@ Worked example: `bufferDuration` is used by the load-segments dispatcher (for `r
```ts
-interface HlsVideoEngineConfig {
+// Combined from `SwitchVideoTrackConfig`, `SegmentLoaderActorConfig`, `TextTrackActorsConfig`, …
+{
// Sub-configs reuse the canonical types from their owning module
bandwidth?: Partial<BandwidthConfig>; // network/bandwidth-estimator
</file context>
| { | |
| type EngineConfig = { |
| /** | ||
| * The `Video` members the player.js host accepts, plus the source that names the embed. `autoplay`, `defaultMuted`, and | ||
| * `loop` reach every embed over the protocol once it reports `ready`. player.js standardizes no URL parameters, so only | ||
| * for the services the host recognizes (Mux Player, Gumlet, FrameRate, Livid, Bunny Stream, Streamable) are they, |
There was a problem hiding this comment.
P3: This comment overstates the URL contract: the providers do not write every listed prop for every recognized service. Describe that each service receives only the URL parameters it supports, so consumers are not misled about preload, mute, or controls behavior.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At packages/adapters/playerjs-video/src/props.ts, line 8:
<comment>This comment overstates the URL contract: the providers do not write every listed prop for every recognized service. Describe that each service receives only the URL parameters it supports, so consumers are not misled about `preload`, mute, or controls behavior.</comment>
<file context>
@@ -0,0 +1,17 @@
+/**
+ * The `Video` members the player.js host accepts, plus the source that names the embed. `autoplay`, `defaultMuted`, and
+ * `loop` reach every embed over the protocol once it reports `ready`. player.js standardizes no URL parameters, so only
+ * for the services the host recognizes (Mux Player, Gumlet, FrameRate, Livid, Bunny Stream, Streamable) are they,
+ * `controls`, and `preload` also written onto the embed URL in the service's own spelling. `controls` also decides
+ * whether the frame takes pointer input. `playsInline` and `poster` are stored and reported without effect.
</file context>
| * for the services the host recognizes (Mux Player, Gumlet, FrameRate, Livid, Bunny Stream, Streamable) are they, | |
| * recognized services receive only the URL parameters they support, in the service's own spelling. `controls` also decides | |
| * whether the frame takes pointer input. `playsInline` and `poster` are stored and reported without effect. |
| // its canonical `.m3u8` form. `<mux-video>` reflects the derived `src` back to | ||
| // the host, React re-syncs the authored one on every render, and re-deriving | ||
| // would drop the params a Mux URL does not carry, such as `poster`. | ||
| if (super.src === (createMuxVideoURL(parsed) ?? value)) return; |
There was a problem hiding this comment.
P3: createMuxVideoURL warns in development for inverted resolution bounds, so this equality check logs before source rebuilds the URL and logs again. Compare with a side-effect-free canonicalizer, or otherwise avoid using the warning-producing builder for equality checks.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At packages/adapters/mux-video/src/adapter.ts, line 76:
<comment>`createMuxVideoURL` warns in development for inverted resolution bounds, so this equality check logs before `source` rebuilds the URL and logs again. Compare with a side-effect-free canonicalizer, or otherwise avoid using the warning-producing builder for equality checks.</comment>
<file context>
@@ -67,10 +68,12 @@ export class MuxVideoAdapter extends HlsJsAdapter implements MuxVideoAdapterProp
+ // its canonical `.m3u8` form. `<mux-video>` reflects the derived `src` back to
+ // the host, React re-syncs the authored one on every render, and re-deriving
+ // would drop the params a Mux URL does not carry, such as `poster`.
+ if (super.src === (createMuxVideoURL(parsed) ?? value)) return;
const { type, preferPlayback, engine, maxAutoResolution, capRenditionToPlayerSize, minAutoResolution } =
</file context>
| * in [Gumlet's](https://docs.gumlet.com/video/embed-stream), [Bunny Stream's](https://bunny.net/docs/stream/embedding), | ||
| * or [Livid's](https://support.livid.com/article/46-advanced-embedding-parameters) parameter lists, say. A parameter a | ||
| * service reads from the URL hash, like Livid's `#t`, belongs in `src`. Values are stringified as given becomes | ||
| * `'true'`), an array repeats the parameter once per value, and `null` removes a parameter the embed URL would |
There was a problem hiding this comment.
P3: Fix the malformed engine-option sentence so consumers can understand how values are stringified. For example, write Values are stringified as given (truebecomes'true'), ....
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At packages/adapters/playerjs-video/src/source.ts, line 13:
<comment>Fix the malformed engine-option sentence so consumers can understand how values are stringified. For example, write `Values are stringified as given (`true` becomes `'true'`), ...`.</comment>
<file context>
@@ -0,0 +1,91 @@
+ * in [Gumlet's](https://docs.gumlet.com/video/embed-stream), [Bunny Stream's](https://bunny.net/docs/stream/embedding),
+ * or [Livid's](https://support.livid.com/article/46-advanced-embedding-parameters) parameter lists, say. A parameter a
+ * service reads from the URL hash, like Livid's `#t`, belongs in `src`. Values are stringified as given becomes
+ * `'true'`), an array repeats the parameter once per value, and `null` removes a parameter the embed URL would
+ * otherwise carry.
+ *
</file context>
| | --- | ------------------- | | ||
| | [behaviors.md](behaviors.md) | When to define a Behavior; behavior shape; helper vs behavior split; per-type specialization; file placement; source-reset handling. | | ||
| | [signals.md](signals.md) | When to use `Signal<T>` (writable) vs `ReadonlySignal<T>` (read-only); when to seed via `initialState`/`initialContext`; when to use `shareSignals`; multi-writer slots; `peek` and `equalsById` helpers. | | ||
| | [signals.md](signals.md) | When to use `Signal<T>` (writable) vs `ReadonlySignal<T>` (read-only); when to seed via `initialState`/`initialContext`; how code outside the composition writes its state; multi-writer slots; `peek` and `equalsById` helpers. | |
There was a problem hiding this comment.
P3: The index omits external context writes even though signals.md documents them alongside state writes. Mention both state and context so the index accurately describes the convention.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At internal/design/spf/conventions/README.md, line 35:
<comment>The index omits external context writes even though `signals.md` documents them alongside state writes. Mention both state and context so the index accurately describes the convention.</comment>
<file context>
@@ -32,7 +32,7 @@ Started small. Grow only when the assessment surfaces a recurring decision that
| --- | ------------------- |
| [behaviors.md](behaviors.md) | When to define a Behavior; behavior shape; helper vs behavior split; per-type specialization; file placement; source-reset handling. |
-| [signals.md](signals.md) | When to use `Signal<T>` (writable) vs `ReadonlySignal<T>` (read-only); when to seed via `initialState`/`initialContext`; when to use `shareSignals`; multi-writer slots; `peek` and `equalsById` helpers. |
+| [signals.md](signals.md) | When to use `Signal<T>` (writable) vs `ReadonlySignal<T>` (read-only); when to seed via `initialState`/`initialContext`; how code outside the composition writes its state; multi-writer slots; `peek` and `equalsById` helpers. |
| [reactors.md](reactors.md) | When to reach for `createMachineReactor`; the `deriveState` + `monitor` convention; the entry-returns-state-exit-cleanup idiom; source-identity states; policy modes as states. |
| [actors.md](actors.md) | When to reach for an Actor; the three actor shapes (`MessageActor` / `TransitionActor` / `CallbackActor`); when one actor vs two (mechanism + policy split); the per-type setup-actor cluster-ownership convention. |
</file context>
| | [signals.md](signals.md) | When to use `Signal<T>` (writable) vs `ReadonlySignal<T>` (read-only); when to seed via `initialState`/`initialContext`; how code outside the composition writes its state; multi-writer slots; `peek` and `equalsById` helpers. | | |
| | [signals.md](signals.md) | When to use `Signal<T>` (writable) vs `ReadonlySignal<T>` (read-only); when to seed via `initialState`/`initialContext`; how code outside the composition writes its state and context; multi-writer slots; `peek` and `equalsById` helpers. | |
The AudioWorklet player core is now published, so the worklet renderer becomes the only audio renderer and the AudioBufferSourceNode path is removed. The latency controller's playout rate reaches the core as the input's playbackRate (clamped to its 0.5-2 range), and the clock is rebased on each change so it advances at the rate in effect. The renderer defaults to the core on the render context's baseContext; the engine's createAudioPlayer option stays as an override. @caprid/* joins minimumReleaseAgeExclude. Closes #66 Claude-Session: https://claude.ai/code/session_01DaH4ihf1LLPqmXShYkvBat
…e contract simple-moq-video is kept off the CDN (cdnMediaExclusions in packages/cdn/vite.config.ts), so CDN_MEDIA_SUBPATHS rightly omits it, but the contract test compared the list against every html media definition. Claude-Session: https://claude.ai/code/session_01DaH4ihf1LLPqmXShYkvBat
test(installation): skip media the cdn build excludes in the workspace contract
Measured from the timeline's first frame, packets that resume past a gap landed beyond the fill horizon and reached the core one per 100 ms stall rescue, holding the clock for up to the core's jitter ceiling over again. Claude-Session: https://claude.ai/code/session_01DaH4ihf1LLPqmXShYkvBat
The player's MOQT codec and session driver now come from @caprid/moq-core 0.1.1, the package extracted from network/moqt, and the local modules and their tests are deleted. The session actor offers moqt-22 first with moqt-20 as the fallback, and the core reads the negotiated WebTransport protocol to pick its LOCATION_FILTER codec. A browser without WebTransport.protocol offers moqt-22 only. The fake relays in the tests re-export the package's unexported relay-side codec from one helper instead of keeping a second copy. Transport section citations follow draft-22 numbering. @caprid/moq-media moves to ^0.1.1 alongside. Claude-Session: https://claude.ai/code/session_01DaH4ieYHRP2Agar6P9KSCB
Replaces the vendored draft-20 text with draft-22 and updates the specs README: revision table, checksum, and the sentence that said the protocol pin lives in network/moqt. The publishing guide, the sandbox relay comments and the plans now point at @caprid/moq-core and draft-22. Claude-Session: https://claude.ai/code/session_01DaH4ieYHRP2Agar6P9KSCB
moq-media 0.1.1 decodes every Opus input with WebAssembly libopus by default for packet-loss concealment. That decoder is single-stream and ignores the OpusHead channel mapping, so a multistream track the catalog allows (channelConfig above stereo, with init data) would decode as noise. The default player factory turns lossConcealment off, which keeps the WebCodecs path #72 shipped with. Claude-Session: https://claude.ai/code/session_01DaH4ieYHRP2Agar6P9KSCB
feat(spf): speak moqt-22 through @caprid/moq-core
moq-media 0.1.1 statically imports a base64 libopus WebAssembly module for packet-loss concealment, which grew the /moq entry from 32 kB to 103 kB brotli. The player already turned concealment off: that decoder is single-stream and would decode a multistream Opus track as noise. 0.1.1's only code change is that path, so 0.1.0 is equivalent at a third of the size. The pin is exact because ^0.1.0 resolves to 0.1.1, and the lossConcealment option goes away with it. Claude-Session: https://claude.ai/code/session_01DaH4ieYHRP2Agar6P9KSCB
The sandbox page still said the loopback relay speaks draft-20. The FIN comment cited §6.4.2.3 as if a FIN were a cancellation, which §6.4.2.2 rules out; it now says the loopback ends the subscription on either. The vi64 note now covers the 9-byte form and why encoding stops at 8. Claude-Session: https://claude.ai/code/session_01DaH4ieYHRP2Agar6P9KSCB
The previous note said 8 bytes hold every integer a JS number represents exactly. They don't: a double holds some larger integers exactly, such as 2^56, and the 8-byte encoder would mis-encode them. 56 bits do hold every safe integer, so the encoder now throws a RangeError for anything else instead of writing wrong bytes. Claude-Session: https://claude.ai/code/session_01DaH4ieYHRP2Agar6P9KSCB
fix(spf): pin @caprid/moq-media 0.1.0 and address #75 review
Co-authored-by: Claude <noreply@anthropic.com>
…eports (#9566) Co-authored-by: Rennan Ribeiro <rennanribeiro1@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…s-moq # Conflicts: # packages/spf/package.json # packages/spf/src/playback/behaviors/resolve-catalog.ts # packages/spf/src/playback/behaviors/subscribe-selected-tracks.ts # pnpm-lock.yaml
# Conflicts: # packages/html/src/define/tests/ssr-safety.test.ts
# Conflicts: # packages/spf/src/network/moqt/control-messages.ts # packages/spf/src/network/moqt/object-stream.ts # packages/spf/src/network/moqt/session.ts # packages/spf/src/network/moqt/tests/control-messages.test.ts
# Conflicts: # .agents/plans/moq-transport-20-migration.md # internal/specs/moq/README.md # packages/spf/package.json # packages/spf/src/network/tests/helpers/moqt-wire.ts # packages/spf/src/network/tests/helpers/raw-peer.ts # packages/spf/src/playback/behaviors/resolve-catalog.ts # packages/spf/src/playback/behaviors/subscribe-selected-tracks.ts # packages/spf/src/publish/behaviors/open-publish-session.ts # packages/spf/src/publish/behaviors/setup-track-publishers.ts # packages/spf/src/publish/engines/moq/tests/helpers/cross-engine-harness.ts # pnpm-lock.yaml
The installation workspace contract from mmcc/moq (#73) requires every html media definition the CDN republishes to appear in CDN_MEDIA_SUBPATHS. The publisher is not playback media the installation builder can offer, so exclude it beside simple-moq-video instead of listing it. Claude-Session: https://claude.ai/code/session_01DaH4ihVZJLpFNTQYdbaDd1
Summary
Syncs
mmcc/moq-publisherto videojs/video.jsmainthrough the syncedmmcc/moqbranch (stacked on themmcc/moqsync PR). This also brings in #69 (SUBSCRIBER_PRIORITY), which the publisher was missing. Merge only: land by fast-forward push after themmcc/moqsync, never squash or rebase.On top of the
mmcc/moqsync:shareSignals/onSignalsReadyare replaced withdefineExternalSignals, which covers the intent state slots and thepreviewElementcontext. The adapter and the cross-engine harness use the returned composition directly. The deprecatedvideoconfig alias is stripped before upstream's new unknown-config-key check.<State, MediaState>element generics (refactor(react,html)!: make every stable type importable from the framework packages videojs/v10#3082).minimal→neutralrename.ScreenShareButtonsit beside upstream's additions.QualityRadioGroupdrops its legacy alias, as upstream did.@internal, as upstream's API-stability check requires.shareSignals.mmcc/moqsync (test(installation): skip media the cdn build excludes in the workspace contract #73, feat(spf): speak moqt-22 through @caprid/moq-core #75, fix(spf): pin @caprid/moq-media 0.1.0 and address #75 review #77, plus upstream through 905a6d1) and feat(spf): publish through @caprid/moq-core's publish session #78 (publisher on@caprid/moq-core). Both sides deletednetwork/moqt/, the publisher keeps its relocatedraw-peertest helper, andmoqt-wirekeeps the publisher codec exports.moq-publish-videois now kept off the CDN besidesimple-moq-video, so the installation contract from test(installation): skip media the cdn build excludes in the workspace contract #73 holds.Testing
pnpm build:packagesandpnpm typecheckpass.pnpm check:workspaceandpnpm -F site check:api-stabilitypass.🤖 Generated with Claude Code
https://claude.ai/code/session_01DaH4iixnBQbNchnez2h4ZG
Summary by cubic
Syncs
mmcc/moq-publisherto videojs/video.jsmainthrough the syncedmmcc/moqbranch, stacked on the moq sync PR, and brings in #69 (SUBSCRIBER_PRIORITY) plus the full upstream history through the 10.0.0 stable release.pnpm build:packages,pnpm typecheck, all test suites, andcheck:api-stabilitypass; the result is not re-verified live against a relay.Refactors
shareSignals/onSignalsReadywithdefineExternalSignals, which covers the intent state slots and thepreviewElementcontext; the adapter and cross-engine harness use the returned composition directly.<State, MediaState>element generics; the deprecatedvideoconfig alias is stripped before upstream's new unknown-config-key check.minimal→neutralrename, now applied repo-wide: the minimal skin and its pages, snapshots, and probes become the neutral skin.@internalto satisfy upstream's API-stability check; docs no longer describeshareSignals.Migration
mmcc/moqsync, never squash or rebase.Written for commit e6fb089. Summary will update on new commits.