Exemplo n.º 1
0
 /// <summary>
 /// 播放结束
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void Events_PlayerEndChanged(object sender, VlcMediaPlayerEndReachedEventArgs e)
 {
     this.Dispatcher.BeginInvoke(new Action(delegate
     {
         InitControls();
     }));
 }
Exemplo n.º 2
0
 private void MediaPlayer_EndReached(object sender, VlcMediaPlayerEndReachedEventArgs e)
 {
     Dispatcher.BeginInvoke(new Action(() => {
         _pauseOnPlay = true;
         OpenFile(_lastFile);
     }));
 }
Exemplo n.º 3
0
 private void vlcPlayer_EndReached(object sender, VlcMediaPlayerEndReachedEventArgs e)
 {
     _lyricTimer.Stop();
     _lastRenderTime = -1;
     _currentTime    = 0;
     _stopWatch.Reset();
     OnSongFinished();
 }
Exemplo n.º 4
0
 private void VlcPlayerOnEndReached(object sender, VlcMediaPlayerEndReachedEventArgs e)
 {
     Stop();
     Dispatcher.Invoke(() =>
     {
         PlayState = PlayState.Finished;
     });
 }
Exemplo n.º 5
0
        /// <summary>The LibVLC EndReached event handler</summary>
        /// <param name="sender">The object that triggered the event</param>
        /// <param name="e">The event arguments</param>
        private void VlcControl_EndReached(object sender, VlcMediaPlayerEndReachedEventArgs e)
        {
            TvCore.LogDebug($"[.NET] VlcControl_EndReached({e})");

            this.InvokeIfRequired(() =>
            {
                playerStatusLabel.Text = Resources.TvForm_Buffering;
                ThreadPool.QueueUserWorkItem(state => vlcControl.Play(TvCore.CurrentChannel.Stream));
            });
        }
Exemplo n.º 6
0
 private void vlcControl1_EndReached(object sender, VlcMediaPlayerEndReachedEventArgs e)
 {
     // TODO: fix automatic transition crashing the player
     if (!waitingForEnd)
     {
         return;
     }
     if (CheckAutoTransition())
     {
         return;
     }
     ShowOverlays();
     listeningInput = true;
 }
Exemplo n.º 7
0
        /// <summary>
        /// Event handler for end reached on player.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void PlayerOnEndReached(object sender, VlcMediaPlayerEndReachedEventArgs e)
        {
            // On endReached, restart player.
            if (!(sender is VlcControl player))
            {
                return;
            }

            Task.Run(() =>
            {
                //player.SetMedia(this.textBox1.Text, " :network-caching=2000");
                player.Play(textBox1.Text, StreamParams);
            });
        }
Exemplo n.º 8
0
 private void EndReached(object sender, VlcMediaPlayerEndReachedEventArgs e)
 {
     Console.WriteLine("FIM!");
     Dispatcher.Invoke(new Action(() =>
     {
         mediaReprodutionFinished = true;
         dt.Stop();
         lastTrackID       = currentTrackID;
         sldTimeline.Value = sldTimeline.Maximum;
         if (currentTrackID + 1 < playList.Count)
         {
             checker.Start();
             currentMedia   = playList[currentTrackID + 1];
             currentTrackID = currentTrackID + 1;
         }
     }));
 }
Exemplo n.º 9
0
        private void VlcControl1_EndReached(object sender, VlcMediaPlayerEndReachedEventArgs e)
        {
            ThreadPool.QueueUserWorkItem(_ =>
            {
                vlcControl1.VlcMediaPlayer.Pause();

                this.vlcControl1.SetMedia(new System.IO.FileInfo(this.PathVideo));

                vlcControl1.Time = vlcControl1.Length - 1;

                buttonPlayPause.Invoke((MethodInvoker) delegate { buttonPlayPause.Text = "Reproducir"; trackBarVideo.Value = 0; });

                vlcControl1.Time = 0;

                ObtenerPresentarTiempo();
            });
        }
Exemplo n.º 10
0
        void MediaPlayer_EndReached(object sender, VlcMediaPlayerEndReachedEventArgs e)
        {
            this.Dispatcher.BeginInvoke(new Action(delegate
            {
                is_end = true;

                // set to start
                this.position = 0;
                RaisePropertyChanged("Position");

                this.isPlay = false;

                if (EndReached != null)
                {
                    EndReached();
                }
            }));
        }
Exemplo n.º 11
0
 /// <summary>
 /// Repeat feature implementation.
 /// </summary>
 private void MediaPlayer_EndReached(object sender, VlcMediaPlayerEndReachedEventArgs e)
 {
     if (IsRepeating)
     {
         VlcRepeatDelegate vlcDelegate = VideoControl.SourceProvider.MediaPlayer.Play;
         Dispatcher.Invoke(() => { TimeSlider.Value = 0; });
         vlcDelegate.BeginInvoke(CurrentFile, new string[] { }, null, null);
     }
     else
     {
         Dispatcher.Invoke(() =>
         {
             if (DropMenu.Visibility == Visibility.Collapsed)
             {
                 DropMenu.Visibility = Visibility.Visible;
             }
         });
     }
 }
Exemplo n.º 12
0
 private void OnEndReachedInternal(object sender, VlcMediaPlayerEndReachedEventArgs e)
 {
     OnEndReached();
 }
 /*
  *  音乐播放到结尾
  */
 private void Music_Media_Element_MediaEnded(object sender, VlcMediaPlayerEndReachedEventArgs e)
 {
     vlcControl.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(Video_Element_Media_Action));
 }
Exemplo n.º 14
0
 private void TrackDone(object sender, VlcMediaPlayerEndReachedEventArgs e)
 {
     bbcount = 1;
     NextButton2_Click();
 }
Exemplo n.º 15
0
 private void VlcMediaPlayer_OnEndReached(object sender, VlcMediaPlayerEndReachedEventArgs e)
 {
     EndReached?.Invoke(this, new EndReachedEventArgs());
 }
Exemplo n.º 16
0
 private void OnVlcEndReached(object sender, VlcMediaPlayerEndReachedEventArgs e)
 {
     //throw new NotImplementedException();
     MessageBox.Show("Song beendet");
 }
Exemplo n.º 17
0
 private void MediaPlayer_EndReached(object sender, VlcMediaPlayerEndReachedEventArgs e)
 {
     throw new NotImplementedException();
 }
 private void OnEndReachedInternal(object sender, VlcMediaPlayerEndReachedEventArgs e)
 {
     OnEndReached();
 }
Exemplo n.º 19
0
 private void _vlcMediaPlayer_EndReached(object sender, VlcMediaPlayerEndReachedEventArgs e)
 {
     MediaFinished?.Invoke();
 }
Exemplo n.º 20
0
 /// 影片結束事件
 private void EndReachedEventHandler(object sender, VlcMediaPlayerEndReachedEventArgs e)
 {
     //Console.WriteLine("EndReachedEventHandler");
     this.SettingUI(() => this.Btn_VideoPlayerViewClose_Click(sender, new RoutedEventArgs()));
 }
Exemplo n.º 21
0
 public void VideoEnd(object sender, VlcMediaPlayerEndReachedEventArgs e)
 {
     Next();
 }
Exemplo n.º 22
0
 /// <summary>
 ///   The Vlc player has reached the end of the video.
 ///   This callback is only called in transcode mode, so when this gets called, the conversion process was finished.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="VlcMediaPlayerEndReachedEventArgs" /> instance containing the event data.</param>
 private void VlcConverterPlayerEndReached(object sender, VlcMediaPlayerEndReachedEventArgs e)
 {
     this.FinishAndClose();
 }