gsl-playback-editor
v1.0.1
Published
提供直播回放编辑功能:上传回放视频、上传回放所需的录制件及自定义消息
Downloads
2
Readme
gsl-playback-editor
Overview
提供直播回放编辑功能:上传回放视频、上传回放所需的录制件及自定义消息
Installation
Using npm:
npm i gsl-playback-editor
example
import Editor, { EditorEvent, UploaderEvent } from 'gsl-playback-editor'
const editor = new Editor()
editor.on(EditorEvent.INITIALIZED, () => {
console.log('INITIALIZED')
})
editor.on(UploaderEvent.VIDEO_UPLOAD_CHANGE, (evt) => {
console.log(evt)
})
editor.on(UploaderEvent.RECORD_DATA_UPLOAD_CHANGE, evt => {
console.log(evt)
})
// objConfig = {appId: xxx, ...}
editor.initialize(objConfig)
// 上传视频文件 file对象
editor.uploadVideoFile(file)
// 上传录制件对象
editor.setRecordData(objRecordData)
editor.setRecordMessage(objRecordMessage)
editor.uploadRecordData()