WebTorrent.IO is not working with other magnet links?

3.6k views Asked by At

I tried finding it out, but couldn't. I am following the steps from here — https://webtorrent.io/intro. I have following code in the file.

<html>
<head>
<title>
StreamTest
</title>
<script type="text/javascript" src="webtorrent.min.js"></script>

<script>
var client = new WebTorrent()

var torrentId = 'magnet:?xt=urn:btih:6a9759bffd5c0af65319979fb7832189f4f3c35d'

client.add(torrentId, function (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,     etc. files
  file.appendTo('body')
})
</script>
</head>
<body>
<h2>Torrent Stream Test</h2>
</body>
</html>

This code works fine with infohash — 6a9759bffd5c0af65319979fb7832189f4f3c35d But when I use it other info hash or magnet link, it doesn't work. An example of other info hash is 80096C11147EEE4D2B6B6AC0B96C951E48298BE3

Any idea, why doesn't it work with other infohash or magnet link?

0

There are 0 answers