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