I want to integrate the vlc player to my project in order to display the stream of an IP camera. I was following this Integrate VLC player in C# (WPF) project using Vlc.DotNet to make a demo. Here is my c# code:
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Vlc.DotNet.Wpf;
namespace RTSPyVLC
{
/// <summary>
/// Lógica de interacción para MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
vlcPlayer.MediaPlayer.VlcLibDirectory =
//replace this path with an appropriate one
new DirectoryInfo(@"c:\Program Files (x86)\VideoLAN\VLC\");
vlcPlayer.MediaPlayer.EndInit();
vlcPlayer.MediaPlayer.Play(new Uri("http://download.blender.org/peach/" +
"bigbuckbunny_movies/big_buck_bunny_480p_surround-fix.avi"));
}
}
}
I do the same, but an error appears: VlcControl does not contain a definition for "MediaPlayer"... And its true, the class VlcControl doesn contain it. The question is if I adding the wrong package (Vlc.DotNet.wpf by ZeBobo5 added with NuGet) or there is another way to integrate the vlc player with this library. If you know about an example or a guide it would be magnificient.
Thank you a lot.