Skip to content

fix(spf): preserve effect order across composition teardown - #1

Closed
a-bro wants to merge 1 commit into
fix/moq-relayed-joinfrom
codex/spf-effect-lifecycle-order
Closed

a-bro wants to merge 1 commit into
fix/moq-relayed-joinfrom
codex/spf-effect-lifecycle-order

Conversation

@a-bro

@a-bro a-bro commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Superseded by mmcc#65, evaluated against current mmcc/moq-publisher. Its source tree matches this tested fix; both regressions reproduce on the current base, and the patched core suite passes 141/141.

Replacing a MoQ player in the same page can leave its new renderer idle while its subscriber receives decodable frames. Destroying the old composition calls Watcher.unwatch(), which swaps the last watched effect into the removed slot and can run the new renderer binding before its setup. The binding then returns without subscribing to either actor slot.

Keep live effects in registration order independently of the watcher’s storage order. Removing an effect also removes it from the flush iteration, so disposal by an earlier effect cannot run the disposed body again.

Validation: both new regressions fail on the unchanged scheduler. The full SPF suite passes: 2,732 passed, 11 existing skips, no type errors. With the unchanged scheduler, the same suite fails only the two new regression tests (2 failed, 2,730 passed). The player dependency build and focused formatting/lint checks pass. The live workflow gate passes 11/11, including same-page player replacement, automatic gateway credential renewal, rebind on the new gateway epoch, and worker retirement after closing the viewer.

The live reproduction uses normal H.264 browser publication, a demand-gated operator, MSF catalog decoder initialization, and MoQ20 over certificate-pinned WebTransport/QUIC. No transport mock or vendored bundle patch is involved.

@github-actions

Copy link
Copy Markdown

📦 Bundle Size Report

🎨 @videojs/html — 6 small size changes
Path Base initial PR initial Initial diff Lazy diff
/media/hls-audio 23.58 kB 23.59 kB +7 B (+0.0%) —
/media/hls-background-video 17.44 kB 17.43 kB -7 B (-0.0%) —
/media/hls-video 33.87 kB 33.91 kB +48 B (+0.1%) —
/media/moq-publish-video 25.33 kB 25.37 kB +40 B (+0.2%) —
/media/mux-background-video 17.42 kB 17.51 kB +97 B (+0.5%) —
/media/simple-moq-video 28.99 kB 28.94 kB -48 B (-0.2%) —
Presets (7)
Entry Initial Lazy
/video (default) 65.38 kB 67.46 kB
/video (default + hls) 67.10 kB 67.46 kB
/video (minimal) 65.87 kB 67.46 kB
/video (minimal + hls) 67.69 kB 67.46 kB
/audio (default) 49.09 kB 67.46 kB
/audio (minimal) 49.29 kB 67.46 kB
/background 12.62 kB 67.46 kB
Media (20)
Entry Initial
/media/mux-video 3.02 kB
/media/mux-audio 2.68 kB
/media/background-video 1.16 kB
/media/cloudflare-video 2.90 kB
/media/dash-video 2.63 kB
/media/hls-audio 23.59 kB
/media/hls-background-video 17.43 kB
/media/hls-video 33.91 kB
/media/hlsjs-video 2.63 kB
/media/moq-publish-video 25.37 kB
/media/mux-background-video 17.51 kB
/media/native-hls-video 7.68 kB
/media/shaka-video 2.63 kB
/media/simple-moq-video 28.94 kB
/media/spotify-audio 3.02 kB
/media/tiktok-video 3.12 kB
/media/twitch-video 2.93 kB
/media/vimeo-video 2.90 kB
/media/wistia-video 607 B
/media/youtube-video 2.90 kB
Players (6)
Entry Initial Lazy
/video/player 9.97 kB 67.46 kB
/audio/player 6.14 kB 67.46 kB
/background/player 4.46 kB 67.46 kB
/live-video/player 9.34 kB 67.46 kB
/live-audio/player 6.16 kB 67.46 kB
/publisher/player 6.97 kB 67.46 kB
Skins (32)
Entry Type Initial Lazy
/video/minimal-skin.css css 8.29 kB —
/video/skin.css css 8.01 kB —
/video/minimal-skin js 64.30 kB 67.46 kB
/video/minimal-skin2 js 8.28 kB —
/video/skin js 63.98 kB 67.46 kB
/video/skin2 js 7.99 kB —
/audio/minimal-skin.css css 6.07 kB —
/audio/skin.css css 5.80 kB —
/audio/minimal-skin js 47.86 kB 67.46 kB
/audio/minimal-skin2 js 6.05 kB —
/audio/skin js 47.52 kB 67.46 kB
/audio/skin2 js 5.78 kB —
/background/skin.css css 141 B —
/background/skin js 10.88 kB 67.46 kB
/background/skin2 js 159 B —
/live-video/minimal-skin.css css 6.78 kB —
/live-video/skin.css css 6.69 kB —
/live-video/minimal-skin js 51.64 kB 67.46 kB
/live-video/minimal-skin2 js 6.78 kB —
/live-video/skin js 51.56 kB 67.46 kB
/live-video/skin2 js 6.68 kB —
/live-audio/minimal-skin.css css 4.78 kB —
/live-audio/skin.css css 4.68 kB —
/live-audio/minimal-skin js 37.02 kB 67.46 kB
/live-audio/minimal-skin2 js 4.77 kB —
/live-audio/skin js 36.88 kB 67.46 kB
/live-audio/skin2 js 4.66 kB —
/publisher/skin.css css 5.38 kB —
/publisher/skin js 45.03 kB 67.46 kB
/publisher/skin2 js 5.39 kB —
/global.css css 250 B —
/shadow.css css 78 B —
UI Components (73)
Entry Initial Lazy
/ui/airplay-button 12.29 kB 67.46 kB
/ui/alert-dialog 8.98 kB 67.46 kB
/ui/audio-track-radio-group 12.40 kB 67.46 kB
/ui/buffering-indicator 9.62 kB 67.46 kB
/ui/camera-button 12.44 kB 67.46 kB
/ui/camera-radio-group 12.53 kB 67.46 kB
/ui/captions-button 12.54 kB 67.46 kB
/ui/captions-radio-group 12.46 kB 67.46 kB
/ui/capture-placeholder 10.62 kB 67.46 kB
/ui/cast-button 12.27 kB 67.46 kB
/ui/connection-indicator 10.50 kB 67.46 kB
/ui/container 10.48 kB 67.46 kB
/ui/controls 9.79 kB 67.46 kB
/ui/controls-backdrop 1.69 kB 67.46 kB
/ui/controls-content 1.67 kB 67.46 kB
/ui/dialog 8.92 kB 67.46 kB
/ui/dialog-backdrop 1.70 kB 67.46 kB
/ui/dialog-close 2.06 kB 67.46 kB
/ui/dialog-description 1.69 kB 67.46 kB
/ui/dialog-popup 1.90 kB 67.46 kB
/ui/dialog-title 1.69 kB 67.46 kB
/ui/enable-devices-button 12.49 kB 67.46 kB
/ui/error-dialog 13.41 kB 67.46 kB
/ui/fullscreen-button 12.29 kB 67.46 kB
/ui/gesture 10.72 kB 67.46 kB
/ui/hotkey 11.15 kB 67.46 kB
/ui/live-button 10.78 kB 67.46 kB
/ui/menu 19.98 kB 67.46 kB
/ui/menu-checkbox-item 1.97 kB 67.46 kB
/ui/menu-content 7.65 kB 67.46 kB
/ui/menu-group 2.09 kB 67.46 kB
/ui/menu-group-label 1.64 kB —
/ui/menu-item 2.29 kB 67.46 kB
/ui/menu-item-indicator 1.38 kB 67.46 kB
/ui/menu-radio-group 3.02 kB 67.46 kB
/ui/menu-radio-item 2.14 kB 67.46 kB
/ui/menu-separator 1.30 kB 67.46 kB
/ui/mic-button 12.43 kB 67.46 kB
/ui/mic-radio-group 12.54 kB 67.46 kB
/ui/mute-button 12.30 kB 67.46 kB
/ui/pip-button 12.25 kB 67.46 kB
/ui/play-button 12.22 kB 67.46 kB
/ui/playback-rate-button 12.33 kB 67.46 kB
/ui/playback-rate-radio-group 12.40 kB 67.46 kB
/ui/popover 8.77 kB 67.46 kB
/ui/poster 9.91 kB 67.46 kB
/ui/publish-badge 10.60 kB 67.46 kB
/ui/publish-button 11.00 kB 67.46 kB
/ui/publish-timer 11.19 kB 67.46 kB
/ui/quality-radio-group 12.92 kB 67.46 kB
/ui/screen-share-button 12.45 kB 67.46 kB
/ui/seek-button 12.28 kB 67.46 kB
/ui/seek-indicator 13.71 kB 67.46 kB
/ui/seek-indicator-value 1.10 kB —
/ui/slider 12.64 kB 67.46 kB
/ui/slider-preview 2.01 kB 67.46 kB
/ui/status-announcer 11.66 kB 67.46 kB
/ui/status-indicator 14.07 kB 67.46 kB
/ui/status-indicator-value 1.10 kB —
/ui/thumbnail 11.35 kB 67.46 kB
/ui/time 12.06 kB 67.46 kB
/ui/time-slider 14.19 kB 67.46 kB
/ui/time-slider-chapter-title 9.82 kB 67.46 kB
/ui/time-slider-chapters 10.66 kB 67.46 kB
/ui/title 9.21 kB 67.46 kB
/ui/tooltip 10.12 kB 67.46 kB
/ui/tooltip-label 1.21 kB —
/ui/tooltip-shortcut 1.18 kB —
/ui/volume-indicator 14.01 kB 67.46 kB
/ui/volume-indicator-fill 1.11 kB —
/ui/volume-indicator-value 1.10 kB —
/ui/volume-popover 15.95 kB 67.46 kB
/ui/volume-slider 13.33 kB 67.46 kB
⚛️ @videojs/react — 5 small size changes
Path Base initial PR initial Initial diff Lazy diff
/media/hls-audio 22.27 kB 22.29 kB +20 B (+0.1%) —
/media/hls-background-video 17.48 kB 17.52 kB +35 B (+0.2%) —
/media/hls-video 32.63 kB 32.63 kB +1 B (+0.0%) —
/media/moq-publish-video 24.00 kB 23.94 kB -58 B (-0.2%) —
/media/mux-background-video 17.48 kB 17.51 kB +35 B (+0.2%) —
Presets (7)
Entry Initial Lazy
/video (default) 59.63 kB 67.46 kB
/video (default + hls) 60.18 kB 67.46 kB
/video (minimal) 59.73 kB 67.46 kB
/video (minimal + hls) 60.30 kB 67.46 kB
/audio (default) 46.39 kB 67.46 kB
/audio (minimal) 46.45 kB 67.46 kB
/background 908 B 67.46 kB
Media (23)
Entry Initial
/media/mux-video/hls-js 1.45 kB
/media/mux-video/spf 1.46 kB
/media/mux-audio/hls-js 1.12 kB
/media/mux-audio/spf 1.13 kB
/media/background-video 513 B
/media/cloudflare-video 1.81 kB
/media/dash-video 1.11 kB
/media/hls-audio 22.29 kB
/media/hls-background-video 17.52 kB
/media/hls-video 32.63 kB
/media/hlsjs-video 1.12 kB
/media/moq-publish-video 23.94 kB
/media/mux-audio 1.12 kB
/media/mux-background-video 17.51 kB
/media/mux-video 1.44 kB
/media/native-hls-video 6.32 kB
/media/shaka-video 1.11 kB
/media/spotify-audio 1.89 kB
/media/tiktok-video 1.81 kB
/media/twitch-video 1.84 kB
/media/vimeo-video 1.79 kB
/media/wistia-video 1.41 kB
/media/youtube-video 1.79 kB
Extensions (2)
Entry Initial
/extensions/google-cast 1.77 kB
/extensions/mux-data 1.80 kB
Players (5)
Entry Initial Lazy
/video/player 8.23 kB 67.46 kB
/audio/player 4.39 kB 67.46 kB
/background/player 2.64 kB 67.46 kB
/live-video/player 7.59 kB 67.46 kB
/live-audio/player 4.40 kB 67.46 kB
Skins (20)
Entry Type Initial Lazy
/video/minimal-skin.css css 8.12 kB —
/video/skin.css css 7.81 kB —
/video/minimal-skin js 59.61 kB 67.46 kB
/video/skin js 59.51 kB 67.46 kB
/audio/minimal-skin.css css 5.88 kB —
/audio/skin.css css 5.60 kB —
/audio/minimal-skin js 46.37 kB 67.46 kB
/audio/skin js 46.34 kB 67.46 kB
/background/skin.css css 97 B —
/background/skin js 514 B —
/live-video/minimal-skin.css css 6.60 kB —
/live-video/skin.css css 6.51 kB —
/live-video/minimal-skin js 49.43 kB 67.46 kB
/live-video/skin js 49.55 kB 67.46 kB
/live-audio/minimal-skin.css css 4.58 kB —
/live-audio/skin.css css 4.47 kB —
/live-audio/minimal-skin js 34.64 kB 67.46 kB
/live-audio/skin js 34.64 kB 67.46 kB
/publisher/skin.css css 5.19 kB —
/publisher/skin js 37.34 kB 67.46 kB
UI Components (50)
Entry Initial Lazy
/ui/airplay-button 12.01 kB 67.46 kB
/ui/alert-dialog 5.20 kB 67.46 kB
/ui/audio-track 9.13 kB 67.46 kB
/ui/audio-track-radio-group 11.57 kB 67.46 kB
/ui/buffering-indicator 9.18 kB 67.46 kB
/ui/camera-button 12.16 kB 67.46 kB
/ui/camera-radio-group 11.49 kB 67.46 kB
/ui/captions-button 11.98 kB 67.46 kB
/ui/captions-radio-group 11.68 kB 67.46 kB
/ui/capture-placeholder 9.93 kB 67.46 kB
/ui/cast-button 12.00 kB 67.46 kB
/ui/connection-indicator 9.87 kB 67.46 kB
/ui/controls 9.06 kB 67.46 kB
/ui/dialog 5.20 kB 67.46 kB
/ui/enable-devices-button 12.24 kB 67.46 kB
/ui/error-dialog 13.40 kB 67.46 kB
/ui/fullscreen-button 11.96 kB 67.46 kB
/ui/gesture 9.35 kB 67.46 kB
/ui/hotkey 9.78 kB 67.46 kB
/ui/live-button 10.32 kB 67.46 kB
/ui/menu 22.80 kB 67.46 kB
/ui/mic-button 12.16 kB 67.46 kB
/ui/mic-radio-group 11.49 kB 67.46 kB
/ui/mute-button 12.02 kB 67.46 kB
/ui/pip-button 11.97 kB 67.46 kB
/ui/play-button 11.94 kB 67.46 kB
/ui/playback-rate 9.20 kB 67.46 kB
/ui/playback-rate-button 11.92 kB 67.46 kB
/ui/playback-rate-radio-group 11.62 kB 67.46 kB
/ui/popover 9.12 kB 67.46 kB
/ui/poster 9.39 kB 67.46 kB
/ui/publish-badge 9.91 kB 67.46 kB
/ui/publish-button 10.53 kB 67.46 kB
/ui/publish-timer 10.50 kB 67.46 kB
/ui/quality 9.56 kB 67.46 kB
/ui/quality-radio-group 11.98 kB 67.46 kB
/ui/screen-share-button 12.18 kB 67.46 kB
/ui/seek-button 11.96 kB 67.46 kB
/ui/seek-indicator 13.69 kB 67.46 kB
/ui/slider 15.13 kB 67.46 kB
/ui/status-announcer 11.59 kB 67.46 kB
/ui/status-indicator 14.13 kB 67.46 kB
/ui/thumbnail 10.57 kB 67.46 kB
/ui/time 11.40 kB 67.46 kB
/ui/time-slider 16.94 kB 67.46 kB
/ui/title 8.64 kB 67.46 kB
/ui/tooltip 9.98 kB 67.46 kB
/ui/volume-indicator 14.17 kB 67.46 kB
/ui/volume-popover 16.32 kB 67.46 kB
/ui/volume-slider 13.79 kB 67.46 kB
🧩 @videojs/core — no changes
Entries (77)
Entry Initial Lazy
. 14.76 kB —
/dom 24.40 kB 67.46 kB
/vjsc 2.23 kB —
/i18n 3.42 kB 67.46 kB
/i18n/locales/all 34.29 kB —
/i18n/locales/ar 1.39 kB —
/i18n/locales/az 1.29 kB —
/i18n/locales/bg 1.54 kB —
/i18n/locales/bn 1.49 kB —
/i18n/locales/bs 1.24 kB —
/i18n/locales/ca 1.26 kB —
/i18n/locales/cs 1.32 kB —
/i18n/locales/cy 1.24 kB —
/i18n/locales/da 1.17 kB —
/i18n/locales/de 1.28 kB —
/i18n/locales/el 1.65 kB —
/i18n/locales/en 1005 B —
/i18n/locales/es 1.19 kB —
/i18n/locales/et 1.24 kB —
/i18n/locales/eu 1.27 kB —
/i18n/locales/fa 1.43 kB —
/i18n/locales/fi 1.27 kB —
/i18n/locales/fr 1.23 kB —
/i18n/locales/gd 1.31 kB —
/i18n/locales/gl 1.21 kB —
/i18n/locales/he 1.33 kB —
/i18n/locales/hi 1.50 kB —
/i18n/locales/hr 1.27 kB —
/i18n/locales/hu 1.32 kB —
/i18n/locales/id 1.15 kB —
/i18n/locales/it 1.23 kB —
/i18n/locales/ja 1.39 kB —
/i18n/locales/ko 1.31 kB —
/i18n/locales/lt 1.26 kB —
/i18n/locales/lv 1.31 kB —
/i18n/locales/mr 1.48 kB —
/i18n/locales/nb 1.19 kB —
/i18n/locales/ne 1.46 kB —
/i18n/locales/nl 1.22 kB —
/i18n/locales/nn 1.18 kB —
/i18n/locales/oc 1.27 kB —
/i18n/locales/pl 1.33 kB —
/i18n/locales/pt 1.23 kB —
/i18n/locales/pt-BR 1.23 kB —
/i18n/locales/pt-PT 1.23 kB —
/i18n/locales/ro 1.26 kB —
/i18n/locales/ru 1.59 kB —
/i18n/locales/sk 1.32 kB —
/i18n/locales/sl 1.26 kB —
/i18n/locales/sr 1.28 kB —
/i18n/locales/sv 1.22 kB —
/i18n/locales/te 1.53 kB —
/i18n/locales/th 1.45 kB —
/i18n/locales/tr 1.22 kB —
/i18n/locales/uk 1.60 kB —
/i18n/locales/vi 1.33 kB —
/i18n/locales/zh 1.24 kB —
/i18n/locales/zh-CN 1.24 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 322 B —
/i18n/text/volume 133 B —
🏷️ @videojs/element — no changes
Entries (2)
Entry Initial
. 1.05 kB
/context 943 B
📦 @videojs/store — no changes
Entries (3)
Entry Initial
. 1.72 kB
/html 703 B
/react 511 B
🔧 @videojs/utils — no changes
Entries (13)
Entry Initial
/array 271 B
/dom 5.25 kB
/events 320 B
/function 414 B
/i18n 249 B
/jwt 176 B
/object 535 B
/predicate 297 B
/percent 281 B
/string 239 B
/style 212 B
/time 1018 B
/number 199 B
📦 @videojs/cdn — no changes
📦 @videojs/cloudflare-video — no changes
📦 @videojs/dash-video — no changes
📦 @videojs/google-cast — no changes
📦 @videojs/hlsjs-video — no changes
📦 @videojs/media — no changes
Entries (3)
Entry Initial
. 1.41 kB
/dom 4.12 kB
/media-tracks 2.05 kB
📦 @videojs/mux — no changes
📦 @videojs/mux-audio — 1 small size change
Path Base initial PR initial Initial diff Lazy diff
/spf 22.85 kB 22.82 kB -32 B (-0.1%) —
Entries (2)
Entry Initial
. 136.12 kB
/spf 22.82 kB
📦 @videojs/mux-data — no changes
📦 @videojs/mux-video — 1 small size change
Path Base initial PR initial Initial diff Lazy diff
/spf 33.01 kB 32.97 kB -39 B (-0.1%) —
Entries (2)
Entry Initial
. 136.12 kB
/spf 32.97 kB
📦 @videojs/native-hls-video — no changes
📦 @videojs/shaka-video — no changes
📦 @videojs/spf — 9 small size changes
Path Base initial PR initial Initial diff Lazy diff
. 4.55 kB 4.56 kB +11 B (+0.2%) —
/dom 7.67 kB 7.70 kB +21 B (+0.3%) —
/hls 28.21 kB 28.26 kB +49 B (+0.2%) —
/moq 27.50 kB 27.53 kB +31 B (+0.1%) —
/moq-publish 21.74 kB 21.79 kB +52 B (+0.2%) —
/moq-publish-video 22.97 kB 22.95 kB -17 B (-0.1%) —
/hls-background-video 16.47 kB 16.50 kB +31 B (+0.2%) —
/hls-audio 21.36 kB 21.36 kB +6 B (+0.0%) —
/hls-video 31.73 kB 31.74 kB +9 B (+0.0%) —
Entries (10)
Entry Initial
. 4.56 kB
/dom 7.70 kB
/hls 28.26 kB
/media-tracks 607 B
/moq 27.53 kB
/moq-publish 21.79 kB
/moq-publish-video 22.95 kB
/hls-background-video 16.50 kB
/hls-audio 21.36 kB
/hls-video 31.74 kB
📦 @videojs/spotify-audio — no changes
📦 @videojs/tiktok-video — no changes
📦 @videojs/twitch-video — no changes
📦 @videojs/other — 1 small size change
Path Base initial PR initial Initial diff Lazy diff
video.js 95.70 kB 95.80 kB +105 B (+0.1%) 0 B
Entries (3)
Entry Initial Lazy
video.js 95.80 kB 67.46 kB
video.js/package.json 608 B —
video.js/errors 1.03 kB —
📦 @videojs/vimeo-video — no changes
📦 @videojs/wistia-video — no changes
Entries (2)
Entry Initial
. 1.91 kB
/helpers 1.77 kB
📦 @videojs/youtube-video — no changes

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

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