Slide 51
Slide 51 text
const client = new WebTorrent()
dragDrop('body', function (files) {
client.seed(files[0], function (torrent) {
hub.broadcast('torrent', torrent.magnetURI)
torrent.files[0].appendTo('body')
})
})
hub.subscribe('torrent').on('data', function (torrentId) {
client.add(torrentId, function (torrent) {
torrent.files[0].appendTo('body')
})
})