Page 1 of 1

Playing a video via http

Posted: 10 Dec 2014 17:14
by GordyGordy
I'm using the .net VlcControl and C#. How do I play a video via http. I can get local files to play no problem. It throws an error when I try any online video. Unfortunately I can't figure out how to read the error either. Hope somebody can point out the obvious mistake.

Code: Select all

VlcControl MyVideo = new VlcControl(); public Form1() { Controls.Add(MyVideo); MyVideo.Bounds=new Rectangle(0,0,300,200); MyVideo.EncounteredError += MyVideo_EncounteredError; Vlc.DotNet.Core.Medias.LocationMedia M = new Vlc.DotNet.Core.Medias.LocationMedia("http://video2.cyber-coach.co.uk/SmartTestVideo.mp4"); MyVideo.Media = M; MyVideo.Play(); } void MyVideo_EncounteredError(VlcControl sender, VlcEventArgs<EventArgs> e) { Console.WriteLine("Error "+e.Data); }

Re: Playing a video via http

Posted: 02 Jan 2015 16:59
by Jean-Baptiste Kempf
Did you create the media player?