add ended event to player