Please provide the following:
- SDK Version: 36.0.2
- Platforms(Android/iOS/web/all): Android/IOS
I am currently developing an app that lets the user record some videos in one screen and in another I want to play the videos using expo videoplayer from Expo AV. The weird thing is that this works perfectly with IOS. Recording works on android (I can console log the link to the video in memory and I can console log the context used to see that it is actually there). But when I use the URL for the videoplayer the video does not appear on android. Instead there is an empty frame where the video should be.
I tried using the exact same code and logic in a test project and it worked perfectly. I am wondering if there could be some package-conflict or something like that. I can’t really wrap my mind around what could be wrong.
Here is mye package.json.
{
“main”: “node_modules/expo/AppEntry.js”,
“scripts”: {
“start”: “expo start”,
“android”: “expo start --android”,
“ios”: “expo start --ios”,
“web”: “expo start --web”,
“eject”: “expo eject”
},
“dependencies”: {
“expo”: “^36.0.2”,
“expo-av”: “^8.0.0”,
“expo-camera”: “^8.0.0”,
“expo-file-system”: “^8.0.0”,
“expo-permissions”: “~8.0.0”,
“native-base”: “^2.13.8”,
“react”: “~16.9.0”,
“react-devtools”: “^3.6.3”,
“react-dom”: “~16.9.0”,
“react-native”: “https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz”,
“react-native-gesture-handler”: “^1.5.6”,
“react-native-reanimated”: “~1.4.0”,
“react-native-router-flux”: “^4.2.0”,
“react-native-screens”: “2.0.0-alpha.12”,
“react-native-web”: “~0.11.7”
},
“devDependencies”: {
“@babel/core”: “^7.0.0”,
“babel-preset-expo”: “~8.0.0”
},
“private”: true
}
Here is my super-basic video-player.
<Video
source={{ uri: this.props.uri }} style={{ height: 500, width: 300 }}
shouldPlay={this.props.shouldPlay}
rate={1.0}
volume={1.0}
isMuted={false}
isLooping={false}
resizeMode=‘cover’
/>
The videoplayer gets the props passed by a component which uses context to get the recordings and play them. I have console logged it and everything seems to be working fine with the URIs.
I have tried using videos from youtube as a link and it works (sometimes). As mentioned earlier we have tried using a separate “test”-project and even the recordings work.
Examples of how the screen looks after it video is loaded.
To see the how the URI looks go to the first reply.