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

Magnet url not work on WebTorrent #1608

Closed
GilGustavoJ opened this issue Apr 4, 2019 · 2 comments
Closed

Magnet url not work on WebTorrent #1608

GilGustavoJ opened this issue Apr 4, 2019 · 2 comments

Comments

@GilGustavoJ
Copy link

@GilGustavoJ GilGustavoJ commented Apr 4, 2019

I try to build a application for my personal use. I try to create a Web Torrent Player (in localhost) but when i pass the magnet link, not download nothing.

The magnet link works in uTorrent and Transmission (Linux)

this is my code:

var client = new WebTorrent()
var magnetUri = 'magnet:?xt=urn:btih:CC01377833C9028EDF33D3DA4E2324871B9CF7F7&dn=https://yts.am/torrent/download/CC01377833C9028EDF33D3DA4E2324871B9CF7F7&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://tracker.openbittorrent.com:80'

client.add(magnetUri, function (torrent) {
// Got torrent metadata!
console.log('Client is downloading:', torrent.infoHash)

torrent.files.forEach(function (file) {
// Display the file by appending it to the DOM. Supports video, audio, images, and
// more. Specify a container element (CSS selector or reference to DOM node).
file.appendTo('body')
})
})

Sorry my English.

@alxhotel

This comment has been minimized.

Copy link
Member

@alxhotel alxhotel commented Apr 4, 2019

Please use the template provided for new issues. And check other similar issues before opening a new one. For example #1546.

If you are running your code in a browser, you need to have WebRTC peers seeding the torrent. Alternatively, you could also use webseeds.

@DiegoRBaquero

This comment has been minimized.

Copy link
Member

@DiegoRBaquero DiegoRBaquero commented Apr 4, 2019

Please don't use WebTorrent with copyrighted content.

@webtorrent webtorrent locked and limited conversation to collaborators Apr 4, 2019
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.