Skip to content

feat(packages): surface explicit mic intent so built-in controls can publish audio-only - #35

Merged
mmcc merged 8 commits into
mmcc/moq-publisherfrom
mmcc/moq-mic-intent
Aug 18, 2026
Merged

mmcc merged 8 commits into
mmcc/moq-publisherfrom
mmcc/moq-mic-intent

Conversation

@mmcc

@mmcc mmcc commented Aug 18, 2026 •

Copy link
Copy Markdown
Owner

Closes #32

Summary

The engine and adapter learned audio-only capture in #31, but the stock publish UI couldn't drive it: the media contract had no mic intent slot, the capture-source store slice didn't expose one, and the capture aggregation only counted the video pipelines — so a voice-only page's publish button never enabled. This surfaces micActive end to end, with the mic counting toward capture aggregation only under explicit intent.

Changes

  • MediaCaptureSourceCapability declares micActive with the same intent-consumption semantics as the video intents; the "mic has no intent slot" contract prose is updated to match.
  • The captureSource store feature exposes the mic intent (micActive state + toggleMic() action). Older media generations without the property stay coherent: the slice defaults the intent to false, and toggleMic() refuses to write an inert expando that the next sync would read back as real intent.
  • aggregateCaptureState now takes the capture slice and counts the mic only when micActive is set — the load-bearing rule lives in one place. An implied mic (video-driven, e.g. one that outlives a dismissed screen picker by a beat) never enables capture-gated controls on its own.
  • With the mic as the sole capture source, PublishButton enables and starts/stops the session; EnableDevicesButton and CapturePlaceholder report the mic-only capture state coherently. HTML and React behave identically (parity tests).

Testing

  • pnpm -F @videojs/media test (613), pnpm -F @videojs/core test (1602), pnpm -F @videojs/html test (406), pnpm -F @videojs/react test (467), pnpm -F @videojs/spf test (all files) — green
  • pnpm typecheck clean after a full declarations rebuild
  • New coverage: mic gating in the aggregation precedence tests, mic intent slice + older-generation tolerance in the feature tests, mic-only enable/publish and implied-mic-stays-disabled cases across the core, HTML, and React publish button and capture placeholder tests

🤖 Generated with Claude Code


Summary by cubic

Enables audio-only publishing by adding an explicit mic intent and provenance. Previously publish required an active camera or screen; now an explicitly requested mic can start a session, while a video‑implied mic never enables controls or shows permission errors.

  • Adds optional micActive to MediaCaptureSourceCapability. The sandbox FakePublishMedia implements a real audio‑only pipeline (token‑canceled acquisition, consume intent on denied/ended, device re‑keying, mute wiring), accepts an explicit active mic as a publish() precondition, reports source‑aware stats (NaN for absent metrics), and only dispatches mic capture state events on real changes.

  • The captureSource store exposes toggleMic() and latches micExplicit across intent consumption on terminal outcomes; it resets when a new implied lifecycle starts. Legacy hosts without micActive remain compatible; the intent defaults to false and toggleMic() no‑ops.

  • aggregateCaptureState(media) replaces the two‑arg form and counts the mic only when micExplicit is true; terminal mic states keep counting after intent consumption. An implied mic never surfaces active or denied on its own.

  • PublishButton, EnableDevicesButton, and capture placeholders handle mic‑only across @videojs/core, @videojs/html, and @videojs/react. Elements pass micState and micExplicit into the core; explicit mic enables Publish, implied mic does not.

  • Migration

    • Media hosts should add a writable optional micActive and emit capturesourcechange when it changes.
    • Update calls to aggregateCaptureState to pass the capture source object. If gating publish outside the built‑ins, enable on mic only when micExplicit is true and micState is active; surface blocks with micExplicit && (micState === 'denied' || micState === 'ended').

Written for commit 316343d. Summary will update on new commits.

Review in cubic

…publish audio-only

Declare micActive on MediaCaptureSourceCapability and the capture-source
store slice (with a toggleMic action), and count the mic toward the
aggregate capture state only under explicit intent — an implied mic
acquired as a side effect of video intent must not enable publish
controls the video pipelines no longer justify. Older media generations
without the property keep working: the slice defaults the intent to
false and toggleMic refuses to write an inert slot.
@github-actions

github-actions Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

📦 Bundle Size Report

