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 utf-8 encode fragment text issue #1104

Closed
dsparacio opened this issue Feb 1, 2016 · 1 comment
Closed

Fix utf-8 encode fragment text issue #1104

dsparacio opened this issue Feb 1, 2016 · 1 comment
Assignees
Milestone

Comments

@dsparacio
Copy link
Contributor

POST PR #1057 fragmented text broke based on comments below.

It is indeed the access to UTF8.decode in TextSourceBuffer.js which has been lost.

Replacing that decoder with the lines:

                let dataView = new DataView(bytes, sampleList[i].offset, sampleList[i].size);
                ccContent = new TextDecoder('utf-8').decode(dataView);

makes fragmented subtitling work again.
Using a data view is also more efficient than the current approach, but the approach above only works on brewers with TextDecoder.
The codem-isoboxer that we include has a fallback, but a poor one. I've made a PR to it with a better fallback (essentially the one from base64) together with new boxes for emsg. Maybe we can use it..

@dsparacio dsparacio added this to the 2.0.0 milestone Feb 1, 2016
@dsparacio dsparacio self-assigned this Feb 1, 2016
@dsparacio
Copy link
Contributor Author

Fixed by PR #1105 thanks @TobbeMobiTV !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant