コード例 #1
0
        private void PlayPause_Click(object sender, RoutedEventArgs e)
        {
            VlcPlayer player = Globals.Instance.VlcPlayer;

            if (player == null || File == null)
            {
                return;
            }

            try
            {
                if (player.IsPlaying)
                {
                    player.Pause();
                }
                else
                {
                    if (!player.IsMediaLoaded)
                    {
                        player.LoadFromMemory(File.Data);
                    }

                    player.Play();
                }
            }
            catch (Exception ex)
            {
                App.Window.ShowNotification(NotificationType.Error, ex);
            }
        }
コード例 #2
0
 public void Pause()
 {
     _vlcPlayer.Pause();
 }