4.0.6 • Published 1 year ago

pbu-video-player v4.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

PBUVideoPlayer

封装了一下 cc 视频播放器

安装

npm i pbu-video-player --save

版本

4.0.6
 onRecordPlaytime 记录播放时长关联倍速
4.0.5
 捕获组件卸载后抛出的异常
4.0.4
 解决组件卸载后 导致的正在播放的视频暂停 异步回调更新视频学习进度错误的问题
4.0.3
 onListenCurrent 修复回调自动取整问题
4.0.2
 onListenCurrent 精确到0.1秒
4.0.1
 修复 切换倍速时 视频处于播放状态下才会触发onRuntimeChange
4.0.0
 增加回调参数
  // 拖拽进度条的回调
  onPlayerSeek: PropTypes.func,
  // 每秒回调视频播放进度(联动倍速)
  onRuntimeChange: PropTypes.func,
  // 当前是否允许播放
  isCanPlayState: PropTypes.bool
3.0.4
 回撤3.0.2
3.0.3 deprecated
3.0.2 修复视频进度(flash=>h5)

使用

import React from "react";
import ReactDOM from "react-dom";
import PBUVideoPlayer from "pbu-video-player";

ReactDOM.render(<PBUVideoPlayer vid={"xxxxxx"} />, mountedDom);

参数接口说明

PBUVideoPlayer.propTypes = {
	/**
	 * siteId
	 */
	siteId: PropTypes.string.isRequired,

	/**
	 * 视频唯一标识符
	 */
	vid: PropTypes.string.isRequired,
	/**
	 * 播放器宽度
	 */
	width: PropTypes.number,
	/**
	 * 播放器高度
	 */
	height: PropTypes.number,
	/**
	 * 是否自动播放,默认false
	 */
	autoStart: PropTypes.bool,
	/**
	 * 播放器id,
	 */
	playerid: PropTypes.string,
	/**
	 * @param currentPosition  已播放的秒数
	 */
	onRecordPlaytime: PropTypes.func,
	/**
	 * 获取用于鉴权的验证码
	 * @param {string} vid 视频id
	 * @return {string}
	 */
	onGetVerificationCode: PropTypes.func,
	/**
	 * 定时回调播放时长
	 * @param {number}  间隔时间
	 */
	interval: PropTypes.number,
};
4.0.6

1 year ago

4.0.5

2 years ago

4.0.4

3 years ago

4.0.3

3 years ago

4.0.2

3 years ago

4.0.1

3 years ago

3.0.4

3 years ago

3.0.3

3 years ago

4.0.0

3 years ago

3.0.2

3 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.0

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago