-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
using webworkers for some cpu-intensive tasks #517
Comments
from my quick tests, webtorrent doesn't seem to want to run in a worker.
|
i think @jaruba implemented something like that ? |
I did that with peerflix, not webtorrent, which doesn't need window and I only pass the magnet link to the worker |
you pass the magnet and get back the localhost url? yes that's what I wanted to do, but as I said, window is needed :/ Maybe checking with webtorrent directly. I vaguely remember reading an issue about it |
In my PR (popcorn-official/popcorn-desktop#474) I was able to fork a process and start up webtorrent there. I think instead of https://github.com/butterproject/butter-desktop/blob/master/src/app/lib/streamer.js#L285 resolving a url, the message passed back to the main thread can be the url. This way the UI (main thread) isn't locked up. e.g. this.worker.on('message', function(msg) {
if(msg.action === 'url') {
// creates the <video> here where the window DOM is present.
this.waitForBuffer(msg.payload);
}
}.bind(this)); |
I was able to make a branch that did the following:
Noticeable:
|
it's #607 |
|
Such as webtorrent, for example. Although we might be limited to webrtc connexions, which would be bad.
The text was updated successfully, but these errors were encountered: