Skip to content

fix: isolate preload mixin for hls delegate#1150

Merged
luwes merged 2 commits intomainfrom
preload-mixin
Mar 27, 2026
Merged

fix: isolate preload mixin for hls delegate#1150
luwes merged 2 commits intomainfrom
preload-mixin

Conversation

@luwes
Copy link
Copy Markdown
Collaborator

@luwes luwes commented Mar 27, 2026

Note

Medium Risk
Touches HLS load/preload behavior by refactoring when hls.js starts buffering and when the engine is (re)initialized, which can affect startup time and network usage. Scope is limited to the HLS delegate and keeps behavior largely equivalent but should be regression-tested across preload modes and native fallback.

Overview
Refactors the HLS delegate to move all preload/buffer-start logic into a new HlsMediaPreloadMixin, and composes it with the existing text-tracks mixin.

Reworks engine lifecycle into explicit initEngine() / destroyEngine() methods, and ensures that when hls.js isn’t used (unsupported, non-m3u8, or native preferred) the delegate still triggers a pending load via the native media element.

Written by Cursor Bugbot for commit 649d1c7. This will update automatically on new commits. Configure here.

@luwes luwes self-assigned this Mar 27, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 27, 2026

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit 649d1c7
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/69c6cd1cece95000085fa420
😎 Deploy Preview https://deploy-preview-1150--vjs10-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v10-sandbox Ready Ready Preview, Comment Mar 27, 2026 6:32pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 2026

📦 Bundle Size Report

🎨 @videojs/html — no changes
Presets (7)
Entry Size
/video (default) 23.67 kB
/video (default + hls) 154.60 kB
/video (minimal) 23.55 kB
/video (minimal + hls) 154.37 kB
/audio (default) 21.80 kB
/audio (minimal) 21.86 kB
/background 6.80 kB
Media (6)
Entry Size
/media/background-video 1.03 kB
/media/container 1.59 kB
/media/dash-video 236.18 kB
/media/hls-video 132.19 kB
/media/mux-video 154.90 kB
/media/simple-hls-video 12.63 kB
Players (3)
Entry Size
/video/player 6.52 kB
/audio/player 6.51 kB
/background/player 6.50 kB
Skins (16)
Entry Type Size
/video/minimal-skin.css css 3.25 kB
/video/skin.css css 3.31 kB
/video/minimal-skin js 22.73 kB
/video/minimal-skin.tailwind js 23.20 kB
/video/skin js 22.88 kB
/video/skin.tailwind js 23.13 kB
/audio/minimal-skin.css css 2.37 kB
/audio/skin.css css 2.37 kB
/audio/minimal-skin js 21.05 kB
/audio/minimal-skin.tailwind js 21.38 kB
/audio/skin js 21.01 kB
/audio/skin.tailwind js 21.34 kB
/background/skin.css css 117 B
/background/skin js 1.13 kB
/base.css css 157 B
/shared.css css 86 B
UI Components (21)
Entry Size
/ui/alert-dialog 1.89 kB
/ui/alert-dialog-close 1.72 kB
/ui/alert-dialog-description 1.61 kB
/ui/alert-dialog-title 1.61 kB
/ui/buffering-indicator 1.70 kB
/ui/captions-button 1.87 kB
/ui/controls 1.69 kB
/ui/fullscreen-button 1.90 kB
/ui/mute-button 1.94 kB
/ui/pip-button 1.87 kB
/ui/play-button 1.89 kB
/ui/playback-rate-button 1.92 kB
/ui/popover 2.58 kB
/ui/poster 1.59 kB
/ui/seek-button 1.87 kB
/ui/slider 2.10 kB
/ui/thumbnail 1.94 kB
/ui/time 1.70 kB
/ui/time-slider 2.16 kB
/ui/tooltip 2.15 kB
/ui/volume-slider 2.30 kB

Sizes are marginal over the root entry point.

⚛️ @videojs/react — no changes
Presets (7)
Entry Size
/video (default) 19.29 kB
/video (default + hls) 150.42 kB
/video (minimal) 19.30 kB
/video (minimal + hls) 150.29 kB
/audio (default) 16.10 kB
/audio (minimal) 16.16 kB
/background 3.13 kB
Media (5)
Entry Size
/media/background-video 476 B
/media/dash-video 236.27 kB
/media/hls-video 132.17 kB
/media/mux-video 154.83 kB
/media/simple-hls-video 12.61 kB
Skins (14)
Entry Type Size
/video/minimal-skin.css css 3.25 kB
/video/skin.css css 3.31 kB
/video/minimal-skin js 19.22 kB
/video/minimal-skin.tailwind js 22.45 kB
/video/skin js 19.20 kB
/video/skin.tailwind js 22.44 kB
/audio/minimal-skin.css css 2.37 kB
/audio/skin.css css 2.37 kB
/audio/minimal-skin js 16.06 kB
/audio/minimal-skin.tailwind js 18.48 kB
/audio/skin js 16.00 kB
/audio/skin.tailwind js 18.40 kB
/background/skin.css css 90 B
/background/skin js 272 B
UI Components (18)
Entry Size
/ui/alert-dialog 2.28 kB
/ui/buffering-indicator 1.89 kB
/ui/captions-button 2.30 kB
/ui/controls 1.88 kB
/ui/fullscreen-button 2.30 kB
/ui/mute-button 2.29 kB
/ui/pip-button 2.31 kB
/ui/play-button 2.35 kB
/ui/playback-rate-button 2.30 kB
/ui/popover 2.90 kB
/ui/poster 1.77 kB
/ui/seek-button 2.33 kB
/ui/slider 3.16 kB
/ui/thumbnail 2.07 kB
/ui/time 1.93 kB
/ui/time-slider 2.73 kB
/ui/tooltip 2.74 kB
/ui/volume-slider 2.65 kB

Sizes are marginal over the root entry point.

🧩 @videojs/core — no changes
Entries (7)
Entry Size
. 4.97 kB
/dom 8.74 kB
/dom/media/custom-media-element 1.81 kB
/dom/media/dash 235.71 kB
/dom/media/hls 131.72 kB
/dom/media/mux 154.40 kB
/dom/media/simple-hls 12.02 kB
🏷️ @videojs/element — no changes
Entries (2)
Entry Size
. 999 B
/context 943 B
📦 @videojs/store — no changes
Entries (3)
Entry Size
. 1.38 kB
/html 700 B
/react 360 B
🔧 @videojs/utils — no changes
Entries (10)
Entry Size
/array 104 B
/dom 1.25 kB
/events 319 B
/function 261 B
/object 119 B
/predicate 265 B
/string 148 B
/style 190 B
/time 478 B
/number 158 B
📦 @videojs/spf — no changes
Entries (3)
Entry Size
. 40 B
/dom 10.22 kB
/playback-engine 10.12 kB

ℹ️ How to interpret

All sizes are standalone totals (minified + brotli).

Icon Meaning
No change
🔺 Increased ≤ 10%
🔴 Increased > 10%
🔽 Decreased
🆕 New (no baseline)

Run pnpm size locally to check current sizes.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread packages/core/src/dom/media/hls/preload.ts
@luwes luwes merged commit a96aad7 into main Mar 27, 2026
21 checks passed
@luwes luwes deleted the preload-mixin branch March 27, 2026 19:02
@luwes luwes mentioned this pull request Mar 27, 2026
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