Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

pbu-video-player

3.0.1 • Public • Published

PBUVideoPlayer

封装了一下cc视频播放器

安装

npm i pbu-video-player --save

使用

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,
}
 

Keywords

Install

npm i pbu-video-player

DownloadsWeekly Downloads

4

Version

3.0.1

License

MIT

Unpacked Size

860 kB

Total Files

16

Last publish

Collaborators

  • avatar
  • avatar
  • avatar