Repository URL to install this package:
|
Version:
0.14.1 ▾
|
import { ReactNode } from 'react'
import { VideoProps } from 'atoms/Video'
// @todo actions too
export interface VideoPresetStateType {
isPlaying: boolean
hasBeenPlayedAtLeastOnce: boolean
autoPlay: boolean
controls: 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
}