@nutui/nutui-react-taro
Version:
京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序
41 lines (40 loc) • 948 B
TypeScript
import { FunctionComponent } from 'react';
import { VideoProps as VideoPropsTaro, BaseEventOrig } from '@tarojs/components';
export interface VideoProps extends Omit<VideoPropsTaro, 'src'> {
/**
* 视频地址和类型设置
* @default {type: {}, src: ''}
*/
source: {
type: string;
src: string;
}
/**
* 控制视频播放属性
* @default -
*/
options: {
controls?: boolean;
muted?: boolean;
autoplay?: boolean;
poster?: string;
playsinline?: boolean;
loop?: boolean;
}
/**
* 播放
* @default -
*/
onPlay: (event: BaseEventOrig<any>) => void
/**
* 暂停
* @default -
*/
onPause: (event: BaseEventOrig<any>) => void
/**
* 播放完成回调
* @default -
*/
onPlayEnd: (event: BaseEventOrig<any>) => void
}
export declare const Video: FunctionComponent<Partial<VideoProps>>;