Closed georgyo closed 3 years ago
Yes, I would love a contribution to skip the gateways and use ipfs-js! At the time I created this, ipfs-js was not able to deliver it yet and I have not found the time to get that going. If you can find some time to help out, I would love to see pull requests.
Thank you for posting this issue!
It took way, way... way longer than I hoped. Turns out, if you want to use javascript to load a video buffer you will have to use one of the supported streaming media formats. It works with mpeg if it's DASH encoded, which is confusing because then some mpeg files will work and other won't.
So for this initial release, I opted to go with webm, VP8. I hope to include other video types by using some magic byte sniffing in later releases. For now, if you want direct ipfs support you have to recode your video files (which I have done with the examples).
Feel free to open a new issue if you have any other suggestions or comments.
I was a little disappointed to see that this only loads videos from IPFS gateways, and does not use ipfs-js. With the recent popularity of peertube I was looking for IPFS equivalents, however all but moshisushi/hlsjs-ipfs-loader seem to only use the gateways.
This means there is zero p2p action happening and 100% of the bandwidth always goes to the hard coded set of gateways.
It would be great if the IPFS video players that are being developed could actually use ipfs-js to gain the P2P ability that IPFS provides, and not just use small number of free gateways.