-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: enable caption positioning #1408
Conversation
💖 Thanks for opening this pull request! 💖 Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
Codecov Report
@@ Coverage Diff @@
## main #1408 +/- ##
==========================================
+ Coverage 85.54% 85.55% +0.01%
==========================================
Files 41 41
Lines 10125 10143 +18
Branches 2345 2349 +4
==========================================
+ Hits 8661 8678 +17
- Misses 1464 1465 +1
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question!
Congrats on merging your first pull request! 🎉🎉🎉 |
videojs/http-streaming#1408 updated 608 captions to default to be left aligned. This may be unwanted by some folks and we should provide an easier way to force them to be centered. This PR adds a player level class that will override the text alignment to be `center`. It also overrides the `width` to `80%` because otherwise the cue box isn't set up correctly to be 10% from the right of the display area (a side effect of hardcoding a width value and using inset in the generation of the cues).
…8625) videojs/http-streaming#1408 updated 608 captions to default to be left aligned. This may be unwanted by some folks and we should provide an easier way to force them to be centered. This PR adds a player level class that will override the text alignment to be `center`. It also overrides the `width` to `80%` because otherwise the cue box isn't set up correctly to be 10% from the right of the display area (a side effect of hardcoding a width value and using inset in the generation of the cues).
Description
This consumes the work completed in mux.js here: videojs/mux.js#434
The goal of this work is to ensure that we can position CEA 608 captions. The bulk of the work was done in mux.js, but this just ensures that we take that data and turn them into valid
VTTCue
s . This will ensure that the captions are positioned correctly based on that CEA 608 caption data.To Test
Pull down this branch and run
npm i
andnpm start
, and then navigate to http://localhost:9999. In the closed caption menu, choose the CC1 option and see that the captions are positioned in different places on the screen.Specific Changes proposed
Requirements Checklist