1.0.6 • Published 2 years ago

video-to-canvas v1.0.6

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

canvas-play-video

Getting Started

Install dependencies,

$ npm i canvas-play-video
import { CanPlayVideoMobile } from 'canvas-play-video';

## html
<CanPlayVideoMobile
  customClass={styles.testCan}
  videoEndCb={() => {
    console.log('播放结束');
    }
  }
  videoPause={() => {
  console.log('暂停了视频');
  }}
  videoPlay={() => {
  console.log('播放了视频');
  }}
  videoReadyFunc={()=>{
    console.log('视频加载完成')
  }}
/>

Props

video: 视频地址
poster: 封面地址

canvaStyle:
  width: canvas 宽度
  height: canvas 高度

customClass: 自定义类名

videoEndCb: 播放结束回调函数

videoPause: 视频播放暂停回调函数

videoPlay: 视频播放事件回调函数

videoProps:
  autoplay: true || false //是否自动播放
  muted:true || false //是否静音
1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago