Repository URL to install this package:
|
Version:
2.1.16 ▾
|
import { ReactNode } from 'react';
import { VideoProps } from '@skava/ui/dist/components/atoms/Video';
export interface VideoPresetStateType extends Function {
isPlaying: boolean;
hasBeenPlayedAtLeastOnce: boolean;
shouldAutoPlay: boolean;
hasNativeControls: boolean;
shouldLoop: boolean;
setIsPlaying(isPlaying: boolean): void;
toggleIsPlaying(): void;
setProps(props: VideoPresetProps): void;
}
/**
* @todo renderShare, renderTitle, renderLength...
* ^ but not needed as much as `renderControls`
*/
export interface VideoPresetControlProps {
title: string;
slogan: string;
shareTitle: string;
videoLength: string;
state?: VideoPresetStateType;
}
export interface VideoPresetRenderProp extends Function {
(props: VideoPresetProps, state: VideoPresetStateType): ReactNode;
}
export interface VideoPresetProps extends VideoProps {
state?: VideoPresetStateType;
renderVideo?: VideoPresetRenderProp;
renderControls?: VideoPresetRenderProp;
}