The commitment of a cell to an endocardial cell fate and its capacity to differentiate into an endocardial cell. An endocardial cell is a specialized endothelial cell that makes up the endocardium portion of the heart.