Tracking Video Watch Length

So we are looking to find out how long a user watches some of our videos once they tap or click to play the video. Is there a formula or logic component we could consider to get such info?

I don’t think you can at the moment get the duration of how much the user has watched, but you could store the timestamp when the user pressed the tap/play of the video, and calculate from that if a minimum time has been watched?