- SDK Version: 37
- Platform: Android
I am playing a video in my Expo / React Native app.
The video works perfectly on both iOS and Android.
However, the audio does not play on Android. The video’s audio works perfectly on iOS.
Here is my video functional component:
import React, { useEffect, useRef } from 'react';
import { Video, Audio } from 'expo-av';
export default function SingleVideo(props) {
useEffect(() => {
Audio.setAudioModeAsync({
playsInSilentModeIOS: true
});
}, [])
return (
<Video
source={{uri: props.source}}
rate={1.0}
volume={1.0}
isMuted={false}
resizeMode="cover"
usePoster={true}
shouldPlay={props.shouldPlay}
progressUpdateIntervalMillis={50}
isLooping
style={{ width: '100%', height: '100%'}}
>
</Video>
)
}