/// <summary> /// Starts or resumes media playback. /// </summary> public virtual void play() { if (mPlayer == null) { // Player is not yet connected, store that we should start playback when it connects. mStateToGo = PlayerState.PLAYING; return; } switch (mCurrentState) { case PlayerState.STOPPED: // Player was stopped, we have to provide content and starting position and subtitles. playItem(); break; case PlayerState.PAUSED: // Player was paused, resume playback. mPlayer.resume(); break; default: break; } }