Skip to main content
Commonmark migration
Source Link

Im using [react-native-video][1]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 [1]: https://www.npmjs.com/package/react-native-video

Im using [react-native-video][1] 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 [1]: https://www.npmjs.com/package/react-native-video

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

added 445 characters in body
Source Link
acroscene
  • 1.1k
  • 5
  • 23
  • 56

Im using react-native-video[react-native-video][1] 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 [1]: https://www.npmjs.com/package/react-native-video

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>
  );
};

Im using [react-native-video][1] 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 [1]: https://www.npmjs.com/package/react-native-video

Source Link
acroscene
  • 1.1k
  • 5
  • 23
  • 56

Black screen when playing video on Android 4.4 (API 19) kitkat

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>
  );
};