Determine video watch time for ad scheduling

We recently added ads at 8 minute fixed intervals to some of our videos, but found the UX was bad for people scanning through videos.

So now we are looking to insert ads after 8 minutes of view time. For example, someone watches 2 minutes, scans forward a few times, then watches another 3 minutes, then goes back and watches the same 3 minutes again. At this point they have watched 8 minutes of video so we want to schedule an ad.

So my question is: what is the best way to track this behaviour from the player? I’ve had a bit of a look around at the example code, but can’t find anything helpful. Has anyone done this before?

We can probably piece something together by listening to various player events but it would be great to get a head start if someone has done something similar.