public void CommandTogglePlayPause() { if (player.IsPlaying) { player.Pause(); } else { player.Play(); } }
private void m_Template_TemplatePaused(object sender, PausedEventArgs e) { if (vlcControl.IsPlaying) { vlcControl.Pause(); } }
private void TrackBar_MouseDown(object sender, MouseEventArgs e) { if (vlcControl != null) { vlcControl.Pause(); } }
/// <summary> /// Toggles the playback state between pause and play and shows the correct button for the playback state. /// </summary> private void TogglePause() { if (startPlay) // If the media has been set by calling the overloaded method VlcControl.SetMedia() { if (vlcControl.IsPlaying && !IsDvdMode()) // If the VlcControl class instance is playing, then pause.. (if not DVD (menus, etc.. --> can be annoying!)).. { vlcControl.Pause(); if (statistic != null) // this ensures that a saved playback will not be re-read from previous statistics.. { statistic.Position = vlcControl.Time; } btnPlay.Visible = true; // Set the button visibility btnPause.Visible = false; } else // .. if the VlcControl class instance's playback state is paused, then play.. { if (startPlay) // avoid the play command to reload the saved playback position.. { Database.UpdateFile(file.FullName, vlcControl.Time, vlcControl.Length, IsWacthed, Volume); } if (statistic != null && file != null) { statistic.Position = vlcControl.Time; } // END: avoid the play command to reload the saved playback position.. vlcControl.Play(); btnPlay.Visible = false; // Set the button visibility btnPause.Visible = true; } wind = false; // don't wind while paused or play is clicked rewind = false; // don't rewind while paused or play is clicked } }
private void videoPauseButton_Click(object sender, EventArgs e) { if (vlcControl != null) { if (vlcControl.IsPlaying) { vlcControl.Pause(); } } }
private void vlcControl1_Click(object sender, EventArgs e) { if (_vlcControl1.IsPlaying == true) { _vlcControl1.Pause(); } else if (_vlcControl1.IsPlaying == false) { _vlcControl1.Play(); } }
public override void Pause() { if (media != null && playState == PlayState.Playing || playState == PlayState.Paused) { vlcCtrl.Pause(); if (media.State == States.Paused) { playState = PlayState.Paused; } else { playState = PlayState.Playing; } } }
/// <summary> /// Pause/Resume playback on the selected Vlc control /// </summary> /// <param name="vlc">Vlc control to toggle</param> public static void TogglePause(VlcControl vlc) { if (vlc != null) { if (vlc.State == Vlc.DotNet.Core.Interops.Signatures.MediaStates.Paused) { vlc.Play(); log.Debug(string.Format("{0} resume playing", vlc.Name)); } else if (vlc.State == Vlc.DotNet.Core.Interops.Signatures.MediaStates.Playing) { vlc.Pause(); log.Debug(string.Format("{0} pause", vlc.Name)); } } }
/// <summary> /// Pauses this instance. /// </summary> /// <returns>Task.</returns> public void Pause() { _vlcControl.Pause(); }
private void Pause(object o) { _player.Pause(); IsPlaying = false; }
private void button8_Click(object sender, EventArgs e) { control.Pause(); }