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

It does not work inside a worker. #1248

Closed
ander7agar opened this issue Dec 20, 2017 · 2 comments
Closed

It does not work inside a worker. #1248

ander7agar opened this issue Dec 20, 2017 · 2 comments

Comments

@ander7agar
Copy link

@ander7agar ander7agar commented Dec 20, 2017

What version of WebTorrent?
WebTorrent 0.98.20
What operating system and Node.js version?
Ubuntu 17.10 Artful with Node 8.9.0
What browser and version? (if using WebTorrent in the browser)
Electron framework
What did you expect to happen?
I am developing a desktop application with Electron that WebTorrent uses to download and share files. So far I started the WebTorrent along with the rest of the application's scripts and it worked perfectly. The bad thing is that sometimes the application froze, so I decided to run the WebTorrent in a different thread. I have done it with the workerjs module, the communication between the processes works correctly, I can add files and it returns the result without problems.
What actually happened?
What happens is that it does not share the files nor download them. If I do not use the Worker everything works fine, except that it freezes the application.

@t-mullen

This comment has been minimized.

Copy link

@t-mullen t-mullen commented Jan 4, 2018

WebRTC doesn't work inside ServiceWorkers or WebWorkers, and probably never will.

See: https://github.com/xuset/aether-torrent
Or: https://github.com/mafintosh/browser-server

@DiegoRBaquero

This comment has been minimized.

Copy link
Member

@DiegoRBaquero DiegoRBaquero commented Jan 5, 2018

Electron allows this, check WebTorrent Desktop app design.

@lock lock bot locked as resolved and limited conversation to collaborators May 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.