React Native - ImageBackground not showing Image on TvOS

175 views Asked by At

I'm trying to get an image on my tvOS app. But it is not showing up.

My URL is https and I've used this same code in Android TV and it works like a charm and when I console.log url it's perfect as well.

Follow bellow the behavior:

enter image description here

The "pink" image is a fast-image. Ok, it works very well, but the "red background" is a ImageBackground and not loading the image. Both use the same image repository.

Follow bellow the code:

<ImageBackground
          source={{
            uri: getEnvProperties().BASEURL_IMAGES + banner?.imageBanner,
          }}
          onError={this.handleError}
          style={{ height: getScaledValue(350), width, backgroundColor: 'red' }}>
          <LinearGradient
            start={{ x: 1, y: 0 }}
            end={{ x: 0, y: 0 }}
            colors={['rgba(0, 0, 0, 0)', 'rgba(0, 0, 0, 0.5)']}
            style={styles.linearGradient}>
              //other codes....
          </LinearGradient>
 </ImageBackground>

onError event doesn't catch any error.

Anyone knows what can I do to solve this problem?

Thanks a lot.

1

There are 1 answers

0
pedro.olimpio On

It has been solved in a new version of TvOS package as follow: GitHub TvOS Changelog.