private void VideoPosition_MouseUp(object sender, MouseEventArgs e) { if (!_blockVideoPositionValueChange) { return; } _blockVideoPositionValueChange = false; if (_playStatus == PlayStatus.Playing) { VlcClient.SeekTo(VideoPosition.Value); } }
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(); }