【发布时间】:2020-12-29 22:16:57
【问题描述】:
我正在使用 reactjs 和烧瓶。在获得存储在私有 s3 存储桶中的 .mp4 文件的 torrent 后,我正在尝试使用 webtorrent 在浏览器中显示和播放它。 但是视频内容没有加载
这是Load and play 1 GB .mp4 in reactjs, stored in private s3 bucket 的后续问题。目前,s3 存储桶是公开的。因为私有文件抛出错误。
参考代码 - https://codepen.io/drngke/pen/abNGbEg
const magnet = 'https://datavocal.s3.amazonaws.com/s3outputx.mp4.torrent'
const client = new WebTorrent()
client.add(magnet, (torrent) => {
console.log(torrent.files)
torrent.files[0].appendTo('body')
});
client.on("error", (err) => console.log(err))
【问题讨论】:
-
我看到了您的原始帖子,但从未回复(抱歉)。我已经用我能想到的回答了这个问题......不幸的是,我认为这是不可能的,但我欢迎进行第二次分析,以防我误解了一些东西。
标签: reactjs amazon-s3 video video-streaming webtorrent