private void PauseButton_Click(object sender, EventArgs e) { _playStatus = PlayStatus.Paused; UpdateUi(); VlcClient.TogglePause(); }
private void StopButton_Click(object sender, EventArgs e) { if (_playStatus == PlayStatus.Paused) { VlcClient.TogglePause(); } VlcClient.Stop(); _playStatus = PlayStatus.Stopped; UpdateUi(); }
private void PlayButton_Click(object sender, EventArgs e) { if (_playStatus == PlayStatus.Stopped) { VlcClient.AddFile(_filePath, IsFirstPlayerMain); VlcClient.SetAudioTracks(LeftAudioTrack.SelectedIndex + 1, RightAudioTrack.SelectedIndex + 1); var leftAudioDevice = _videoInfo.AudioDevices[LeftAudioDevice.SelectedItem.ToString()]; var rightAudioDevice = _videoInfo.AudioDevices[RightAudioDevice.SelectedItem.ToString()]; VlcClient.SetAudioDevices(leftAudioDevice, rightAudioDevice); VlcClient.SeekTo(VideoPosition.Value); } else if (_playStatus == PlayStatus.Paused) { VlcClient.SeekTo(VideoPosition.Value); VlcClient.TogglePause(); } _playStatus = PlayStatus.Playing; UpdateUi(); }