I'm using ReactJS and I'm trying to display a video where the user is only allowed to continue after watching the entire video. I'm currently using a dependency called React-player, it has the option to check when it has ended, but then the user can just skip through the video.
Is there a way to check if the video was played for a certain duration? Or is it possible to disable forwarding?
This is my code currently:
<ReactPlayer
onEnded={() => setVideoEnded(true)}
url={
"https://...server.net/NodeUploadServer/public/" +
course.video
}
width="100%"
height="100%"
controls={true}
/>
<Button disabled={!videoEnded} >
Go to test
</Button>