To avoid unnecessary processing, you can wait for player to enter PLAYING state, then, put a setTimeout function with the remaining time until time stamp.

In case of buffering, anytime the player resumes PLAYING states, call the same function, which clears the previous setTimeout and sets the new one (if remaining time positive)

Here is the jsfiddle POC : http://jsfiddle.net/V6rgy/