/**
  * Release the media player component and the associated native media player resources.
  */
 public void Release()
 {
     OnBeforeRelease();
     mediaPlayer.Release();
     mediaPlayerFactory.Release();
     OnAfterRelease();
 }