I am creating an online video and online exercise course and would like people to be able to log in and track their progress.
Is there a way I could measure the percentage of youtube embedding that someone watched and mark it as complete if they looked at, say, more than 80%?
My best idea so far is to use getCurrentTime () when the playerโs state changes to PLAYING, and then again every five seconds or so, adding a difference in some amount. However, if someone watched the first minute five times, they would end the shot, although they did not see it all.
Is there a more elegant solution to calculate the% of the video you are watching, rather than the method described above, which calculates the amount of time spent watching the video?
source
share