import type { Vector3 } from '@anov/3d-core'; export interface IPanel { /** 打开面板 */ open: () => void; /** 关闭面板 */ close: () => void; /** 更新面板 */ update: (option: Option) => void; /** 销毁面板 */ destroy: () => void; /** 播放 */ play: () => void; /** 暂停 */ pause: () => void; /** 设置音量 */ setVolume: (volume: number) => void; /** 跳转 */ seek: (time: number) => void; /** 切换静音 */ toggleMute: () => void; /** 获取视频时长 */ get duration(): number; /** 获取当前播放时间 */ get currentTime(): number; /** 获取是否播放中 */ get isPlaying(): boolean; } export type Option = Partial<{ title: TitleOption; position: Vector3; width: number | string; height: number | string; bgColor: string; bgUrl: string; borderRadius: number; padding: string; closeable: boolean; className: string; customStyle: object; autoplay: boolean; loop: boolean; controls: boolean; muted: boolean; src: string; volume: number; poster: string; videoWidth: number; videoHeight: number; onClose: () => void; }>; export type TitleOption = Partial<{ value: string; fontSize: string; color: string; fontFamily: string; fontWeight: number; lineHeight: number | string; textAlign: string; padding: string; margin: string; icon: string; }>;