How to add video to your Expo app, in short
You add video to an Expo app with the expo-video library. Install it with npx expo install expo-video. In a component, create a player with the useVideoPlayer hook, passing a local file (require('./assets/intro.mp4')) or a URL. Then render a VideoView and give it that player. The view shows the picture and the native controls. The player holds the state: play(), pause(), loop, muted, currentTime. That is enough for an onboarding clip, a product demo, a lesson player or a feed of short videos.
Getting a video on screen takes a few lines. The work is in the details users notice: a background loop that pauses their Spotify, a play button that shows the wrong icon, a list of videos that stutters, and a background mode in your iOS build that you did not mean to ship. This guide covers each one.
Step 1: Install expo-video
- Run: npx expo install expo-video. Using expo install instead of npm install picks a version that matches your SDK.
- Put bundled clips in your project, for example assets/videos. Keep them short and compressed, because every bundled file adds to the download.
- Start testing in Expo Go if you like. expo-video is included in Expo Go, so basic playback works there. The config plugin options (Picture in Picture and background playback) only take effect in a development build or a store build.
If you are not sure which of those you are running, read [Expo Go vs a development build](/blog/expo-go-vs-development-build) first. You will need a development build before you ship anyway.
Step 2: Play a video with useVideoPlayer and VideoView
The minimal version, following the pattern in Expo's docs:
- Import: import { useVideoPlayer, VideoView } from 'expo-video'.
- Create the player, with an optional setup function that runs once: const player = useVideoPlayer(source, (p) => { p.loop = true; p.play(); }).
- Render it: <VideoView player={player} style={{ width: '100%', aspectRatio: 16 / 9 }} />. Give the view a size, or you will see nothing.
- For a local file, the source is require('../assets/videos/intro.mp4'). For a remote file, it is the URL string. To add a title for the system controls, pass an object: { assetId: require(...), metadata: { title: 'Welcome' } } or { uri, metadata }.
VideoView shows native controls by default (nativeControls is true). Set nativeControls={false} when you want your own buttons or a clean, control-free loop. Expo's docs note that native controls are always shown in fullscreen, whatever you set. contentFit decides how the video fills the view: 'contain' (the default, letterboxed), 'cover' (fills and crops) or 'fill' (stretches).
The player has the controls you would expect. play() and pause(). loop to repeat. muted and volume (0.0 to 1.0). playbackRate for speed. currentTime, in seconds, which you can also set to seek. seekBy(seconds) for skip buttons. replay() to jump back to the start. To switch to a different video, use replaceAsync(source). Expo's reference says the older replace() loads the asset on the UI thread on iOS and can freeze the screen, and that it will be deprecated.
Step 3: Show state with player events
This is the part that trips people up most. Expo's docs are explicit: changes to the player's properties do not update React state. If your play button reads player.playing directly, the icon will not change when the video stops on its own. You listen to events instead.
- Play/pause icon: const { isPlaying } = useEvent(player, 'playingChange', { isPlaying: player.playing }). useEvent comes from the expo package and cleans up for you.
- Loading and errors: const { status, error } = useEvent(player, 'statusChange', { status: player.status }). Status is one of idle, loading, readyToPlay or error. Show a spinner while it is loading and a retry message on error.
- End of video: useEventListener(player, 'playToEnd', () => { ... }) to move to the next lesson or show a call to action.
- Progress bar: the timeUpdate event only fires if you set player.timeUpdateEventInterval to a number of seconds, such as 0.5. Its default is 0, which means the event never fires. That is the usual reason a progress bar sits at zero.
- Poster image: use the onFirstFrameRender prop on VideoView to hide a placeholder image once the first frame is drawn, so users never see a black box while the video loads.
A muted background loop that does not stop the user's music
The most common use of video in an indie app is not a player at all. It is a short looping clip on a welcome screen or a paywall. Done carelessly, it pauses whatever the user was listening to the moment your screen appears. That is a bad first impression.
audioMixingMode options in expo-video
| Value | What it does to other apps' audio |
|---|---|
| auto (default) | Other apps keep playing only while your player is muted |
| mixWithOthers | Your audio plays alongside other apps |
| duckOthers | Other apps get quieter while your player outputs sound |
| doNotMix | Other apps pause, even if your player is muted |
My recommendation for a decorative loop: in the setup function, set p.muted = true, p.loop = true and p.audioMixingMode = 'mixWithOthers', then call p.play(). Render it with nativeControls={false} and contentFit='cover'. Muted plus the default auto mode already leaves other audio alone, but setting mixWithOthers explicitly documents the intent, so a later change to unmute the clip does not quietly start pausing people's podcasts. For a real player, like lessons or a workout video, leave the default or use doNotMix.
One more default worth knowing: keepScreenOnWhilePlaying is true. That is right for a lesson player. For an endless background loop on a screen people might leave open, consider setting it to false so the phone can still sleep.
Step 4: Picture in Picture, background playback and fullscreen
Fullscreen works without any setup: VideoView takes fullscreenOptions={{ enable: true }}, and onFullscreenEnter and onFullscreenExit callbacks if you need them. Picture in Picture and background playback need the config plugin:
- In app.json: plugins: [["expo-video", { "supportsPictureInPicture": true, "supportsBackgroundPlayback": true }]]. Only include the ones you need. Both default to undefined, which leaves your native config alone.
- Rebuild your development build. Plugin changes do nothing until you do.
- For Picture in Picture, add allowsPictureInPicture to the VideoView. Add startsPictureInPictureAutomatically if the video should shrink into PiP when the user leaves the app. It defaults to false.
- For audio that keeps going in the background, set player.staysActiveInBackground = true. It defaults to false and only works when supportsBackgroundPlayback is on.
- For lock screen and notification controls, set player.showNowPlayingNotification = true. On Android it also needs supportsBackgroundPlayback.
Feeds, preloading and caching
If your app shows several videos in a row (a feed, a course playlist, swipeable stories), three features from Expo's docs make it feel fast:
- Preloading: a player starts buffering as soon as it has a source, even before it is attached to a VideoView. Create the next video's player ahead of time and it can start without a loading spinner. You can also create a player with a null source and call replaceAsync later when you want it to start loading.
- Caching: set useCaching: true on a remote source ({ uri, useCaching: true }) and replays come from disk instead of the network, including offline once cached. The default cache size is 1 GB, adjustable with setVideoCacheSizeAsync. Expo's docs note the cache does not work with HLS streams on iOS, and the system can clear it when storage is low, so never treat it as permanent storage.
- One view per player on Android: Expo's docs say mounting the same player in multiple VideoView components at once does not work on Android. Give each visible video its own player.
For thumbnails, the player has generateThumbnailsAsync(times), which returns images you can show with expo-image. The separate expo-video-thumbnails package is marked deprecated in Expo's current SDK reference, so do not start new code on it.
Mistakes that make video fail in Expo
- Following an expo-av tutorial. If the code imports Video from expo-av, it is the old API. Use useVideoPlayer and VideoView from expo-video.
- Reading player.playing in render and expecting the UI to update. Use useEvent.
- A progress bar that never moves because timeUpdateEventInterval is still 0.
- A VideoView with no width or height, which renders nothing.
- Calling replace() for every new video on iOS instead of replaceAsync().
- Creating players with createVideoPlayer and never calling release().
- Turning on Picture in Picture or background playback for a decorative clip, which ships the audio background mode for no reason.
- A welcome-screen loop that pauses the user's music. Mute it and use mixWithOthers.
- Bundling large video files. Host long videos remotely and keep bundled clips small. See [how to reduce your Expo app size](/blog/how-to-reduce-your-expo-app-size).
If users can pick their own videos from their library, that flow is in [how to add an image picker to your Expo app](/blog/how-to-add-an-image-picker-to-your-expo-app). If your app records video, start with [how to add a camera to your Expo app](/blog/how-to-add-a-camera-to-your-expo-app). For sound without a picture, see [how to add audio to your Expo app](/blog/how-to-add-audio-to-your-expo-app).
Have Claude Code set it up for you
Open your project in the Claude Code desktop app and describe how the video should behave, not just "add a video". The decisions above (muted or not, background or not, your controls or native ones) are product choices the AI cannot guess. A prompt that works for a welcome-screen loop plus a lesson player:
Then add a line to your [CLAUDE.md](/blog/claude-md-for-expo-apps) like "video uses expo-video, never expo-av; UI state comes from useEvent, not player properties" so a later session does not slip back to the old library. Test on a real iPhone with music playing in another app and on a slow connection.
The short version
To add video to your Expo app: install expo-video, create a player with useVideoPlayer, and render it with VideoView. Drive your UI from events with useEvent, and set timeUpdateEventInterval if you need a progress bar. For a decorative loop, mute it, loop it and use mixWithOthers so you never stop someone's music. Only enable Picture in Picture or background playback in the config plugin if your app really is a video player, because both add a background mode to your iOS build. Use replaceAsync to switch videos, preload the next one, and cache remote videos that get replayed.
If you are building your first iOS app with Claude Code and Expo and want a second pair of eyes on it before App Review, bring it to App Store Launch Club. Members share their builds for feedback, and the [curriculum](/curriculum) covers the full path from first build to first users. Join at applaunchclub.co for $9 a month.
Short, practical drops on app ideas, validating fast, store listings, and passing app review. No spam, unsubscribe anytime.
Frequently asked questions
Should I use expo-video or expo-av for video?
Use expo-video. The Video component from expo-av is the old API and expo-av is no longer in Expo's latest SDK reference. expo-video uses a player object (useVideoPlayer) and a view (VideoView).
Does expo-video work in Expo Go?
Yes, expo-video is included in Expo Go, so basic playback works there. Picture in Picture and background playback depend on the config plugin, which needs a development build.
Why doesn't my play/pause button update in expo-video?
Player properties do not update React state. Listen to the playingChange event with useEvent from 'expo' and read isPlaying from it instead of reading player.playing in render.
How do I autoplay a muted looping video in Expo?
In the useVideoPlayer setup function, set muted to true and loop to true, then call play(). Render the VideoView with nativeControls={false}. Set audioMixingMode to 'mixWithOthers' so it never pauses other apps' audio.
How do I add Picture in Picture to an Expo app?
Set supportsPictureInPicture to true in the expo-video config plugin, rebuild, and add allowsPictureInPicture to the VideoView. On iOS this adds the audio background mode, so only enable it if your app is a real video player.
How do I show a progress bar with expo-video?
Set player.timeUpdateEventInterval to a number of seconds, such as 0.5, and listen to the timeUpdate event. The default is 0, which means the event is never emitted.
Can expo-video cache videos for offline playback?
Yes, on Android and iOS. Set useCaching: true on the video source. Cached parts play offline, but the cache does not work with HLS streams on iOS and the system can clear it when storage is low.
Last reviewed by David on October 16, 2026

