-
Notifications
You must be signed in to change notification settings - Fork 103
Legacy Brotli #114
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
Legacy Brotli #114
Conversation
Seems sensible, though if JSO switches to emscripten's combined
I agree that having the polyfills provided by Emscripten would be ideal, but failing that utilisng brotli's
Grepping for |
I'm mostly concerned about polyfill duplication. No harm, but it will bloat the output file.
It seems that Btw, in webOS 1.2 |
If it's used by emscripten not just brotli, than it would be defined in our own polyfills, which should take precedence over brotli's polyfills, and since it wouldn't be removed (until emscripten starts to provide the polyfills). On another note, just copying polyfills from |
4a94ff5
to
13fa2f1
Compare
13fa2f1
to
77286bd
Compare
A bunch of polyfills need to be added to support Brotli compression in legacy browsers.
Some of them (marked
From brotli
) are from https://github.com/google/brotli/blob/master/js/polyfill.js So they can be added by this file passed inemcc
.At the same time, if something changes in Brotli polyfills, it may affect JSO. For example, there is no
Int8Array.slice
in the version currently used by JSO, but there is in the latest recent.Therefore, it is probably better to rely on Emscripten polyfills and explicitly added JSO polyfills.
URLs can contain params. For example, in Jellyfin the URL looks like
/Videos/{1}/{2]/Subtitles/{3}/{4}/Stream.ass?api_key={5}
.Jellyfin doesn't support Brotli compressed subtitles yet, but maybe someday.
If you want, I can extract this part in a separate PR.
Tested in webOS 1.2 emulator with Brotli subtitles from
gh-pages
branch.Some thoughts
Maybe extract polyfills in
polyfills.js
and add them only to the legacy worker?