Skip to content

HLS解码器,可参考demo的实现,用于原生Video或您的H5播放器。

Notifications You must be signed in to change notification settings

Chimeejs/chimee-kernel-hls

Repository files navigation

chimee-kernel-hls

Build Status Coverage Status npm dependency Status devDependency Status

chimee-kernel-hls is the decoder for chimee. It can decode m3u8 on browser.

It's based on hls.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-hls

Usage

You can use chimee-kernel-hls in chimee or chimee-player like this.

import Chimee from 'chimee';
import ChimeeKernelHls from 'chimee-kernel-hls';
const chimee = new Chimee({
  wrapper: '#wrapper',
  src: 'http://cdn.toxicjohann.com/lostStar.mp4',
  controls: true,
  autoplay: true,
  kernels: {
    hls: ChimeeKernelHls,
  }
});
chimee.play();

We also support custom config on hls.js, such as config describe in the document.

import Chimee from 'chimee';
import ChimeeKernelHls from 'chimee-kernel-hls';
const chimee = new Chimee({
  wrapper: '#wrapper',
  src: 'http://cdn.toxicjohann.com/lostStar.mp4',
  controls: true,
  autoplay: true,
  kernels: {
    hls: {
      handler: ChimeeKernelHls,
      debug: true,
    }
  }
});
chimee.play();

About

HLS解码器,可参考demo的实现,用于原生Video或您的H5播放器。

Resources

Stars

Watchers

Forks

Packages

No packages published