I'm setting up a video platform and want to track where a user left off when they leave/close the page. The videos are hosted in an external platform called videoCypher which helps prevent the videos from being scraped but they don't offer anything to track videos at a user level since that logic is not relevant to them.
I currently send http requests every few seconds and when the user leaves the page to store the data in a table.
I'm curious if this is the way to go about this though, I've read about navigator.sendBeacon() which might lighten the load of theses requests but the clear drawback is having to pass the user in a parameter instead of an auth header.
Netflix/Prime/Youtube stream the video which leads me to assume the streaming server is in charge of keeping track of this.
Any thoughts?
BONUS Q: I'm also struggling with tracking if a video has been completely watched without the user simply skipping to the back of the video and watching the last few seconds.