private void vlcControl1_PositionChanged(object sender, VlcMediaPlayerPositionChangedEventArgs e) { if (this.vlcControl1 != null && !this.vlcControl1.IsDisposed) { this.InvokeUpdateControls(); } }
private void VlcMediaPlayer_OnPositionChanged(object sender, VlcMediaPlayerPositionChangedEventArgs e) { Position = e.NewPosition; PositionChanged?.Invoke(this, new PositionChangedEventArgs { Position = Position }); }
private void MediaPlayerOnPositionChanged(object sender, VlcMediaPlayerPositionChangedEventArgs e) { Dispatcher.Invoke(() => { _lastNotifiedPosition = e.NewPosition; _timeLastNotifiedPosition = DateTime.Now; _newPositionAvailable = true; }); }
void PlayerPositionChanged(object sender, VlcMediaPlayerPositionChangedEventArgs e) { this.Dispatcher.BeginInvoke(new Action(delegate { position = MediaPlayer.Position; RaisePropertyChanged("Position"); RaisePropertyChanged("FPS"); })); }
/// <summary> /// 播放文件点改变 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MediaPlayer_PositionChanged(object sender, VlcMediaPlayerPositionChangedEventArgs e) { this.Dispatcher.BeginInvoke(new Action(() => { if (PositionChanged != null) { PositionChanged(this, e); } })); }
/// <summary> /// 播放进度 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void Events_PlayerPositionChanged(object sender, VlcMediaPlayerPositionChangedEventArgs e) { this.Dispatcher.BeginInvoke(new Action(delegate { if (!m_isDrag) { videoTimeLine.Value = (double)e.NewPosition; } })); }
private void VlcMediaPlayer_PositionChanged(object sender, VlcMediaPlayerPositionChangedEventArgs e) { if (base.InvokeRequired) { base.Invoke(new Action(() => { barEditItemPosition.EditValue = e.NewPosition * 100.0; })); } }
/// <summary> /// Handles the slider movement when the video is playing. /// </summary> private void MediaPlayer_PositionChanged(object sender, VlcMediaPlayerPositionChangedEventArgs e) { Dispatcher.Invoke(() => { if (!TimeSlider.IsMouseCaptured) { TimeSlider.Value = VideoControl.SourceProvider.MediaPlayer.Position; } }); }
private void MediaPlayer_PositionChanged(object sender, VlcMediaPlayerPositionChangedEventArgs e) { if (_isUserDragTimeline) { return; } Dispatcher.BeginInvoke(new Action(() => { _ignoreTimelineValChange = true; timelineSlider.Value = e.NewPosition; _ignoreTimelineValChange = false; })); }
private void OnVlcPositionChanged(object sender, VlcMediaPlayerPositionChangedEventArgs e) { var position = vlcControl.GetCurrentMedia().Duration.Ticks *e.NewPosition; var currentTime = new TimeSpan((long)position); try { UpdateTime(currentTime); trackBar.Value = (int)currentTime.TotalMilliseconds; Taskbar.SetProgressValue(trackBar.Value, trackBar.Maximum); } catch (Exception ex) { } }
/// <summary> /// Handles the PositionChanged event of the VlcControl control. /// Updates the converter progress bar and the sliders thumb. /// Stops replay if selection end was reached. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="VlcMediaPlayerPositionChangedEventArgs" /> instance containing the event data.</param> private void VlcControlPositionChanged(object sender, VlcMediaPlayerPositionChangedEventArgs e) { this.Dispatcher.InvokeAsync( () => { this.TimelineSlider.Value = e.NewPosition * this.vlcConverterPlayer.Length; if (e.NewPosition * this.vlcConverterPlayer.Length > this.TimelineSlider.SelectionEnd && !this.isConverting) { this.vlcConverterPlayer.Pause(); } var length = this.TimelineSlider.SelectionEnd - this.TimelineSlider.SelectionStart; var factor = this.TimelineSlider.Maximum / length; var startPercentage = this.TimelineSlider.SelectionStart / this.TimelineSlider.Maximum; this.ConverterProgressbar.Value = (e.NewPosition - startPercentage) * 100 * factor; }); }
private void OnPositionChangedInternal(object sender, VlcMediaPlayerPositionChangedEventArgs e) { OnPositionChanged(e.NewPosition); }
private void OnVlcPositionChanged(object sender, VlcMediaPlayerPositionChangedEventArgs e) { var position = myVlcControl.GetCurrentMedia().Duration.Ticks *e.NewPosition; myLblVlcPosition.InvokeIfRequired(l => l.Text = new DateTime((long)position).ToString("T")); }
/// 當影片進度改變 private void PositionChangedEventHandler(object sender, VlcMediaPlayerPositionChangedEventArgs e) { //Console.WriteLine("PositionChangedEventHandler"); }
private void MediaPlayer_PositionChanged(object sender, VlcMediaPlayerPositionChangedEventArgs e) { this.RefreshSlider(); }