fixes setting of the time

The player now waits until it can actually set the time before trying
to do so. Also it now uses the mediaelement.js way of doing that.