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

fix: 708 captions multi-byte char fix #439

Merged
merged 3 commits into from
Oct 12, 2023
Merged

Conversation

wseymour15
Copy link
Contributor

@wseymour15 wseymour15 commented Oct 11, 2023

We were seeing issues with non-latin 708 captions not being displayed correctly. It appears that the issue that we are not always handling multi-byte characters correctly.

This fix proposes that in the case where we see a multi-byte character without a pre-designated decoder, we send the byte array through a function to turn it into a hex string, and then from there decode it into the character.

Example Test Playlist: https://solutions.brightcove.com/wseymour/708-testing/playlist.m3u8

Before:
Screenshot 2023-10-12 at 10 47 59 AM

After:
Screenshot 2023-10-12 at 10 46 12 AM

Copy link
Contributor

@adrums86 adrums86 left a comment

Choose a reason for hiding this comment

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

Nice work! :shipit:

lib/m2ts/caption-stream.js Show resolved Hide resolved
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.

None yet

3 participants