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 upMagnet link with web seed does not work #376
Comments
This comment has been minimized.
This comment has been minimized.
|
Your code sample is out of date. Please update to the latest version of WebTorrent:
And update your code sample: var WebTorrent = require('webtorrent')
var client = new WebTorrent()
var magnetUri = '...'
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')
})
}) |
This comment has been minimized.
This comment has been minimized.
|
Hi, i'm not trying to use webtorrent on node.js. I'm trying to use is on Thanks, regards 2015-07-17 3:52 GMT-03:00 Feross Aboukhadijeh notifications@github.com:
|
This comment has been minimized.
This comment has been minimized.
|
The code sample I pasted above was for the browser, just assuming browserify (which provides the The webtorrent script will set a So the new code snippet would be: var client = new WebTorrent()
var magnetUri = '...'
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')
})
}) |
This comment has been minimized.
This comment has been minimized.
|
Hi, thanks for your answer, and your patience. I'm still getting the same error. This is the complete code now: <title>Web Torrent Player</title> <script src="https://cdn.jsdelivr.net/webtorrent/latest/webtorrent.min.js"></script>
It happens on the the client.add(..) call. The callback function does never executes. Thanks |
This comment has been minimized.
This comment has been minimized.
|
Got the same issue, the callback function does never execute. |
This comment has been minimized.
This comment has been minimized.
|
I've maybe misunderstood something? It works for instant.io torrents (magnet URI) but not normal torrents from other trackers. So just for webtorrents? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@feross Thank you! |
This comment has been minimized.
This comment has been minimized.
|
I've tryed with the magnet uri of a torrent file that i took from the example torrent files on the repo. Thanks |
This comment has been minimized.
This comment has been minimized.
|
@marianobrc I confirmed that the BitLove magnet link is not working. Magnet links with web seeds apparently cause WebTorrent to crash. I just confirmed this and wrote a test. Next, I'll fix it. |
This comment has been minimized.
This comment has been minimized.
|
@feross if you need any other info let me know. Thanks! |
This comment has been minimized.
This comment has been minimized.
|
@feross Shouldn't it work with http/https links also? Can't seem to get it working, says "invalid torrent identifier". |
This comment has been minimized.
This comment has been minimized.
|
@deamme Please open a new issue. This issue thread is already quite long. |
This comment has been minimized.
This comment has been minimized.
|
@marianobrc Okay, the issue with the bitlove .torrent should be fixed in webtorrent 0.53.4. |
This comment has been minimized.
This comment has been minimized.
|
Thank you @feross . Where can i get the lastest .js file? |
This comment has been minimized.
This comment has been minimized.
|
@marianobrc Yes, that's the latest. The link is https://github.com/feross/webtorrent/blob/master/webtorrent.min.js |
This comment has been minimized.
This comment has been minimized.
|
Hi @feross . I've dowloaded the js and tested again my webpage. Now i don't see any errors on the console. I only see the following warnings on Chrome, but not in Firefox: webtorrent.min.js:7: The provided value 'ms-stream' is not a valid enum value of interface XMLHttpRequestResponseType. But i still seeing that the callback funcion on the client.add(..) method isn't called, so the video isn't appended to the body. Is it something else that am i missing? Thanks, regards |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Thanks @feross, i get it now. I've seeded the torrent first using instant.io and then copied that magnet link and it works great! |
This comment has been minimized.
This comment has been minimized.
|
@marianobrc Glad you got it figured out! |
This comment has been minimized.
This comment has been minimized.
|
i want to store infoHash of torrent after start seeding (after drag & drop a file into browser generated MagnetURI) in mongodb in nodejs using webtorrent. |
This comment has been minimized.
This comment has been minimized.
|
@vikrambarnwal Please don't ask for help in a random issue. Open a new issue. |
This comment has been minimized.
This comment has been minimized.
|
Hi, when .torrent file is created in the browser runtime, where are the .torrents stored? On instant.io? |
Hi, i'm trying to make streaming to a HTML5 video tag. Here is my full code:
I'm getting different errors on the client.add(..) call, on firefox and chrome:
On firefox 38.0 on Ubuntu, i get this on the console:
"TypeError: a.parsedTorrent.pieces is undefined webtorrent.min.js:2:930"
On chrome 43.0.2357.125 on Ubuntu, i get this other error on the console:
"webtorrent.min.js:2 Uncaught TypeError: Cannot read property 'length' of undefined"
As the client.add(..) call fails, the video tag can't even load.