using the video.js api a JavaScript function can run every 5 secs with a call to player.currentTime()
function will be called getPlayerTime()
using the mysql table key fileId and userId a ajax call could store the position in a database table.
ajax call could run inside the function getPlayerTime()
could use player.timeupdate event to run getPlayerTime() on a periodic basis.