move track end handle to a separate function of the Player prototype (DRY)