0

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

6
  • Which version of react-native-video? Commented Aug 29, 2019 at 22:27
  • version 4.4.4 I just tried as well running on mediaplayer built in Android studio. Got the same problem there. Could it possibly be a codec problem/ video format? Im using .mp4 Commented Aug 29, 2019 at 22:30
  • .mp4 is just a container. What is the actual video stream format? Commented Aug 29, 2019 at 22:33
  • When Im opening the file in VLC and choosing codec information i get: H264 - MPEG-4 AVC (part 10)(avc1) I guess it is that? Commented Aug 29, 2019 at 22:38
  • @acroscene That seems like normal H264, what is the size (HxW) and how are you testing on Kitkat (emulator or device, list specs). Commented Aug 29, 2019 at 22:50

1 Answer 1

0

Per the exoplayer website, if you're using an emulator, it at least needs api version 23.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.