refactored releasePlayer in hook