henry-rodrick / hlsjs-ipfs-loader

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

Fix stream.on is not a function error #2

Closed 0xVasconcelos closed 6 years ago

0xVasconcelos commented 6 years ago

I think ipfs-js changed how ipfs.files.cat works, now this method returns a buffer instead of a stream, so needs to convert to stream to pipe. I added a method called buf2Stream that do this conversion. I tested on Chrome(macOs) and worked perfectly.