In node.js, webtorrent
no longer connects 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 this package (webtorrent-hybrid
).
The wrtc
dependency (which provides WebRTC support in node.js) can be a bit difficult/slow to install and lacks Windows support, so we didn't want to burden all users of webtorrent
with that process. If you just want to use WebTorrent in the browser, or in node.js to connect to normal TCP/UDP peers, then you can depend on webtorrent
, which will be faster to install.
To install WebTorrent:
npm install webtorrent-hybrid
To install a webtorrent-hybrid
command line program, run:
npm install webtorrent-hybrid -g
webtorrent-hybrid
has the same command line interface (CLI) and module API as
webtorrent
. Just require('webtorrent-hybrid')
instead of require('webtorrent')
.
See the WebTorrent docs.
MIT. Copyright (c) Feross Aboukhadijeh.