Created
October 17, 2015 18:23
-
-
Save summer4096/3d009a4dd49c758d3d6d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import WebTorrent from 'webtorrent' | |
let client = new WebTorrent() | |
let uri = 'http://releases.ubuntu.com/15.04/ubuntu-15.04-desktop-amd64.iso.torrent' | |
client.add(uri, torrent => { | |
console.log('Client is downloading:', torrent.infoHash) | |
for (let file of torrent.files) { | |
console.log(file) | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment