【发布时间】:2018-09-26 22:30:20
【问题描述】:
你好。鉴于 webtorrent.io,我想构建一个 VueJS 组件,显示加载磁铁文件、状态以及下载完成时触发播放器。
Vuex Store 是保存活动下载队列列表和数据流的好地方吗?
使用 webtorrent 一切皆有可能。
var WebTorrent = require('webtorrent')
var client = new WebTorrent()
var magnetURI = 'magnet: ...'
client.add(magnetURI, { path: '/path/to/folder' }, function (torrent) {
torrent.on('done', function () {
console.log('torrent download finished')
})
})
如何使用 VueJS 构建该架构/模式?任何见解,不胜感激
谢谢!
【问题讨论】:
标签: vue.js webtorrent