To solve #1 and issue #2 I had to rewrite the frontend using Vue.js and implement some code to hook up ipfs to the video element.
There are still some issues that I would have to fix another way, but for now we have direct IPFS support via js-ipfs for all video files that are VP8 encoded streams with OPUS audio in a WEBM container. See the recode_webm.sh script for an example on how to create a video like that.
The big issue is that the video element connected to an HTTP endpoint will play quite a few different formats, but if you want to use javascript to inject the video stream (as required for js-ipfs) you are only allowed to use properly streamable videos: mpeg streams with DASH encoding, WEBM, etc. The list of allowed formats is not large and even smaller if you want them to work on multiple browsers.
To solve #1 and issue #2 I had to rewrite the frontend using Vue.js and implement some code to hook up ipfs to the video element.
There are still some issues that I would have to fix another way, but for now we have direct IPFS support via js-ipfs for all video files that are VP8 encoded streams with OPUS audio in a WEBM container. See the
recode_webm.sh
script for an example on how to create a video like that.The big issue is that the video element connected to an HTTP endpoint will play quite a few different formats, but if you want to use javascript to inject the video stream (as required for js-ipfs) you are only allowed to use properly streamable videos: mpeg streams with DASH encoding, WEBM, etc. The list of allowed formats is not large and even smaller if you want them to work on multiple browsers.