Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chimeejs/chimee-flv2fmp4
核心flv解码器
https://github.com/chimeejs/chimee-flv2fmp4
Last synced: 9 days ago
JSON representation
核心flv解码器
- Host: GitHub
- URL: https://github.com/chimeejs/chimee-flv2fmp4
- Owner: Chimeejs
- Created: 2017-07-04T08:39:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-07T14:52:18.000Z (about 6 years ago)
- Last Synced: 2024-11-11T12:52:57.727Z (9 days ago)
- Language: JavaScript
- Size: 358 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
![icon](http://gao111.top/icon/giticon.png)
```
npm install chimee-flv2fmp4 -Svar cpu= require("chimee-flv2fmp4")
new cpu();
```
-----------------
# Doc
## function
* setflv(arraybuffer) 参数,arraybuffer数组,返回值是该数值用到的位置
* onInitSegment(fun) 参数,回调function, mp4初始化数据调用该方法,类型为uint8array
* onMediaSegment(fun) 参数,回调function,mp4后续数据包会回调方法,类型为uint8array
* onMediaInfo(fun) 参数,回调function,MP4获取metadata后会回调该方法,类型为object
* seekCallBack(fun) 参数,回调function,跳转触发后,可进行跳转时回调
* seek(time) 参数,时间,单位是秒,进行跳转
* on(type,function) 参数,事件名,回调function,事件监听## event
* error 核心出现问题时会向外派发这个事件