Skip to content

Forced captions - #911

Merged
Dananji merged 2 commits into
mainfrom
forced-captions
Mar 12, 2026
Merged

Forced captions#911
Dananji merged 2 commits into
mainfrom
forced-captions

Conversation

@Dananji

@Dananji Dananji commented Mar 9, 2026

Copy link
Copy Markdown
Collaborator

Related issue: #906

This PR enables parsing and auto-enabling of forced text tracks in VideoJS. Ramp uses a forced flag in the text-track objects it creates from the parsed information to keep track of the forced text-tracks.

One of the done looks like suggests the following,

The forced text track should be identifiable in the captions menu (different CSS, or potentially don't display to users)

Solution implemented in this work,
The forced text track in the captions menu is displayed with the forced text in the label with a tooltip. Hiding this in the captions menu will have the following implications that are not desirable,

  • UX: removes the clutter but can cause confusion when captions display without an active text track even when the users have turned them off previously
  • A11y: hiding the track breaks the broader 'Understandable' principle in WCAG guidelines

Additionally,

  • Changes to the captions menu with longer file names,
    • File name with spaces;
long caption file name with spaces - File name with underscores (without spaces); long_caption_file_name_with_underscores - Fix the captions handling in Safari and Chrome in iOS; remove duplicated subtitle/caption options in the captions menu

Demo:

demo-forced-captions.mov

@cjcolvar cjcolvar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me!

It might be nice if there was a sample manifest with a forced track to test out in the demo or a way to see this in the styleguidist docs but this isn't a blocker.

@Dananji
Dananji merged commit 32efabe into main Mar 12, 2026
3 checks passed
@Dananji
Dananji deleted the forced-captions branch March 12, 2026 20:38
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.

2 participants