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

Video reload on state changes #197

Closed samy-tcheik closed 2 years ago

samy-tcheik commented 3 years ago

When i click on a button to update a random state, the video player get reloaded again and the onReady event is fired again

const [videoLoading, setVideoLoading] = useState(true)

return (

{setVideoLoading(false)}} />

)

LonelyCpp commented 3 years ago

normal state changes ideally will not trigger a player reload.

can you make a small repo that reproduces this issue?