videojs / mux.js

Lightweight utilities for inspecting and manipulating video container formats.
Apache License 2.0
1.11k stars 210 forks source link

fix: 708 captions multi-byte char fix #439

Closed wseymour15 closed 11 months ago

wseymour15 commented 11 months ago

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