Video file does not play on Android release builds (when using require)
See original GitHub issueHello Team,
For the past few months, I’ve been trying to play an .mp4 video on the Video component from expo-av module but only succeeded on iOS.
It just does not load/play on Android.
I’m using the following modules on the bare workflow: “expo”: “36.0.0”, “expo-av”: “8.0.0”, “react”: “16.9.0”, “react-native”: “0.61.4”
And here is a snippet of my code:
import Videos from '../../assets/videos'
const Walkthrough = ({ navigation }) => (
<Video
isLooping
isMuted
shouldPlay
key={3}
resizeMode={Video.RESIZE_MODE_COVER}
source={{ uri: Videos.Nv, overrideFileExtensionAndroid: 'mp4' }}
style={[
{
bottom: 0,
left: 0,
position: 'absolute',
right: 0,
top: 0,
},
]}
/>
)
The video does play on Emulator with debug mode but not in release mode.
Any idea on how I can resolve this issue ?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Embedded local video file not playing on Android
Embedded local video file not playing on Android in release build but fine in debug build when using AppBuilder (Windows Client).
Read more >Supported media formats
This document describes the media codec, container, and network protocol support provided by the Android platform.
Read more >Troubleshoot known issues with Android Emulator
This page lists known issues, workarounds, and troubleshooting tips for the Android Emulator. If you encounter an issue not listed here or ...
Read more >Prepare your app for release
Learn how to build a signed, release-ready APK. This process is the same for all Android apps.
Read more >Known issues with Android Studio and Android Gradle Plugin
If Studio doesn't start after an upgrade, the problem may be due to an invalid Android Studio configuration imported from a previous version...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I found the solution that works on device and emulator after studying the Video and Audio classes a bit closer. I should note that I’m also using expo-asset 8.1.5.
This does NOT work for me, it’s not loading the video on android devices:
This DOES works for me:
And for Audio, it’s the same, so this does NOT work for me on android device:
And this DOES works for me:
@watanabeyu Can you please provide detail or a code example rather than letting us know you solved it? thanks…