Skip to content

ACCOUNT-30901 add support for tracks in video component#1540

Merged
andyindahouse merged 13 commits into
masterfrom
test-andy
Jun 1, 2026
Merged

ACCOUNT-30901 add support for tracks in video component#1540
andyindahouse merged 13 commits into
masterfrom
test-andy

Conversation

@andyindahouse

Copy link
Copy Markdown
Contributor

No description provided.

@andyindahouse andyindahouse requested a review from Marcosld April 23, 2026 11:15
@github-actions

github-actions Bot commented Apr 23, 2026

Copy link
Copy Markdown

Size stats

master this branch diff
Total JS 16.1 MB 16.1 MB +590 B
JS without icons 2.01 MB 2.01 MB +590 B
Lib overhead 92.5 kB 92.5 kB 0 B
Lib overhead (gzip) 19.9 kB 19.9 kB 0 B

@github-actions

github-actions Bot commented Apr 23, 2026

Copy link
Copy Markdown

Deploy preview for mistica-web ready!

Project:mistica-web
Status: ✅  Deploy successful!
Preview URL:https://mistica-1c9qopv1i-flows-projects-65bb050e.vercel.app
Latest Commit:000b8ff

Deployed with vercel-action

@github-actions

github-actions Bot commented Apr 23, 2026

Copy link
Copy Markdown

Accessibility report
✔️ No issues found

ℹ️ You can run this locally by executing yarn audit-accessibility.

@andyindahouse andyindahouse changed the title test video with tracks elements ACCOUNT-30901 add support for tracks in video component May 18, 2026
@andyindahouse andyindahouse marked this pull request as ready for review May 18, 2026 11:48
Copilot AI review requested due to automatic review settings May 18, 2026 11:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds support for <track> elements (subtitles, captions, etc.) to the Video component by introducing a new tracks prop and corresponding VideoTrack type, exporting the new type publicly, and updating the Video story with a sample WebVTT subtitle file.

Changes:

  • New VideoTrack type and tracks prop on Video, rendered as <track> children; crossOrigin="anonymous" is automatically applied when tracks are present.
  • Public re-export of VideoTrack from the package entry point.
  • Story update with a demo .vtt subtitle file to exercise the new feature.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/video.tsx Adds VideoTrack type, tracks prop, renders <track> elements, sets crossOrigin when tracks exist.
src/index.tsx Exports the new VideoTrack type.
src/stories/video-story.tsx Adds a tracks example using the new VTT file in the Default story.
src/stories/videos/test-subtitles.vtt New WebVTT subtitle file used by the story.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/__stories__/videos/test-subtitles-en.vtt
Comment thread src/video.tsx Outdated
disableRemotePlayback
muted={muted}
loop={loop}
crossOrigin={tracks ? 'anonymous' : undefined}
@github-actions

github-actions Bot commented May 18, 2026

Copy link
Copy Markdown

Size stats

master this branch diff
Total JS 16.1 MB 16.1 MB +1.05 kB
JS without icons 2.03 MB 2.03 MB +1.05 kB
Lib overhead 93.9 kB 93.9 kB 0 B
Lib overhead (gzip) 20 kB 20 kB 0 B

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 18, 2026 12:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Comment thread src/video.tsx
Comment thread src/video.tsx Outdated
Comment thread src/__stories__/video-story.tsx
Copilot AI review requested due to automatic review settings May 20, 2026 10:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread src/video.tsx Outdated
Comment thread src/video.tsx Outdated
@andyindahouse andyindahouse requested a review from Marcosld May 20, 2026 10:27
andyindahouse and others added 2 commits May 20, 2026 12:28
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 20, 2026 11:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Comment thread src/video.tsx Outdated
Comment thread src/video.tsx
Comment thread src/video.tsx Outdated
Comment thread src/__stories__/video-story.tsx
Comment thread src/video.tsx
Comment thread src/__stories__/video-story.tsx
Copilot AI review requested due to automatic review settings May 25, 2026 11:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 5 comments.

Comment thread src/video.tsx
Comment thread src/video.tsx
Comment thread src/video.tsx
Comment thread src/__stories__/video-story.tsx
Comment thread src/video.tsx Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 25, 2026 11:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Comment thread src/video.tsx
Comment thread src/video.tsx
Comment thread src/video.tsx
Comment on lines +129 to +134
/**
* Sets the display mode of a track by its index.
* - 'showing': track is visible
* - 'disabled': track is inactive
*/
setTrackMode: (index: number, mode: 'showing' | 'disabled') => void;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is the goal of this method changing the subtitles that are currently enabled? Perhaps we should expose a simpler API, something like:

setActiveSubtitleIndex: (i: number) => void
```tsx

@andyindahouse andyindahouse added this pull request to the merge queue Jun 1, 2026
Merged via the queue into master with commit 19d568f Jun 1, 2026
11 of 12 checks passed
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.

5 participants