diff --git a/docs/pages/versions/unversioned/sdk/av.mdx b/docs/pages/versions/unversioned/sdk/av.mdx
index 55bf4c91dee1b..6dd0efdafadaf 100644
--- a/docs/pages/versions/unversioned/sdk/av.mdx
+++ b/docs/pages/versions/unversioned/sdk/av.mdx
@@ -16,7 +16,7 @@ import {
} from '~/components/plugins/ConfigSection';
import { AndroidPermissions, IOSPermissions } from '~/components/plugins/permissions';
-The [`Audio.Sound`](audio.mdx) objects and [`Video`](video.mdx) components share a unified imperative API for media playback.
+The [`Audio.Sound`](audio.mdx) objects and [`Video`](video-av.mdx) components share a unified imperative API for media playback.
Note that for `Video`, all of the operations are also available via props on the component. However, we recommend using this imperative playback API for most applications where finer control over the state of the video playback is needed.
@@ -108,7 +108,7 @@ render() {
}
```
-See the [video documentation](video.mdx) for further information.
+See the [video documentation](video-av.mdx) for further information.
### Example: `setOnPlaybackStatusUpdate()`
diff --git a/docs/pages/versions/unversioned/sdk/video-av.mdx b/docs/pages/versions/unversioned/sdk/video-av.mdx
new file mode 100644
index 0000000000000..fc86ebf1b849c
--- /dev/null
+++ b/docs/pages/versions/unversioned/sdk/video-av.mdx
@@ -0,0 +1,98 @@
+---
+title: Video (expo-av)
+description: A library that provides an API to implement video playback and recording in apps.
+sourceCodeUrl: 'https://github.com/expo/expo/tree/main/packages/expo-av'
+packageName: 'expo-av'
+iconUrl: '/static/images/packages/expo-av.png'
+platforms: ['android', 'ios', 'web']
+---
+
+import APISection from '~/components/plugins/APISection';
+import { APIInstallSection } from '~/components/plugins/InstallSection';
+import { SnackInline } from '~/ui/components/Snippet';
+
+> **info** The `Video` component from expo-av, which is documented on this page, will be replaced by an improved version in expo-video in an upcoming release (when the new library is stable). [Learn about expo-video](video.mdx)
+
+The `Video` component from **`expo-av`** displays a video inline with the other UI elements in your app.
+
+Much of Video and Audio have common APIs that are documented in [AV documentation](av.mdx). This page covers video-specific props and APIs. We encourage you to skim through this document to get basic video working, and then move on to [AV documentation](av.mdx) for more advanced functionality. The audio experience of video (such as whether to interrupt music already playing in another app, or whether to play sound while the phone is on silent mode) can be customized using the [Audio API](audio.mdx).
+
+## Installation
+
+
+
+## Usage
+
+Here's a simple example of a video with a play/pause button.
+
+
+
+```jsx
+import * as React from 'react';
+import { View, StyleSheet, Button } from 'react-native';
+import { Video, ResizeMode } from 'expo-av';
+
+export default function App() {
+ const video = React.useRef(null);
+ const [status, setStatus] = React.useState({});
+ return (
+
+ setStatus(() => status)}
+ />
+
+
+ status.isPlaying ? video.current.pauseAsync() : video.current.playAsync()
+ }
+ />
+
+
+ );
+}
+
+/* @hide const styles = StyleSheet.create({ ... }); */
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ backgroundColor: '#ecf0f1',
+ },
+ video: {
+ alignSelf: 'center',
+ width: 320,
+ height: 200,
+ },
+ buttons: {
+ flexDirection: 'row',
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+});
+/* @end */
+```
+
+
+
+For more advanced examples, check out the [Playlist example](https://github.com/expo/playlist-example/blob/master/App.js), and the [custom `VideoPlayer` controls component](https://github.com/ihmpavel/expo-video-player/blob/master/lib/index.tsx) that wraps ``, adds custom controls and use the `` API extensively. The `VideoPlayer` controls is used in [this app](https://github.com/expo/harvard-cs50-app).
+
+## API
+
+```js
+import { Video } from 'expo-av';
+```
+
+
+
+## Unified API
+
+The rest of the API on the `Video` component `ref` is the same as the API for `Audio.Sound` - see the [AV documentation](av/#playback) for further information.
diff --git a/docs/pages/versions/unversioned/sdk/video.mdx b/docs/pages/versions/unversioned/sdk/video.mdx
index 67e81a78014d2..709a7fc44d642 100644
--- a/docs/pages/versions/unversioned/sdk/video.mdx
+++ b/docs/pages/versions/unversioned/sdk/video.mdx
@@ -1,9 +1,8 @@
---
title: Video
-description: A library that provides an API to implement video playback and recording in apps.
-sourceCodeUrl: 'https://github.com/expo/expo/tree/main/packages/expo-av'
-packageName: 'expo-av'
-iconUrl: '/static/images/packages/expo-av.png'
+description: A library that provides an API to implement video playback in apps.
+sourceCodeUrl: 'https://github.com/expo/expo/tree/main/packages/expo-video'
+packageName: 'expo-video'
platforms: ['android', 'ios', 'web']
---
@@ -11,9 +10,9 @@ import APISection from '~/components/plugins/APISection';
import { APIInstallSection } from '~/components/plugins/InstallSection';
import { SnackInline } from '~/ui/components/Snippet';
-The `Video` component from **`expo-av`** displays a video inline with the other UI elements in your app.
+> **info** expo-video is a new, experimental package that aims to replace the `Video` component from expo-av with a more modern and reliable implementation. If you are concerned about using a new package, consider [expo-av](video.mdx) until expo-video has stabilized.
-Much of Video and Audio have common APIs that are documented in [AV documentation](av.mdx). This page covers video-specific props and APIs. We encourage you to skim through this document to get basic video working, and then move on to [AV documentation](av.mdx) for more advanced functionality. The audio experience of video (such as whether to interrupt music already playing in another app, or whether to play sound while the phone is on silent mode) can be customized using the [Audio API](audio.mdx).
+A cross-platform, performant video component for React Native and Expo with Web support.
## Installation
@@ -23,35 +22,54 @@ Much of Video and Audio have common APIs that are documented in [AV documentatio
Here's a simple example of a video with a play/pause button.
-
+
```jsx
-import * as React from 'react';
-import { View, StyleSheet, Button } from 'react-native';
-import { Video, ResizeMode } from 'expo-av';
+import { useVideoPlayer, VideoView, VideoSource } from 'expo-video';
+import React, { useEffect, useRef, useState } from 'react';
+import { PixelRatio, StyleSheet, View, Button } from 'react-native';
+
+const videoSource: VideoSource =
+ 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4';
+
+export default function VideoScreen() {
+ const ref = useRef(null);
+ const [isPlaying, setIsPlaying] = useState(true);
+ const player = useVideoPlayer(videoSource, (player) => {
+ player.loop = true;
+ player.play();
+ });
+
+ useEffect(() => {
+ const subscription = player.addListener('playingChange', (isPlaying) => {
+ setIsPlaying(isPlaying);
+ });
+
+ return () => {
+ subscription.remove();
+ };
+ }, [player]);
-export default function App() {
- const video = React.useRef(null);
- const [status, setStatus] = React.useState({});
return (
-
-
+ setStatus(() => status)}
+ player={player}
+ allowsFullscreen
+ allowsPictureInPicture
/>
-
+
- status.isPlaying ? video.current.pauseAsync() : video.current.playAsync()
- }
+ title={isPlaying ? 'Pause' : 'Play'}
+ onPress={() => {
+ if (isPlaying) {
+ player.pause();
+ } else {
+ player.play();
+ }
+ setIsPlaying(!isPlaying);
+ }}
/>
@@ -59,36 +77,29 @@ export default function App() {
}
const styles = StyleSheet.create({
- container: {
+ contentContainer: {
flex: 1,
+ padding: 10,
+ alignItems: 'center',
justifyContent: 'center',
- backgroundColor: '#ecf0f1',
+ paddingHorizontal: 50,
},
video: {
- alignSelf: 'center',
- width: 320,
- height: 200,
+ width: 350,
+ height: 275,
},
- buttons: {
- flexDirection: 'row',
- justifyContent: 'center',
- alignItems: 'center',
+ controlsContainer: {
+ padding: 10,
},
});
```
-For more advanced examples, check out the [Playlist example](https://github.com/expo/playlist-example/blob/master/App.js), and the [custom `VideoPlayer` controls component](https://github.com/ihmpavel/expo-video-player/blob/master/lib/index.tsx) that wraps ``, adds custom controls and use the `` API extensively. The `VideoPlayer` controls is used in [this app](https://github.com/expo/harvard-cs50-app).
-
## API
```js
-import { Video } from 'expo-av';
+import { VideoView, useVideoPlayer } from 'expo-video';
```
-
-## Unified API
-
-The rest of the API on the `Video` component `ref` is the same as the API for `Audio.Sound` - see the [AV documentation](av/#playback) for further information.
diff --git a/docs/public/static/data/unversioned/expo-video-av.json b/docs/public/static/data/unversioned/expo-video-av.json
new file mode 100644
index 0000000000000..cb3b1f024376d
--- /dev/null
+++ b/docs/public/static/data/unversioned/expo-video-av.json
@@ -0,0 +1 @@
+{"name":"expo-video-av","variant":"project","kind":1,"children":[{"name":"default","variant":"declaration","kind":128,"children":[{"name":"constructor","variant":"declaration","kind":512,"signatures":[{"name":"new default","variant":"signature","kind":16384,"parameters":[{"name":"props","variant":"param","kind":32768,"type":{"type":"reference","name":"VideoProps","package":"expo-av"}}],"type":{"type":"reference","name":"Video","package":"expo-av"},"overwrites":{"type":"reference","name":"React.Component.constructor"}}],"overwrites":{"type":"reference","name":"React.Component.constructor"}},{"name":"_nativeRef","variant":"declaration","kind":1024,"type":{"type":"reference","typeArguments":[{"type":"intersection","types":[{"type":"reference","typeArguments":[{"type":"reference","name":"VideoNativeProps","package":"expo-av"},{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"}],"name":"Component","package":"@types/react","qualifiedName":"React.Component"},{"type":"reference","name":"NativeMethods","package":"react-native"}]}],"name":"RefObject","package":"@types/react","qualifiedName":"React.RefObject"},"defaultValue":"..."},{"name":"_onPlaybackStatusUpdate","variant":"declaration","kind":1024,"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"status","variant":"param","kind":32768,"type":{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}}],"type":{"type":"intrinsic","name":"void"}}]}}]},"defaultValue":"null"},{"name":"pauseAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.pauseAsync"}},{"name":"playAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.playAsync"}},{"name":"playFromPositionAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"positionMillis","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"number"}},{"name":"tolerances","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","name":"AVPlaybackTolerance","package":"expo-av"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.playFromPositionAsync"}},{"name":"setIsLoopingAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"isLooping","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.setIsLoopingAsync"}},{"name":"setIsMutedAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"isMuted","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.setIsMutedAsync"}},{"name":"setPositionAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"positionMillis","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"number"}},{"name":"tolerances","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","name":"AVPlaybackTolerance","package":"expo-av"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.setPositionAsync"}},{"name":"setProgressUpdateIntervalAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"progressUpdateIntervalMillis","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.setProgressUpdateIntervalAsync"}},{"name":"setRateAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"rate","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"number"}},{"name":"shouldCorrectPitch","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"boolean"}},{"name":"pitchCorrectionQuality","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","name":"PitchCorrectionQuality","package":"expo-av"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.setRateAsync"}},{"name":"setVolumeAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"volume","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"number"}},{"name":"audioPan","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.setVolumeAsync"}},{"name":"stopAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.stopAsync"}},{"name":"_handleNewStatus","variant":"declaration","kind":2048,"signatures":[{"name":"_handleNewStatus","variant":"signature","kind":4096,"parameters":[{"name":"status","variant":"param","kind":32768,"type":{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}}],"type":{"type":"intrinsic","name":"void"}}]},{"name":"_nativeOnError","variant":"declaration","kind":2048,"signatures":[{"name":"_nativeOnError","variant":"signature","kind":4096,"parameters":[{"name":"event","variant":"param","kind":32768,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"nativeEvent","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"error","variant":"declaration","kind":1024,"type":{"type":"intrinsic","name":"string"}}]}}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"name":"_nativeOnFullscreenUpdate","variant":"declaration","kind":2048,"signatures":[{"name":"_nativeOnFullscreenUpdate","variant":"signature","kind":4096,"parameters":[{"name":"event","variant":"param","kind":32768,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"nativeEvent","variant":"declaration","kind":1024,"type":{"type":"reference","name":"VideoFullscreenUpdateEvent","package":"expo-av"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"name":"_nativeOnLoad","variant":"declaration","kind":2048,"signatures":[{"name":"_nativeOnLoad","variant":"signature","kind":4096,"parameters":[{"name":"event","variant":"param","kind":32768,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"nativeEvent","variant":"declaration","kind":1024,"type":{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"name":"_nativeOnLoadStart","variant":"declaration","kind":2048,"signatures":[{"name":"_nativeOnLoadStart","variant":"signature","kind":4096,"type":{"type":"intrinsic","name":"void"}}]},{"name":"_nativeOnPlaybackStatusUpdate","variant":"declaration","kind":2048,"signatures":[{"name":"_nativeOnPlaybackStatusUpdate","variant":"signature","kind":4096,"parameters":[{"name":"event","variant":"param","kind":32768,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"nativeEvent","variant":"declaration","kind":1024,"type":{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"name":"_nativeOnReadyForDisplay","variant":"declaration","kind":2048,"signatures":[{"name":"_nativeOnReadyForDisplay","variant":"signature","kind":4096,"parameters":[{"name":"event","variant":"param","kind":32768,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"nativeEvent","variant":"declaration","kind":1024,"type":{"type":"reference","name":"VideoReadyForDisplayEvent","package":"expo-av"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"name":"_performOperationAndHandleStatusAsync","variant":"declaration","kind":2048,"signatures":[{"name":"_performOperationAndHandleStatusAsync","variant":"signature","kind":4096,"parameters":[{"name":"operation","variant":"param","kind":32768,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"tag","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]},{"name":"_renderPoster","variant":"declaration","kind":2048,"signatures":[{"name":"_renderPoster","variant":"signature","kind":4096,"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","name":"Element","package":"@types/react","qualifiedName":"__global.JSX.Element"}]}}]},{"name":"_setFullscreen","variant":"declaration","kind":2048,"signatures":[{"name":"_setFullscreen","variant":"signature","kind":4096,"parameters":[{"name":"value","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]},{"name":"componentWillUnmount","variant":"declaration","kind":2048,"signatures":[{"name":"componentWillUnmount","variant":"signature","kind":4096,"type":{"type":"intrinsic","name":"void"},"overwrites":{"type":"reference","name":"React.Component.componentWillUnmount"}}],"overwrites":{"type":"reference","name":"React.Component.componentWillUnmount"}},{"name":"dismissFullscreenPlayer","variant":"declaration","kind":2048,"signatures":[{"name":"dismissFullscreenPlayer","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"This dismisses the fullscreen video view."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A "},{"kind":"code","text":"`Promise`"},{"kind":"text","text":" that is fulfilled with the "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":" of the video once the fullscreen player has finished dismissing,\nor rejects if there was an error, or if this was called on an Android device."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]},{"name":"presentFullscreenPlayer","variant":"declaration","kind":2048,"signatures":[{"name":"presentFullscreenPlayer","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"This presents a fullscreen view of your video component on top of your app's UI. Note that even if "},{"kind":"code","text":"`useNativeControls`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`false`"},{"kind":"text","text":",\nnative controls will be visible in fullscreen mode."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A "},{"kind":"code","text":"`Promise`"},{"kind":"text","text":" that is fulfilled with the "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":" of the video once the fullscreen player has finished presenting,\nor rejects if there was an error, or if this was called on an Android device."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]},{"name":"render","variant":"declaration","kind":2048,"signatures":[{"name":"render","variant":"signature","kind":4096,"type":{"type":"reference","name":"Element","package":"@types/react","qualifiedName":"__global.JSX.Element"},"overwrites":{"type":"reference","name":"React.Component.render"}}],"overwrites":{"type":"reference","name":"React.Component.render"}},{"name":"setOnPlaybackStatusUpdate","variant":"declaration","kind":2048,"signatures":[{"name":"setOnPlaybackStatusUpdate","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Sets a function to be called regularly with the "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":" of the playback object.\n\n"},{"kind":"code","text":"`onPlaybackStatusUpdate`"},{"kind":"text","text":" will be called whenever a call to the API for this playback object completes\n(such as "},{"kind":"code","text":"`setStatusAsync()`"},{"kind":"text","text":", "},{"kind":"code","text":"`getStatusAsync()`"},{"kind":"text","text":", or "},{"kind":"code","text":"`unloadAsync()`"},{"kind":"text","text":"), nd will also be called at regular intervals\nwhile the media is in the loaded state.\n\nSet "},{"kind":"code","text":"`progressUpdateIntervalMillis`"},{"kind":"text","text":" via "},{"kind":"code","text":"`setStatusAsync()`"},{"kind":"text","text":" or "},{"kind":"code","text":"`setProgressUpdateIntervalAsync()`"},{"kind":"text","text":" to modify\nthe interval with which "},{"kind":"code","text":"`onPlaybackStatusUpdate`"},{"kind":"text","text":" is called while loaded."}]},"parameters":[{"name":"onPlaybackStatusUpdate","variant":"param","kind":32768,"comment":{"summary":[{"kind":"text","text":"A function taking a single parameter "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":"."}]},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"status","variant":"param","kind":32768,"type":{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}}],"type":{"type":"intrinsic","name":"void"}}]}}]}}],"type":{"type":"intrinsic","name":"void"}}]}],"extendedTypes":[{"type":"reference","typeArguments":[{"type":"reference","name":"VideoProps","package":"expo-av"},{"type":"reference","name":"VideoState","package":"expo-av"}],"name":"Component","package":"@types/react","qualifiedName":"React.Component"}],"implementedTypes":[{"type":"reference","name":"Playback","package":"expo-av"}]},{"name":"ResizeMode","variant":"declaration","kind":8,"children":[{"name":"CONTAIN","variant":"declaration","kind":16,"comment":{"summary":[{"kind":"text","text":"Fit within component bounds while preserving aspect ratio."}]},"type":{"type":"literal","value":"contain"}},{"name":"COVER","variant":"declaration","kind":16,"comment":{"summary":[{"kind":"text","text":"Fill component bounds while preserving aspect ratio."}]},"type":{"type":"literal","value":"cover"}},{"name":"STRETCH","variant":"declaration","kind":16,"comment":{"summary":[{"kind":"text","text":"Stretch to fill component bounds."}]},"type":{"type":"literal","value":"stretch"}}]},{"name":"VideoFullscreenUpdate","variant":"declaration","kind":8,"children":[{"name":"PLAYER_DID_DISMISS","variant":"declaration","kind":16,"comment":{"summary":[{"kind":"text","text":"Describing that the fullscreen player just finished dismissing."}]},"type":{"type":"literal","value":3}},{"name":"PLAYER_DID_PRESENT","variant":"declaration","kind":16,"comment":{"summary":[{"kind":"text","text":"Describing that the fullscreen player just finished presenting."}]},"type":{"type":"literal","value":1}},{"name":"PLAYER_WILL_DISMISS","variant":"declaration","kind":16,"comment":{"summary":[{"kind":"text","text":"Describing that the fullscreen player is about to dismiss."}]},"type":{"type":"literal","value":2}},{"name":"PLAYER_WILL_PRESENT","variant":"declaration","kind":16,"comment":{"summary":[{"kind":"text","text":"Describing that the fullscreen player is about to present."}]},"type":{"type":"literal","value":0}}]},{"name":"VideoFullscreenUpdateEvent","variant":"declaration","kind":2097152,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"fullscreenUpdate","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"The kind of the fullscreen update."}]},"type":{"type":"reference","name":"VideoFullscreenUpdate","package":"expo-av"}},{"name":"status","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":" of the video. See the [AV documentation](./av) for further information."}]},"type":{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}}]}}},{"name":"VideoNaturalSize","variant":"declaration","kind":2097152,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"height","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"A number describing the height in pixels of the video data."}]},"type":{"type":"intrinsic","name":"number"}},{"name":"orientation","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"A string describing the natural orientation of the video data."}]},"type":{"type":"union","types":[{"type":"literal","value":"portrait"},{"type":"literal","value":"landscape"}]}},{"name":"width","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"A number describing the width in pixels of the video data."}]},"type":{"type":"intrinsic","name":"number"}}]}}},{"name":"VideoProps","variant":"declaration","kind":2097152,"comment":{"summary":[{"kind":"text","text":"The Video component props can be divided into following groups:\n- The "},{"kind":"code","text":"`source`"},{"kind":"text","text":" and "},{"kind":"code","text":"`posterSource`"},{"kind":"text","text":" props customize the source of the video content.\n- The "},{"kind":"code","text":"`useNativeControls`"},{"kind":"text","text":", "},{"kind":"code","text":"`resizeMode`"},{"kind":"text","text":", and "},{"kind":"code","text":"`usePoster`"},{"kind":"text","text":" props customize the UI of the component.\n- The "},{"kind":"code","text":"`onPlaybackStatusUpdate`"},{"kind":"text","text":", "},{"kind":"code","text":"`onReadyForDisplay`"},{"kind":"text","text":", and "},{"kind":"code","text":"`onIOSFullscreenUpdate`"},{"kind":"text","text":" props pass information of the state of the "},{"kind":"code","text":"`Video`"},{"kind":"text","text":" component.\n- The "},{"kind":"code","text":"`onLoadStart`"},{"kind":"text","text":", "},{"kind":"code","text":"`onLoad`"},{"kind":"text","text":", and "},{"kind":"code","text":"`onError`"},{"kind":"text","text":" props are also provided for backwards compatibility with "},{"kind":"code","text":"`Image`"},{"kind":"text","text":"\n (but they are redundant with "},{"kind":"code","text":"`onPlaybackStatusUpdate`"},{"kind":"text","text":").\nFinally, the rest of props are available to control the playback of the video, but we recommend that, for finer control, you use the methods\navailable on the "},{"kind":"code","text":"`ref`"},{"kind":"text","text":" described in the [AV documentation](./av)."}]},"type":{"type":"intersection","types":[{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"PosterComponent","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A react-native "},{"kind":"code","text":"`Image`"},{"kind":"text","text":" like component to display the poster image."}]},"type":{"type":"reference","typeArguments":[{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"source","variant":"declaration","kind":1024,"type":{"type":"indexedAccess","indexType":{"type":"literal","value":"source"},"objectType":{"type":"reference","name":"ImageProps","package":"react-native"}}},{"name":"style","variant":"declaration","kind":1024,"type":{"type":"indexedAccess","indexType":{"type":"literal","value":"style"},"objectType":{"type":"reference","name":"ImageProps","package":"react-native"}}}]}}],"name":"React.ComponentType","package":"@types/react"}},{"name":"audioPan","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The desired audio panning value of the audio for this media. This value must be between "},{"kind":"code","text":"`-1.0`"},{"kind":"text","text":" (full left) and "},{"kind":"code","text":"`1.0`"},{"kind":"text","text":" (full right).\nSee the [AV documentation](./av) for more information."}]},"type":{"type":"intrinsic","name":"number"}},{"name":"isLooping","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A boolean describing if the media should play once ("},{"kind":"code","text":"`false`"},{"kind":"text","text":") or loop indefinitely ("},{"kind":"code","text":"`true`"},{"kind":"text","text":").\nSee the [AV documentation](./av) for more information."}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"isMuted","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A boolean describing if the audio of this media should be muted.\nSee the [AV documentation](./av) for more information."}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"onError","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A function to be called if load or playback have encountered a fatal error. The function is passed a single error message string as a parameter.\nErrors sent here are also set on "},{"kind":"code","text":"`playbackStatus.error`"},{"kind":"text","text":" that are passed into the "},{"kind":"code","text":"`onPlaybackStatusUpdate`"},{"kind":"text","text":" callback."}],"blockTags":[{"tag":"@param","name":"error","content":[]}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A function to be called if load or playback have encountered a fatal error. The function is passed a single error message string as a parameter.\nErrors sent here are also set on "},{"kind":"code","text":"`playbackStatus.error`"},{"kind":"text","text":" that are passed into the "},{"kind":"code","text":"`onPlaybackStatusUpdate`"},{"kind":"text","text":" callback."}]},"parameters":[{"name":"error","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"onFullscreenUpdate","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A function to be called when the state of the native iOS fullscreen view changes (controlled via the "},{"kind":"code","text":"`presentFullscreenPlayer()`"},{"kind":"text","text":"\nand "},{"kind":"code","text":"`dismissFullscreenPlayer()`"},{"kind":"text","text":" methods on the "},{"kind":"code","text":"`Video`"},{"kind":"text","text":"'s "},{"kind":"code","text":"`ref`"},{"kind":"text","text":")."}],"blockTags":[{"tag":"@param","name":"event","content":[]}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A function to be called when the state of the native iOS fullscreen view changes (controlled via the "},{"kind":"code","text":"`presentFullscreenPlayer()`"},{"kind":"text","text":"\nand "},{"kind":"code","text":"`dismissFullscreenPlayer()`"},{"kind":"text","text":" methods on the "},{"kind":"code","text":"`Video`"},{"kind":"text","text":"'s "},{"kind":"code","text":"`ref`"},{"kind":"text","text":")."}]},"parameters":[{"name":"event","variant":"param","kind":32768,"type":{"type":"reference","name":"VideoFullscreenUpdateEvent","package":"expo-av"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"onLoad","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A function to be called once the video has been loaded. The data is streamed so all of it may not have been fetched yet, just enough to render the first frame.\nThe function is called with the "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":" of the video as its parameter. See the [AV documentation](./av) for further information."}],"blockTags":[{"tag":"@param","name":"status","content":[]}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A function to be called once the video has been loaded. The data is streamed so all of it may not have been fetched yet, just enough to render the first frame.\nThe function is called with the "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":" of the video as its parameter. See the [AV documentation](./av) for further information."}]},"parameters":[{"name":"status","variant":"param","kind":32768,"type":{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"onLoadStart","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A function to be called when the video begins to be loaded into memory. Called without any arguments."}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A function to be called when the video begins to be loaded into memory. Called without any arguments."}]},"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"onPlaybackStatusUpdate","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A function to be called regularly with the "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":" of the video. You will likely be using this a lot.\nSee the [AV documentation](./av) for further information on "},{"kind":"code","text":"`onPlaybackStatusUpdate`"},{"kind":"text","text":", and the interval at which it is called."}],"blockTags":[{"tag":"@param","name":"status","content":[]}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A function to be called regularly with the "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":" of the video. You will likely be using this a lot.\nSee the [AV documentation](./av) for further information on "},{"kind":"code","text":"`onPlaybackStatusUpdate`"},{"kind":"text","text":", and the interval at which it is called."}]},"parameters":[{"name":"status","variant":"param","kind":32768,"type":{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"onReadyForDisplay","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A function to be called when the video is ready for display. Note that this function gets called whenever the video's natural size changes."}],"blockTags":[{"tag":"@param","name":"event","content":[]}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A function to be called when the video is ready for display. Note that this function gets called whenever the video's natural size changes."}]},"parameters":[{"name":"event","variant":"param","kind":32768,"type":{"type":"reference","name":"VideoReadyForDisplayEvent","package":"expo-av"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"positionMillis","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The desired position of playback in milliseconds.\nSee the [AV documentation](./av) for more information."}]},"type":{"type":"intrinsic","name":"number"}},{"name":"posterSource","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The source of an optional image to display over the video while it is loading. The following forms are supported:\n- A dictionary of the form "},{"kind":"code","text":"`{ uri: 'http://path/to/file' }`"},{"kind":"text","text":" with a network URL pointing to an image file on the web.\n- "},{"kind":"code","text":"`require('path/to/file')`"},{"kind":"text","text":" for an image file asset in the source code directory."}]},"type":{"type":"indexedAccess","indexType":{"type":"literal","value":"source"},"objectType":{"type":"reference","name":"ImageProps","package":"react-native"}}},{"name":"posterStyle","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"An optional property to pass custom styles to the poster image."}]},"type":{"type":"indexedAccess","indexType":{"type":"literal","value":"style"},"objectType":{"type":"reference","name":"ImageProps","package":"react-native"}}},{"name":"progressUpdateIntervalMillis","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A number describing the new minimum interval in milliseconds between calls of "},{"kind":"code","text":"`onPlaybackStatusUpdate`"},{"kind":"text","text":".\nSee the [AV documentation](./av) for more information."}]},"type":{"type":"intrinsic","name":"number"}},{"name":"rate","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The desired playback rate of the media. This value must be between "},{"kind":"code","text":"`0.0`"},{"kind":"text","text":" and "},{"kind":"code","text":"`32.0`"},{"kind":"text","text":". Only available on Android API version 23 and later and iOS.\nSee the [AV documentation](./av) for more information."}]},"type":{"type":"intrinsic","name":"number"}},{"name":"resizeMode","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A string describing how the video should be scaled for display in the component view bounds.\nMust be one of the ["},{"kind":"code","text":"`ResizeMode`"},{"kind":"text","text":"](#resizemode) enum values."}]},"type":{"type":"reference","name":"ResizeMode","package":"expo-av"}},{"name":"shouldCorrectPitch","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A boolean describing if we should correct the pitch for a changed rate. If set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":", the pitch of the audio will be corrected\n(so a rate different than "},{"kind":"code","text":"`1.0`"},{"kind":"text","text":" will timestretch the audio).\nSee the [AV documentation](./av) for more information."}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"shouldPlay","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A boolean describing if the media is supposed to play. Playback may not start immediately after setting this value for reasons such as buffering.\nMake sure to update your UI based on the "},{"kind":"code","text":"`isPlaying`"},{"kind":"text","text":" and "},{"kind":"code","text":"`isBuffering`"},{"kind":"text","text":" properties of the "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":".\nSee the [AV documentation](./av) for more information."}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"source","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The source of the video data to display. If this prop is "},{"kind":"code","text":"`null`"},{"kind":"text","text":", or left blank, the video component will display nothing.\nNote that this can also be set on the "},{"kind":"code","text":"`ref`"},{"kind":"text","text":" via "},{"kind":"code","text":"`loadAsync()`"},{"kind":"text","text":". See the [AV documentation](./av) for further information."}],"blockTags":[{"tag":"@see","content":[{"kind":"text","text":"The [Android developer documentation](https://developer.android.com/guide/topics/media/platform/supported-formats#video-formats)\nand the [iOS developer documentation](https://developer.apple.com/documentation/coremedia/1564239-video_codec_constants)\nlists of the video formats supported on Android and iOS."}]}]},"type":{"type":"reference","name":"AVPlaybackSource","package":"expo-av"}},{"name":"status","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A dictionary setting a new "},{"kind":"code","text":"`AVPlaybackStatusToSet`"},{"kind":"text","text":" on the video.\nSee the [AV documentation](./av#default-initial--avplaybackstatustoset) for more information on "},{"kind":"code","text":"`AVPlaybackStatusToSet`"},{"kind":"text","text":"."}]},"type":{"type":"reference","name":"AVPlaybackStatusToSet","package":"expo-av"}},{"name":"useNativeControls","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A boolean which, if set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":", will display native playback controls (such as play and pause) within the "},{"kind":"code","text":"`Video`"},{"kind":"text","text":" component.\nIf you'd prefer to use custom controls, you can write them yourself, and/or check out the ["},{"kind":"code","text":"`VideoPlayer`"},{"kind":"text","text":" component](https://github.com/ihmpavel/expo-video-player)."}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"usePoster","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A boolean which, if set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":", will display an image (whose source is set via the prop "},{"kind":"code","text":"`posterSource`"},{"kind":"text","text":") while the video is loading."}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"videoStyle","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"An optional property to pass custom styles to the internal video component."}]},"type":{"type":"reference","typeArguments":[{"type":"reference","name":"ViewStyle","package":"react-native"}],"name":"StyleProp","package":"react-native"}},{"name":"volume","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The desired volume of the audio for this media. This value must be between "},{"kind":"code","text":"`0.0`"},{"kind":"text","text":" (silence) and "},{"kind":"code","text":"`1.0`"},{"kind":"text","text":" (maximum volume).\nSee the [AV documentation](./av) for more information."}]},"type":{"type":"intrinsic","name":"number"}}]}},{"type":"reference","name":"ViewProps","package":"react-native"}]}},{"name":"VideoReadyForDisplayEvent","variant":"declaration","kind":2097152,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"naturalSize","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"An object containing the basic data about video size."}]},"type":{"type":"reference","name":"VideoNaturalSize","package":"expo-av"}},{"name":"status","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":" of the video. See the [AV documentation](./av/#playback-status) for further information."}]},"type":{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}}]}}},{"name":"VideoState","variant":"declaration","kind":2097152,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"showPoster","variant":"declaration","kind":1024,"type":{"type":"intrinsic","name":"boolean"}}]}}}],"packageName":"expo-av"}
\ No newline at end of file
diff --git a/docs/public/static/data/unversioned/expo-video.json b/docs/public/static/data/unversioned/expo-video.json
index 1803c19241ce8..252a1d0f1e228 100644
--- a/docs/public/static/data/unversioned/expo-video.json
+++ b/docs/public/static/data/unversioned/expo-video.json
@@ -1 +1 @@
-{"name":"expo-video","variant":"project","kind":1,"children":[{"name":"default","variant":"declaration","kind":128,"children":[{"name":"constructor","variant":"declaration","kind":512,"signatures":[{"name":"new default","variant":"signature","kind":16384,"parameters":[{"name":"props","variant":"param","kind":32768,"type":{"type":"reference","name":"VideoProps","package":"expo-av"}}],"type":{"type":"reference","name":"Video","package":"expo-av"},"overwrites":{"type":"reference","name":"React.Component.constructor"}}],"overwrites":{"type":"reference","name":"React.Component.constructor"}},{"name":"_nativeRef","variant":"declaration","kind":1024,"type":{"type":"reference","typeArguments":[{"type":"intersection","types":[{"type":"reference","typeArguments":[{"type":"reference","name":"VideoNativeProps","package":"expo-av"},{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"}],"name":"Component","package":"@types/react","qualifiedName":"React.Component"},{"type":"reference","name":"NativeMethods","package":"react-native"}]}],"name":"RefObject","package":"@types/react","qualifiedName":"React.RefObject"},"defaultValue":"..."},{"name":"_onPlaybackStatusUpdate","variant":"declaration","kind":1024,"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"status","variant":"param","kind":32768,"type":{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}}],"type":{"type":"intrinsic","name":"void"}}]}}]},"defaultValue":"null"},{"name":"pauseAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.pauseAsync"}},{"name":"playAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.playAsync"}},{"name":"playFromPositionAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"positionMillis","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"number"}},{"name":"tolerances","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","name":"AVPlaybackTolerance","package":"expo-av"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.playFromPositionAsync"}},{"name":"setIsLoopingAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"isLooping","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.setIsLoopingAsync"}},{"name":"setIsMutedAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"isMuted","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.setIsMutedAsync"}},{"name":"setPositionAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"positionMillis","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"number"}},{"name":"tolerances","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","name":"AVPlaybackTolerance","package":"expo-av"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.setPositionAsync"}},{"name":"setProgressUpdateIntervalAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"progressUpdateIntervalMillis","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.setProgressUpdateIntervalAsync"}},{"name":"setRateAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"rate","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"number"}},{"name":"shouldCorrectPitch","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"boolean"}},{"name":"pitchCorrectionQuality","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","name":"PitchCorrectionQuality","package":"expo-av"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.setRateAsync"}},{"name":"setVolumeAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"volume","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"number"}},{"name":"audioPan","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.setVolumeAsync"}},{"name":"stopAsync","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}},"implementationOf":{"type":"reference","name":"Playback.stopAsync"}},{"name":"_handleNewStatus","variant":"declaration","kind":2048,"signatures":[{"name":"_handleNewStatus","variant":"signature","kind":4096,"parameters":[{"name":"status","variant":"param","kind":32768,"type":{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}}],"type":{"type":"intrinsic","name":"void"}}]},{"name":"_nativeOnError","variant":"declaration","kind":2048,"signatures":[{"name":"_nativeOnError","variant":"signature","kind":4096,"parameters":[{"name":"event","variant":"param","kind":32768,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"nativeEvent","variant":"declaration","kind":1024,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"error","variant":"declaration","kind":1024,"type":{"type":"intrinsic","name":"string"}}]}}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"name":"_nativeOnFullscreenUpdate","variant":"declaration","kind":2048,"signatures":[{"name":"_nativeOnFullscreenUpdate","variant":"signature","kind":4096,"parameters":[{"name":"event","variant":"param","kind":32768,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"nativeEvent","variant":"declaration","kind":1024,"type":{"type":"reference","name":"VideoFullscreenUpdateEvent","package":"expo-av"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"name":"_nativeOnLoad","variant":"declaration","kind":2048,"signatures":[{"name":"_nativeOnLoad","variant":"signature","kind":4096,"parameters":[{"name":"event","variant":"param","kind":32768,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"nativeEvent","variant":"declaration","kind":1024,"type":{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"name":"_nativeOnLoadStart","variant":"declaration","kind":2048,"signatures":[{"name":"_nativeOnLoadStart","variant":"signature","kind":4096,"type":{"type":"intrinsic","name":"void"}}]},{"name":"_nativeOnPlaybackStatusUpdate","variant":"declaration","kind":2048,"signatures":[{"name":"_nativeOnPlaybackStatusUpdate","variant":"signature","kind":4096,"parameters":[{"name":"event","variant":"param","kind":32768,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"nativeEvent","variant":"declaration","kind":1024,"type":{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"name":"_nativeOnReadyForDisplay","variant":"declaration","kind":2048,"signatures":[{"name":"_nativeOnReadyForDisplay","variant":"signature","kind":4096,"parameters":[{"name":"event","variant":"param","kind":32768,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"nativeEvent","variant":"declaration","kind":1024,"type":{"type":"reference","name":"VideoReadyForDisplayEvent","package":"expo-av"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"name":"_performOperationAndHandleStatusAsync","variant":"declaration","kind":2048,"signatures":[{"name":"_performOperationAndHandleStatusAsync","variant":"signature","kind":4096,"parameters":[{"name":"operation","variant":"param","kind":32768,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"tag","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]}}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]},{"name":"_renderPoster","variant":"declaration","kind":2048,"signatures":[{"name":"_renderPoster","variant":"signature","kind":4096,"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","name":"Element","package":"@types/react","qualifiedName":"__global.JSX.Element"}]}}]},{"name":"_setFullscreen","variant":"declaration","kind":2048,"signatures":[{"name":"_setFullscreen","variant":"signature","kind":4096,"parameters":[{"name":"value","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]},{"name":"componentWillUnmount","variant":"declaration","kind":2048,"signatures":[{"name":"componentWillUnmount","variant":"signature","kind":4096,"type":{"type":"intrinsic","name":"void"},"overwrites":{"type":"reference","name":"React.Component.componentWillUnmount"}}],"overwrites":{"type":"reference","name":"React.Component.componentWillUnmount"}},{"name":"dismissFullscreenPlayer","variant":"declaration","kind":2048,"signatures":[{"name":"dismissFullscreenPlayer","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"This dismisses the fullscreen video view."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A "},{"kind":"code","text":"`Promise`"},{"kind":"text","text":" that is fulfilled with the "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":" of the video once the fullscreen player has finished dismissing,\nor rejects if there was an error, or if this was called on an Android device."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]},{"name":"presentFullscreenPlayer","variant":"declaration","kind":2048,"signatures":[{"name":"presentFullscreenPlayer","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"This presents a fullscreen view of your video component on top of your app's UI. Note that even if "},{"kind":"code","text":"`useNativeControls`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`false`"},{"kind":"text","text":",\nnative controls will be visible in fullscreen mode."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A "},{"kind":"code","text":"`Promise`"},{"kind":"text","text":" that is fulfilled with the "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":" of the video once the fullscreen player has finished presenting,\nor rejects if there was an error, or if this was called on an Android device."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}],"name":"Promise","package":"typescript"}}]},{"name":"render","variant":"declaration","kind":2048,"signatures":[{"name":"render","variant":"signature","kind":4096,"type":{"type":"reference","name":"Element","package":"@types/react","qualifiedName":"__global.JSX.Element"},"overwrites":{"type":"reference","name":"React.Component.render"}}],"overwrites":{"type":"reference","name":"React.Component.render"}},{"name":"setOnPlaybackStatusUpdate","variant":"declaration","kind":2048,"signatures":[{"name":"setOnPlaybackStatusUpdate","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Sets a function to be called regularly with the "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":" of the playback object.\n\n"},{"kind":"code","text":"`onPlaybackStatusUpdate`"},{"kind":"text","text":" will be called whenever a call to the API for this playback object completes\n(such as "},{"kind":"code","text":"`setStatusAsync()`"},{"kind":"text","text":", "},{"kind":"code","text":"`getStatusAsync()`"},{"kind":"text","text":", or "},{"kind":"code","text":"`unloadAsync()`"},{"kind":"text","text":"), nd will also be called at regular intervals\nwhile the media is in the loaded state.\n\nSet "},{"kind":"code","text":"`progressUpdateIntervalMillis`"},{"kind":"text","text":" via "},{"kind":"code","text":"`setStatusAsync()`"},{"kind":"text","text":" or "},{"kind":"code","text":"`setProgressUpdateIntervalAsync()`"},{"kind":"text","text":" to modify\nthe interval with which "},{"kind":"code","text":"`onPlaybackStatusUpdate`"},{"kind":"text","text":" is called while loaded."}]},"parameters":[{"name":"onPlaybackStatusUpdate","variant":"param","kind":32768,"comment":{"summary":[{"kind":"text","text":"A function taking a single parameter "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":"."}]},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"status","variant":"param","kind":32768,"type":{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}}],"type":{"type":"intrinsic","name":"void"}}]}}]}}],"type":{"type":"intrinsic","name":"void"}}]}],"extendedTypes":[{"type":"reference","typeArguments":[{"type":"reference","name":"VideoProps","package":"expo-av"},{"type":"reference","name":"VideoState","package":"expo-av"}],"name":"Component","package":"@types/react","qualifiedName":"React.Component"}],"implementedTypes":[{"type":"reference","name":"Playback","package":"expo-av"}]},{"name":"ResizeMode","variant":"declaration","kind":8,"children":[{"name":"CONTAIN","variant":"declaration","kind":16,"comment":{"summary":[{"kind":"text","text":"Fit within component bounds while preserving aspect ratio."}]},"type":{"type":"literal","value":"contain"}},{"name":"COVER","variant":"declaration","kind":16,"comment":{"summary":[{"kind":"text","text":"Fill component bounds while preserving aspect ratio."}]},"type":{"type":"literal","value":"cover"}},{"name":"STRETCH","variant":"declaration","kind":16,"comment":{"summary":[{"kind":"text","text":"Stretch to fill component bounds."}]},"type":{"type":"literal","value":"stretch"}}]},{"name":"VideoFullscreenUpdate","variant":"declaration","kind":8,"children":[{"name":"PLAYER_DID_DISMISS","variant":"declaration","kind":16,"comment":{"summary":[{"kind":"text","text":"Describing that the fullscreen player just finished dismissing."}]},"type":{"type":"literal","value":3}},{"name":"PLAYER_DID_PRESENT","variant":"declaration","kind":16,"comment":{"summary":[{"kind":"text","text":"Describing that the fullscreen player just finished presenting."}]},"type":{"type":"literal","value":1}},{"name":"PLAYER_WILL_DISMISS","variant":"declaration","kind":16,"comment":{"summary":[{"kind":"text","text":"Describing that the fullscreen player is about to dismiss."}]},"type":{"type":"literal","value":2}},{"name":"PLAYER_WILL_PRESENT","variant":"declaration","kind":16,"comment":{"summary":[{"kind":"text","text":"Describing that the fullscreen player is about to present."}]},"type":{"type":"literal","value":0}}]},{"name":"VideoFullscreenUpdateEvent","variant":"declaration","kind":2097152,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"fullscreenUpdate","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"The kind of the fullscreen update."}]},"type":{"type":"reference","name":"VideoFullscreenUpdate","package":"expo-av"}},{"name":"status","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":" of the video. See the [AV documentation](./av) for further information."}]},"type":{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}}]}}},{"name":"VideoNaturalSize","variant":"declaration","kind":2097152,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"height","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"A number describing the height in pixels of the video data."}]},"type":{"type":"intrinsic","name":"number"}},{"name":"orientation","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"A string describing the natural orientation of the video data."}]},"type":{"type":"union","types":[{"type":"literal","value":"portrait"},{"type":"literal","value":"landscape"}]}},{"name":"width","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"A number describing the width in pixels of the video data."}]},"type":{"type":"intrinsic","name":"number"}}]}}},{"name":"VideoProps","variant":"declaration","kind":2097152,"comment":{"summary":[{"kind":"text","text":"The Video component props can be divided into following groups:\n- The "},{"kind":"code","text":"`source`"},{"kind":"text","text":" and "},{"kind":"code","text":"`posterSource`"},{"kind":"text","text":" props customize the source of the video content.\n- The "},{"kind":"code","text":"`useNativeControls`"},{"kind":"text","text":", "},{"kind":"code","text":"`resizeMode`"},{"kind":"text","text":", and "},{"kind":"code","text":"`usePoster`"},{"kind":"text","text":" props customize the UI of the component.\n- The "},{"kind":"code","text":"`onPlaybackStatusUpdate`"},{"kind":"text","text":", "},{"kind":"code","text":"`onReadyForDisplay`"},{"kind":"text","text":", and "},{"kind":"code","text":"`onIOSFullscreenUpdate`"},{"kind":"text","text":" props pass information of the state of the "},{"kind":"code","text":"`Video`"},{"kind":"text","text":" component.\n- The "},{"kind":"code","text":"`onLoadStart`"},{"kind":"text","text":", "},{"kind":"code","text":"`onLoad`"},{"kind":"text","text":", and "},{"kind":"code","text":"`onError`"},{"kind":"text","text":" props are also provided for backwards compatibility with "},{"kind":"code","text":"`Image`"},{"kind":"text","text":"\n (but they are redundant with "},{"kind":"code","text":"`onPlaybackStatusUpdate`"},{"kind":"text","text":").\nFinally, the rest of props are available to control the playback of the video, but we recommend that, for finer control, you use the methods\navailable on the "},{"kind":"code","text":"`ref`"},{"kind":"text","text":" described in the [AV documentation](./av)."}]},"type":{"type":"intersection","types":[{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"PosterComponent","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A react-native "},{"kind":"code","text":"`Image`"},{"kind":"text","text":" like component to display the poster image."}]},"type":{"type":"reference","typeArguments":[{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"source","variant":"declaration","kind":1024,"type":{"type":"indexedAccess","indexType":{"type":"literal","value":"source"},"objectType":{"type":"reference","name":"ImageProps","package":"react-native"}}},{"name":"style","variant":"declaration","kind":1024,"type":{"type":"indexedAccess","indexType":{"type":"literal","value":"style"},"objectType":{"type":"reference","name":"ImageProps","package":"react-native"}}}]}}],"name":"React.ComponentType","package":"@types/react"}},{"name":"audioPan","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The desired audio panning value of the audio for this media. This value must be between "},{"kind":"code","text":"`-1.0`"},{"kind":"text","text":" (full left) and "},{"kind":"code","text":"`1.0`"},{"kind":"text","text":" (full right).\nSee the [AV documentation](./av) for more information."}]},"type":{"type":"intrinsic","name":"number"}},{"name":"isLooping","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A boolean describing if the media should play once ("},{"kind":"code","text":"`false`"},{"kind":"text","text":") or loop indefinitely ("},{"kind":"code","text":"`true`"},{"kind":"text","text":").\nSee the [AV documentation](./av) for more information."}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"isMuted","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A boolean describing if the audio of this media should be muted.\nSee the [AV documentation](./av) for more information."}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"onError","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A function to be called if load or playback have encountered a fatal error. The function is passed a single error message string as a parameter.\nErrors sent here are also set on "},{"kind":"code","text":"`playbackStatus.error`"},{"kind":"text","text":" that are passed into the "},{"kind":"code","text":"`onPlaybackStatusUpdate`"},{"kind":"text","text":" callback."}],"blockTags":[{"tag":"@param","name":"error","content":[]}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A function to be called if load or playback have encountered a fatal error. The function is passed a single error message string as a parameter.\nErrors sent here are also set on "},{"kind":"code","text":"`playbackStatus.error`"},{"kind":"text","text":" that are passed into the "},{"kind":"code","text":"`onPlaybackStatusUpdate`"},{"kind":"text","text":" callback."}]},"parameters":[{"name":"error","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"onFullscreenUpdate","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A function to be called when the state of the native iOS fullscreen view changes (controlled via the "},{"kind":"code","text":"`presentFullscreenPlayer()`"},{"kind":"text","text":"\nand "},{"kind":"code","text":"`dismissFullscreenPlayer()`"},{"kind":"text","text":" methods on the "},{"kind":"code","text":"`Video`"},{"kind":"text","text":"'s "},{"kind":"code","text":"`ref`"},{"kind":"text","text":")."}],"blockTags":[{"tag":"@param","name":"event","content":[]}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A function to be called when the state of the native iOS fullscreen view changes (controlled via the "},{"kind":"code","text":"`presentFullscreenPlayer()`"},{"kind":"text","text":"\nand "},{"kind":"code","text":"`dismissFullscreenPlayer()`"},{"kind":"text","text":" methods on the "},{"kind":"code","text":"`Video`"},{"kind":"text","text":"'s "},{"kind":"code","text":"`ref`"},{"kind":"text","text":")."}]},"parameters":[{"name":"event","variant":"param","kind":32768,"type":{"type":"reference","name":"VideoFullscreenUpdateEvent","package":"expo-av"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"onLoad","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A function to be called once the video has been loaded. The data is streamed so all of it may not have been fetched yet, just enough to render the first frame.\nThe function is called with the "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":" of the video as its parameter. See the [AV documentation](./av) for further information."}],"blockTags":[{"tag":"@param","name":"status","content":[]}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A function to be called once the video has been loaded. The data is streamed so all of it may not have been fetched yet, just enough to render the first frame.\nThe function is called with the "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":" of the video as its parameter. See the [AV documentation](./av) for further information."}]},"parameters":[{"name":"status","variant":"param","kind":32768,"type":{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"onLoadStart","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A function to be called when the video begins to be loaded into memory. Called without any arguments."}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A function to be called when the video begins to be loaded into memory. Called without any arguments."}]},"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"onPlaybackStatusUpdate","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A function to be called regularly with the "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":" of the video. You will likely be using this a lot.\nSee the [AV documentation](./av) for further information on "},{"kind":"code","text":"`onPlaybackStatusUpdate`"},{"kind":"text","text":", and the interval at which it is called."}],"blockTags":[{"tag":"@param","name":"status","content":[]}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A function to be called regularly with the "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":" of the video. You will likely be using this a lot.\nSee the [AV documentation](./av) for further information on "},{"kind":"code","text":"`onPlaybackStatusUpdate`"},{"kind":"text","text":", and the interval at which it is called."}]},"parameters":[{"name":"status","variant":"param","kind":32768,"type":{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"onReadyForDisplay","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A function to be called when the video is ready for display. Note that this function gets called whenever the video's natural size changes."}],"blockTags":[{"tag":"@param","name":"event","content":[]}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A function to be called when the video is ready for display. Note that this function gets called whenever the video's natural size changes."}]},"parameters":[{"name":"event","variant":"param","kind":32768,"type":{"type":"reference","name":"VideoReadyForDisplayEvent","package":"expo-av"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"positionMillis","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The desired position of playback in milliseconds.\nSee the [AV documentation](./av) for more information."}]},"type":{"type":"intrinsic","name":"number"}},{"name":"posterSource","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The source of an optional image to display over the video while it is loading. The following forms are supported:\n- A dictionary of the form "},{"kind":"code","text":"`{ uri: 'http://path/to/file' }`"},{"kind":"text","text":" with a network URL pointing to an image file on the web.\n- "},{"kind":"code","text":"`require('path/to/file')`"},{"kind":"text","text":" for an image file asset in the source code directory."}]},"type":{"type":"indexedAccess","indexType":{"type":"literal","value":"source"},"objectType":{"type":"reference","name":"ImageProps","package":"react-native"}}},{"name":"posterStyle","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"An optional property to pass custom styles to the poster image."}]},"type":{"type":"indexedAccess","indexType":{"type":"literal","value":"style"},"objectType":{"type":"reference","name":"ImageProps","package":"react-native"}}},{"name":"progressUpdateIntervalMillis","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A number describing the new minimum interval in milliseconds between calls of "},{"kind":"code","text":"`onPlaybackStatusUpdate`"},{"kind":"text","text":".\nSee the [AV documentation](./av) for more information."}]},"type":{"type":"intrinsic","name":"number"}},{"name":"rate","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The desired playback rate of the media. This value must be between "},{"kind":"code","text":"`0.0`"},{"kind":"text","text":" and "},{"kind":"code","text":"`32.0`"},{"kind":"text","text":". Only available on Android API version 23 and later and iOS.\nSee the [AV documentation](./av) for more information."}]},"type":{"type":"intrinsic","name":"number"}},{"name":"resizeMode","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A string describing how the video should be scaled for display in the component view bounds.\nMust be one of the ["},{"kind":"code","text":"`ResizeMode`"},{"kind":"text","text":"](#resizemode) enum values."}]},"type":{"type":"reference","name":"ResizeMode","package":"expo-av"}},{"name":"shouldCorrectPitch","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A boolean describing if we should correct the pitch for a changed rate. If set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":", the pitch of the audio will be corrected\n(so a rate different than "},{"kind":"code","text":"`1.0`"},{"kind":"text","text":" will timestretch the audio).\nSee the [AV documentation](./av) for more information."}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"shouldPlay","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A boolean describing if the media is supposed to play. Playback may not start immediately after setting this value for reasons such as buffering.\nMake sure to update your UI based on the "},{"kind":"code","text":"`isPlaying`"},{"kind":"text","text":" and "},{"kind":"code","text":"`isBuffering`"},{"kind":"text","text":" properties of the "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":".\nSee the [AV documentation](./av) for more information."}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"source","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The source of the video data to display. If this prop is "},{"kind":"code","text":"`null`"},{"kind":"text","text":", or left blank, the video component will display nothing.\nNote that this can also be set on the "},{"kind":"code","text":"`ref`"},{"kind":"text","text":" via "},{"kind":"code","text":"`loadAsync()`"},{"kind":"text","text":". See the [AV documentation](./av) for further information."}],"blockTags":[{"tag":"@see","content":[{"kind":"text","text":"The [Android developer documentation](https://developer.android.com/guide/topics/media/platform/supported-formats#video-formats)\nand the [iOS developer documentation](https://developer.apple.com/documentation/coremedia/1564239-video_codec_constants)\nlists of the video formats supported on Android and iOS."}]}]},"type":{"type":"reference","name":"AVPlaybackSource","package":"expo-av"}},{"name":"status","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A dictionary setting a new "},{"kind":"code","text":"`AVPlaybackStatusToSet`"},{"kind":"text","text":" on the video.\nSee the [AV documentation](./av#default-initial--avplaybackstatustoset) for more information on "},{"kind":"code","text":"`AVPlaybackStatusToSet`"},{"kind":"text","text":"."}]},"type":{"type":"reference","name":"AVPlaybackStatusToSet","package":"expo-av"}},{"name":"useNativeControls","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A boolean which, if set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":", will display native playback controls (such as play and pause) within the "},{"kind":"code","text":"`Video`"},{"kind":"text","text":" component.\nIf you'd prefer to use custom controls, you can write them yourself, and/or check out the ["},{"kind":"code","text":"`VideoPlayer`"},{"kind":"text","text":" component](https://github.com/ihmpavel/expo-video-player)."}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"usePoster","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A boolean which, if set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":", will display an image (whose source is set via the prop "},{"kind":"code","text":"`posterSource`"},{"kind":"text","text":") while the video is loading."}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"videoStyle","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"An optional property to pass custom styles to the internal video component."}]},"type":{"type":"reference","typeArguments":[{"type":"reference","name":"ViewStyle","package":"react-native"}],"name":"StyleProp","package":"react-native"}},{"name":"volume","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The desired volume of the audio for this media. This value must be between "},{"kind":"code","text":"`0.0`"},{"kind":"text","text":" (silence) and "},{"kind":"code","text":"`1.0`"},{"kind":"text","text":" (maximum volume).\nSee the [AV documentation](./av) for more information."}]},"type":{"type":"intrinsic","name":"number"}}]}},{"type":"reference","name":"ViewProps","package":"react-native"}]}},{"name":"VideoReadyForDisplayEvent","variant":"declaration","kind":2097152,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"naturalSize","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"An object containing the basic data about video size."}]},"type":{"type":"reference","name":"VideoNaturalSize","package":"expo-av"}},{"name":"status","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The "},{"kind":"code","text":"`AVPlaybackStatus`"},{"kind":"text","text":" of the video. See the [AV documentation](./av/#playback-status) for further information."}]},"type":{"type":"reference","name":"AVPlaybackStatus","package":"expo-av"}}]}}},{"name":"VideoState","variant":"declaration","kind":2097152,"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"showPoster","variant":"declaration","kind":1024,"type":{"type":"intrinsic","name":"boolean"}}]}}}],"packageName":"expo-av"}
\ No newline at end of file
+{"name":"expo-video","variant":"project","kind":1,"children":[{"name":"DRMOptions","variant":"declaration","kind":2097152,"comment":{"summary":[{"kind":"text","text":"Specifies DRM options which will be used by the player while loading the video."}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"certificateUrl","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Specifies the certificate URL for the FairPlay DRM."}],"blockTags":[{"tag":"@platform","content":[{"kind":"text","text":"ios"}]}]},"type":{"type":"intrinsic","name":"string"}},{"name":"contentId","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Specifies the content ID of the stream."}],"blockTags":[{"tag":"@platform","content":[{"kind":"text","text":"ios"}]}]},"type":{"type":"intrinsic","name":"string"}},{"name":"headers","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Determines headers sent to the license server on license requests."}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"indexSignature":{"name":"__index","variant":"signature","kind":8192,"parameters":[{"name":"key","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"intrinsic","name":"string"}}}}},{"name":"licenseServer","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Determines the license server URL."}]},"type":{"type":"intrinsic","name":"string"}},{"name":"multiKey","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Specifies whether the DRM is a multi-key DRM."}],"blockTags":[{"tag":"@platform","content":[{"kind":"text","text":"android"}]}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"type","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Determines which type of DRM to use."}]},"type":{"type":"reference","name":"DRMType","package":"expo-video"}}]}}},{"name":"DRMType","variant":"declaration","kind":2097152,"comment":{"summary":[{"kind":"text","text":"Specifies which type of DRM to use. Android supports Widevine, PlayReady and ClearKey, iOS supports FairPlay."}]},"type":{"type":"union","types":[{"type":"literal","value":"clearkey"},{"type":"literal","value":"fairplay"},{"type":"literal","value":"playready"},{"type":"literal","value":"widevine"}]}},{"name":"isPictureInPictureSupported","variant":"declaration","kind":64,"signatures":[{"name":"isPictureInPictureSupported","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Returns whether the current device supports Picture in Picture (PiP) mode."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A "},{"kind":"code","text":"`boolean`"},{"kind":"text","text":" which is "},{"kind":"code","text":"`true`"},{"kind":"text","text":" if the device supports PiP mode, and "},{"kind":"code","text":"`false`"},{"kind":"text","text":" otherwise."}]},{"tag":"@platform","content":[{"kind":"text","text":"android"}]},{"tag":"@platform","content":[{"kind":"text","text":"ios"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript"}}]},{"name":"PlayerError","variant":"declaration","kind":2097152,"comment":{"summary":[{"kind":"text","text":"Contains information about any errors that the player encountered during the playback"}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"message","variant":"declaration","kind":1024,"type":{"type":"intrinsic","name":"string"}}]}}},{"name":"useVideoPlayer","variant":"declaration","kind":64,"signatures":[{"name":"useVideoPlayer","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Creates a "},{"kind":"code","text":"`VideoPlayer`"},{"kind":"text","text":", which will be automatically cleaned up when the component is unmounted."}]},"parameters":[{"name":"source","variant":"param","kind":32768,"comment":{"summary":[{"kind":"text","text":"A video source to initialize the player with"}]},"type":{"type":"reference","name":"VideoSource","package":"expo-video"}},{"name":"setup","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A function that allows setting up the player. It will run after the player is created."}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"parameters":[{"name":"player","variant":"param","kind":32768,"type":{"type":"reference","name":"VideoPlayer","package":"expo-video"}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","name":"VideoPlayer","package":"expo-video"}}]},{"name":"VideoContentFit","variant":"declaration","kind":2097152,"comment":{"summary":[{"kind":"text","text":"Describes how a video should be scaled to fit in a container.\n- "},{"kind":"code","text":"`contain`"},{"kind":"text","text":": The video maintains its aspect ratio and fits inside the container, with possible letterboxing/pillarboxing.\n- "},{"kind":"code","text":"`cover`"},{"kind":"text","text":": The video maintains its aspect ratio and covers the entire container, potentially cropping some portions.\n- "},{"kind":"code","text":"`fill`"},{"kind":"text","text":": The video stretches/squeezes to completely fill the container, potentially causing distortion."}]},"type":{"type":"union","types":[{"type":"literal","value":"contain"},{"type":"literal","value":"cover"},{"type":"literal","value":"fill"}]}},{"name":"VideoPlayer","variant":"declaration","kind":128,"comment":{"summary":[{"kind":"text","text":"A class that represents an instance of the video player."}]},"children":[{"name":"constructor","variant":"declaration","kind":512,"signatures":[{"name":"new VideoPlayer","variant":"signature","kind":16384,"comment":{"summary":[{"kind":"text","text":"Creates a new event emitter instance."}]},"type":{"type":"reference","name":"VideoPlayer","package":"expo-video"},"inheritedFrom":{"type":"reference","name":"SharedObject.constructor"}}],"inheritedFrom":{"type":"reference","name":"SharedObject.constructor"}},{"name":"currentTime","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Integer value representing the current position in seconds."}]},"type":{"type":"intrinsic","name":"number"}},{"name":"loop","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Determines whether the player should automatically replay after reaching the end of the video."}],"blockTags":[{"tag":"@default","content":[{"kind":"text","text":"false"}]}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"muted","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Boolean value whether the player is currently muted."}],"blockTags":[{"tag":"@default","content":[{"kind":"text","text":"false"}]}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"playbackRate","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Float value between 0 and 16 indicating the current playback speed of the player."}],"blockTags":[{"tag":"@default","content":[{"kind":"text","text":"1.0"}]}]},"type":{"type":"intrinsic","name":"number"}},{"name":"playing","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Boolean value whether the player is currently playing.\n> This property is get-only, use "},{"kind":"code","text":"`play`"},{"kind":"text","text":" and "},{"kind":"code","text":"`pause`"},{"kind":"text","text":" methods to control the playback."}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"preservesPitch","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Boolean value indicating if the player should correct audio pitch when the playback speed changes.\n> On web, changing this property is not supported, the player will always correct the pitch."}],"blockTags":[{"tag":"@default","content":[{"kind":"text","text":"true"}]},{"tag":"@platform","content":[{"kind":"text","text":"android"}]},{"tag":"@platform","content":[{"kind":"text","text":"ios"}]}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"status","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Indicates the current status of the player.\n> This property is get-only"}]},"type":{"type":"reference","name":"VideoPlayerStatus","package":"expo-video"}},{"name":"staysActiveInBackground","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Determines whether the player should continue playing after the app enters the background."}],"blockTags":[{"tag":"@default","content":[{"kind":"text","text":"false"}]},{"tag":"@platform","content":[{"kind":"text","text":"ios"}]},{"tag":"@platform","content":[{"kind":"text","text":"android"}]}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"volume","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Float value between 0 and 1 representing the current volume.\nMuting the player doesn't affect the volume. In other words, when the player is muted, the volume is the same as\nwhen unmuted. Similarly, setting the volume doesn't unmute the player."}],"blockTags":[{"tag":"@default","content":[{"kind":"text","text":"1.0"}]}]},"type":{"type":"intrinsic","name":"number"}},{"name":"addListener","variant":"declaration","kind":2048,"signatures":[{"name":"addListener","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Adds a listener for the given event name."}]},"typeParameter":[{"name":"EventName","variant":"typeParam","kind":131072,"type":{"type":"typeOperator","operator":"keyof","target":{}}}],"parameters":[{"name":"eventName","variant":"param","kind":32768,"type":{"type":"reference","name":"EventName","package":"expo-modules-core","refersToTypeParameter":true}},{"name":"listener","variant":"param","kind":32768,"type":{"type":"indexedAccess","indexType":{"type":"reference","name":"EventName","package":"expo-modules-core","refersToTypeParameter":true},"objectType":{"type":"reference","name":"VideoPlayerEvents","package":"expo-video"}}}],"type":{"type":"reference","name":"EventSubscription","package":"expo-modules-core"},"inheritedFrom":{"type":"reference","name":"SharedObject.addListener"}}],"inheritedFrom":{"type":"reference","name":"SharedObject.addListener"}},{"name":"emit","variant":"declaration","kind":2048,"signatures":[{"name":"emit","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Synchronously calls all of the listeners attached to that specific event.\nThe event can include any number of arguments that will be passed to the listeners."}]},"typeParameter":[{"name":"EventName","variant":"typeParam","kind":131072,"type":{"type":"typeOperator","operator":"keyof","target":{}}}],"parameters":[{"name":"eventName","variant":"param","kind":32768,"type":{"type":"reference","name":"EventName","package":"expo-modules-core","refersToTypeParameter":true}},{"name":"args","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"reference","typeArguments":[{"type":"indexedAccess","indexType":{"type":"reference","name":"EventName","package":"expo-modules-core","refersToTypeParameter":true},"objectType":{"type":"reference","name":"VideoPlayerEvents","package":"expo-video"}}],"name":"Parameters","package":"typescript"}}],"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"SharedObject.emit"}}],"inheritedFrom":{"type":"reference","name":"SharedObject.emit"}},{"name":"pause","variant":"declaration","kind":2048,"signatures":[{"name":"pause","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Pauses the player."}]},"type":{"type":"intrinsic","name":"void"}}]},{"name":"play","variant":"declaration","kind":2048,"signatures":[{"name":"play","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Resumes the player."}]},"type":{"type":"intrinsic","name":"void"}}]},{"name":"release","variant":"declaration","kind":2048,"signatures":[{"name":"release","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A function that detaches the JS and native objects to let the native object deallocate\nbefore the JS object gets deallocated by the JS garbagge collector. Any subsequent calls to native\nfunctions of the object will throw an error as it is no longer associated with its native counterpart."}]},"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"SharedObject.release"}}],"inheritedFrom":{"type":"reference","name":"SharedObject.release"}},{"name":"removeAllListeners","variant":"declaration","kind":2048,"signatures":[{"name":"removeAllListeners","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Removes all listeners for the given event name."}]},"parameters":[{"name":"eventName","variant":"param","kind":32768,"type":{"type":"typeOperator","operator":"keyof","target":{}}}],"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"SharedObject.removeAllListeners"}}],"inheritedFrom":{"type":"reference","name":"SharedObject.removeAllListeners"}},{"name":"removeListener","variant":"declaration","kind":2048,"signatures":[{"name":"removeListener","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Removes a listener for the given event name."}]},"typeParameter":[{"name":"EventName","variant":"typeParam","kind":131072,"type":{"type":"typeOperator","operator":"keyof","target":{}}}],"parameters":[{"name":"eventName","variant":"param","kind":32768,"type":{"type":"reference","name":"EventName","package":"expo-modules-core","refersToTypeParameter":true}},{"name":"listener","variant":"param","kind":32768,"type":{"type":"indexedAccess","indexType":{"type":"reference","name":"EventName","package":"expo-modules-core","refersToTypeParameter":true},"objectType":{"type":"reference","name":"VideoPlayerEvents","package":"expo-video"}}}],"type":{"type":"intrinsic","name":"void"},"inheritedFrom":{"type":"reference","name":"SharedObject.removeListener"}}],"inheritedFrom":{"type":"reference","name":"SharedObject.removeListener"}},{"name":"replace","variant":"declaration","kind":2048,"signatures":[{"name":"replace","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Replaces the current source with a new one."}]},"parameters":[{"name":"source","variant":"param","kind":32768,"type":{"type":"reference","name":"VideoSource","package":"expo-video"}}],"type":{"type":"intrinsic","name":"void"}}]},{"name":"replay","variant":"declaration","kind":2048,"signatures":[{"name":"replay","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Seeks the playback to the beginning."}]},"type":{"type":"intrinsic","name":"void"}}]},{"name":"seekBy","variant":"declaration","kind":2048,"signatures":[{"name":"seekBy","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Seeks the playback by the given number of seconds."}]},"parameters":[{"name":"seconds","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"intrinsic","name":"void"}}]}],"extendedTypes":[{"type":"reference","typeArguments":[{"type":"reference","name":"VideoPlayerEvents","package":"expo-video"}],"name":"SharedObject","package":"expo-modules-core"}]},{"name":"VideoPlayerEvents","variant":"declaration","kind":2097152,"comment":{"summary":[{"kind":"text","text":"Handlers for events which can be emitted by the player."}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"playToEnd","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Handler for an event emitted when the player plays to the end of the current source."}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Handler for an event emitted when the player plays to the end of the current source."}]},"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"playbackRateChange","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Handler for an event emitted when the "},{"kind":"code","text":"`playbackRate`"},{"kind":"text","text":" property of the player changes."}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Handler for an event emitted when the "},{"kind":"code","text":"`playbackRate`"},{"kind":"text","text":" property of the player changes."}]},"parameters":[{"name":"newPlaybackRate","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"number"}},{"name":"oldPlaybackRate","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"playingChange","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Handler for an event emitted when the player starts or stops playback."}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Handler for an event emitted when the player starts or stops playback."}]},"parameters":[{"name":"newIsPlaying","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"boolean"}},{"name":"oldIsPlaying","variant":"param","kind":32768,"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"sourceChange","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Handler for an event emitted when the current media source of the player changes."}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Handler for an event emitted when the current media source of the player changes."}]},"parameters":[{"name":"newSource","variant":"param","kind":32768,"type":{"type":"reference","name":"VideoSource","package":"expo-video"}},{"name":"previousSource","variant":"param","kind":32768,"type":{"type":"reference","name":"VideoSource","package":"expo-video"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"statusChange","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Handler for an event emitted when the status of the player changes."}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Handler for an event emitted when the status of the player changes."}]},"parameters":[{"name":"newStatus","variant":"param","kind":32768,"type":{"type":"reference","name":"VideoPlayerStatus","package":"expo-video"}},{"name":"oldStatus","variant":"param","kind":32768,"type":{"type":"reference","name":"VideoPlayerStatus","package":"expo-video"}},{"name":"error","variant":"param","kind":32768,"type":{"type":"reference","name":"PlayerError","package":"expo-video"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"volumeChange","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"Handler for an event emitted when the "},{"kind":"code","text":"`volume`"},{"kind":"text","text":" property of the player changes."}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Handler for an event emitted when the "},{"kind":"code","text":"`volume`"},{"kind":"text","text":" property of the player changes."}]},"parameters":[{"name":"newVolume","variant":"param","kind":32768,"type":{"type":"reference","name":"VolumeEvent","package":"expo-video"}},{"name":"oldVolume","variant":"param","kind":32768,"type":{"type":"reference","name":"VolumeEvent","package":"expo-video"}}],"type":{"type":"intrinsic","name":"void"}}]}}}]}}},{"name":"VideoPlayerStatus","variant":"declaration","kind":2097152,"comment":{"summary":[{"kind":"text","text":"Describes the current status of the player.\n- "},{"kind":"code","text":"`idle`"},{"kind":"text","text":": The player is not playing or loading any videos.\n- "},{"kind":"code","text":"`loading`"},{"kind":"text","text":": The player is loading video data from the provided source\n- "},{"kind":"code","text":"`readyToPlay`"},{"kind":"text","text":": The player has loaded enough data to start playing or to continue playback.\n- "},{"kind":"code","text":"`error`"},{"kind":"text","text":": The player has encountered an error while loading or playing the video."}]},"type":{"type":"union","types":[{"type":"literal","value":"idle"},{"type":"literal","value":"loading"},{"type":"literal","value":"readyToPlay"},{"type":"literal","value":"error"}]}},{"name":"VideoSource","variant":"declaration","kind":2097152,"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"drm","variant":"declaration","kind":1024,"flags":{"isOptional":true},"type":{"type":"reference","name":"DRMOptions","package":"expo-video"}},{"name":"uri","variant":"declaration","kind":1024,"type":{"type":"intrinsic","name":"string"}}]}},{"type":"literal","value":null}]}},{"name":"VideoView","variant":"declaration","kind":128,"children":[{"name":"constructor","variant":"declaration","kind":512,"flags":{"isExternal":true},"signatures":[{"name":"new VideoView","variant":"signature","kind":16384,"flags":{"isExternal":true},"parameters":[{"name":"props","variant":"param","kind":32768,"flags":{"isExternal":true},"type":{"type":"union","types":[{"type":"reference","name":"VideoViewProps","package":"expo-video"},{"type":"reference","typeArguments":[{"type":"reference","name":"VideoViewProps","package":"expo-video"}],"name":"Readonly","package":"typescript"}]}}],"type":{"type":"reference","name":"VideoView","package":"expo-video"},"inheritedFrom":{"type":"reference","name":"PureComponent.constructor"}},{"name":"new VideoView","variant":"signature","kind":16384,"flags":{"isExternal":true},"comment":{"summary":[],"blockTags":[{"tag":"@deprecated","content":[]},{"tag":"@see","content":[{"kind":"text","text":"https://reactjs.org/docs/legacy-context.html"}]}]},"parameters":[{"name":"props","variant":"param","kind":32768,"flags":{"isExternal":true},"type":{"type":"reference","name":"VideoViewProps","package":"expo-video"}},{"name":"context","variant":"param","kind":32768,"flags":{"isExternal":true},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"reference","name":"VideoView","package":"expo-video"},"inheritedFrom":{"type":"reference","name":"PureComponent.constructor"}}],"inheritedFrom":{"type":"reference","name":"PureComponent.constructor"}},{"name":"nativeRef","variant":"declaration","kind":1024,"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"any"}],"name":"RefObject","package":"@types/react","qualifiedName":"React.RefObject"},"defaultValue":"..."},{"name":"enterFullscreen","variant":"declaration","kind":2048,"signatures":[{"name":"enterFullscreen","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Enters fullscreen mode."}]},"type":{"type":"intrinsic","name":"void"}}]},{"name":"exitFullscreen","variant":"declaration","kind":2048,"signatures":[{"name":"exitFullscreen","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Exits fullscreen mode."}]},"type":{"type":"intrinsic","name":"void"}}]},{"name":"render","variant":"declaration","kind":2048,"signatures":[{"name":"render","variant":"signature","kind":4096,"type":{"type":"reference","name":"ReactNode","package":"@types/react","qualifiedName":"React.ReactNode"},"overwrites":{"type":"reference","name":"PureComponent.render"}}],"overwrites":{"type":"reference","name":"PureComponent.render"}},{"name":"startPictureInPicture","variant":"declaration","kind":2048,"signatures":[{"name":"startPictureInPicture","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Enters Picture in Picture (PiP) mode. Throws an exception if the device does not support PiP.\n> **Note:** Only one player can be in Picture in Picture (PiP) mode at a time."}],"blockTags":[{"tag":"@platform","content":[{"kind":"text","text":"android"}]},{"tag":"@platform","content":[{"kind":"text","text":"ios 14+"}]}]},"type":{"type":"intrinsic","name":"void"}}]},{"name":"stopPictureInPicture","variant":"declaration","kind":2048,"signatures":[{"name":"stopPictureInPicture","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"Exits Picture in Picture (PiP) mode."}],"blockTags":[{"tag":"@platform","content":[{"kind":"text","text":"android"}]},{"tag":"@platform","content":[{"kind":"text","text":"ios 14+"}]}]},"type":{"type":"intrinsic","name":"void"}}]}],"extendedTypes":[{"type":"reference","typeArguments":[{"type":"reference","name":"VideoViewProps","package":"expo-video"}],"name":"PureComponent","package":"@types/react","qualifiedName":"React.PureComponent"}]},{"name":"VideoViewProps","variant":"declaration","kind":256,"children":[{"name":"allowsFullscreen","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Determines whether fullscreen mode is allowed or not."}],"blockTags":[{"tag":"@default","content":[{"kind":"text","text":"true"}]}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"allowsPictureInPicture","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Determines whether the player allows Picture in Picture (PiP) mode."}],"blockTags":[{"tag":"@default","content":[{"kind":"text","text":"false"}]},{"tag":"@platform","content":[{"kind":"text","text":"ios 14+"}]}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"contentFit","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Describes how the video should be scaled to fit in the container.\nOptions are 'contain', 'cover', and 'fill'."}],"blockTags":[{"tag":"@default","content":[{"kind":"text","text":"'contain'"}]}]},"type":{"type":"reference","name":"VideoContentFit","package":"expo-video"}},{"name":"contentPosition","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Determines the position offset of the video inside the container."}],"blockTags":[{"tag":"@default","content":[]},{"tag":"@platform","content":[{"kind":"text","text":"ios"}]}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"dx","variant":"declaration","kind":1024,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"number"}},{"name":"dy","variant":"declaration","kind":1024,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"number"}}]}}},{"name":"nativeControls","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Determines whether native controls should be displayed or not."}],"blockTags":[{"tag":"@default","content":[{"kind":"text","text":"true"}]}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"onPictureInPictureStart","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A callback to call after the video player enters Picture in Picture (PiP) mode."}],"blockTags":[{"tag":"@platform","content":[{"kind":"text","text":"android"}]},{"tag":"@platform","content":[{"kind":"text","text":"ios 14+"}]}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A callback to call after the video player enters Picture in Picture (PiP) mode."}],"blockTags":[{"tag":"@platform","content":[{"kind":"text","text":"android"}]},{"tag":"@platform","content":[{"kind":"text","text":"ios 14+"}]}]},"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"onPictureInPictureStop","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"A callback to call after the video player exits Picture in Picture (PiP) mode."}],"blockTags":[{"tag":"@platform","content":[{"kind":"text","text":"android"}]},{"tag":"@platform","content":[{"kind":"text","text":"ios 14+"}]}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"signatures":[{"name":"__type","variant":"signature","kind":4096,"comment":{"summary":[{"kind":"text","text":"A callback to call after the video player exits Picture in Picture (PiP) mode."}],"blockTags":[{"tag":"@platform","content":[{"kind":"text","text":"android"}]},{"tag":"@platform","content":[{"kind":"text","text":"ios 14+"}]}]},"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"player","variant":"declaration","kind":1024,"comment":{"summary":[{"kind":"text","text":"A player instance – use "},{"kind":"code","text":"`useVideoPlayer()`"},{"kind":"text","text":" to create one."}]},"type":{"type":"reference","name":"VideoPlayer","package":"expo-video"}},{"name":"requiresLinearPlayback","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Determines whether the player allows the user to skip media content."}],"blockTags":[{"tag":"@default","content":[{"kind":"text","text":"false"}]},{"tag":"@platform","content":[{"kind":"text","text":"android"}]},{"tag":"@platform","content":[{"kind":"text","text":"ios"}]}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"showsTimecodes","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Determines whether the timecodes should be displayed or not."}],"blockTags":[{"tag":"@default","content":[{"kind":"text","text":"true"}]},{"tag":"@platform","content":[{"kind":"text","text":"ios"}]}]},"type":{"type":"intrinsic","name":"boolean"}},{"name":"startsPictureInPictureAutomatically","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Determines whether the player should start Picture in Picture (PiP) automatically when the app is in the background.\n> **Note:** Only one player can be in Picture in Picture (PiP) mode at a time."}],"blockTags":[{"tag":"@default","content":[{"kind":"text","text":"false"}]},{"tag":"@platform","content":[{"kind":"text","text":"android 12+"}]},{"tag":"@platform","content":[{"kind":"text","text":"ios 14.2+"}]}]},"type":{"type":"intrinsic","name":"boolean"}}],"extendedTypes":[{"type":"reference","name":"ViewProps","package":"react-native"}]},{"name":"VolumeEvent","variant":"declaration","kind":2097152,"comment":{"summary":[{"kind":"text","text":"Contains information about the current volume and whether the player is muted."}]},"type":{"type":"reflection","declaration":{"name":"__type","variant":"declaration","kind":65536,"children":[{"name":"isMuted","variant":"declaration","kind":1024,"type":{"type":"intrinsic","name":"boolean"}},{"name":"volume","variant":"declaration","kind":1024,"type":{"type":"intrinsic","name":"number"}}]}}}],"packageName":"expo-video"}
\ No newline at end of file
diff --git a/packages/expo-video/build/VideoView.d.ts b/packages/expo-video/build/VideoView.d.ts
index dd4d18face94e..1bc7565ac0371 100644
--- a/packages/expo-video/build/VideoView.d.ts
+++ b/packages/expo-video/build/VideoView.d.ts
@@ -1,5 +1,10 @@
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.
@@ -10,8 +15,13 @@ export declare function useVideoPlayer(source: VideoSource, setup?: (player: Vid
export declare function isPictureInPictureSupported(): Promise;
export declare class VideoView extends PureComponent {
nativeRef: import("react").RefObject;
- replace(source: VideoSource): void;
+ /**
+ * 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.
@@ -19,13 +29,13 @@ export declare class VideoView extends PureComponent {
* @platform android
* @platform ios 14+
*/
- startPictureInPicture(): any;
+ startPictureInPicture(): void;
/**
* Exits Picture in Picture (PiP) mode.
* @platform android
* @platform ios 14+
*/
- stopPictureInPicture(): any;
+ stopPictureInPicture(): void;
render(): ReactNode;
}
//# sourceMappingURL=VideoView.d.ts.map
\ No newline at end of file
diff --git a/packages/expo-video/build/VideoView.d.ts.map b/packages/expo-video/build/VideoView.d.ts.map
index 30900ea2ccad4..e0e7dfa67e79e 100644
--- a/packages/expo-video/build/VideoView.d.ts.map
+++ b/packages/expo-video/build/VideoView.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"VideoView.d.ts","sourceRoot":"","sources":["../src/VideoView.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,aAAa,EAMd,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE7E,wBAAgB,cAAc,CAC5B,MAAM,EAAE,WAAW,EACnB,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,GACpC,WAAW,CAQb;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,IAAI,OAAO,CAAC,OAAO,CAAC,CAE9D;AAED,qBAAa,SAAU,SAAQ,aAAa,CAAC,cAAc,CAAC;IAC1D,SAAS,iCAAoB;IAE7B,OAAO,CAAC,MAAM,EAAE,WAAW;IAQ3B,eAAe;IAIf,cAAc;IAId;;;;;OAKG;IACH,qBAAqB;IAIrB;;;;OAIG;IACH,oBAAoB;IAIpB,MAAM,IAAI,SAAS;CAMpB"}
\ No newline at end of file
+{"version":3,"file":"VideoView.d.ts","sourceRoot":"","sources":["../src/VideoView.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,aAAa,EAMd,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE7E;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,WAAW,EACnB,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,GACpC,WAAW,CAQb;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,IAAI,OAAO,CAAC,OAAO,CAAC,CAE9D;AAED,qBAAa,SAAU,SAAQ,aAAa,CAAC,cAAc,CAAC;IAC1D,SAAS,iCAAoB;IAE7B;;OAEG;IACH,eAAe;IAIf;;OAEG;IACH,cAAc;IAId;;;;;OAKG;IACH,qBAAqB,IAAI,IAAI;IAI7B;;;;OAIG;IACH,oBAAoB,IAAI,IAAI;IAI5B,MAAM,IAAI,SAAS;CAMpB"}
\ No newline at end of file
diff --git a/packages/expo-video/build/VideoView.js b/packages/expo-video/build/VideoView.js
index 2f7b6adc4773c..1dd7ee1a72deb 100644
--- a/packages/expo-video/build/VideoView.js
+++ b/packages/expo-video/build/VideoView.js
@@ -1,6 +1,11 @@
import { PureComponent, createRef, useRef, useMemo, useEffect, } from 'react';
import NativeVideoModule from './NativeVideoModule';
import NativeVideoView from './NativeVideoView';
+/**
+ * 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 function useVideoPlayer(source, setup) {
const parsedSource = typeof source === 'string' ? { uri: source } : source;
return useReleasingSharedObject(() => {
@@ -20,16 +25,15 @@ export function isPictureInPictureSupported() {
}
export class VideoView extends PureComponent {
nativeRef = createRef();
- replace(source) {
- if (typeof source === 'string') {
- this.nativeRef.current?.replace({ uri: source });
- return;
- }
- this.nativeRef.current?.replace(source);
- }
+ /**
+ * Enters fullscreen mode.
+ */
enterFullscreen() {
this.nativeRef.current?.enterFullscreen();
}
+ /**
+ * Exits fullscreen mode.
+ */
exitFullscreen() {
this.nativeRef.current?.exitFullscreen();
}
diff --git a/packages/expo-video/build/VideoView.js.map b/packages/expo-video/build/VideoView.js.map
index d61992bc7b2a2..97602df30b20f 100644
--- a/packages/expo-video/build/VideoView.js.map
+++ b/packages/expo-video/build/VideoView.js.map
@@ -1 +1 @@
-{"version":3,"file":"VideoView.js","sourceRoot":"","sources":["../src/VideoView.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,aAAa,EAEb,SAAS,EACT,MAAM,EACN,OAAO,EACP,SAAS,GACV,MAAM,OAAO,CAAC;AAEf,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAGhD,MAAM,UAAU,cAAc,CAC5B,MAAmB,EACnB,KAAqC;IAErC,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;IAE3E,OAAO,wBAAwB,CAAC,GAAG,EAAE;QACnC,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QAC/D,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC;QAChB,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AACrC,CAAC;AAED;;;;;GAKG;AACH,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ACnB,CAAC,EAAE,YAAY,CAAC,CAAC;IAEjB,SAAS,CAAC,GAAG,EAAE;QACb,aAAa,CAAC,OAAO,GAAG,KAAK,CAAC;QAE9B,OAAO,GAAG,EAAE;YACV,+GAA+G;YAC/G,IAAI,CAAC,aAAa,CAAC,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;gBAChD,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;YAC9B,CAAC;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import { SharedObject } from 'expo-modules-core';\nimport {\n ReactNode,\n PureComponent,\n DependencyList,\n createRef,\n useRef,\n useMemo,\n useEffect,\n} from 'react';\n\nimport NativeVideoModule from './NativeVideoModule';\nimport NativeVideoView from './NativeVideoView';\nimport { VideoPlayer, VideoSource, VideoViewProps } from './VideoView.types';\n\nexport function useVideoPlayer(\n source: VideoSource,\n setup?: (player: VideoPlayer) => void\n): VideoPlayer {\n const parsedSource = typeof source === 'string' ? { uri: source } : source;\n\n return useReleasingSharedObject(() => {\n const player = new NativeVideoModule.VideoPlayer(parsedSource);\n setup?.(player);\n return player;\n }, [JSON.stringify(parsedSource)]);\n}\n\n/**\n * Returns whether the current device supports Picture in Picture (PiP) mode.\n * @returns A `boolean` which is `true` if the device supports PiP mode, and `false` otherwise.\n * @platform android\n * @platform ios\n */\nexport function isPictureInPictureSupported(): Promise {\n return NativeVideoModule.isPictureInPictureSupported();\n}\n\nexport class VideoView extends PureComponent {\n nativeRef = createRef();\n\n replace(source: VideoSource) {\n if (typeof source === 'string') {\n this.nativeRef.current?.replace({ uri: source });\n return;\n }\n this.nativeRef.current?.replace(source);\n }\n\n enterFullscreen() {\n this.nativeRef.current?.enterFullscreen();\n }\n\n exitFullscreen() {\n this.nativeRef.current?.exitFullscreen();\n }\n\n /**\n * Enters Picture in Picture (PiP) mode. Throws an exception if the device does not support PiP.\n * > **Note:** Only one player can be in Picture in Picture (PiP) mode at a time.\n * @platform android\n * @platform ios 14+\n */\n startPictureInPicture() {\n return this.nativeRef.current?.startPictureInPicture();\n }\n\n /**\n * Exits Picture in Picture (PiP) mode.\n * @platform android\n * @platform ios 14+\n */\n stopPictureInPicture() {\n return this.nativeRef.current?.stopPictureInPicture();\n }\n\n render(): ReactNode {\n const { player, ...props } = this.props;\n const playerId = getPlayerId(player);\n\n return ;\n }\n}\n\n// Temporary solution to pass the shared object ID instead of the player object.\n// We can't really pass it as an object in the old architecture.\n// Technically we can in the new architecture, but it's not possible yet.\nfunction getPlayerId(player: number | VideoPlayer): number | null {\n if (player instanceof NativeVideoModule.VideoPlayer) {\n // @ts-expect-error\n return player.__expo_shared_object_id__;\n }\n if (typeof player === 'number') {\n return player;\n }\n return null;\n}\n\n/**\n * Returns a shared object, which is automatically cleaned up when the component is unmounted.\n */\nfunction useReleasingSharedObject(\n factory: () => T,\n dependencies: DependencyList\n): T {\n const objectRef = useRef(null);\n const isFastRefresh = useRef(false);\n const previousDependencies = useRef(dependencies);\n\n if (objectRef.current == null) {\n objectRef.current = factory();\n }\n\n const object = useMemo(() => {\n let newObject = objectRef.current;\n const dependenciesAreEqual =\n previousDependencies.current?.length === dependencies.length &&\n dependencies.every((value, index) => value === previousDependencies.current[index]);\n\n // If the dependencies have changed, release the previous object and create a new one, otherwise this has been called\n // because of a fast refresh, and we don't want to release the object.\n if (!newObject || !dependenciesAreEqual) {\n objectRef.current?.release();\n newObject = factory();\n objectRef.current = newObject;\n previousDependencies.current = dependencies;\n } else {\n isFastRefresh.current = true;\n }\n return newObject;\n }, dependencies);\n\n useEffect(() => {\n isFastRefresh.current = false;\n\n return () => {\n // This will be called on every fast refresh and on unmount, but we only want to release the object on unmount.\n if (!isFastRefresh.current && objectRef.current) {\n objectRef.current.release();\n }\n };\n }, []);\n\n return object;\n}\n"]}
\ No newline at end of file
+{"version":3,"file":"VideoView.js","sourceRoot":"","sources":["../src/VideoView.tsx"],"names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,CAAC,CAAC;QAEtF,qHAAqH;QACrH,sEAAsE;QACtE,IAAI,CAAC,SAAS,IAAI,CAAC,oBAAoB,EAAE;YACvC,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC;YAC7B,SAAS,GAAG,OAAO,EAAE,CAAC;YACtB,SAAS,CAAC,OAAO,GAAG,SAAS,CAAC;YAC9B,oBAAoB,CAAC,OAAO,GAAG,YAAY,CAAC;SAC7C;aAAM;YACL,aAAa,CAAC,OAAO,GAAG,IAAI,CAAC;SAC9B;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,YAAY,CAAC,CAAC;IAEjB,SAAS,CAAC,GAAG,EAAE;QACb,aAAa,CAAC,OAAO,GAAG,KAAK,CAAC;QAE9B,OAAO,GAAG,EAAE;YACV,+GAA+G;YAC/G,IAAI,CAAC,aAAa,CAAC,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE;gBAC/C,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;aAC7B;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import { SharedObject } from 'expo-modules-core';\nimport {\n ReactNode,\n PureComponent,\n DependencyList,\n createRef,\n useRef,\n useMemo,\n useEffect,\n} from 'react';\n\nimport NativeVideoModule from './NativeVideoModule';\nimport NativeVideoView from './NativeVideoView';\nimport { VideoPlayer, VideoSource, VideoViewProps } from './VideoView.types';\n\n/**\n * Creates a `VideoPlayer`, which will be automatically cleaned up when the component is unmounted.\n * @param source - A video source to initialize the player with\n * @param setup - A function that allows setting up the player. It will run after the player is created.\n */\nexport function useVideoPlayer(\n source: VideoSource,\n setup?: (player: VideoPlayer) => void\n): VideoPlayer {\n const parsedSource = typeof source === 'string' ? { uri: source } : source;\n\n return useReleasingSharedObject(() => {\n const player = new NativeVideoModule.VideoPlayer(parsedSource);\n setup?.(player);\n return player;\n }, [JSON.stringify(parsedSource)]);\n}\n\n/**\n * Returns whether the current device supports Picture in Picture (PiP) mode.\n * @returns A `boolean` which is `true` if the device supports PiP mode, and `false` otherwise.\n * @platform android\n * @platform ios\n */\nexport function isPictureInPictureSupported(): Promise {\n return NativeVideoModule.isPictureInPictureSupported();\n}\n\nexport class VideoView extends PureComponent {\n nativeRef = createRef();\n\n /**\n * Enters fullscreen mode.\n */\n enterFullscreen() {\n this.nativeRef.current?.enterFullscreen();\n }\n\n /**\n * Exits fullscreen mode.\n */\n exitFullscreen() {\n this.nativeRef.current?.exitFullscreen();\n }\n\n /**\n * Enters Picture in Picture (PiP) mode. Throws an exception if the device does not support PiP.\n * > **Note:** Only one player can be in Picture in Picture (PiP) mode at a time.\n * @platform android\n * @platform ios 14+\n */\n startPictureInPicture(): void {\n return this.nativeRef.current?.startPictureInPicture();\n }\n\n /**\n * Exits Picture in Picture (PiP) mode.\n * @platform android\n * @platform ios 14+\n */\n stopPictureInPicture(): void {\n return this.nativeRef.current?.stopPictureInPicture();\n }\n\n render(): ReactNode {\n const { player, ...props } = this.props;\n const playerId = getPlayerId(player);\n\n return ;\n }\n}\n\n// Temporary solution to pass the shared object ID instead of the player object.\n// We can't really pass it as an object in the old architecture.\n// Technically we can in the new architecture, but it's not possible yet.\nfunction getPlayerId(player: number | VideoPlayer): number | null {\n if (player instanceof NativeVideoModule.VideoPlayer) {\n // @ts-expect-error\n return player.__expo_shared_object_id__;\n }\n if (typeof player === 'number') {\n return player;\n }\n return null;\n}\n\n/**\n * Returns a shared object, which is automatically cleaned up when the component is unmounted.\n */\nfunction useReleasingSharedObject(\n factory: () => T,\n dependencies: DependencyList\n): T {\n const objectRef = useRef(null);\n const isFastRefresh = useRef(false);\n const previousDependencies = useRef(dependencies);\n\n if (objectRef.current == null) {\n objectRef.current = factory();\n }\n\n const object = useMemo(() => {\n let newObject = objectRef.current;\n const dependenciesAreEqual =\n previousDependencies.current?.length === dependencies.length &&\n dependencies.every((value, index) => value === previousDependencies.current[index]);\n\n // If the dependencies have changed, release the previous object and create a new one, otherwise this has been called\n // because of a fast refresh, and we don't want to release the object.\n if (!newObject || !dependenciesAreEqual) {\n objectRef.current?.release();\n newObject = factory();\n objectRef.current = newObject;\n previousDependencies.current = dependencies;\n } else {\n isFastRefresh.current = true;\n }\n return newObject;\n }, dependencies);\n\n useEffect(() => {\n isFastRefresh.current = false;\n\n return () => {\n // This will be called on every fast refresh and on unmount, but we only want to release the object on unmount.\n if (!isFastRefresh.current && objectRef.current) {\n objectRef.current.release();\n }\n };\n }, []);\n\n return object;\n}\n"]}
\ No newline at end of file
diff --git a/packages/expo-video/build/VideoView.types.d.ts b/packages/expo-video/build/VideoView.types.d.ts
index 7d47366c63e96..42261c38bc70f 100644
--- a/packages/expo-video/build/VideoView.types.d.ts
+++ b/packages/expo-video/build/VideoView.types.d.ts
@@ -47,7 +47,7 @@ export declare class VideoPlayer extends SharedObject {
* Indicates the current status of the player.
* > This property is get-only
*/
- status: PlayerStatus;
+ status: VideoPlayerStatus;
/**
* Determines whether the player should continue playing after the app enters the background.
* @default false
@@ -82,7 +82,7 @@ export declare class VideoPlayer extends SharedObject {
* - `cover`: The video maintains its aspect ratio and covers the entire container, potentially cropping some portions.
* - `fill`: The video stretches/squeezes to completely fill the container, potentially causing distortion.
*/
-type VideoContentFit = 'contain' | 'cover' | 'fill';
+export type VideoContentFit = 'contain' | 'cover' | 'fill';
/**
* Describes the current status of the player.
* - `idle`: The player is not playing or loading any videos.
@@ -90,7 +90,7 @@ type VideoContentFit = 'contain' | 'cover' | 'fill';
* - `readyToPlay`: The player has loaded enough data to start playing or to continue playback.
* - `error`: The player has encountered an error while loading or playing the video.
*/
-export type PlayerStatus = 'idle' | 'loading' | 'readyToPlay' | 'error';
+export type VideoPlayerStatus = 'idle' | 'loading' | 'readyToPlay' | 'error';
export interface VideoViewProps extends ViewProps {
/**
* A player instance – use `useVideoPlayer()` to create one.
@@ -164,11 +164,11 @@ export interface VideoViewProps extends ViewProps {
/**
* Specifies which type of DRM to use. Android supports Widevine, PlayReady and ClearKey, iOS supports FairPlay.
* */
-type DRMType = 'clearkey' | 'fairplay' | 'playready' | 'widevine';
+export type DRMType = 'clearkey' | 'fairplay' | 'playready' | 'widevine';
/**
* Specifies DRM options which will be used by the player while loading the video.
*/
-type DRMOptions = {
+export type DRMOptions = {
/**
* Determines which type of DRM to use.
*/
@@ -210,7 +210,7 @@ export type VideoPlayerEvents = {
/**
* Handler for an event emitted when the status of the player changes.
*/
- statusChange: (newStatus: PlayerStatus, oldStatus: PlayerStatus, error: PlayerError) => void;
+ statusChange: (newStatus: VideoPlayerStatus, oldStatus: VideoPlayerStatus, error: PlayerError) => void;
/**
* Handler for an event emitted when the player starts or stops playback.
*/
@@ -235,15 +235,14 @@ export type VideoPlayerEvents = {
/**
* Contains information about any errors that the player encountered during the playback
*/
-type PlayerError = {
+export type PlayerError = {
message: string;
};
/**
* Contains information about the current volume and whether the player is muted.
*/
-type VolumeEvent = {
+export type VolumeEvent = {
volume: number;
isMuted: boolean;
};
-export {};
//# sourceMappingURL=VideoView.types.d.ts.map
\ No newline at end of file
diff --git a/packages/expo-video/build/VideoView.types.d.ts.map b/packages/expo-video/build/VideoView.types.d.ts.map
index f67846c876dc5..c1a2db64529e5 100644
--- a/packages/expo-video/build/VideoView.types.d.ts.map
+++ b/packages/expo-video/build/VideoView.types.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"VideoView.types.d.ts","sourceRoot":"","sources":["../src/VideoView.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,YAAY,CAAC,iBAAiB,CAAC;IACtE;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;;OAGG;IACH,KAAK,EAAE,OAAO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H,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,YAAY,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,KAAK,IAAI,CAAC;CAC7E,CAAC;AAEF;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC"}
\ No newline at end of file
+{"version":3,"file":"VideoView.types.d.ts","sourceRoot":"","sources":["../src/VideoView.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,YAAY,CAAC,iBAAiB,CAAC;IACtE;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;;OAGG;IACH,KAAK,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;;OAMG;IACH,cAAc,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,MAAM,EAAE,iBAAiB,CAAC;IAE1B;;;;;OAKG;IACH,uBAAuB,EAAE,OAAO,CAAC;IAEjC;;OAEG;IACH,IAAI,IAAI,IAAI;IAEZ;;OAEG;IACH,KAAK,IAAI,IAAI;IAEb;;OAEG;IACH,OAAO,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAElC;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAE7B;;OAEG;IACH,MAAM,IAA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QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,UAAU,CAAA;CAAE,GAAG,IAAI,CAAC;AAE5E;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,YAAY,EAAE,CACZ,SAAS,EAAE,iBAAiB,EAC5B,SAAS,EAAE,iBAAiB,EAC5B,KAAK,EAAE,WAAW,KACf,IAAI,CAAC;IACV;;OAEG;IACH,aAAa,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,KAAK,IAAI,CAAC;IACtE;;OAEG;IACH,kBAAkB,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/E;;OAEG;IACH,YAAY,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,KAAK,IAAI,CAAC;IACvE;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,YAAY,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,KAAK,IAAI,CAAC;CAC7E,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC"}
\ No newline at end of file
diff --git a/packages/expo-video/build/VideoView.types.js.map b/packages/expo-video/build/VideoView.types.js.map
index 24305ed664850..eb1c17c7ef435 100644
--- a/packages/expo-video/build/VideoView.types.js.map
+++ b/packages/expo-video/build/VideoView.types.js.map
@@ -1 +1 @@
-{"version":3,"file":"VideoView.types.js","sourceRoot":"","sources":["../src/VideoView.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { SharedObject } from 'expo-modules-core';\nimport { ViewProps } from 'react-native';\n\n/**\n * A class that represents an instance of the video player.\n */\nexport declare class VideoPlayer extends SharedObject {\n /**\n * Boolean value whether the player is currently playing.\n * > This property is get-only, use `play` and `pause` methods to control the playback.\n */\n playing: boolean;\n\n /**\n * Determines whether the player should automatically replay after reaching the end of the video.\n * @default false\n */\n loop: boolean;\n\n /**\n * Boolean value whether the player is currently muted.\n * @default false\n */\n muted: boolean;\n\n /**\n * Integer value representing the current position in seconds.\n */\n currentTime: number;\n\n /**\n * Float value between 0 and 1 representing the current volume.\n * Muting the player doesn't affect the volume. In other words, when the player is muted, the volume is the same as\n * when unmuted. Similarly, setting the volume doesn't unmute the player.\n * @default 1.0\n */\n volume: number;\n\n /**\n * Boolean value indicating if the player should correct audio pitch when the playback speed changes.\n * > On web, changing this property is not supported, the player will always correct the pitch.\n * @default true\n * @platform android\n * @platform ios\n */\n preservesPitch: boolean;\n\n /**\n * Float value between 0 and 16 indicating the current playback speed of the player.\n * @default 1.0\n */\n playbackRate: number;\n\n /**\n * Indicates the current status of the player.\n * > This property is get-only\n */\n status: PlayerStatus;\n\n /**\n * Determines whether the player should continue playing after the app enters the background.\n * @default false\n * @platform ios\n * @platform android\n */\n staysActiveInBackground: boolean;\n\n /**\n * Resumes the player.\n */\n play(): void;\n\n /**\n * Pauses the player.\n */\n pause(): void;\n\n /**\n * Replaces the current source with a new one.\n */\n replace(source: VideoSource): void;\n\n /**\n * Seeks the playback by the given number of seconds.\n */\n seekBy(seconds: number): void;\n\n /**\n * Seeks the playback to the beginning.\n */\n replay(): void;\n}\n\n/**\n * Describes how a video should be scaled to fit in a container.\n * - `contain`: The video maintains its aspect ratio and fits inside the container, with possible letterboxing/pillarboxing.\n * - `cover`: The video maintains its aspect ratio and covers the entire container, potentially cropping some portions.\n * - `fill`: The video stretches/squeezes to completely fill the container, potentially causing distortion.\n */\ntype VideoContentFit = 'contain' | 'cover' | 'fill';\n\n/**\n * Describes the current status of the player.\n * - `idle`: The player is not playing or loading any videos.\n * - `loading`: The player is loading video data from the provided source\n * - `readyToPlay`: The player has loaded enough data to start playing or to continue playback.\n * - `error`: The player has encountered an error while loading or playing the video.\n */\nexport type PlayerStatus = 'idle' | 'loading' | 'readyToPlay' | 'error';\n\nexport interface VideoViewProps extends ViewProps {\n /**\n * A player instance – use `useVideoPlayer()` to create one.\n */\n player: VideoPlayer;\n\n /**\n * Determines whether native controls should be displayed or not.\n * @default true\n */\n nativeControls?: boolean;\n\n /**\n * Describes how the video should be scaled to fit in the container.\n * Options are 'contain', 'cover', and 'fill'.\n * @default 'contain'\n */\n contentFit?: VideoContentFit;\n\n /**\n * Determines whether fullscreen mode is allowed or not.\n * @default true\n */\n allowsFullscreen?: boolean;\n\n /**\n * Determines whether the timecodes should be displayed or not.\n * @default true\n * @platform ios\n */\n showsTimecodes?: boolean;\n\n /**\n * Determines whether the player allows the user to skip media content.\n * @default false\n * @platform android\n * @platform ios\n */\n requiresLinearPlayback?: boolean;\n\n /**\n * Determines the position offset of the video inside the container.\n * @default { dx: 0, dy: 0 }\n * @platform ios\n */\n contentPosition?: { dx?: number; dy?: number };\n\n /**\n * A callback to call after the video player enters Picture in Picture (PiP) mode.\n * @platform android\n * @platform ios 14+\n */\n onPictureInPictureStart?: () => void;\n\n /**\n * A callback to call after the video player exits Picture in Picture (PiP) mode.\n * @platform android\n * @platform ios 14+\n */\n onPictureInPictureStop?: () => void;\n\n /**\n * Determines whether the player allows Picture in Picture (PiP) mode.\n * @default false\n * @platform ios 14+\n */\n allowsPictureInPicture?: boolean;\n\n /**\n * Determines whether the player should start Picture in Picture (PiP) automatically when the app is in the background.\n * > **Note:** Only one player can be in Picture in Picture (PiP) mode at a time.\n * @default false\n * @platform android 12+\n * @platform ios 14.2+\n */\n startsPictureInPictureAutomatically?: boolean;\n}\n\n/**\n * Specifies which type of DRM to use. Android supports Widevine, PlayReady and ClearKey, iOS supports FairPlay.\n * */\ntype DRMType = 'clearkey' | 'fairplay' | 'playready' | 'widevine';\n\n/**\n * Specifies DRM options which will be used by the player while loading the video.\n */\ntype DRMOptions = {\n /**\n * Determines which type of DRM to use.\n */\n type: DRMType;\n\n /**\n * Determines the license server URL.\n */\n licenseServer: string;\n\n /**\n * Determines headers sent to the license server on license requests.\n */\n headers?: { [key: string]: string };\n\n /**\n * Specifies whether the DRM is a multi-key DRM.\n * @platform android\n */\n multiKey?: boolean;\n\n /**\n * Specifies the content ID of the stream.\n * @platform ios\n */\n contentId?: string;\n\n /**\n * Specifies the certificate URL for the FairPlay DRM.\n * @platform ios\n */\n certificateUrl?: string;\n};\n\nexport type VideoSource = string | { uri: string; drm?: DRMOptions } | null;\n\n/**\n * Handlers for events which can be emitted by the player.\n */\nexport type VideoPlayerEvents = {\n /**\n * Handler for an event emitted when the status of the player changes.\n */\n statusChange: (newStatus: PlayerStatus, oldStatus: PlayerStatus, error: PlayerError) => void;\n /**\n * Handler for an event emitted when the player starts or stops playback.\n */\n playingChange: (newIsPlaying: boolean, oldIsPlaying: boolean) => void;\n /**\n * Handler for an event emitted when the `playbackRate` property of the player changes.\n */\n playbackRateChange: (newPlaybackRate: number, oldPlaybackRate: number) => void;\n /**\n * Handler for an event emitted when the `volume` property of the player changes.\n */\n volumeChange: (newVolume: VolumeEvent, oldVolume: VolumeEvent) => void;\n /**\n * Handler for an event emitted when the player plays to the end of the current source.\n */\n playToEnd: () => void;\n /**\n * Handler for an event emitted when the current media source of the player changes.\n */\n sourceChange: (newSource: VideoSource, previousSource: VideoSource) => void;\n};\n\n/**\n * Contains information about any errors that the player encountered during the playback\n */\ntype PlayerError = {\n message: string;\n};\n\n/**\n * Contains information about the current volume and whether the player is muted.\n */\ntype VolumeEvent = {\n volume: number;\n isMuted: boolean;\n};\n"]}
\ No newline at end of file
+{"version":3,"file":"VideoView.types.js","sourceRoot":"","sources":["../src/VideoView.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { SharedObject } from 'expo-modules-core';\nimport { ViewProps } from 'react-native';\n\n/**\n * A class that represents an instance of the video player.\n */\nexport declare class VideoPlayer extends SharedObject {\n /**\n * Boolean value whether the player is currently playing.\n * > This property is get-only, use `play` and `pause` methods to control the playback.\n */\n playing: boolean;\n\n /**\n * Determines whether the player should automatically replay after reaching the end of the video.\n * @default false\n */\n loop: boolean;\n\n /**\n * Boolean value whether the player is currently muted.\n * @default false\n */\n muted: boolean;\n\n /**\n * Integer value representing the current position in seconds.\n */\n currentTime: number;\n\n /**\n * Float value between 0 and 1 representing the current volume.\n * Muting the player doesn't affect the volume. In other words, when the player is muted, the volume is the same as\n * when unmuted. Similarly, setting the volume doesn't unmute the player.\n * @default 1.0\n */\n volume: number;\n\n /**\n * Boolean value indicating if the player should correct audio pitch when the playback speed changes.\n * > On web, changing this property is not supported, the player will always correct the pitch.\n * @default true\n * @platform android\n * @platform ios\n */\n preservesPitch: boolean;\n\n /**\n * Float value between 0 and 16 indicating the current playback speed of the player.\n * @default 1.0\n */\n playbackRate: number;\n\n /**\n * Indicates the current status of the player.\n * > This property is get-only\n */\n status: VideoPlayerStatus;\n\n /**\n * Determines whether the player should continue playing after the app enters the background.\n * @default false\n * @platform ios\n * @platform android\n */\n staysActiveInBackground: boolean;\n\n /**\n * Resumes the player.\n */\n play(): void;\n\n /**\n * Pauses the player.\n */\n pause(): void;\n\n /**\n * Replaces the current source with a new one.\n */\n replace(source: VideoSource): void;\n\n /**\n * Seeks the playback by the given number of seconds.\n */\n seekBy(seconds: number): void;\n\n /**\n * Seeks the playback to the beginning.\n */\n replay(): void;\n}\n\n/**\n * Describes how a video should be scaled to fit in a container.\n * - `contain`: The video maintains its aspect ratio and fits inside the container, with possible letterboxing/pillarboxing.\n * - `cover`: The video maintains its aspect ratio and covers the entire container, potentially cropping some portions.\n * - `fill`: The video stretches/squeezes to completely fill the container, potentially causing distortion.\n */\nexport type VideoContentFit = 'contain' | 'cover' | 'fill';\n\n/**\n * Describes the current status of the player.\n * - `idle`: The player is not playing or loading any videos.\n * - `loading`: The player is loading video data from the provided source\n * - `readyToPlay`: The player has loaded enough data to start playing or to continue playback.\n * - `error`: The player has encountered an error while loading or playing the video.\n */\nexport type VideoPlayerStatus = 'idle' | 'loading' | 'readyToPlay' | 'error';\n\nexport interface VideoViewProps extends ViewProps {\n /**\n * A player instance – use `useVideoPlayer()` to create one.\n */\n player: VideoPlayer;\n\n /**\n * Determines whether native controls should be displayed or not.\n * @default true\n */\n nativeControls?: boolean;\n\n /**\n * Describes how the video should be scaled to fit in the container.\n * Options are 'contain', 'cover', and 'fill'.\n * @default 'contain'\n */\n contentFit?: VideoContentFit;\n\n /**\n * Determines whether fullscreen mode is allowed or not.\n * @default true\n */\n allowsFullscreen?: boolean;\n\n /**\n * Determines whether the timecodes should be displayed or not.\n * @default true\n * @platform ios\n */\n showsTimecodes?: boolean;\n\n /**\n * Determines whether the player allows the user to skip media content.\n * @default false\n * @platform android\n * @platform ios\n */\n requiresLinearPlayback?: boolean;\n\n /**\n * Determines the position offset of the video inside the container.\n * @default { dx: 0, dy: 0 }\n * @platform ios\n */\n contentPosition?: { dx?: number; dy?: number };\n\n /**\n * A callback to call after the video player enters Picture in Picture (PiP) mode.\n * @platform android\n * @platform ios 14+\n */\n onPictureInPictureStart?: () => void;\n\n /**\n * A callback to call after the video player exits Picture in Picture (PiP) mode.\n * @platform android\n * @platform ios 14+\n */\n onPictureInPictureStop?: () => void;\n\n /**\n * Determines whether the player allows Picture in Picture (PiP) mode.\n * @default false\n * @platform ios 14+\n */\n allowsPictureInPicture?: boolean;\n\n /**\n * Determines whether the player should start Picture in Picture (PiP) automatically when the app is in the background.\n * > **Note:** Only one player can be in Picture in Picture (PiP) mode at a time.\n * @default false\n * @platform android 12+\n * @platform ios 14.2+\n */\n startsPictureInPictureAutomatically?: boolean;\n}\n\n/**\n * Specifies which type of DRM to use. Android supports Widevine, PlayReady and ClearKey, iOS supports FairPlay.\n * */\nexport type DRMType = 'clearkey' | 'fairplay' | 'playready' | 'widevine';\n\n/**\n * Specifies DRM options which will be used by the player while loading the video.\n */\nexport type DRMOptions = {\n /**\n * Determines which type of DRM to use.\n */\n type: DRMType;\n\n /**\n * Determines the license server URL.\n */\n licenseServer: string;\n\n /**\n * Determines headers sent to the license server on license requests.\n */\n headers?: { [key: string]: string };\n\n /**\n * Specifies whether the DRM is a multi-key DRM.\n * @platform android\n */\n multiKey?: boolean;\n\n /**\n * Specifies the content ID of the stream.\n * @platform ios\n */\n contentId?: string;\n\n /**\n * Specifies the certificate URL for the FairPlay DRM.\n * @platform ios\n */\n certificateUrl?: string;\n};\n\nexport type VideoSource = string | { uri: string; drm?: DRMOptions } | null;\n\n/**\n * Handlers for events which can be emitted by the player.\n */\nexport type VideoPlayerEvents = {\n /**\n * Handler for an event emitted when the status of the player changes.\n */\n statusChange: (\n newStatus: VideoPlayerStatus,\n oldStatus: VideoPlayerStatus,\n error: PlayerError\n ) => void;\n /**\n * Handler for an event emitted when the player starts or stops playback.\n */\n playingChange: (newIsPlaying: boolean, oldIsPlaying: boolean) => void;\n /**\n * Handler for an event emitted when the `playbackRate` property of the player changes.\n */\n playbackRateChange: (newPlaybackRate: number, oldPlaybackRate: number) => void;\n /**\n * Handler for an event emitted when the `volume` property of the player changes.\n */\n volumeChange: (newVolume: VolumeEvent, oldVolume: VolumeEvent) => void;\n /**\n * Handler for an event emitted when the player plays to the end of the current source.\n */\n playToEnd: () => void;\n /**\n * Handler for an event emitted when the current media source of the player changes.\n */\n sourceChange: (newSource: VideoSource, previousSource: VideoSource) => void;\n};\n\n/**\n * Contains information about any errors that the player encountered during the playback\n */\nexport type PlayerError = {\n message: string;\n};\n\n/**\n * Contains information about the current volume and whether the player is muted.\n */\nexport type VolumeEvent = {\n volume: number;\n isMuted: boolean;\n};\n"]}
\ No newline at end of file
diff --git a/packages/expo-video/build/VideoView.web.d.ts b/packages/expo-video/build/VideoView.web.d.ts
index 5cfe2137a3880..afbb578ed568c 100644
--- a/packages/expo-video/build/VideoView.web.d.ts
+++ b/packages/expo-video/build/VideoView.web.d.ts
@@ -1,5 +1,5 @@
import React from 'react';
-import { PlayerStatus, VideoPlayer, VideoSource, VideoViewProps, VideoPlayerEvents } from './VideoView.types';
+import { VideoPlayerStatus, VideoPlayer, VideoSource, VideoViewProps, VideoPlayerEvents } from './VideoView.types';
declare class VideoPlayerWeb extends globalThis.expo.SharedObject implements VideoPlayer {
constructor(source: VideoSource);
src: VideoSource;
@@ -11,7 +11,7 @@ declare class VideoPlayerWeb extends globalThis.expo.SharedObject\n implements VideoPlayer\n{\n constructor(source: VideoSource) {\n super();\n this.src = source;\n }\n\n src: VideoSource = null;\n _mountedVideos: Set = new Set();\n _audioNodes: Set = new Set();\n playing: boolean = false;\n _muted: boolean = false;\n _volume: number = 1;\n _loop: boolean = false;\n _playbackRate: number = 1.0;\n _preservesPitch: boolean = true;\n _status: PlayerStatus = 'idle';\n staysActiveInBackground: boolean = false; // Not supported on web. Dummy to match the interface.\n\n set muted(value: boolean) {\n this._mountedVideos.forEach((video) => {\n video.muted = value;\n });\n this._muted = value;\n }\n\n get muted(): boolean {\n return this._muted;\n }\n\n set playbackRate(value: number) {\n this._mountedVideos.forEach((video) => {\n video.playbackRate = value;\n });\n }\n\n get playbackRate(): number {\n return this._playbackRate;\n }\n\n set volume(value: number) {\n this._mountedVideos.forEach((video) => {\n video.volume = value;\n });\n this._volume = value;\n }\n\n get volume(): number {\n this._mountedVideos.forEach((video) => {\n this._volume = video.volume;\n });\n return this._volume;\n }\n\n set loop(value: boolean) {\n this._mountedVideos.forEach((video) => {\n video.loop = value;\n });\n this._loop = value;\n }\n\n get loop(): boolean {\n return this._loop;\n }\n\n get currentTime(): number {\n // All videos should be synchronized, so we return the position of the first video.\n return [...this._mountedVideos][0].currentTime;\n }\n\n set currentTime(value: number) {\n this._mountedVideos.forEach((video) => {\n video.currentTime = value;\n });\n }\n\n get preservesPitch(): boolean {\n return this._preservesPitch;\n }\n\n set preservesPitch(value: boolean) {\n this._mountedVideos.forEach((video) => {\n video.preservesPitch = value;\n });\n this._preservesPitch = value;\n }\n\n get status(): PlayerStatus {\n return this._status;\n }\n\n mountVideoView(video: HTMLVideoElement) {\n this._mountedVideos.add(video);\n this._synchronizeWithFirstVideo(video);\n this._addListeners(video);\n }\n\n unmountVideoView(video: HTMLVideoElement) {\n const mountedVideos = [...this._mountedVideos];\n const mediaElementSources = [...this._audioNodes];\n const videoIndex = mountedVideos.findIndex((value) => value === video);\n const videoPlayingAudio = mountedVideos[0];\n this._mountedVideos.delete(video);\n this._audioNodes.delete(mediaElementSources[videoIndex]);\n\n // If video playing audio has been removed, select a new video to be the audio player by disconnecting it from the mute node.\n if (videoPlayingAudio === video && this._audioNodes.size > 0 && audioContext) {\n const newMainAudioSource = [...this._audioNodes][0];\n newMainAudioSource.disconnect();\n newMainAudioSource.connect(audioContext.destination);\n }\n }\n\n play(): void {\n this._mountedVideos.forEach((video) => {\n video.play();\n });\n this.playing = true;\n }\n\n pause(): void {\n this._mountedVideos.forEach((video) => {\n video.pause();\n });\n this.playing = false;\n }\n\n replace(source: VideoSource): void {\n this._mountedVideos.forEach((video) => {\n const uri = getSourceUri(source);\n video.pause();\n if (uri) {\n video.setAttribute('src', uri);\n video.load();\n video.play();\n } else {\n video.removeAttribute('src');\n }\n });\n this.playing = true;\n }\n\n seekBy(seconds: number): void {\n this._mountedVideos.forEach((video) => {\n video.currentTime += seconds;\n });\n }\n\n replay(): void {\n this._mountedVideos.forEach((video) => {\n video.currentTime = 0;\n video.play();\n });\n this.playing = true;\n }\n\n _synchronizeWithFirstVideo(video: HTMLVideoElement): void {\n const firstVideo = [...this._mountedVideos][0];\n if (!firstVideo) return;\n video.currentTime = firstVideo.currentTime;\n video.volume = firstVideo.volume;\n video.muted = firstVideo.muted;\n video.playbackRate = firstVideo.playbackRate;\n }\n\n _addListeners(video: HTMLVideoElement): void {\n video.onloadedmetadata = () => {\n if (!audioContext || !zeroGainNode) return;\n const source = audioContext.createMediaElementSource(video);\n this._audioNodes.add(source);\n\n // First mounted video should be connected to the audio context. All other videos have to be muted.\n if (this._audioNodes.size === 1) {\n source.connect(audioContext.destination);\n } else {\n source.connect(zeroGainNode);\n }\n };\n\n video.onplay = () => {\n this.playing = true;\n this._mountedVideos.forEach((mountedVideo) => {\n mountedVideo.play();\n });\n };\n\n video.onpause = () => {\n this.playing = false;\n this._mountedVideos.forEach((mountedVideo) => {\n mountedVideo.pause();\n });\n };\n\n video.onvolumechange = () => {\n this.volume = video.volume;\n this._muted = video.muted;\n };\n\n video.onseeking = () => {\n this._mountedVideos.forEach((mountedVideo) => {\n if (mountedVideo === video || mountedVideo.currentTime === video.currentTime) return;\n mountedVideo.currentTime = video.currentTime;\n });\n };\n\n video.onseeked = () => {\n this._mountedVideos.forEach((mountedVideo) => {\n if (mountedVideo === video || mountedVideo.currentTime === video.currentTime) return;\n mountedVideo.currentTime = video.currentTime;\n });\n };\n\n video.onratechange = () => {\n this._mountedVideos.forEach((mountedVideo) => {\n if (mountedVideo === video || mountedVideo.playbackRate === video.playbackRate) return;\n this._playbackRate = video.playbackRate;\n mountedVideo.playbackRate = video.playbackRate;\n });\n };\n\n video.onerror = () => {\n this._status = 'error';\n };\n\n video.onloadeddata = () => {\n this._status = 'readyToPlay';\n };\n\n video.onwaiting = () => {\n this._status = 'loading';\n };\n }\n}\n\nfunction mapStyles(style: VideoViewProps['style']): React.CSSProperties {\n const flattenedStyles = StyleSheet.flatten(style);\n // Looking through react-native-web source code they also just pass styles directly without further conversions, so it's just a cast.\n return flattenedStyles as React.CSSProperties;\n}\n\nexport function useVideoPlayer(\n source: VideoSource,\n setup?: (player: VideoPlayer) => void\n): VideoPlayer {\n const parsedSource = typeof source === 'string' ? { uri: source } : source;\n\n return useMemo(() => {\n const player = new VideoPlayerWeb(parsedSource);\n setup?.(player);\n return player;\n }, [JSON.stringify(source)]);\n}\n\nfunction getSourceUri(source: VideoSource): string | null {\n if (typeof source == 'string') {\n return source;\n }\n return source?.uri ?? null;\n}\n\nexport const VideoView = forwardRef((props: { player?: VideoPlayerWeb } & VideoViewProps, ref) => {\n const videoRef = useRef(null);\n useImperativeHandle(ref, () => ({\n enterFullscreen: () => {\n if (!props.allowsFullscreen) {\n return;\n }\n videoRef.current?.requestFullscreen();\n },\n exitFullscreen: () => {\n document.exitFullscreen();\n },\n }));\n\n useEffect(() => {\n return () => {\n if (videoRef.current) {\n props.player?.unmountVideoView(videoRef.current);\n }\n };\n }, []);\n\n useEffect(() => {\n if (!props.player || !videoRef.current) {\n return;\n }\n props.player.mountVideoView(videoRef.current);\n return () => {\n if (videoRef.current) {\n props.player?.unmountVideoView(videoRef.current);\n }\n };\n }, [props.player]);\n\n return (\n {\n // This is called with a null value before `player.unmountVideoView` is called,\n // we can't assign null to videoRef if we want to unmount it from the player.\n if (newRef) {\n videoRef.current = newRef;\n }\n }}\n src={getSourceUri(props.player?.src) ?? ''}\n />\n );\n});\n\nexport default VideoView;\n"]}
\ No newline at end of file
+{"version":3,"file":"VideoView.web.js","sourceRoot":"","sources":["../src/VideoView.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAU1C;;;GAGG;AACH,MAAM,YAAY,GAAG,MAAM,IAAI,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC;AACzD,MAAM,YAAY,GAAG,YAAY,IAAI,YAAY,CAAC,UAAU,EAAE,CAAC;AAC/D,IAAI,YAAY,IAAI,YAAY,EAAE;IAChC,YAAY,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IAC5B,YAAY,CAAC,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;CAChD;KAAM;IACL,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AAE,GAAG,CAAC,IAAI,EAAE,CAAC,EAC3C,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC","sourcesContent":["import React, { useEffect, useRef, forwardRef, useImperativeHandle, useMemo } from 'react';\nimport { StyleSheet } from 'react-native';\n\nimport {\n VideoPlayerStatus,\n VideoPlayer,\n VideoSource,\n VideoViewProps,\n VideoPlayerEvents,\n} from './VideoView.types';\n\n/**\n * This audio context is used to mute all but one video when multiple video views are playing from one player simultaneously.\n * Using audio context nodes allows muting videos without displaying the mute icon in the video player.\n */\nconst audioContext = window && new window.AudioContext();\nconst zeroGainNode = audioContext && audioContext.createGain();\nif (audioContext && zeroGainNode) {\n zeroGainNode.gain.value = 0;\n zeroGainNode.connect(audioContext.destination);\n} else {\n console.warn(\n \"Couldn't create AudioContext, this might affect the audio playback when using multiple video views with the same player.\"\n );\n}\n\nclass VideoPlayerWeb\n extends globalThis.expo.SharedObject\n implements VideoPlayer\n{\n constructor(source: VideoSource) {\n super();\n this.src = source;\n }\n\n src: VideoSource = null;\n _mountedVideos: Set = new Set();\n _audioNodes: Set = new Set();\n playing: boolean = false;\n _muted: boolean = false;\n _volume: number = 1;\n _loop: boolean = false;\n _playbackRate: number = 1.0;\n _preservesPitch: boolean = true;\n _status: VideoPlayerStatus = 'idle';\n staysActiveInBackground: boolean = false; // Not supported on web. Dummy to match the interface.\n\n set muted(value: boolean) {\n this._mountedVideos.forEach((video) => {\n video.muted = value;\n });\n this._muted = value;\n }\n\n get muted(): boolean {\n return this._muted;\n }\n\n set playbackRate(value: number) {\n this._mountedVideos.forEach((video) => {\n video.playbackRate = value;\n });\n }\n\n get playbackRate(): number {\n return this._playbackRate;\n }\n\n set volume(value: number) {\n this._mountedVideos.forEach((video) => {\n video.volume = value;\n });\n this._volume = value;\n }\n\n get volume(): number {\n this._mountedVideos.forEach((video) => {\n this._volume = video.volume;\n });\n return this._volume;\n }\n\n set loop(value: boolean) {\n this._mountedVideos.forEach((video) => {\n video.loop = value;\n });\n this._loop = value;\n }\n\n get loop(): boolean {\n return this._loop;\n }\n\n get currentTime(): number {\n // All videos should be synchronized, so we return the position of the first video.\n return [...this._mountedVideos][0].currentTime;\n }\n\n set currentTime(value: number) {\n this._mountedVideos.forEach((video) => {\n video.currentTime = value;\n });\n }\n\n get preservesPitch(): boolean {\n return this._preservesPitch;\n }\n\n set preservesPitch(value: boolean) {\n this._mountedVideos.forEach((video) => {\n video.preservesPitch = value;\n });\n this._preservesPitch = value;\n }\n\n get status(): VideoPlayerStatus {\n return this._status;\n }\n\n mountVideoView(video: HTMLVideoElement) {\n this._mountedVideos.add(video);\n this._synchronizeWithFirstVideo(video);\n this._addListeners(video);\n }\n\n unmountVideoView(video: HTMLVideoElement) {\n const mountedVideos = [...this._mountedVideos];\n const mediaElementSources = [...this._audioNodes];\n const videoIndex = mountedVideos.findIndex((value) => value === video);\n const videoPlayingAudio = mountedVideos[0];\n this._mountedVideos.delete(video);\n this._audioNodes.delete(mediaElementSources[videoIndex]);\n\n // If video playing audio has been removed, select a new video to be the audio player by disconnecting it from the mute node.\n if (videoPlayingAudio === video && this._audioNodes.size > 0 && audioContext) {\n const newMainAudioSource = [...this._audioNodes][0];\n newMainAudioSource.disconnect();\n newMainAudioSource.connect(audioContext.destination);\n }\n }\n\n play(): void {\n this._mountedVideos.forEach((video) => {\n video.play();\n });\n this.playing = true;\n }\n\n pause(): void {\n this._mountedVideos.forEach((video) => {\n video.pause();\n });\n this.playing = false;\n }\n\n replace(source: VideoSource): void {\n this._mountedVideos.forEach((video) => {\n const uri = getSourceUri(source);\n video.pause();\n if (uri) {\n video.setAttribute('src', uri);\n video.load();\n video.play();\n } else {\n video.removeAttribute('src');\n }\n });\n this.playing = true;\n }\n\n seekBy(seconds: number): void {\n this._mountedVideos.forEach((video) => {\n video.currentTime += seconds;\n });\n }\n\n replay(): void {\n this._mountedVideos.forEach((video) => {\n video.currentTime = 0;\n video.play();\n });\n this.playing = true;\n }\n\n _synchronizeWithFirstVideo(video: HTMLVideoElement): void {\n const firstVideo = [...this._mountedVideos][0];\n if (!firstVideo) return;\n video.currentTime = firstVideo.currentTime;\n video.volume = firstVideo.volume;\n video.muted = firstVideo.muted;\n video.playbackRate = firstVideo.playbackRate;\n }\n\n _addListeners(video: HTMLVideoElement): void {\n video.onloadedmetadata = () => {\n if (!audioContext || !zeroGainNode) return;\n const source = audioContext.createMediaElementSource(video);\n this._audioNodes.add(source);\n\n // First mounted video should be connected to the audio context. All other videos have to be muted.\n if (this._audioNodes.size === 1) {\n source.connect(audioContext.destination);\n } else {\n source.connect(zeroGainNode);\n }\n };\n\n video.onplay = () => {\n this.playing = true;\n this._mountedVideos.forEach((mountedVideo) => {\n mountedVideo.play();\n });\n };\n\n video.onpause = () => {\n this.playing = false;\n this._mountedVideos.forEach((mountedVideo) => {\n mountedVideo.pause();\n });\n };\n\n video.onvolumechange = () => {\n this.volume = video.volume;\n this._muted = video.muted;\n };\n\n video.onseeking = () => {\n this._mountedVideos.forEach((mountedVideo) => {\n if (mountedVideo === video || mountedVideo.currentTime === video.currentTime) return;\n mountedVideo.currentTime = video.currentTime;\n });\n };\n\n video.onseeked = () => {\n this._mountedVideos.forEach((mountedVideo) => {\n if (mountedVideo === video || mountedVideo.currentTime === video.currentTime) return;\n mountedVideo.currentTime = video.currentTime;\n });\n };\n\n video.onratechange = () => {\n this._mountedVideos.forEach((mountedVideo) => {\n if (mountedVideo === video || mountedVideo.playbackRate === video.playbackRate) return;\n this._playbackRate = video.playbackRate;\n mountedVideo.playbackRate = video.playbackRate;\n });\n };\n\n video.onerror = () => {\n this._status = 'error';\n };\n\n video.onloadeddata = () => {\n this._status = 'readyToPlay';\n };\n\n video.onwaiting = () => {\n this._status = 'loading';\n };\n }\n}\n\nfunction mapStyles(style: VideoViewProps['style']): React.CSSProperties {\n const flattenedStyles = StyleSheet.flatten(style);\n // Looking through react-native-web source code they also just pass styles directly without further conversions, so it's just a cast.\n return flattenedStyles as React.CSSProperties;\n}\n\nexport function useVideoPlayer(\n source: VideoSource,\n setup?: (player: VideoPlayer) => void\n): VideoPlayer {\n const parsedSource = typeof source === 'string' ? { uri: source } : source;\n\n return useMemo(() => {\n const player = new VideoPlayerWeb(parsedSource);\n setup?.(player);\n return player;\n }, [JSON.stringify(source)]);\n}\n\nfunction getSourceUri(source: VideoSource): string | null {\n if (typeof source == 'string') {\n return source;\n }\n return source?.uri ?? null;\n}\n\nexport const VideoView = forwardRef((props: { player?: VideoPlayerWeb } & VideoViewProps, ref) => {\n const videoRef = useRef(null);\n useImperativeHandle(ref, () => ({\n enterFullscreen: () => {\n if (!props.allowsFullscreen) {\n return;\n }\n videoRef.current?.requestFullscreen();\n },\n exitFullscreen: () => {\n document.exitFullscreen();\n },\n }));\n\n useEffect(() => {\n return () => {\n if (videoRef.current) {\n props.player?.unmountVideoView(videoRef.current);\n }\n };\n }, []);\n\n useEffect(() => {\n if (!props.player || !videoRef.current) {\n return;\n }\n props.player.mountVideoView(videoRef.current);\n return () => {\n if (videoRef.current) {\n props.player?.unmountVideoView(videoRef.current);\n }\n };\n }, [props.player]);\n\n return (\n {\n // This is called with a null value before `player.unmountVideoView` is called,\n // we can't assign null to videoRef if we want to unmount it from the player.\n if (newRef) {\n videoRef.current = newRef;\n }\n }}\n src={getSourceUri(props.player?.src) ?? ''}\n />\n );\n});\n\nexport default VideoView;\n"]}
\ No newline at end of file
diff --git a/packages/expo-video/build/index.d.ts b/packages/expo-video/build/index.d.ts
index dad6c647430a6..f99302c568dd3 100644
--- a/packages/expo-video/build/index.d.ts
+++ b/packages/expo-video/build/index.d.ts
@@ -1,5 +1,5 @@
import Video from './NativeVideoModule';
export { VideoView, useVideoPlayer, isPictureInPictureSupported } from './VideoView';
export { Video };
-export { VideoSource, VideoPlayerEvents } from './VideoView.types';
+export { VideoSource, VideoPlayerEvents, VideoPlayerStatus, VideoContentFit, } from './VideoView.types';
//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/packages/expo-video/build/index.d.ts.map b/packages/expo-video/build/index.d.ts.map
index 4659bd04fc5c2..4eddb6e2ca973 100644
--- a/packages/expo-video/build/index.d.ts.map
+++ b/packages/expo-video/build/index.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC"}
\ No newline at end of file
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,mBAAmB,CAAC"}
\ No newline at end of file
diff --git a/packages/expo-video/build/index.js.map b/packages/expo-video/build/index.js.map
index 33562d87dc0ed..113b235bc0922 100644
--- a/packages/expo-video/build/index.js.map
+++ b/packages/expo-video/build/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,KAAK,EAAE,CAAC","sourcesContent":["import Video from './NativeVideoModule';\n\nexport { VideoView, useVideoPlayer, isPictureInPictureSupported } from './VideoView';\nexport { Video };\nexport { VideoSource, VideoPlayerEvents } from './VideoView.types';\n"]}
\ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,KAAK,EAAE,CAAC","sourcesContent":["import Video from './NativeVideoModule';\n\nexport { VideoView, useVideoPlayer, isPictureInPictureSupported } from './VideoView';\nexport { Video };\nexport {\n VideoSource,\n VideoPlayerEvents,\n VideoPlayerStatus,\n VideoContentFit,\n} from './VideoView.types';\n"]}
\ No newline at end of file
diff --git a/packages/expo-video/src/VideoView.tsx b/packages/expo-video/src/VideoView.tsx
index 03756f8d24a13..8a9b3e1e2feb4 100644
--- a/packages/expo-video/src/VideoView.tsx
+++ b/packages/expo-video/src/VideoView.tsx
@@ -13,6 +13,11 @@ import NativeVideoModule from './NativeVideoModule';
import NativeVideoView from './NativeVideoView';
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 function useVideoPlayer(
source: VideoSource,
setup?: (player: VideoPlayer) => void
@@ -39,18 +44,16 @@ export function isPictureInPictureSupported(): Promise {
export class VideoView extends PureComponent {
nativeRef = createRef();
- replace(source: VideoSource) {
- if (typeof source === 'string') {
- this.nativeRef.current?.replace({ uri: source });
- return;
- }
- this.nativeRef.current?.replace(source);
- }
-
+ /**
+ * Enters fullscreen mode.
+ */
enterFullscreen() {
this.nativeRef.current?.enterFullscreen();
}
+ /**
+ * Exits fullscreen mode.
+ */
exitFullscreen() {
this.nativeRef.current?.exitFullscreen();
}
@@ -61,7 +64,7 @@ export class VideoView extends PureComponent {
* @platform android
* @platform ios 14+
*/
- startPictureInPicture() {
+ startPictureInPicture(): void {
return this.nativeRef.current?.startPictureInPicture();
}
@@ -70,7 +73,7 @@ export class VideoView extends PureComponent {
* @platform android
* @platform ios 14+
*/
- stopPictureInPicture() {
+ stopPictureInPicture(): void {
return this.nativeRef.current?.stopPictureInPicture();
}
diff --git a/packages/expo-video/src/VideoView.types.ts b/packages/expo-video/src/VideoView.types.ts
index 1203ca2ece3d5..65e7964e4477d 100644
--- a/packages/expo-video/src/VideoView.types.ts
+++ b/packages/expo-video/src/VideoView.types.ts
@@ -55,7 +55,7 @@ export declare class VideoPlayer extends SharedObject {
* Indicates the current status of the player.
* > This property is get-only
*/
- status: PlayerStatus;
+ status: VideoPlayerStatus;
/**
* Determines whether the player should continue playing after the app enters the background.
@@ -97,7 +97,7 @@ export declare class VideoPlayer extends SharedObject {
* - `cover`: The video maintains its aspect ratio and covers the entire container, potentially cropping some portions.
* - `fill`: The video stretches/squeezes to completely fill the container, potentially causing distortion.
*/
-type VideoContentFit = 'contain' | 'cover' | 'fill';
+export type VideoContentFit = 'contain' | 'cover' | 'fill';
/**
* Describes the current status of the player.
@@ -106,7 +106,7 @@ type VideoContentFit = 'contain' | 'cover' | 'fill';
* - `readyToPlay`: The player has loaded enough data to start playing or to continue playback.
* - `error`: The player has encountered an error while loading or playing the video.
*/
-export type PlayerStatus = 'idle' | 'loading' | 'readyToPlay' | 'error';
+export type VideoPlayerStatus = 'idle' | 'loading' | 'readyToPlay' | 'error';
export interface VideoViewProps extends ViewProps {
/**
@@ -189,12 +189,12 @@ export interface VideoViewProps extends ViewProps {
/**
* Specifies which type of DRM to use. Android supports Widevine, PlayReady and ClearKey, iOS supports FairPlay.
* */
-type DRMType = 'clearkey' | 'fairplay' | 'playready' | 'widevine';
+export type DRMType = 'clearkey' | 'fairplay' | 'playready' | 'widevine';
/**
* Specifies DRM options which will be used by the player while loading the video.
*/
-type DRMOptions = {
+export type DRMOptions = {
/**
* Determines which type of DRM to use.
*/
@@ -238,7 +238,11 @@ export type VideoPlayerEvents = {
/**
* Handler for an event emitted when the status of the player changes.
*/
- statusChange: (newStatus: PlayerStatus, oldStatus: PlayerStatus, error: PlayerError) => void;
+ statusChange: (
+ newStatus: VideoPlayerStatus,
+ oldStatus: VideoPlayerStatus,
+ error: PlayerError
+ ) => void;
/**
* Handler for an event emitted when the player starts or stops playback.
*/
@@ -264,14 +268,14 @@ export type VideoPlayerEvents = {
/**
* Contains information about any errors that the player encountered during the playback
*/
-type PlayerError = {
+export type PlayerError = {
message: string;
};
/**
* Contains information about the current volume and whether the player is muted.
*/
-type VolumeEvent = {
+export type VolumeEvent = {
volume: number;
isMuted: boolean;
};
diff --git a/packages/expo-video/src/VideoView.web.tsx b/packages/expo-video/src/VideoView.web.tsx
index 45894c0d7e68d..92afcf6755062 100644
--- a/packages/expo-video/src/VideoView.web.tsx
+++ b/packages/expo-video/src/VideoView.web.tsx
@@ -2,7 +2,7 @@ import React, { useEffect, useRef, forwardRef, useImperativeHandle, useMemo } fr
import { StyleSheet } from 'react-native';
import {
- PlayerStatus,
+ VideoPlayerStatus,
VideoPlayer,
VideoSource,
VideoViewProps,
@@ -42,7 +42,7 @@ class VideoPlayerWeb
_loop: boolean = false;
_playbackRate: number = 1.0;
_preservesPitch: boolean = true;
- _status: PlayerStatus = 'idle';
+ _status: VideoPlayerStatus = 'idle';
staysActiveInBackground: boolean = false; // Not supported on web. Dummy to match the interface.
set muted(value: boolean) {
@@ -113,7 +113,7 @@ class VideoPlayerWeb
this._preservesPitch = value;
}
- get status(): PlayerStatus {
+ get status(): VideoPlayerStatus {
return this._status;
}
diff --git a/packages/expo-video/src/index.ts b/packages/expo-video/src/index.ts
index 9ddb43699b27e..537b84916f25f 100644
--- a/packages/expo-video/src/index.ts
+++ b/packages/expo-video/src/index.ts
@@ -2,4 +2,9 @@ import Video from './NativeVideoModule';
export { VideoView, useVideoPlayer, isPictureInPictureSupported } from './VideoView';
export { Video };
-export { VideoSource, VideoPlayerEvents } from './VideoView.types';
+export {
+ VideoSource,
+ VideoPlayerEvents,
+ VideoPlayerStatus,
+ VideoContentFit,
+} from './VideoView.types';
diff --git a/tools/src/commands/GenerateDocsAPIData.ts b/tools/src/commands/GenerateDocsAPIData.ts
index 06bdd72a9f670..5eb1a07b33a02 100644
--- a/tools/src/commands/GenerateDocsAPIData.ts
+++ b/tools/src/commands/GenerateDocsAPIData.ts
@@ -92,7 +92,8 @@ const PACKAGES_MAPPING: Record = {
'expo-task-manager': ['TaskManager.ts'],
'expo-tracking-transparency': ['TrackingTransparency.ts'],
'expo-updates': ['index.ts'],
- 'expo-video': [['Video.tsx', 'Video.types.ts'], 'expo-av'],
+ 'expo-video': [['VideoView.tsx', 'VideoView.types.ts']],
+ 'expo-video-av': [['Video.tsx', 'Video.types.ts'], 'expo-av'],
'expo-video-thumbnails': ['VideoThumbnails.ts'],
'expo-web-browser': ['WebBrowser.ts'],
};