chimee-kernel-flv.js is the decoder for chimee. It can decode m3u8 on browser.
It's based on flv.js.js.
It totally fit the requirement of chimee-kernel.
It should only be used in the PC, as most of mobile browser support m3u8.
npm install --save chimee-kernel-flv.js
You can use chimee-kernel-flv.js in chimee or chimee-player like this.
import Chimee from 'chimee';
import ChimeeKernelFlvJs from 'chimee-kernel-flv.js';
const chimee = new Chimee({
wrapper: '#wrapper',
src: 'http://cdn.toxicjohann.com/lostStar.mp4',
controls: true,
autoplay: true,
kernels: {
flv: ChimeeKernelFlvJs,
}
});
chimee.play();
We also support custom config on flv.js.js, such as config describe in the document.
import Chimee from 'chimee';
import ChimeeKernelFlvJs from 'chimee-kernel-flv.js';
const chimee = new Chimee({
wrapper: '#wrapper',
src: 'http://cdn.toxicjohann.com/lostStar.mp4',
controls: true,
autoplay: true,
kernels: {
flv: {
handler: ChimeeKernelFlvJs,
lazyLoad: true,
}
}
});
chimee.play();