/// <summary> /// Only called when the user presses the stop button. Resets the media player to /// the beginning of the media file. /// </summary> internal void Stop() { if (mediaState != MyPlayerState.Stopped) { StopStateButtons(); mediaState = MyPlayerState.Stopped; mediaPlayer.Ctlcontrols.stop(); } }
/// <summary> /// Changes the State of the application to "Playing", starts/resumes playing of media. /// Called when user presses "Play" button, or a face is detected /// </summary> internal void Play() { if (mediaState != MyPlayerState.Playing) { PlayStateButtons(); mediaState = MyPlayerState.Playing; mediaPlayer.Ctlcontrols.play(); } }
/// <summary> /// Changes state of application to "Paused", pauses playback of media. /// Called when user presses "Pause" Button and when no faces are detected. /// </summary> internal void Pause() { if (mediaState != MyPlayerState.Paused) { PauseStateButtons(); mediaState = MyPlayerState.Paused; mediaPlayer.Ctlcontrols.pause(); } }