Skip to content
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

Merged
merged 6 commits into from
Jul 24, 2023
Merged

Conversation

wseymour15
Copy link
Contributor

@wseymour15 wseymour15 commented Jul 21, 2023

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 VTTCues . 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 and npm 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

  • Package updates to mux.js and video.js
  • Ensuring we add the correct properties to VTTCues per caption sent to VHS.
  • Tests regarding the above

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
  • Reviewed by Two Core Contributors

@welcome
Copy link

welcome bot commented Jul 21, 2023

💖 Thanks for opening this pull request! 💖

Things that will help get your PR across the finish line:

  • Run npm run lint -- --errors locally to catch formatting errors earlier.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

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
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Merging #1408 (79a10fe) into main (7c0e968) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            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     
Impacted Files Coverage Δ
src/util/text-tracks.js 89.39% <100.00%> (+0.68%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@misteroneill misteroneill left a comment

Choose a reason for hiding this comment

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

Just a question!

src/util/text-tracks.js Show resolved Hide resolved
@wseymour15 wseymour15 merged commit 3c5a5bc into main Jul 24, 2023
@wseymour15 wseymour15 deleted the feat/enable-caption-positioning branch July 24, 2023 16:53
@welcome
Copy link

welcome bot commented Jul 24, 2023

Congrats on merging your first pull request! 🎉🎉🎉

gkatsev added a commit to videojs/video.js that referenced this pull request Mar 1, 2024
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).
mister-ben pushed a commit to videojs/video.js that referenced this pull request Apr 12, 2024
…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).
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.

3 participants