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
607 stars 155 forks source link

Android!!! App getting exited without any console error while scroll down. (YoutubePlayer) #328

Closed abdul-megadraws closed 3 months ago

abdul-megadraws commented 7 months ago
 const onStateChange = useCallback((state) => {
    if (state === 'ended') {
      setPlaying(false);
    }
  }, []);

Component:

<YoutubePlayer
  height={220}
  play={playing}
  videoId={item?.youtubeVideoId}
  onChangeState={onStateChange}
/>
notDemian commented 7 months ago

same error here

LonelyCpp commented 6 months ago

probably related to android's bounce animation on scroll

use this to fix : https://github.com/LonelyCpp/react-native-youtube-iframe/issues/110#issuecomment-779848787