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

Remove `wrtc` dependency #303

Closed
feross opened this issue Apr 29, 2015 · 2 comments
Closed

Remove `wrtc` dependency #303

feross opened this issue Apr 29, 2015 · 2 comments
Labels
bug

Comments

@feross
Copy link
Member

@feross feross commented Apr 29, 2015

Currently, bittorrent-tracker, and thus WebTorrent, depend on the wrtc npm module.

wrtc doesn't build on some linux and windows systems. There are only prebuilt binaries for some platforms. On the other platforms, wrtc tries to build the module from source. This can take a long time and will always fail on systems that aren't set up with a compiler. It doesn't work at all on Windows. And, even though it's an optionalDependency it often breaks the whole install.

The truth is that wrtc is not a hard dependency for WebTorrent - only if you want WebRTC support to talk to web peers from node. Without wrtc, WebTorrent would just be a normal torrent client in node. If there aren't prebuilt wrtc binaries for a user's platform, I'd rather have it fail immediately (as an optionalDependency) without attempting a build from source. This would keep the install fast, and WebTorrent would continue to work just fine for end users (even though they wouldn't be able to talk to web peers).

I'm still experimenting with the best way to get WebRTC support in node. Too many people are having problems with wrtc, so I think I'm going to remove that dependency soon.

The good news is that Electron (atom-shell) has built-in support for WebRTC, since it's just Chromium. So it's not that important that every user of the webtorrent node program has WebRTC support via wrtc. It's more important that install is fast and works for everyone.

@feross

This comment has been minimized.

Copy link
Member Author

@feross feross commented Apr 29, 2015

I've opened an issue on wrtc requesting a wrtc-prebuilt module with the behavior I described above: node-webrtc/node-webrtc#200

Hoping that they agree that this is worthwhile.

cc @maxogden, @mafintosh, @substack, @dominictarr

@feross feross added the bug label May 3, 2015
feross added a commit to webtorrent/torrent-discovery that referenced this issue May 4, 2015
feross added a commit that referenced this issue May 4, 2015
@feross

This comment has been minimized.

Copy link
Member Author

@feross feross commented May 4, 2015

Good news! As of v0.35.0, webtorrent no longer depends on wrtc, so installing should be easy and error-free again!

In node.js, webtorrent will no longer connect to WebRTC peers, just normal TCP/UDP peers. If you want to connect to all types of peers, including WebRTC peers, from node.js, you need to use the webtorrent-hybrid package.

npm install webtorrent-hybrid

webtorrent-hybrid has the same command line interface (CLI) and module API as webtorrent. Just require('webtorrent-hybrid') if you need support for WebRTC peers.

@feross feross closed this May 4, 2015
@lock lock bot locked as resolved and limited conversation to collaborators May 6, 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
1 participant
You can’t perform that action at this time.