@huanyer/player
v0.0.2
Published
pdf\video播放器组件
Downloads
2
Readme
项目说明
pdf\video播放器组件
更新日志
- v0.0.2 feat: 更新readme
- v0.0.1
import { PdfPlayer } from '@huanyer/player';
<div style={{width: '100%', maxHeight: '500px', overflow: 'auto'}}>
<PdfPlayer url='xxx' />
</div>
api
| 属性 | 解释 | 默认值 | 必填 | | --- | --- | --- | --- | | url | 资源路径string | 无 | 否 | | base64Data | base64格式数据 | 无 | 否 | | width | pdf页宽度 number | 1420 | 否 | | pageChangeCallback | 页码切换时的回调pageChangeCallback?: (pagination: {pageSize: number,current: number;total: number;}) => void; | 无 | 否 |
video
import { VideoPlayer } from '@huanyer/player';
<VideoPlayer url='xxx' type='video/mp4'></VideoPlayer>
api
| 属性 | 解释 | 默认值 | 必填 | | --- | --- | --- | --- | | url | 资源路径string | 无 | 是 | | type | 视频类型 | application/x-mpegurl | 否 | | initCallback | 返回播放器实例,可以用来做事件绑定,initCallback?: (videoRef: any) => void; | 无 | 否 |