Is there a callback for when video das ended in video-react? I need to make it so another component will only be available (appear on page) when the user has reached the end of the video.
Here's my player component:
export default props => {
return (
<Player poster={poster} fluid="false" on="ended">
<BigPlayButton position="center" />
<source src={video} />
<ControlBar>
<ReplayControl seconds={10} order={1.1} />
<VolumeMenuButton enabled />
</ControlBar>
</Player>
);
};```
It looks like
<Player>accepts an undocumentedonEndedprop: https://github.com/video-react/video-react/blob/5ba018d095c9a00572d91ecbf853450a150f480f/src/components/Player.js#L44I'm not familiar enough with the library to know whether or not this is the same
Playerthat you're importing or if there's a wrapper, but it seems worth trying.