-
Step 1 of 7Capture
The player reports back
The vidinfra player sits in an iframe and reports playback to the lesson page through postMessage. The newer player URL is checked once and the result cached for a day.
-
Step 2 of 7Capture
One bit per 5 seconds
The page keeps a bitmap with one bit for every 5 seconds of video. It saves every 15 seconds, on pause, at the end, and with sendBeacon when the student leaves the page.
-
Step 3 of 7API
Check before trusting it
The endpoint checks the numbers (a duration between 5 seconds and 6 hours, a map of the right size) and the access: a free course, a valid enrolment, or staff.
-
Step 4 of 7Edge case
Merge, never overwrite
Inside a transaction, the row is locked and the new bits are ORed into the stored map. Watching on a phone and a laptop adds up instead of overwriting, and the watched percentage never goes down.
-
Step 5 of 7Progress
90% marks a lesson done
The first time a lesson passes 90%, it's marked complete: course progress is recalculated, the completion date set and certificate eligibility checked. Students can still tick a lesson done by hand.
-
Step 6 of 7Guide
A roadmap through the course
A config file orders lessons into 7 stages, from Foundation through Listening, Reading, Writing and Speaking to Exam practice and Bonus. The student area shows where they are and what's next.
-
Step 7 of 7Recap
Across 226+ video lessons
I co-developed progress tracking across 226+ video lessons. Slices, merges and a lock per row make the number honest, even with several tabs open.
Tip: the ← and → keys work too.