/
VideoView.d.ts
41 lines (41 loc) · 1.54 KB
/
VideoView.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { ReactNode, PureComponent } from 'react';
import { VideoPlayer, VideoSource, VideoViewProps } from './VideoView.types';
/**
* Creates a `VideoPlayer`, which will be automatically cleaned up when the component is unmounted.
* @param source - A video source to initialize the player with
* @param setup - A function that allows setting up the player. It will run after the player is created.
*/
export declare function useVideoPlayer(source: VideoSource, setup?: (player: VideoPlayer) => void): VideoPlayer;
/**
* Returns whether the current device supports Picture in Picture (PiP) mode.
* @returns A `boolean` which is `true` if the device supports PiP mode, and `false` otherwise.
* @platform android
* @platform ios
*/
export declare function isPictureInPictureSupported(): Promise<boolean>;
export declare class VideoView extends PureComponent<VideoViewProps> {
nativeRef: import("react").RefObject<any>;
/**
* Enters fullscreen mode.
*/
enterFullscreen(): void;
/**
* Exits fullscreen mode.
*/
exitFullscreen(): void;
/**
* Enters Picture in Picture (PiP) mode. Throws an exception if the device does not support PiP.
* > **Note:** Only one player can be in Picture in Picture (PiP) mode at a time.
* @platform android
* @platform ios 14+
*/
startPictureInPicture(): any;
/**
* Exits Picture in Picture (PiP) mode.
* @platform android
* @platform ios 14+
*/
stopPictureInPicture(): any;
render(): ReactNode;
}
//# sourceMappingURL=VideoView.d.ts.map