'expo-av Video not showing up on iOS but working on Android
Video and video player is loading fine on Android, but on iOS nothing is rendered. I'm using Video from expo-av.
I tried adding height and width to the view , tried
source={{ uri: post.videoURL + ".mp4" }}
as these solved the problem in other SO posts, but they didn't work for me. What else would you suggest?
let videoPlayerRef = useRef(null);
...
<View>
<Video
ref={videoPlayerRef}
style={{
width: 350,
height: 200,
}}
resizeMode={Video.RESIZE_MODE_COVER}
shouldPlay={true}
useNativeControls
isLooping={false}
usePoster
rate={1.0}
volume={1.0}
isMuted={false}
onPlaybackStatusUpdate={(videoStatus) =>
setVideoStatus(() => videoStatus)
}
source={{ uri: post.videoURL }}
/>
</View>
Solution 1:[1]
The problem was video format. Check what video format is uploaded/ played, guys. The video I was trying to play on iOS was neither of these: .m4v, .mp4, and .mov . Also the videos I was trying to upload in my app were .mov and that also caused problems - they didn't upload
Solution 2:[2]
I had the same issue with ios version, but my problem was the name of the files, when I removed the spaces from the name everything worked fine.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Simona |
Solution 2 | MertHaddad |