🎨 @videojs/html — 67 small size changes
Path Base initial PR initial Initial diff Lazy diff
/video/minimal-skin 58.55 kB 58.59 kB +44 B (+0.1%) 0 B
/video/minimal-skin.tailwind 59.22 kB 59.33 kB +108 B (+0.2%) 0 B
/video/skin 58.80 kB 58.83 kB +25 B (+0.0%) 0 B
/video/skin.tailwind 59.51 kB 59.57 kB +58 B (+0.1%) 0 B
/audio/minimal-skin 45.23 kB 45.30 kB +66 B (+0.1%) 0 B
/audio/minimal-skin.tailwind 45.80 kB 45.85 kB +55 B (+0.1%) 0 B
/audio/skin 49.11 kB 49.23 kB +122 B (+0.2%) 0 B
/audio/skin.tailwind 49.70 kB 49.77 kB +70 B (+0.1%) 0 B
/live-video/minimal-skin 52.63 kB 52.69 kB +65 B (+0.1%) 0 B
/live-video/minimal-skin.tailwind 52.96 kB 53.00 kB +41 B (+0.1%) 0 B
/live-video/skin 55.23 kB 55.20 kB -36 B (-0.1%) 0 B
/live-video/skin.tailwind 55.62 kB 55.76 kB +148 B (+0.3%) 0 B
/live-audio/minimal-skin 39.27 kB 39.40 kB +126 B (+0.3%) 0 B
/live-audio/minimal-skin.tailwind 38.76 kB 38.81 kB +46 B (+0.1%) 0 B
/live-audio/skin 42.87 kB 42.95 kB +82 B (+0.2%) 0 B
/live-audio/skin.tailwind 42.48 kB 42.53 kB +45 B (+0.1%) 0 B
/publisher/player 7.77 kB 7.85 kB +85 B (+1.1%) 0 B
/publisher/skin 42.73 kB 42.82 kB +93 B (+0.2%) 0 B
/publisher/skin.tailwind 43.00 kB 43.07 kB +75 B (+0.2%) 0 B
/ui/airplay-button 11.60 kB 11.69 kB +84 B (+0.7%) 0 B
/ui/audio-track-radio-group 11.77 kB 11.83 kB +62 B (+0.5%) 0 B
/ui/buffering-indicator 8.80 kB 8.88 kB +76 B (+0.8%) —
/ui/camera-button 11.74 kB 11.84 kB +97 B (+0.8%) 0 B
/ui/camera-radio-group 11.90 kB 12.00 kB +100 B (+0.8%) 0 B
/ui/captions-button 11.86 kB 11.94 kB +85 B (+0.7%) 0 B
/ui/captions-radio-group 11.85 kB 11.93 kB +78 B (+0.6%) 0 B
/ui/capture-placeholder 10.02 kB 10.12 kB +99 B (+1.0%) 0 B
/ui/cast-button 11.56 kB 11.63 kB +71 B (+0.6%) 0 B
/ui/compounds 35.36 kB 35.49 kB +136 B (+0.4%) 0 B
/ui/connection-indicator 9.90 kB 9.99 kB +91 B (+0.9%) 0 B
/ui/controls 8.98 kB 9.04 kB +62 B (+0.7%) 0 B
/ui/enable-devices-button 11.81 kB 11.89 kB +79 B (+0.7%) 0 B
/ui/error-dialog 12.09 kB 12.16 kB +70 B (+0.6%) 0 B
/ui/fullscreen-button 11.55 kB 11.63 kB +76 B (+0.6%) 0 B
/ui/hotkey 10.10 kB 10.18 kB +82 B (+0.8%) —
/ui/menu 18.96 kB 19.07 kB +103 B (+0.5%) 0 B
/ui/mic-button 11.75 kB 11.83 kB +80 B (+0.7%) 0 B
/ui/mic-radio-group 11.91 kB 12.00 kB +90 B (+0.7%) 0 B
/ui/mute-button 11.55 kB 11.63 kB +83 B (+0.7%) 0 B
/ui/pip-button 11.54 kB 11.62 kB +79 B (+0.7%) 0 B
/ui/play-button 11.53 kB 11.61 kB +79 B (+0.7%) 0 B
/ui/playback-rate-button 11.73 kB 11.82 kB +90 B (+0.7%) 0 B
/ui/playback-rate-radio-group 11.77 kB 11.85 kB +79 B (+0.7%) 0 B
/ui/poster 9.20 kB 9.28 kB +76 B (+0.8%) 0 B
/ui/publish-badge 10.00 kB 10.07 kB +72 B (+0.7%) 0 B
/ui/publish-button 10.37 kB 10.47 kB +105 B (+1.0%) 0 B
/ui/publish-timer 10.59 kB 10.67 kB +81 B (+0.7%) 0 B
/ui/quality-radio-group 12.36 kB 12.44 kB +79 B (+0.6%) 0 B
/ui/screen-share-button 11.77 kB 11.85 kB +80 B (+0.7%) 0 B
/ui/seek-button 11.58 kB 11.65 kB +73 B (+0.6%) 0 B
/ui/seek-indicator 12.78 kB 12.86 kB +81 B (+0.6%) —
/ui/slider 12.47 kB 12.56 kB +89 B (+0.7%) 0 B
/ui/status-announcer 10.99 kB 11.05 kB +66 B (+0.6%) 0 B
/ui/status-indicator 13.33 kB 13.41 kB +81 B (+0.6%) 0 B
/ui/thumbnail 9.98 kB 10.05 kB +81 B (+0.8%) —
/ui/time 11.34 kB 11.41 kB +70 B (+0.6%) 0 B
/ui/time-slider 15.40 kB 15.48 kB +84 B (+0.5%) 0 B
/ui/time-slider-chapter-title 9.00 kB 9.07 kB +72 B (+0.8%) —
/ui/time-slider-chapters 9.96 kB 10.05 kB +92 B (+0.9%) —
/ui/volume-indicator 13.33 kB 13.43 kB +96 B (+0.7%) 0 B
/ui/volume-slider 13.13 kB 13.21 kB +80 B (+0.6%) 0 B
/video (default) 58.89 kB 58.84 kB -52 B (-0.1%) 0 B
/video (default + hls) 197.14 kB 197.39 kB +250 B (+0.1%) 0 B
/video (minimal) 58.49 kB 58.60 kB +106 B (+0.2%) 0 B
/video (minimal + hls) 197.05 kB 197.08 kB +29 B (+0.0%) 0 B
/audio (default) 49.13 kB 49.20 kB +78 B (+0.2%) 0 B
/audio (minimal) 45.22 kB 45.30 kB +79 B (+0.2%) 0 B
Presets (7)
Entry Initial Lazy
/video (default) 58.84 kB 68.34 kB
/video (default + hls) 197.39 kB 68.34 kB
/video (minimal) 58.60 kB 68.34 kB
/video (minimal + hls) 197.08 kB 68.34 kB
/audio (default) 49.20 kB 68.34 kB
/audio (minimal) 45.30 kB 68.34 kB
/background 5.66 kB 68.34 kB
Media (17)
Entry Initial Lazy
/media/mux-video 141.61 kB —
/media/mux-audio 141.39 kB —
/media/background-video 1.14 kB —
/media/container 3.12 kB 68.34 kB
/media/dash-video 211.89 kB —
/media/google-cast 6.46 kB —
/media/hls-audio 21.86 kB —
/media/hls-background-video 15.69 kB —
/media/hls-video 27.39 kB —
/media/hlsjs-video 140.52 kB —
/media/moq-publish-video 23.91 kB —
/media/mux-background-video 15.72 kB —
/media/mux-data 26.71 kB —
/media/native-hls-video 7.51 kB —
/media/simple-moq-video 28.11 kB —
/media/vimeo-video 12.97 kB —
/media/youtube-video 6.75 kB —
Players (6)
Entry Initial Lazy
/video/player 10.14 kB 68.34 kB
/audio/player 7.05 kB 68.34 kB
/background/player 5.38 kB 68.34 kB
/live-video/player 9.54 kB 68.34 kB
/live-audio/player 7.08 kB 68.34 kB
/publisher/player 7.85 kB 68.34 kB
Skins (32)
Entry Type Initial Lazy
/video/minimal-skin.css css 6.30 kB —
/video/skin.css css 6.18 kB —
/video/minimal-skin js 58.59 kB 68.34 kB
/video/minimal-skin.tailwind js 59.33 kB 68.34 kB
/video/skin js 58.83 kB 68.34 kB
/video/skin.tailwind js 59.57 kB 68.34 kB
/audio/minimal-skin.css css 4.62 kB —
/audio/skin.css css 4.56 kB —
/audio/minimal-skin js 45.30 kB 68.34 kB
/audio/minimal-skin.tailwind js 45.85 kB 68.34 kB
/audio/skin js 49.23 kB 68.34 kB
/audio/skin.tailwind js 49.77 kB 68.34 kB
/background/skin.css css 145 B —
/background/skin js 1.14 kB —
/live-video/minimal-skin.css css 6.30 kB —
/live-video/skin.css css 6.18 kB —
/live-video/minimal-skin js 52.69 kB 68.34 kB
/live-video/minimal-skin.tailwind js 53.00 kB 68.34 kB
/live-video/skin js 55.20 kB 68.34 kB
/live-video/skin.tailwind js 55.76 kB 68.34 kB
/live-audio/minimal-skin.css css 4.62 kB —
/live-audio/skin.css css 4.56 kB —
/live-audio/minimal-skin js 39.40 kB 68.34 kB
/live-audio/minimal-skin.tailwind js 38.81 kB 68.34 kB
/live-audio/skin js 42.95 kB 68.34 kB
/live-audio/skin.tailwind js 42.53 kB 68.34 kB
/publisher/skin.css css 4.84 kB —
/publisher/skin js 42.82 kB 68.34 kB
/publisher/skin.tailwind js 43.07 kB 68.34 kB
/global.css css 196 B —
/shared.css css 99 B —
/skin-element js 1.47 kB —
UI Components (52)
Entry Initial Lazy
/ui/airplay-button 11.69 kB 68.34 kB
/ui/alert-dialog 4.22 kB —
/ui/alert-dialog-close 1.95 kB —
/ui/alert-dialog-description 1.63 kB —
/ui/alert-dialog-title 1.65 kB —
/ui/audio-track-radio-group 11.83 kB 68.34 kB
/ui/buffering-indicator 8.88 kB —
/ui/camera-button 11.84 kB 68.34 kB
/ui/camera-radio-group 12.00 kB 68.34 kB
/ui/captions-button 11.94 kB 68.34 kB
/ui/captions-radio-group 11.93 kB 68.34 kB
/ui/capture-placeholder 10.12 kB 68.34 kB
/ui/cast-button 11.63 kB 68.34 kB
/ui/compounds 35.49 kB 68.34 kB
/ui/connection-indicator 9.99 kB 68.34 kB
/ui/controls 9.04 kB 68.34 kB
/ui/enable-devices-button 11.89 kB 68.34 kB
/ui/error-dialog 12.16 kB 68.34 kB
/ui/fullscreen-button 11.63 kB 68.34 kB
/ui/hotkey 10.18 kB —
/ui/menu 19.07 kB 68.34 kB
/ui/mic-button 11.83 kB 68.34 kB
/ui/mic-radio-group 12.00 kB 68.34 kB
/ui/mute-button 11.63 kB 68.34 kB
/ui/pip-button 11.62 kB 68.34 kB
/ui/play-button 11.61 kB 68.34 kB
/ui/playback-rate-button 11.82 kB 68.34 kB
/ui/playback-rate-radio-group 11.85 kB 68.34 kB
/ui/popover 8.11 kB —
/ui/poster 9.28 kB 68.34 kB
/ui/publish-badge 10.07 kB 68.34 kB
/ui/publish-button 10.47 kB 68.34 kB
/ui/publish-timer 10.67 kB 68.34 kB
/ui/quality-radio-group 12.44 kB 68.34 kB
/ui/screen-share-button 11.85 kB 68.34 kB
/ui/seek-button 11.65 kB 68.34 kB
/ui/seek-indicator 12.86 kB —
/ui/seek-indicator-value 1.03 kB —
/ui/slider 12.56 kB 68.34 kB
/ui/status-announcer 11.05 kB 68.34 kB
/ui/status-indicator 13.41 kB 68.34 kB
/ui/status-indicator-value 1.02 kB —
/ui/thumbnail 10.05 kB —
/ui/time 11.41 kB 68.34 kB
/ui/time-slider 15.48 kB 68.34 kB
/ui/time-slider-chapter-title 9.07 kB —
/ui/time-slider-chapters 10.05 kB —
/ui/tooltip 9.44 kB 68.34 kB
/ui/volume-indicator 13.43 kB 68.34 kB
/ui/volume-indicator-fill 1.03 kB —
/ui/volume-indicator-value 1.02 kB —
/ui/volume-slider 13.21 kB 68.34 kB
⚛️ @videojs/react — 68 small size changes
Path Base initial PR initial Initial diff Lazy diff
/video/minimal-skin 45.78 kB 45.83 kB +55 B (+0.1%) 0 B
/video/minimal-skin.tailwind 52.40 kB 52.46 kB +70 B (+0.1%) 0 B
/video/skin 45.67 kB 45.80 kB +135 B (+0.3%) 0 B
/video/skin.tailwind 52.22 kB 52.34 kB +116 B (+0.2%) 0 B
/audio/minimal-skin 35.36 kB 35.41 kB +49 B (+0.1%) 0 B
/audio/minimal-skin.tailwind 40.23 kB 40.30 kB +79 B (+0.2%) 0 B
/audio/skin 35.32 kB 35.40 kB +79 B (+0.2%) 0 B
/audio/skin.tailwind 40.17 kB 40.29 kB +120 B (+0.3%) 0 B
/live-video/minimal-skin 37.93 kB 37.98 kB +51 B (+0.1%) 0 B
/live-video/minimal-skin.tailwind 44.25 kB 44.33 kB +82 B (+0.2%) 0 B
/live-video/skin 37.93 kB 38.07 kB +139 B (+0.4%) 0 B
/live-video/skin.tailwind 44.25 kB 44.36 kB +110 B (+0.2%) 0 B
/live-audio/minimal-skin 27.83 kB 27.88 kB +47 B (+0.2%) 0 B
/live-audio/minimal-skin.tailwind 31.57 kB 31.66 kB +85 B (+0.3%) 0 B
/live-audio/skin 27.87 kB 27.96 kB +86 B (+0.3%) 0 B
/live-audio/skin.tailwind 31.67 kB 31.79 kB +113 B (+0.3%) 0 B
/publisher/skin 28.68 kB 28.78 kB +106 B (+0.4%) 0 B
/publisher/skin.tailwind 33.40 kB 33.44 kB +45 B (+0.1%) 0 B
/ui/airplay-button 10.81 kB 10.88 kB +72 B (+0.7%) 0 B
/ui/audio-track 8.43 kB 8.50 kB +75 B (+0.9%) 0 B
/ui/audio-track-radio-group 9.58 kB 9.65 kB +80 B (+0.8%) 0 B
/ui/buffering-indicator 8.01 kB 8.07 kB +62 B (+0.8%) —
/ui/camera-button 10.94 kB 11.04 kB +100 B (+0.9%) 0 B
/ui/camera-radio-group 8.43 kB 8.50 kB +77 B (+0.9%) 0 B
/ui/captions-button 10.79 kB 10.87 kB +79 B (+0.7%) 0 B
/ui/captions-radio-group 9.70 kB 9.77 kB +79 B (+0.8%) 0 B
/ui/capture-placeholder 8.96 kB 9.06 kB +101 B (+1.1%) 0 B
/ui/cast-button 10.78 kB 10.87 kB +99 B (+0.9%) 0 B
/ui/connection-indicator 8.91 kB 8.99 kB +83 B (+0.9%) 0 B
/ui/controls 7.73 kB 7.81 kB +79 B (+1.0%) —
/ui/enable-devices-button 11.01 kB 11.11 kB +105 B (+0.9%) 0 B
/ui/error-dialog 10.85 kB 10.92 kB +78 B (+0.7%) 0 B
/ui/fullscreen-button 10.75 kB 10.84 kB +85 B (+0.8%) 0 B
/ui/gesture 8.10 kB 8.17 kB +73 B (+0.9%) —
/ui/hotkey 8.57 kB 8.65 kB +79 B (+0.9%) —
/ui/live-button 9.20 kB 9.28 kB +82 B (+0.9%) 0 B
/ui/menu 18.13 kB 18.21 kB +75 B (+0.4%) —
/ui/mic-button 10.94 kB 11.04 kB +95 B (+0.8%) 0 B
/ui/mic-radio-group 8.43 kB 8.51 kB +83 B (+1.0%) 0 B
/ui/mute-button 10.75 kB 10.83 kB +83 B (+0.8%) 0 B
/ui/pip-button 10.76 kB 10.84 kB +78 B (+0.7%) 0 B
/ui/play-button 10.74 kB 10.81 kB +78 B (+0.7%) 0 B
/ui/playback-rate 8.49 kB 8.56 kB +72 B (+0.8%) 0 B
/ui/playback-rate-button 10.73 kB 10.80 kB +80 B (+0.7%) 0 B
/ui/playback-rate-radio-group 9.62 kB 9.70 kB +90 B (+0.9%) 0 B
/ui/poster 7.62 kB 7.69 kB +73 B (+0.9%) —
/ui/publish-badge 8.95 kB 9.04 kB +87 B (+0.9%) 0 B
/ui/publish-button 9.44 kB 9.54 kB +98 B (+1.0%) 0 B
/ui/publish-timer 9.53 kB 9.61 kB +83 B (+0.9%) 0 B
/ui/quality 8.91 kB 8.99 kB +83 B (+0.9%) 0 B
/ui/quality-radio-group 10.06 kB 10.15 kB +91 B (+0.9%) 0 B
/ui/screen-share-button 10.97 kB 11.04 kB +69 B (+0.6%) 0 B
/ui/seek-button 10.77 kB 10.85 kB +89 B (+0.8%) 0 B
/ui/seek-indicator 12.07 kB 12.14 kB +71 B (+0.6%) —
/ui/slider 12.87 kB 12.95 kB +80 B (+0.6%) 0 B
/ui/status-announcer 10.52 kB 10.59 kB +77 B (+0.7%) 0 B
/ui/status-indicator 12.57 kB 12.66 kB +85 B (+0.7%) 0 B
/ui/thumbnail 8.90 kB 8.97 kB +71 B (+0.8%) —
/ui/time 10.27 kB 10.33 kB +67 B (+0.6%) 0 B
/ui/time-slider 14.43 kB 14.53 kB +103 B (+0.7%) 0 B
/ui/volume-indicator 12.68 kB 12.76 kB +80 B (+0.6%) 0 B
/ui/volume-slider 12.29 kB 12.36 kB +73 B (+0.6%) 0 B
/video (default) 45.80 kB 45.86 kB +58 B (+0.1%) 0 B
/video (default + hls) 183.04 kB 183.05 kB +9 B (+0.0%) 0 B
/video (minimal) 45.77 kB 45.94 kB +167 B (+0.4%) 0 B
/video (minimal + hls) 183.13 kB 183.28 kB +158 B (+0.1%) 0 B
/audio (default) 35.41 kB 35.47 kB +55 B (+0.2%) 0 B
/audio (minimal) 35.42 kB 35.49 kB +75 B (+0.2%) 0 B
Presets (7)
Entry Initial Lazy
/video (default) 45.86 kB 68.34 kB
/video (default + hls) 183.05 kB 68.34 kB
/video (minimal) 45.94 kB 68.34 kB
/video (minimal + hls) 183.28 kB 68.34 kB
/audio (default) 35.47 kB 68.34 kB
/audio (minimal) 35.49 kB 68.34 kB
/background 589 B —
Media (19)
Entry Initial
/media/mux-video/hls-js 139.96 kB
/media/mux-video/spf 26.70 kB
/media/mux-audio/hls-js 139.85 kB
/media/mux-audio/spf 20.98 kB
/media/background-video 394 B
/media/dash-video 210.24 kB
/media/google-cast 5.33 kB
/media/hls-audio 20.16 kB
/media/hls-background-video 15.24 kB
/media/hls-video 25.69 kB
/media/hlsjs-video 138.86 kB
/media/moq-publish-video 22.07 kB
/media/mux-audio 139.75 kB
/media/mux-background-video 15.27 kB
/media/mux-data 25.46 kB
/media/mux-video 139.97 kB
/media/native-hls-video 5.74 kB
/media/vimeo-video 11.14 kB
/media/youtube-video 4.85 kB
Players (5)
Entry Initial
/video/player 7.15 kB
/audio/player 4.01 kB
/background/player 2.28 kB
/live-video/player 6.53 kB
/live-audio/player 4.03 kB
Skins (29)
Entry Type Initial Lazy
/video/minimal-skin.css css 6.18 kB —
/video/skin.css css 6.05 kB —
/video/minimal-skin js 45.83 kB 68.34 kB
/video/minimal-skin.tailwind js 52.46 kB 68.34 kB
/video/skin js 45.80 kB 68.34 kB
/video/skin.tailwind js 52.34 kB 68.34 kB
/audio/minimal-skin.css css 4.47 kB —
/audio/skin.css css 4.40 kB —
/audio/minimal-skin js 35.41 kB 68.34 kB
/audio/minimal-skin.tailwind js 40.30 kB 68.34 kB
/audio/skin js 35.40 kB 68.34 kB
/audio/skin.tailwind js 40.29 kB 68.34 kB
/background/skin.css css 90 B —
/background/skin js 273 B —
/live-video/minimal-skin.css css 6.18 kB —
/live-video/skin.css css 6.05 kB —
/live-video/minimal-skin js 37.98 kB 68.34 kB
/live-video/minimal-skin.tailwind js 44.33 kB 68.34 kB
/live-video/skin js 38.07 kB 68.34 kB
/live-video/skin.tailwind js 44.36 kB 68.34 kB
/live-audio/minimal-skin.css css 4.47 kB —
/live-audio/skin.css css 4.40 kB —
/live-audio/minimal-skin js 27.88 kB 68.34 kB
/live-audio/minimal-skin.tailwind js 31.66 kB 68.34 kB
/live-audio/skin js 27.96 kB 68.34 kB
/live-audio/skin.tailwind js 31.79 kB 68.34 kB
/publisher/skin.css css 4.67 kB —
/publisher/skin js 28.78 kB 68.34 kB
/publisher/skin.tailwind js 33.44 kB 68.34 kB
UI Components (47)
Entry Initial Lazy
/ui/airplay-button 10.88 kB 68.34 kB
/ui/alert-dialog 3.32 kB —
/ui/audio-track 8.50 kB 68.34 kB
/ui/audio-track-radio-group 9.65 kB 68.34 kB
/ui/buffering-indicator 8.07 kB —
/ui/camera-button 11.04 kB 68.34 kB
/ui/camera-radio-group 8.50 kB 68.34 kB
/ui/captions-button 10.87 kB 68.34 kB
/ui/captions-radio-group 9.77 kB 68.34 kB
/ui/capture-placeholder 9.06 kB 68.34 kB
/ui/cast-button 10.87 kB 68.34 kB
/ui/connection-indicator 8.99 kB 68.34 kB
/ui/controls 7.81 kB —
/ui/enable-devices-button 11.11 kB 68.34 kB
/ui/error-dialog 10.92 kB 68.34 kB
/ui/fullscreen-button 10.84 kB 68.34 kB
/ui/gesture 8.17 kB —
/ui/hotkey 8.65 kB —
/ui/live-button 9.28 kB 68.34 kB
/ui/menu 18.21 kB —
/ui/mic-button 11.04 kB 68.34 kB
/ui/mic-radio-group 8.51 kB 68.34 kB
/ui/mute-button 10.83 kB 68.34 kB
/ui/pip-button 10.84 kB 68.34 kB
/ui/play-button 10.81 kB 68.34 kB
/ui/playback-rate 8.56 kB 68.34 kB
/ui/playback-rate-button 10.80 kB 68.34 kB
/ui/playback-rate-radio-group 9.70 kB 68.34 kB
/ui/popover 7.81 kB —
/ui/poster 7.69 kB —
/ui/publish-badge 9.04 kB 68.34 kB
/ui/publish-button 9.54 kB 68.34 kB
/ui/publish-timer 9.61 kB 68.34 kB
/ui/quality 8.99 kB 68.34 kB
/ui/quality-radio-group 10.15 kB 68.34 kB
/ui/screen-share-button 11.04 kB 68.34 kB
/ui/seek-button 10.85 kB 68.34 kB
/ui/seek-indicator 12.14 kB —
/ui/slider 12.95 kB 68.34 kB
/ui/status-announcer 10.59 kB 68.34 kB
/ui/status-indicator 12.66 kB 68.34 kB
/ui/thumbnail 8.97 kB —
/ui/time 10.33 kB 68.34 kB
/ui/time-slider 14.53 kB 68.34 kB
/ui/tooltip 8.54 kB —
/ui/volume-indicator 12.76 kB 68.34 kB
/ui/volume-slider 12.36 kB 68.34 kB
🧩 @videojs/core — 2 small size changes
Path Base initial PR initial Initial diff Lazy diff
. 14.08 kB 14.09 kB +7 B (+0.0%) —
/dom 20.84 kB 20.94 kB +97 B (+0.5%) —
Entries (77)
Entry Initial Lazy
. 14.09 kB —
/dom 20.94 kB —
/components 927 B —
/i18n 3.41 kB 68.34 kB
/i18n/locales/all 35.47 kB —
/i18n/locales/ar 1.45 kB —
/i18n/locales/az 1.31 kB —
/i18n/locales/bg 1.53 kB —
/i18n/locales/bn 1.52 kB —
/i18n/locales/bs 1.23 kB —
/i18n/locales/ca 1.29 kB —
/i18n/locales/cs 1.29 kB —
/i18n/locales/cy 1.24 kB —
/i18n/locales/da 1.20 kB —
/i18n/locales/de 1.31 kB —
/i18n/locales/el 1.74 kB —
/i18n/locales/en 993 B —
/i18n/locales/es 1.21 kB —
/i18n/locales/et 1.27 kB —
/i18n/locales/eu 1.24 kB —
/i18n/locales/fa 1.45 kB —
/i18n/locales/fi 1.26 kB —
/i18n/locales/fr 1.29 kB —
/i18n/locales/gd 1.32 kB —
/i18n/locales/gl 1.21 kB —
/i18n/locales/he 1.37 kB —
/i18n/locales/hi 1.54 kB —
/i18n/locales/hr 1.25 kB —
/i18n/locales/hu 1.31 kB —
/i18n/locales/id 1.11 kB —
/i18n/locales/it 1.22 kB —
/i18n/locales/ja 1.41 kB —
/i18n/locales/ko 1.36 kB —
/i18n/locales/lt 1.24 kB —
/i18n/locales/lv 1.30 kB —
/i18n/locales/mr 1.54 kB —
/i18n/locales/nb 1.18 kB —
/i18n/locales/ne 1.52 kB —
/i18n/locales/nl 1.22 kB —
/i18n/locales/nn 1.18 kB —
/i18n/locales/oc 1.29 kB —
/i18n/locales/pl 1.36 kB —
/i18n/locales/pt 1.25 kB —
/i18n/locales/pt-BR 1.25 kB —
/i18n/locales/pt-PT 1.23 kB —
/i18n/locales/ro 1.28 kB —
/i18n/locales/ru 1.63 kB —
/i18n/locales/sk 1.32 kB —
/i18n/locales/sl 1.26 kB —
/i18n/locales/sr 1.29 kB —
/i18n/locales/sv 1.22 kB —
/i18n/locales/te 1.55 kB —
/i18n/locales/th 1.53 kB —
/i18n/locales/tr 1.30 kB —
/i18n/locales/uk 1.64 kB —
/i18n/locales/vi 1.32 kB —
/i18n/locales/zh 1.23 kB —
/i18n/locales/zh-CN 1.23 kB —
/i18n/locales/zh-TW 1.24 kB —
/i18n/text/airplay 101 B —
/i18n/text/buttons 137 B —
/i18n/text/captions 93 B —
/i18n/text/cast 114 B —
/i18n/text/common 90 B —
/i18n/text/container 75 B —
/i18n/text/errors 285 B —
/i18n/text/fullscreen 98 B —
/i18n/text/live 126 B —
/i18n/text/menu 249 B —
/i18n/text/pip 101 B —
/i18n/text/playback 80 B —
/i18n/text/publish 451 B —
/i18n/text/seek 105 B —
/i18n/text/slider 65 B —
/i18n/text/status 222 B —
/i18n/text/time 280 B —
/i18n/text/volume 133 B —
🏷️ @videojs/element — no changes
Entries (2)
Entry Initial
. 996 B
/context 943 B
📦 @videojs/store — no changes
Entries (3)
Entry Initial
. 1.72 kB
/html 703 B
/react 365 B
🔧 @videojs/utils — no changes
Entries (13)
Entry Initial
/array 271 B
/dom 4.49 kB
/events 320 B
/function 369 B
/i18n 44 B
/jwt 176 B
/object 535 B
/predicate 297 B
/percent 281 B
/string 239 B
/style 188 B
/time 1.01 kB
/number 199 B
📦 @videojs/jsx — no changes
Entries (3)
Entry Initial
. 393 B
/jsx-runtime 371 B
/jsx-dev-runtime 375 B
📦 @videojs/media — no changes
Entries (15)
Entry Initial
. 1.15 kB
/dom 121 B
/dom/audio-host 1.10 kB
/dom/custom-media-element 2.09 kB
/dom/dash 209.84 kB
/dom/google-cast 4.06 kB
/dom/hls-js 138.53 kB
/dom/media-host 1.20 kB
/dom/media-played-ranges 576 B
/dom/mux 161.78 kB
/dom/native-hls 5.26 kB
/dom/video-host 1.39 kB
/dom/vimeo 10.54 kB
/dom/youtube 4.23 kB
/media-tracks 2.05 kB
📦 @videojs/spf — no changes
Entries (13)
Entry Initial
. 4.53 kB
/dom 6.58 kB
/hls 21.06 kB
/media-tracks 604 B
/moq 26.59 kB
/moq-publish 20.34 kB
/moq-publish-video 21.57 kB
/hls-background-video 14.76 kB
/hls-audio 19.67 kB
/hls-video 25.23 kB
/mux-audio 20.49 kB
/mux-background-video 14.76 kB
/mux-video 26.12 kB

