public void IsPausedTest()
 {
     player = instance.CreatePlayer(BaseTestFilePath + "n900_extremely_short.avi");
     player.Play();
     player.Pause();
     Assert.IsTrue(player.IsPaused);
 }
示例#2
0
文件: VlcControl.cs 项目: metoer/wpf
 public void Pause()
 {
     //EndInit();
     if (myVlcMediaPlayer != null)
     {
         myVlcMediaPlayer.Pause();
     }
 }
示例#3
0
 public void Pause()
 {
     // if player exists, pause it
     if (_mediaPlayer != null)
     {
         _mediaPlayer.Pause();
     }
 }
示例#4
0
        /// <summary>
        ///     Pause media.
        /// </summary>
        public void Pause()
        {
            if (VlcMediaPlayer == null)
            {
                return;
            }

            VlcMediaPlayer.Pause();
        }
示例#5
0
        /// <summary>
        ///     Pause media.
        /// </summary>
        public void Pause()
        {
            if (VlcMediaPlayer == null)
            {
                throw new InvalidOperationException("VlcMediaPlayer doesn't have initialize.");
            }

            VlcMediaPlayer.Pause();
        }
示例#6
0
        public bool Pause()
        {
            if (_vlcMediaPlayer.IsPausable() && _vlcMediaPlayer.IsPlaying())
            {
                _vlcMediaPlayer.Pause();
                return(true);
            }

            return(false);
        }
示例#7
0
 /// <summary>
 /// Pauses/Unpauses the current media
 /// </summary>
 public void Pause()
 {
     if (Player.State == MediaStates.Paused)
     {
         Player.Play();
     }
     else
     {
         Player.Pause();
     }
 }
示例#8
0
 public void Pause()
 {
     EndInit();
     myVlcMediaPlayer.Pause();
 }
示例#9
0
        /// <summary>
        ///     Pause media.
        /// </summary>
        public void Pause()
        {
            ThrowIfNotInitialize();

            VlcMediaPlayer.Pause();
        }
示例#10
0
 public void Pause()
 {
     myVlcMediaPlayer?.Pause();
 }
示例#11
0
 private void Pauseb_Click(object sender, EventArgs e)
 {
     player.Pause();
 }
示例#12
0
 public static Task PauseAsync(this VlcMediaPlayer player, CancellationToken cancellationToken = default) => Task.Run(() => player.Pause(), cancellationToken);