Skip to content

Chimeejs/chimee-kernel-flv.js

Repository files navigation

chimee-kernel-flv.js

Build Status Coverage Status npm dependency Status devDependency Status

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.

Installation

npm install --save chimee-kernel-flv.js

Usage

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();

About

A flv decoder for chimee, using flv.js

Resources

Stars

Watchers

Forks

Packages

No packages published