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

Streaming from magnets not explicitly seeded by webtorrent peers? #1171

Closed
hayzamjs opened this issue Aug 9, 2017 · 1 comment
Closed

Streaming from magnets not explicitly seeded by webtorrent peers? #1171

hayzamjs opened this issue Aug 9, 2017 · 1 comment

Comments

@hayzamjs
Copy link

@hayzamjs hayzamjs commented Aug 9, 2017

I'm using the https://cdn.jsdelivr.net/webtorrent/latest/webtorrent.min.js in the browser.

On the latest chrome browser.

<html>
<head>
<script src="https://cdn.jsdelivr.net/webtorrent/latest/webtorrent.min.js"></script>
<head>
<div id="div">
</div>
<script>
var client = new WebTorrent()

var torrentId = 'magnet:?xt=urn:btih:99feae0a05c6a5dd9af939ffce5ca9b0d16f31b0&dn=TPB.AFK.2013.480p.h264-SimonKlose&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Fzer0day.ch%3A1337&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Fexodus.desync.com%3A6969&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com';
client.add(torrentId, function (torrent) {

  var interval = setInterval(function () {
      log('Progress: ' + (torrent.progress * 100).toFixed(1) + '%')
    }, 1)
// Torrents can contain many files. Let's use the .mp4 file
var file = torrent.files.find(function (file) {
  return file.name.endsWith('.mp4')
})

// Display the file by adding it to the DOM.
// Supports video, audio, image files, and more!
file.appendTo('#div', function (err, elem) {
  if (err) throw err // file failed to download or display in the DOM
  console.log('New DOM node with the content', elem)
})

});
</script>
<body>
</body>
</html>

I don't think it has any 'webtorrent' peers, but it has some amount of seeders, is there anyway I can stream the contents of that magnet using webtorrent?

@DiegoRBaquero

This comment has been minimized.

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