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

Can't add custom torrent from tracker #1050

Closed
t0xicDen opened this issue Feb 18, 2017 · 2 comments
Closed

Can't add custom torrent from tracker #1050

t0xicDen opened this issue Feb 18, 2017 · 2 comments

Comments

@t0xicDen
Copy link

@t0xicDen t0xicDen commented Feb 18, 2017

What version of WebTorrent?

WebTorrent 0.98.8

What operating system and Node.js version?

Windows 7
NodeJs v6.9.5

What browser and version? (if using WebTorrent in the browser)

Chrome Version 56.0.2924.87

What did you expect to happen?
When I use magnet URI from example all work OK.
I am trying to play in browser custom video from torrent-tracker.

    var WebTorrent = require('webtorrent');
    var client = new WebTorrent();

    client.on('error',
        function(err) {
            console.log('Error:');
            console.log(err);
        });

    var torrentId =
        //'magnet:?xt=urn:btih:6a9759bffd5c0af65319979fb7832189f4f3c35d&dn=sintel.mp4&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel-1024-surround.mp4';
        'magnet:?xt=urn:btih:79356933BCD37DEAA6EC05E4CFE934F31BACD823&tr=http%3A%2F%2Fbt2.t-ru.org%2Fann%3Fmagnet&dn=%5BSERIAL%5D%20%D0%A1%D0%B2%D0%B0%D1%82%D1%8B%20%2F%20%D0%A1%D0%B5%D0%B7%D0%BE%D0%BD%3A%201%20%2F%20%D0%A1%D0%B5%D1%80%D0%B8%D0%B8%3A%201-2%20%D0%B8%D0%B7%202%20(%D0%AE%D1%80%D0%B8%D0%B9%20%D0%9C%D0%BE%D1%80%D0%BE%D0%B7%D0%BE%D0%B2)%20%5B2008%2C%20%D0%BA%D0%BE%D0%BC%D0%B5%D0%B4%D0%B8%D1%8F%2C%20SATRip%5D%20%5BMP4%2C%20640x%5D';

    var torrent1 = client.add(torrentId,
    function (torrent) {
        console.log('adding torrent');

        // Torrents can contain many files. Let's use the first.
        var file = torrent.files[0];

        // Display the file by adding it to the DOM.
        // Supports video, audio, image files, and more!
        file.appendTo('#video');
    });

    console.log('torrent1:');
    console.log(torrent1);

    torrent1.on('error', function (err) {
        console.error('torrent1 error', err);
    });

    torrent1.on('ready', function () {
        console.error('torrent1 ready');
    });

What actually happened?

'ready' event never fires. So file do not appends to DOM.

console.log shows this:
image

Can you explain please, what am I doing wrong? I spend a half of day doing this.
Thanks.

@DiegoRBaquero

This comment has been minimized.

@lock

This comment has been minimized.

Copy link

@lock lock bot commented May 4, 2018

This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 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.