Repository navigation
Expand file tree
/
Copy pathVideoView.d.ts
More file actions
69 lines (69 loc) · 2.5 KB
/
Copy pathVideoView.d.ts
File metadata and controls
69 lines (69 loc) · 2.5 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import type { ReactNode } from 'react';
import { PureComponent } from 'react';
import type { VideoViewProps } from './VideoView.types';
/**
* Returns whether the current device supports Picture in Picture (PiP) mode.
*
* > **Note:** All major web browsers support Picture in Picture (PiP) mode except Firefox.
* > For more information, see [MDN web docs](https://developer.mozilla.org/en-US/docs/Web/API/Picture-in-Picture_API#browser_compatibility).
* @returns A `boolean` which is `true` if the device supports PiP mode, and `false` otherwise.
* @platform android
* @platform ios
* @platform web
*/
export declare function isPictureInPictureSupported(): boolean;
export declare class VideoView extends PureComponent<VideoViewProps> {
/**
* A reference to the underlying native view. On web it is a reference to the HTMLVideoElement.
*/
nativeRef: import("react").RefObject<any>;
/**
* Enters fullscreen mode.
*/
enterFullscreen(): Promise<void>;
/**
* Exits fullscreen mode.
*
* > **Note:** On Android the JS runtime is paused when the `VideoView` is in fullscreen mode. Because of this `exitFullscreen` will only work when called from a native listener - see the example below.
*
* @example
* ```tsx
* const ref = useRef<VideoView>()
* const player = useVideoPlayer(source)
*
* // This will work on all platforms
* useEventListener(player, 'playToEnd', () => {
* ref.current?.exitFullscreen();
* });
*
* // This will not work on Android
* const enterAndExit = useCallback(() => {
* setTimeout(() => {
* ref.current?.exitFullscreen()
* }, 5000)
* ref.current?.enterFullscreen()
* },[])
* ```
*/
exitFullscreen(): Promise<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.
*
* > **Note:** The `supportsPictureInPicture` property of the [config plugin](#configuration-in-app-config)
* > has to be configured for the PiP to work.
* @platform android
* @platform ios
* @platform web
*/
startPictureInPicture(): Promise<void>;
/**
* Exits Picture in Picture (PiP) mode.
* @platform android
* @platform ios
* @platform web
*/
stopPictureInPicture(): Promise<void>;
render(): ReactNode;
}
//# sourceMappingURL=VideoView.d.ts.map