ℹ️ How to interpret

Each 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 pnpm size locally to check current initial sizes.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ff234b2d25

ℹ️ 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".

* a beat.
*/
export function aggregateCaptureState(source: AggregatableCaptureSource): MediaCaptureState {
const micState = source.micActive ? source.micState : 'idle';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve mic terminal states after intent consumption

When an audio-only microphone request is denied or its track ends, runCaptureAcquisition sets micState to denied/ended and immediately consumes micActive by setting it to false. This conditional therefore replaces the terminal state with idle, so CapturePlaceholder never shows the permission-denied guidance for a failed mic-only request and instead exposes the camera-oriented enable-devices CTA. Track whether the mic state originated from explicit intent, or otherwise preserve terminal mic states after the intent is consumed rather than gating every state on the current boolean.

Useful? React with 👍 / 👎.

@cubic-dev-ai cubic-dev-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.

No issues found across 20 files

Re-trigger cubic

mmcc added 2 commits August 18, 2026 04:34
The acquire pipeline consumes micActive on denied/ended while parking
micState there so UIs can say why capture stopped — gating the whole mic
contribution on the intent erased that residue, so a mic-only permission
denial showed the enable-devices CTA instead of the blocked guidance.
Only the mic's in-flight states stay gated on explicit intent; terminal
states can never enable a publish control anyway. Flagged by the Codex
CLI review.
…eline

The widened MediaCaptureSourceCapability made FakePublishMedia's
implements clause fail (TS2420). Run micActive as a third, audio-only
pipeline mirroring the camera's shape — token-cancelled acquisition,
intent consumption on denied/ended, device re-keying, mute wiring — and
accept an explicit active mic as the publish() precondition, so ?fake
mode can drive a mic-only session. Flagged by the Codex CLI review.

@cubic-dev-ai cubic-dev-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.

All reported issues were addressed across 7 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

mmcc added 2 commits August 18, 2026 04:45
…ance

A terminal micState does not prove the mic was explicitly requested:
the pipeline also parks denied/ended for a video-implied mic, so
counting every terminal residue let a camera-granted, mic-denied page
claim blocked permissions after the camera was released. The
captureSource feature now latches micExplicit — set while micActive
reads true, carried across intent consumption only while the state
stays parked terminal, reset when a new implied lifecycle starts — and
the aggregation counts the mic solely on that claim. Flagged by the
Codex CLI review.
A mic-only session sampled ~30 fps and 2.5 Mbps of nonexistent video;
the stats contract uses NaN for absent metrics. Derive each sample from
the live streams so audio-only sessions report NaN video metrics and a
video source joining mid-session starts counting. Flagged by the Codex
CLI review.

@cubic-dev-ai cubic-dev-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.

1 issue found across 17 files (changes from recent commits).

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="packages/react/src/ui/publish-button/tests/publish-button.test.tsx">

<violation number="1" location="packages/react/src/ui/publish-button/tests/publish-button.test.tsx:27">
P2: The "stays disabled on an implied mic without explicit intent" test can never represent an implied mic, because the mock couples `micActive: micExplicit`, so an implied mic (mic active but not explicitly requested) is unconstructable. `aggregateCaptureState` gates solely on `micExplicit`/`micState` and ignores `micActive`, so this test currently passes whether the rule keys on `micExplicit` or regresses to `micActive`: with `micActive` forced equal to `micExplicit`, both branches stay disabled. It therefore provides no regression protection for the implied-mic scenario the test name claims to cover. Decouple the fields so the implied case (micActive true, micExplicit false) can actually be set up.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

// `captureSource` feature slice
cameraActive: captureState === 'active',
screenShareActive: false,
micActive: micExplicit,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: The "stays disabled on an implied mic without explicit intent" test can never represent an implied mic, because the mock couples micActive: micExplicit, so an implied mic (mic active but not explicitly requested) is unconstructable. aggregateCaptureState gates solely on micExplicit/micState and ignores micActive, so this test currently passes whether the rule keys on micExplicit or regresses to micActive: with micActive forced equal to micExplicit, both branches stay disabled. It therefore provides no regression protection for the implied-mic scenario the test name claims to cover. Decouple the fields so the implied case (micActive true, micExplicit false) can actually be set up.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/react/src/ui/publish-button/tests/publish-button.test.tsx, line 27:

<comment>The "stays disabled on an implied mic without explicit intent" test can never represent an implied mic, because the mock couples `micActive: micExplicit`, so an implied mic (mic active but not explicitly requested) is unconstructable. `aggregateCaptureState` gates solely on `micExplicit`/`micState` and ignores `micActive`, so this test currently passes whether the rule keys on `micExplicit` or regresses to `micActive`: with `micActive` forced equal to `micExplicit`, both branches stay disabled. It therefore provides no regression protection for the implied-mic scenario the test name claims to cover. Decouple the fields so the implied case (micActive true, micExplicit false) can actually be set up.</comment>

<file context>
@@ -24,7 +24,8 @@ function createWrapper({
     cameraActive: captureState === 'active',
     screenShareActive: false,
-    micActive,
+    micActive: micExplicit,
+    micExplicit,
     cameraState: captureState,
</file context>

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Partly disagree on the reasoning, agree on the remedy. An implied mic has micActive false (video intent drives the pipeline; the slot was never written), so the implied scenario was constructible — micActive true + micExplicit false is unreachable by the store latch. But coupling the knobs did misrepresent other states (a consumed-intent denial showed micActive true) and weakened the fixtures. Fixed in 316343d: micActive and micExplicit are independent parameters with honest per-scenario values in the html and react publish-button and capture-placeholder fixtures.

isMediaCaptureSourceCapable deliberately admits hosts from before the
audio-only generation, so a required micActive made that public guard
unsound: narrowed code could assign the slot on a legacy host and
create an inert expando instead of starting capture. Declare the
generational truth in the type — writers check presence, as the store
feature's toggleMic already does — and document the latch's
attach-boundary limitation. Flagged by the Codex CLI review.

@cubic-dev-ai cubic-dev-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.

All reported issues were addressed across 3 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

@mmcc

mmcc commented Aug 18, 2026

Copy link
Copy Markdown
Owner Author

Ran the Codex CLI review against the branch (three rounds until clean). Fixes landed for each verified finding:

  • 401930bf1 — the aggregation erased a mic-only denial: the acquire pipeline consumes micActive on denied/ended while parking micState, so gating the whole mic contribution on the intent hid the blocked-permission guidance.
  • 760d1ce2f — the widened capability broke the sandbox's tracked FakePublishMedia (TS2420, not covered by root typecheck); it now runs a real audio-only mic pipeline so ?fake mode can drive a mic-only session.
  • da733a5a8 (core) — counting every terminal mic residue misclassified an implied-mic denial as explicit (camera granted → implied mic denied → camera released showed "access blocked"). The captureSource feature now latches micExplicit provenance across intent consumption and the aggregation keys on that.
  • da733a5a8 (sandbox) — mic-only fake sessions reported nonexistent video stats; samples are now source-aware (NaN for absent metrics per the contract).
  • a086cc43d — micActive is optional on MediaCaptureSourceCapability: the public predicate deliberately admits pre-audio-only hosts, so a required slot made the narrowing unsound for writers.

One finding intentionally deferred: an explicit mic attempt whose terminal outcome lands before the store feature attaches (React mount + persisted instant denial) reads as implied on the first sync, showing the CTA instead of denied guidance until the user retries. Exact provenance needs the host to persist it (engine/adapter-level micExplicit); noted in the latch's code comment as the follow-up seam.

Final Codex verdict: "The explicit microphone intent is consistently propagated through the media contract, store, capture aggregation, and HTML/React publish controls. … no actionable regressions were identified."

🤖 Generated with Claude Code

mmcc added 2 commits August 18, 2026 05:07
Merged video audio can hold the derived micState at 'active' across
explicit mic pipeline transitions, so the unconditional dispatches fired
capturestatechange with nothing changed. Route every mic mutation
through a before/after guard, mirroring #setCaptureState's dedupe for
the video pipelines. Flagged by Cubic on the PR.
…y predicate case

Coupling micActive to micExplicit in the publish-button and placeholder
fixtures made states like a consumed-intent denial unrepresentable;
give each knob its own value per scenario. The new capture predicate
test also duplicated the released-capture case's input — exercise the
actual in-between generation instead (mic lifecycle present, intent
slot absent). Flagged by Cubic on the PR.
@mmcc
mmcc merged commit e5d9aef into mmcc/moq-publisher Aug 18, 2026
25 checks passed
@mmcc
mmcc deleted the mmcc/moq-mic-intent branch August 18, 2026 05:24
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.

1 participant