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); } }