Simona
Simona

Reputation: 83

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>

Upvotes: 1

Views: 5459

Answers (2)

MertHaddad
MertHaddad

Reputation: 573

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.

Upvotes: 1

Simona
Simona

Reputation: 83

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

Upvotes: 3

Related Questions