import { PlayerExtended } from 'components/Player'; import { Dispatch, FunctionComponent, ReactNode } from 'react'; export declare type PlaybackType = 'vod' | 'live' | 'unknown'; export declare type VideoType = 'highlight' | 'event'; export interface YouboraOptions { username: string; 'content.isLive': boolean; 'content.title': string; 'extraparam.1': VideoType; 'extraparam.2': string; 'extraparam.3': string; 'extraparam.4': string; 'extraparam.5': string; 'extraparam.6': string; 'extraparam.7': string; 'extraparam.8': string; 'extraparam.9': string; 'extraparam.10': string; 'extraparam.11': string; 'extraparam.12': string; 'extraparam.13': boolean; } export interface PlayerState { isAtLiveEdge: boolean | null; isInitialized: boolean; isCasting: boolean; isFullscreen: boolean | null; isInfoOpen: boolean | null; isLive: boolean | null; isMediaControlOpen: boolean | null; isPlaying: boolean | null; isSeeking: boolean | null; isStreamError: boolean; playerHeight: number; playerInstance: PlayerExtended | null; playerWidth: number; totalViewers: number; totalTime: number; currentTime: number; playbackType: PlaybackType; startTimeOffset: number; youboraOptions?: YouboraOptions; } export declare type Action = { type: 'initialize'; instance: PlayerExtended; } | { type: 'dispose'; } | { type: 'disableControls'; } | { type: 'enableControls'; } | { type: 'openInfo'; } | { type: 'closeInfo'; } | { type: 'closeMediaControl'; } | { type: 'replay'; elapsedTime: number; duration: number; } | { type: 'updateTotalViewers'; value: number; } | { type: 'updateYouboraOptions'; value: YouboraOptions; } | { type: 'updateTotalTime'; value: number; } | { type: 'updateCurrentTime'; value: number; } | { type: 'resize'; } | { type: 'playerError'; value: string; }; export declare type PlayerActions = { type: 'playerUserActive'; } | { type: 'playerUserInactive'; } | { type: 'playerFirstPlay'; } | { type: 'playerPlaying'; } | { type: 'playerPause'; } | { type: 'playerEnded'; } | { type: 'playerSeekStart'; } | { type: 'playerSeekEnd'; } | { type: 'playerFullscrenChange'; } | { type: 'playerChromecastConnected'; } | { type: 'playerChromecastDisconnected'; } | { type: 'playerTimeUpdate'; } | { type: 'playerQualitySelectorInitialize'; } | { type: 'playerLiveEdgeChange'; }; export declare const PlayerStateContext: import("react").Context<{ state: PlayerState; dispatch: (_a: Action) => void; }>; export declare function usePlayerState(): PlayerState; export declare function usePlayerTimers(): { currentTime: number; totalTime: number; videoOffset: number; }; export declare function usePlayerInstance(): PlayerExtended | null; export declare function useDispatch(): Dispatch; export declare function useOnPlayerInit(): (videoJsPlayer: PlayerExtended) => void; export declare const PlayerStateContextProvider: FunctionComponent<{ children: ReactNode; }>;