Animations now work properly when playing and pausing a video