Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upnot entering client.add() #980
Comments
This comment has been minimized.
This comment has been minimized.
|
This can happen if the magnet link you pass in has no peers and even the metadata can't be fetched. You should set a timeout to detect when this happens, or just show some torrent stats like number of peers, download speed, etc. to the user. Also, see this FAQ answer: Why does browser downloading not work? I see no peers! It does work! But you can't just use any random magnet uri or .torrent file. The torrent must be seeded by a WebRTC-capable client, i.e. WebTorrent Desktop, Vuze, webtorrent-hybrid, Playback, instant.io, or βTorrent. In the browser, WebTorrent can only download torrents that are explicitly seeded to web peers via a WebRTC-capable client. Desktop torrent clients need to support WebRTC to connect to web browsers. |
This comment has been minimized.
This comment has been minimized.
|
Hi ,Thanks for the answer. I am using a .torrent or a magnet link which has more than 50 peers and seeders for my testing. It works perfectly fine if I run webtorrent on a nodejs server, but I encounter this error running it on browser javascript. |
This comment has been minimized.
This comment has been minimized.
|
@c00kie17 in Node, WebTorrent connects to TCP/UDP peers. On the browser it can't, it can only connect to WebRTC peers, I suppose your torrent doesn't have any. webtorrent-hybrid and WebTorrent Desktop can connect to both type of peers. |
This comment has been minimized.
This comment has been minimized.
|
Thanks for the reply, I got what you are trying to say. My mistake should have researched more before asking a question here. Thank you. |
This comment has been minimized.
This comment has been minimized.
|
This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue. |
here is my code:
I didnt know where else to ask this question. Is there anything I am doing wrong ?