zy-react-library/components/Video/AliPlayer.d.ts

43 lines
978 B
TypeScript
Raw Normal View History

2025-12-01 11:12:27 +08:00
import type { ForwardRefExoticComponent, RefAttributes } from "react";
export interface AliPlayerProps {
/** 播放地址 */
source?: string | string[];
/** 阿里的 vid */
vid?: string;
/** 阿里的 playAuth */
playAuth?: string;
/** 封面地址 */
cover?: string;
/** 播放器宽度,默认 100% */
width?: string;
/** 播放器高度,默认 600px */
height?: string;
/** 是否自动播放 */
autoplay?: boolean;
/** 是否显示进度条 */
showProgress?: boolean;
/** 是否直播模式 */
isLive?: boolean;
/** 播放开始时间 */
playTime?: number;
/** 播放结束事件 */
onEnded?: () => void;
/** 播放进度更新事件 */
onTimeupdate?: (currentTime: number) => void;
}
export interface AliPlayerRef {
play: () => void;
pause: () => void;
}
/**
*
*/
declare const AliPlayer: ForwardRefExoticComponent<
AliPlayerProps & RefAttributes<AliPlayerRef>
>;
export default AliPlayer;