Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chimeejs/chimee-kernel-hls
HLS解码器,可参考demo的实现,用于原生Video或您的H5播放器。
https://github.com/chimeejs/chimee-kernel-hls
Last synced: 9 days ago
JSON representation
HLS解码器,可参考demo的实现,用于原生Video或您的H5播放器。
- Host: GitHub
- URL: https://github.com/chimeejs/chimee-kernel-hls
- Owner: Chimeejs
- Created: 2017-07-25T09:37:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-07T14:53:16.000Z (about 6 years ago)
- Last Synced: 2024-10-13T11:20:11.373Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 1.1 MB
- Stars: 18
- Watchers: 7
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# chimee-kernel-hls
[![Build Status](https://img.shields.io/travis/Chimeejs/chimee-kernel-hls/master.svg?style=flat-square)](https://travis-ci.org/Chimeejs/chimee-kernel-hls.svg?branch=master)
[![Coverage Status](https://img.shields.io/coveralls/Chimeejs/chimee-kernel-hls/master.svg?style=flat-square)](https://coveralls.io/github/Chimeejs/chimee-kernel-hls?branch=master)
[![npm](https://img.shields.io/npm/v/chimee-kernel-hls.svg?colorB=brightgreen&style=flat-square)](https://www.npmjs.com/package/chimee-kernel-hls)
[![dependency Status](https://david-dm.org/Chimeejs/chimee-kernel-hls.svg)](https://david-dm.org/Chimeejs/chimee-kernel-hls)
[![devDependency Status](https://david-dm.org/Chimeejs/chimee-kernel-hls/dev-status.svg)](https://david-dm.org/Chimeejs/chimee-kernel-hls?type=dev)chimee-kernel-hls is the decoder for [chimee](https://github.com/Chimeejs/chimee). It can decode m3u8 on browser.
It's based on [hls.js](https://github.com/video-dev/hls.js).
It totally fit the requirement of [chimee-kernel](https://github.com/Chimeejs/chimee-kernel).
It should only be used in the PC, as most of mobile browser support m3u8.
## Installation
```
npm install --save chimee-kernel-hls
```
## UsageYou can use chimee-kernel-hls in chimee or chimee-player like this.
```javascript
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](https://github.com/video-dev/hls.js/blob/master/doc/API.md#fine-tuning).
```Javascript
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();
```