henry-rodrick / hlsjs-ipfs-loader

A js-ipfs loader for the hls.js JavaScript HLS client
MIT License
60 stars 31 forks source link

feat: support for ipfs directories #20

Closed vaultec81 closed 3 years ago

vaultec81 commented 3 years ago

Passes full path to ipfs.ls. Backwards compatible, does not cause any compatibility issues with my tests.

fixes #19 cc: @moshisushi

georgyo commented 3 years ago

With these improvements, initializing a full node and playing a 2 hour video complete with 5 different bit rates starts playing in about a second. This is a stark improvement for upwards of 30 seconds before when the directory structure was flat.

Here is Charade a movie from 1963 that is in the Public Domain. There are ~7000 parts here: https://charade.fu.io/

It loads quickly enough, even with a clean start, that you wouldn't be able to know that video is being served natively out of IPFS. It also enables the webrtc, so multiple clients would discover each other and share load. Though with 5 different bitrates finding a peer that has what you need shrinks a bit.

This is really impressive stuff. Thanks for creating and enabling this.

henry-rodrick commented 3 years ago

@georgyo Amazing demo! This change is now in the latest build 0.3.0. Thanks everyone.