-
Notifications
You must be signed in to change notification settings - Fork 425
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
chore: better worker build #1033
Conversation
data.iv.byteOffset, | ||
data.iv.byteLength / 4 | ||
); | ||
self.onmessage = function(event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We no longer wrap in a function here, instead the code looks exactly as it would running on a web worker, inside of the main script body.
this.messageHandlers = new MessageHandlers(self, event.data.options); | ||
return; | ||
} | ||
self.onmessage = function(event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again no longer wrapped in a function.
@@ -13,7 +13,7 @@ import { MasterPlaylistController } from '../src/master-playlist-controller'; | |||
import SourceUpdater from '../src/source-updater'; | |||
import SyncController from '../src/sync-controller'; | |||
import TimelineChangeController from '../src/timeline-change-controller'; | |||
import Decrypter from 'worker!../src/decrypter-worker.worker.js'; | |||
import Decrypter from 'worker!../src/decrypter-worker.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slight change since we no longer pre-bundle the worker.
80410f6
to
3422c1d
Compare
3422c1d
to
0d6f722
Compare
0d6f722
to
f8bf2cf
Compare
Description
I wrote rollup-plugin-worker-factory for Mux.js so that we could support nodejs workers and browser workers using the same plugin. It has side benefits of: