Skip to content

fix(publish,demo): align media constraints#2181

Merged
kixelated merged 4 commits into
moq-dev:devfrom
fperex:split/demo-fixes
Jul 12, 2026
Merged

fix(publish,demo): align media constraints#2181
kixelated merged 4 commits into
moq-dev:devfrom
fperex:split/demo-fixes

Conversation

@fperex

@fperex fperex commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Split out of #2163.

Summary:

  • Add demo mic processing controls for echoCancellation, autoGainControl, and noiseSuppression while keeping Auto as the browser default.
  • Request the selected camera resolution and frame rate on the source, and keep the demo encoder cap aligned with that selected target.
  • Let the video encoder use source width.max * height.max as the maxPixels fallback when both constraints are present and config.maxPixels is unset.
  • Fix Safari/Firefox console-overlay error formatting, the speaker-mute reset on catalog updates, and buffer-bar shrinking in narrow layouts.

Public API changes:

  • No new, renamed, removed, or signature-changed exports.
  • Non-breaking behavior/doc change: EncoderConfig.maxPixels now documents and uses source width.max and height.max as a fallback cap when both are present.

Branch targeting:

  • These changes are non-breaking and would normally target main. The branch is based on dev; retargeting to main would include unrelated dev changes, so this PR remains on dev.

Test plan:

  • nix develop --command env CARGO_TARGET_DIR=/Users/kixelated/.codex/worktrees/078c/moq/target just check
  • nix develop --command just js check
  • Remote Check is green.

(Written by GPT-5)

…buffer bar

Three unrelated demo fixes:

- The console overlay printed err.stack, but JavaScriptCore and SpiderMonkey
  build the stack as a bare frame list with no leading 'Name: message' line,
  so on Safari and Firefox the only part that identifies the error (the code
  in 'RESET_STREAM: 24') was dropped. Prepend the header when the stack does
  not already carry it, keyed on the stack contents rather than the browser,
  so V8 does not print it twice.

- The watch tile's active-state effect both wrote watch.muted and read the
  catalog for the speaker badge, so every catalog frame re-ran it and
  re-asserted muted=false, reverting the user's speaker-mute a moment after
  each click. Split the badge into its own effect.

- The buffer-bar canvas could not shrink inside its flex row (min-width: 0).

Also expose the microphone's echoCancellation/autoGainControl/noiseSuppression
constraints and the camera resolution request in the publish demo, since the
macOS defaults engage the system voice processor: auto gain slowly rides the
capture level down and other system audio is ducked while the mic is live.

@sourcery-ai sourcery-ai 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.

Sorry @fperex, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

Comment thread demo/web/src/publish.ts Outdated
Comment thread demo/web/src/publish.ts
Comment thread doc/lib/js/env/web.md Outdated
kixelated and others added 3 commits July 12, 2026 07:56
Co-authored-by: GPT-5 <codex@openai.com>
Co-authored-by: GPT-5 <codex@openai.com>
Co-authored-by: GPT-5 <codex@openai.com>
@kixelated kixelated changed the title fix(demo): mic processing controls, error messages, and a shrinkable buffer bar fix(publish,demo): align media constraints Jul 12, 2026
@kixelated kixelated merged commit 4436ca0 into moq-dev:dev Jul 12, 2026
3 checks passed
@fperex fperex deleted the split/demo-fixes branch July 12, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants