UNPKG

2.21 kBTypeScriptView Raw
1import * as React from 'react';
2import { View } from 'react-native';
3import { AVPlaybackNativeSource, AVPlaybackStatus, AVPlaybackStatusToSet } from './AV';
4declare type ExponentVideoProps = {
5 source: AVPlaybackNativeSource | null;
6 resizeMode?: object;
7 status?: AVPlaybackStatusToSet;
8 useNativeControls?: boolean;
9 onStatusUpdate?: (event: {
10 nativeEvent: AVPlaybackStatus;
11 }) => void;
12 onReadyForDisplay?: (event: {
13 nativeEvent: object;
14 }) => void;
15 onFullscreenUpdate?: (event: {
16 nativeEvent: object;
17 }) => void;
18 onLoadStart: () => void;
19 onLoad: (event: {
20 nativeEvent: AVPlaybackStatus;
21 }) => void;
22 onError: (event: {
23 nativeEvent: {
24 error: string;
25 };
26 }) => void;
27 scaleX?: number;
28 scaleY?: number;
29 translateX?: number;
30 translateY?: number;
31 rotation?: number;
32} & React.ComponentProps<typeof View>;
33export declare type NaturalSize = {
34 width: number;
35 height: number;
36 orientation: 'portrait' | 'landscape';
37};
38export declare const FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT = 0;
39export declare const FULLSCREEN_UPDATE_PLAYER_DID_PRESENT = 1;
40export declare const FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS = 2;
41export declare const FULLSCREEN_UPDATE_PLAYER_DID_DISMISS = 3;
42export declare const IOS_FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT = 0;
43export declare const IOS_FULLSCREEN_UPDATE_PLAYER_DID_PRESENT = 1;
44export declare const IOS_FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS = 2;
45export declare const IOS_FULLSCREEN_UPDATE_PLAYER_DID_DISMISS = 3;
46export default class ExponentVideo extends React.Component<ExponentVideoProps> {
47 _video?: HTMLVideoElement;
48 componentDidMount(): void;
49 componentWillUnmount(): void;
50 onFullscreenChange: (event: any) => void;
51 onStatusUpdate: () => Promise<void>;
52 onLoadStart: () => void;
53 onLoadedData: (event: any) => void;
54 onError: (event: any) => void;
55 onProgress: () => void;
56 onSeeking: () => void;
57 onEnded: () => void;
58 onLoadedMetadata: () => void;
59 onCanPlay: (event: any) => void;
60 onStalled: () => void;
61 onRef: (ref: HTMLVideoElement) => void;
62 render(): JSX.Element;
63}
64export {};