In my React app, I want a button to navigate to the next lesson to be appeared on the video, right after the current video is finished playing. I'm using react-player
to display videos. I want to know how can I accomplish this is react-player
. Any helpful tip is highly appreciated.
<ReactPlayer
url={videoPath}
width="100%"
height='100%'
controls={true}
className="player"
onEnded={markLessonAsCompleted}
config={{
file: {
attributes: {
controlsList: "nodownload"
}
}
}}
volume={1}
/>