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

ontorrent callback isn't fired in browser #173

Closed
LaurentVB opened this issue Nov 2, 2014 · 2 comments
Closed

ontorrent callback isn't fired in browser #173

LaurentVB opened this issue Nov 2, 2014 · 2 comments

Comments

@LaurentVB
Copy link

@LaurentVB LaurentVB commented Nov 2, 2014

Hello,
I tried the snippet from the README with webtorrent 0.11.2 in chrome and firefox 34.0 and chrome 38 on windows 7.
The callback is never fired.
Webtorrent on the command-line with the same magnet link downloads the file right away.
So I tried the following code (inspired by the cmd.js file):

var WebTorrent = require('webtorrent')
var client = new WebTorrent()
var torrent = client.add(magnet_uri);
torrent.on('infoHash', function () {
    console.log('infoHash');

    torrent.on('metadata', function () {
        console.log('metadata');
    })
})

And the console shows the 'infoHash' log, but the 'metadata' log never shows up.
Anyidea what could be the issue here?

Regards

Laurent

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Nov 3, 2014

WebTorrent can only download torrents that are explicitly seeded to the WebTorrent network. Torrent clients need to support WebRTC to peer with web browsers. Currently, no clients support it but you can use http://instant.io/ to seed torrents that WebTorrent can download.

@feross feross closed this Nov 3, 2014
@LaurentVB

This comment has been minimized.

Copy link
Author

@LaurentVB LaurentVB commented Nov 3, 2014

Thanks for this clarification.

@lock lock bot locked as resolved and limited conversation to collaborators May 7, 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
2 participants
You can’t perform that action at this time.