import * as React from "react"; import { EasingFunction, ViewStyle } from "react-native"; import { INodeVideoImmutable, INodeVideoOptions, ITrackImmutable, NodeType } from "@ef-carbon/dom"; import { Milliseconds, MillisecondsAccepted, Url } from "@ef-carbon/primitive"; import { Component, ReferencedTypedComponent } from "@ef-carbon/react-render-component"; import IDimensions from "../IDimensions"; import IFullscreen from "../IFullscreen"; import IBaseProps from "../IProps"; import { ErrorComponent, IProps as IResourceProps, LoadingComponent } from "../Resource/index"; import IMediaVideo from "../media/IVideo"; import { FullscreenComponent, IProps as IControlsProps, SeekComponent, StateComponent, TimeComponent } from "../media/playable/Controls/index"; import State from "../media/playable/State"; import MediaVideo, { IProps as IMediaVideoProps } from "../media/Video"; import { IProps as IFullscreenProps } from "./Fullscreen/index"; export { LoadingComponent, ErrorComponent, FullscreenComponent, SeekComponent, StateComponent, TimeComponent }; export declare type OpenFullscreen = (node: React.ReactNode) => IFullscreen; export declare type ImplementationComponent = ReferencedTypedComponent; export declare type ControlsComponent = Component; export declare type FullscreenImplementationComponent = Component; export interface IProps extends INodeVideoOptions, IBaseProps, Partial, "LoadingComponent" | "ErrorComponent" | "reloadParameter" | "reloadAttempts">> { ImplementationComponent?: ImplementationComponent; FullscreenImplementationComponent?: FullscreenImplementationComponent | null; openFullscreen?: OpenFullscreen; controls?: boolean; controlsDuration?: MillisecondsAccepted; StateComponent?: StateComponent | null; SeekComponent?: SeekComponent | null; seekComponentBreakpoint?: number | null; TimeComponent?: TimeComponent | null; FullscreenComponent?: FullscreenComponent | null; ControlsComponent?: ControlsComponent | null; loop?: boolean; autoPlay?: boolean; positionInterval?: MillisecondsAccepted; onPosition?(position: Milliseconds): void; onStateChange?(state: State): void; onLoad?(): void; animate?: boolean; animationDelay?: number; animationDuration?: number; animationEasing?: EasingFunction; gifify?: boolean; disableFocus?: boolean; } export interface IState { progress: number; reloads: number; error?: Error; dimensions?: IDimensions; size?: IDimensions; fadeDelay: number; scaleDuration: number; state: State; position: Milliseconds; duration: Milliseconds; controls: boolean; } declare class Video extends React.PureComponent implements IMediaVideo, INodeVideoImmutable { private mounted; private dimensionsRef; private resourceRef; private implementationRef; private controlsTimeout; private array; static ImplementationComponent?: ImplementationComponent; static FullscreenImplementationComponent?: FullscreenImplementationComponent; static LoadingComponent?: LoadingComponent; static ErrorComponent?: ErrorComponent; static openFullscreen?: OpenFullscreen; static StateComponent?: StateComponent | null; static SeekComponent?: SeekComponent | null; static TimeComponent?: TimeComponent | null; static FullscreenComponent?: FullscreenComponent | null; static ControlsComponent?: ControlsComponent; static seekComponentBreakpoint?: number | null; static animate: boolean; constructor(props: IProps); componentDidMount(): void; componentWillUnmount(): void; componentDidUpdate({ tracks: prev }: IProps): void; render(): React.ReactNode; readonly gifify: boolean; readonly seekComponentBreakpoint: number | null | undefined; private readonly stateComponent; private readonly seekComponent; private readonly timeComponent; private readonly fullscreenComponent; private readonly fullscreenImplementationComponent; private readonly controlsComponent; readonly type: NodeType.Video; readonly tracks: ReadonlyArray; readonly coverStyle: ViewStyle; readonly looping: boolean; readonly start: Milliseconds; readonly end: Milliseconds; readonly seek: (milliseconds: MillisecondsAccepted) => Promise; readonly position: Milliseconds | undefined; readonly duration: Milliseconds | undefined; readonly transitioning: boolean; readonly buffering: boolean; readonly playing: boolean; play(): Promise; readonly paused: boolean; pause(): Promise; readonly stopped: boolean; stop(): Promise; toggle(): Promise; readonly url: Url; readonly loading: boolean; readonly loaded: boolean; readonly unloaded: boolean; readonly error: Error | undefined; unload(): Promise; readonly width: number | undefined; readonly height: number | undefined; private readonly dimensions; private readonly implementationComponent; private readonly renderControlsComponent; readonly animate: boolean; readonly animationDuration: number; readonly animationEasing: EasingFunction | undefined; readonly animationDelay: number; private readonly renderImplementationComponent; private readonly handleControlsStateChange; private readonly handleSeekStart; private readonly handleSeek; private readonly handleSeekEnd; private readonly handleStateChange; private readonly handlePosition; private readonly handleDuration; private readonly loadingComponent; private readonly renderLoadingComponent; private readonly errorComponent; private readonly renderErrorComponent; private readonly openFullscreen; private readonly handleOpenFullscreen; private readonly handleDefaultAction; private clearControlsTimeout; private setControlsTimeout; private readonly layout; private readonly handleLoad; private readonly handleError; private readonly handleProgress; private readonly handleDimensions; private readonly handleSize; private readonly handleUnload; private readonly handleReload; private readonly refDimensions; private readonly refResource; private readonly refImplementation; private readonly handleScaleBegin; private readonly handleScaleEnd; private updateState; readonly catcher: (error: Error) => void; } export interface IStatic extends React.ComponentClass { } declare const component: IStatic; export { component as Component }; export default Video;