Skip to content

feat: add subtitles handling + captions core#692

Merged
luwes merged 8 commits intomainfrom
text-tracks
Mar 5, 2026
Merged

feat: add subtitles handling + captions core#692
luwes merged 8 commits intomainfrom
text-tracks

Conversation

@luwes
Copy link
Copy Markdown
Collaborator

@luwes luwes commented Mar 3, 2026

fix #687, #498, #498

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

netlify bot commented Mar 3, 2026

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit 328386e
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/69aa0bbb647c070008e7773b
😎 Deploy Preview https://deploy-preview-692--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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

📦 Bundle Size Report

Package Size Diff %
@videojs/core 11.56 kB +403 B █████░░░ +3.5% 🔺
@videojs/element 1.60 kB 0 B ░░░░░░░░ 0%
@videojs/html 29.96 kB +805 B ████░░░░ +2.7% 🔺
@videojs/icons 7.49 kB 0 B ░░░░░░░░ 0%
@videojs/react 16.71 kB +278 B ██░░░░░░ +1.7% 🔺
@videojs/store 1.97 kB 0 B ░░░░░░░░ 0%
@videojs/utils 2.97 kB +169 B ████████ +5.9% 🔺

Total: 72.26 kB · +1.62 kB · +2.3%


Entry Breakdown

Subpath sizes are the additional bytes on top of the root entry point, measured by bundling root + subpath together and subtracting the root-only size.

@videojs/core
Entry Base PR Diff %
. 4.63 kB 4.72 kB +93 B +2.0% 🔺
./dom 6.54 kB 6.84 kB +310 B +4.6% 🔺
total 11.17 kB 11.56 kB +403 B +3.5%
@videojs/element
Entry Base PR Diff %
. 817 B 817 B 0 B 0%
./context 823 B 823 B 0 B 0%
total 1.60 kB 1.60 kB 0 B 0%
@videojs/html
Entry Base PR Diff %
. 16.56 kB 16.96 kB +408 B +2.4% 🔺
./video 10.40 kB 10.60 kB +207 B +1.9% 🔺
./audio 1.17 kB 1.23 kB +63 B +5.3% 🔺
./background 1.05 kB 1.17 kB +127 B +11.9% 🔴
total 29.18 kB 29.96 kB +805 B +2.7%
@videojs/icons
Entry Base PR Diff %
./react 2.27 kB 2.27 kB 0 B 0%
./html 1.52 kB 1.52 kB 0 B 0%
./render 1.59 kB 1.59 kB 0 B 0%
./element 2.11 kB 2.11 kB 0 B 0%
total 7.49 kB 7.49 kB 0 B 0%
@videojs/store
Entry Base PR Diff %
. 1.32 kB 1.32 kB 0 B 0%
./html 465 B 465 B 0 B 0%
./react 196 B 196 B 0 B 0%
total 1.97 kB 1.97 kB 0 B 0%
@videojs/utils
Entry Base PR Diff %
./array 104 B 104 B 0 B 0%
./dom 928 B 1.07 kB +169 B +18.2% 🔴
./events 227 B 227 B 0 B 0%
./function 261 B 261 B 0 B 0%
./object 119 B 119 B 0 B 0%
./predicate 265 B 265 B 0 B 0%
./string 148 B 148 B 0 B 0%
./style 185 B 185 B 0 B 0%
./time 478 B 478 B 0 B 0%
./number 158 B 158 B 0 B 0%
total 2.81 kB 2.97 kB +169 B +5.9%

ℹ️ How to interpret

Sizes are minified + brotli, measured with esbuild.
Package totals are computed as root size + marginal subpath costs.
Subpath marginal cost = (root + subpath bundled together) − root alone.

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

Run pnpm size locally to check current sizes.

@luwes luwes marked this pull request as ready for review March 4, 2026 20:33
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 4, 2026

CI Failure Diagnosis

File Type What failed
packages/html/src/ui/captions-button/captions-button-element.ts:41 typecheck TS2559: AbortSignal passed where { signal?: AbortSignal } options object expected.

Comment thread packages/core/src/core/media/state.ts Outdated
Comment thread packages/core/src/core/media/state.ts
Comment thread packages/core/src/core/media/state.ts Outdated
Comment thread packages/core/src/core/ui/captions-button/captions-button-data-attrs.ts Outdated
Copy link
Copy Markdown
Member

@mihar-22 mihar-22 Mar 4, 2026

Choose a reason for hiding this comment

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

(request): I did a pass recently to dry up buttons to avoid boilerplate, rebasing on main and aligning with latest would be nice. Your feedback there would be appreciated if you have any :)

Comment thread packages/react/src/ui/captions-button/captions-button.tsx
Comment on lines +48 to +50
function alwaysTrue(): boolean {
return true;
}
Copy link
Copy Markdown
Member

@mihar-22 mihar-22 Mar 4, 2026

Choose a reason for hiding this comment

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

(question): seems unused? maybe I missed it

Comment thread packages/core/src/dom/media/custom-media-element/index.ts
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2026

CI Failure Diagnosis

File Type What failed
packages/core/src/dom/store/features/tests/text-track.test.ts test Test expects showing: true/false but implementation now returns mode: "showing"/"disabled" in subtitlesList.

@luwes luwes merged commit 5c11606 into main Mar 5, 2026
5 checks passed
@luwes luwes deleted the text-tracks branch March 5, 2026 23:11
This was referenced Mar 5, 2026
This was referenced Apr 11, 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.

HLS: subtitles handling on source change

3 participants