import { ReactNode } from 'react'; import React from 'react'; interface Caption { /** * Title */ title: string; /** * Byline */ byline: string; } export interface VideoPlayerProps extends React.Props { children?: ReactNode; /** * Source of the video */ mediaSource: string; /** * VideoPlayer muted onLoad * * @default false */ muted?: boolean; /** * VideoPlayer autoPLay onLoad * * @default false */ autoPlay?: boolean; /** * VideoPlayer fullWidth onLoad * * @default false */ fullwidth?: boolean; /** * Will only display if fullwidth === true * * @default false */ caption?: Caption; /** * Video poster image when not playing. If "boolean", defaults to first frame of video. Will only work with autoplay === false * * @default false */ poster?: boolean | string; } export interface VideoPlayerState { /** * hasStarted event * * @default false; */ hasStarted: boolean; /** * isControlBarActive event * * @default false; */ isControlBarActive: boolean; /** * hasEnded event * * @default false; */ hasEnded: boolean; /** * isSeeking event * * @default false; */ isSeeking: boolean; /** * playing event * * @default false; */ playing: boolean; /** * Current duration * * @default 0; */ duration: number; /** * played Event * * @default 0; */ played: number; /** * Percentage played * * @default 0; */ playedPerecent: number; }