davidohayon669/react-native-youtube

onClose, onFinish, or something similar for closing the youtube player event

lguardado opened this issue · 1 comments

Hi. I just needed an onClose or similar event but I couldn't find any.
The idea is to be able to know when the user closed the player but when that happens, the only state change is paused.

If I want to show different UI depending on the playing, state it would be nice to be able to do it.

For instance, if I want to show the player () only when a user press "play" and a spinner while it's loading, it would be nice to know when the play has ended (rather than paused in which case the player would be removed from the DOM if the user press the pause button)

Basically something like vimeo's library https://github.com/Myagi/react-native-vimeo's "onFinish"

Yout can listen onChangeState, when video is end it will return status 'ended'