Im using react-native-video with react-native. I need to install and run this on an older Android version Android 4.4 (API 19) kitkat.
But Im only getting a black screen when playing video on Android 4.4 (API 19). Not sure what is happening. Works fine on Android 9 (API 28)
Is the library not supported on Android 4.4?
const App = () => {
return (
<Fragment>
<View>
<Video
source={require('./assets/backgroundVideo.mp4')}
ref={(ref) => {
this.player = ref
}}
onBuffer={this.onBuffer}
onError={this.videoError}
style={styles.backgroundVideo} />
</View>
</Fragment>
);
};
UPDATE: Im also getting the same error in Android studio using the mediaplayer library.
I read this https://developer.android.com/guide/topics/media/media-formats so I changed the profile in my encoding from H.264 AVC Main Profile to H.264 AVC Baseline Profile (BP). But no difference.
Im testing on emulator via android studio. I have got no device with that os. Android 4.4 Version.api: 19 (Google API) and resolution 1920 x 1080