LonelyCpp / react-native-youtube-iframe

A wrapper of the Youtube-iframe API built for react native.
https://lonelycpp.github.io/react-native-youtube-iframe/
MIT License
603 stars 153 forks source link

App randomly crashes with React Navigation #223

Closed Bayramito closed 2 years ago

Bayramito commented 2 years ago

App is randomly crashing when you use this component with React Navigation. If you used this lib in your current Screen or in Target screen to navigate, app is crashing randomly with

2022-01-28 13:34:38.251 11783-11852/com.test A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x1c in tid 11852 (RenderThread), pid 11783 (com.test)

    <YoutubePlayer
      key={videoId}
      height={_height}
      width={_width}
      videoId={videoId}
      play={false}
      onError={e => console.log("error", e)}
      onPlaybackQualityChange={q => console.log(q)}
      volume={50}
      playbackRate={1}
      playerParams={{
        cc_lang_pref: "us",
        showClosedCaptions: true,
      }}
    />

To Reproduce Just use YoutubePlayer component in your current or target screen and navigate a couple times with react navigation v6

Smartphone (please complete the following information):

LonelyCpp commented 2 years ago

https://lonelycpp.github.io/react-native-youtube-iframe/navigation-crash

(re-open if you've tried all the alternatives here, but still get the crash)

Bayramito commented 2 years ago

https://lonelycpp.github.io/react-native-youtube-iframe/navigation-crash

(re-open if you've tried all the alternatives here, but still get the crash)

setting opacity to .99 seems fixed my issue