It might be better not to use startTime but instead use an setInterval whenever we are playing. As it is, if you pause and unpause the time delta is still relative to when you first started playing and will yield incorrect results.

Alternately you could do some bookkeeping when the image is paused/stopped.