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: Add ability to pass encoding value for 708 captions via captionServices #1194

Merged
merged 10 commits into from
Sep 22, 2021

Conversation

alex-barstow
Copy link
Contributor

Description

Complementary Mux.js PR: videojs/mux.js#398

The 708 implementation of mux will soon support multibyte character encodings, so this PR adds a way to pass the option to the transmuxer. using the existing captionServices options block.

@@ -482,6 +481,9 @@ This option defaults to `false`.
The captionServices options object has properties that map to the caption services. Each property is an object itself that includes several properties, like a label or language.

For 608 captions, the service names are `CC1`, `CC2`, `CC3`, and `CC4`. For 708 captions, the service names are `SERVICEn` where `n` is a digit between `1` and `63`.

For 708 caption services, you may additionally provide an `encoding` value that will be used by the transmuxer to decode the captions using an instance of [TextDecoder](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder). This is to permit and is required for legacy multi-byte encodings. Please review the `TextDecoder` documentation for accepted encoding labels.
Copy link
Member

Choose a reason for hiding this comment

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

thanks for updating the docs!

@codecov
Copy link

codecov bot commented Sep 8, 2021

Codecov Report

Merging #1194 (bd9a604) into main (9d6505a) will decrease coverage by 0.26%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1194      +/-   ##
==========================================
- Coverage   86.60%   86.33%   -0.27%     
==========================================
  Files          39       39              
  Lines        9652     9691      +39     
  Branches     2231     2243      +12     
==========================================
+ Hits         8359     8367       +8     
- Misses       1293     1324      +31     
Impacted Files Coverage Δ
src/master-playlist-controller.js 94.62% <ø> (ø)
src/segment-loader.js 96.23% <100.00%> (+<0.01%) ⬆️
src/transmuxer-worker.js 73.76% <0.00%> (-0.60%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d6505a...bd9a604. Read the comment docs.

brandonocasey
brandonocasey previously approved these changes Sep 9, 2021
gkatsev
gkatsev previously approved these changes Sep 20, 2021
Copy link
Member

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

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

Approved, though, I guess we should wait to update mux.js in this PR

@alex-barstow alex-barstow dismissed stale reviews from gkatsev and brandonocasey via d6d16f7 September 21, 2021 19:54
gkatsev
gkatsev previously approved these changes Sep 21, 2021
@gkatsev gkatsev merged commit e2b46e7 into main Sep 22, 2021
@gkatsev gkatsev deleted the add-encoding-option-to-captionServices branch September 22, 2021 19:27
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