How do you use the onEnd method?
Opened this issue · 0 comments
RobinLans commented
I have been doing something like this and nothing happens
function YouTubePlayer(props) {
function endTheVideo(e) {
console.log(e.target);
}
return (
<div>
<YouTube
opts={opts}
onReady={startVideo}
ref={videoPlayer}
onEnd={(e) => {
endTheVideo(e);
}}
/>
</div>
);
}
export default YouTubePlayer;
I'm probably doing it very wrong, does someone know?