public void StopVideo() { if (_player != null) { _player.Stop(); } }
private void Btn_Click(object sender, RoutedEventArgs e) { CurrentPlayer.Stop(); CurrentPlayer.LoadMedia(@"F:\Kugou\Anya Marina - Whatever You Like.mp3"); CurrentPlayer.Play(); //if (this.WindowState == WindowState.Maximized) //{ // this.WindowState = WindowState.Normal; //} //else //{ // this.WindowState = WindowState.Maximized; //} }
private void OnPlay(object obj, string media) { try { if (_videoView.IsPlaying) { _videoView.Stop(); } _videoView.Play(Android.Net.Uri.Parse(media)); } catch (Exception ex) { throw; } }
private async Task RemoveCurrentImage() { await Task.Run(() => { VlcPlayer.Stop(); RecycleOption recycleOption = RecycleOption.DeletePermanently; if (SettingsViewModel.SendToRecycleBin) { recycleOption = RecycleOption.SendToRecycleBin; } FileSystem.DeleteFile(_imagePathList[_currentImageIndex].FullName, UIOption.OnlyErrorDialogs, recycleOption); Logging.LogInfo(recycleOption == RecycleOption.DeletePermanently ? "Deleted permanently: " : "Send to recycle bin: " + _imagePathList[_currentImageIndex].FullName); }); }
/// <summary> /// Loads a new video. /// </summary> private async Task LoadNewVideo() { try { VlcPlayer.RebuildPlayer(); await Task.Run(() => { VlcPlayer.Stop(); VlcPlayer.LoadMedia(_imagePathList[_currentImageIndex].FullName); VlcPlayer.Play(); CurrentImage = null; }); } catch (Exception ex) { HandleError(ex); } }
private void Button_Click_Stop(object sender, RoutedEventArgs e) { VlcPlayer.Stop(); VlcPlayer.Dispose(); Close(); }
public void StopVideo() { _player.Stop(); }
private void Button_Click(object sender, RoutedEventArgs e) { VlcPlayer.Stop(); }
public void Stop() { CleanManagements(); _vlcPlayer.Stop(); }