I am using reactjs and flask. After getting the torrent of .mp4 file stored in private s3 bucket, I am trying to displayand play it in browser using webtorrent. But the video content is not loading
This is a follow up question to Load and play 1 GB .mp4 in reactjs, stored in private s3 bucket. For now, the s3 bucket is public. Because private file was throwing error.
Code for reference - 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))
I'm not sure if this will work.
From the webtorrent docs:
And further:
So I'm guessing S3 would have to support WebTorrent/WebRTC which I don't think it will.
If my understanding of the above diagram is correct, you could run a hybrid client in between S3 and your web-peers, however you'd then need to host the hybrid somewhere which kind of makes S3 redundant in that setup.