Playing a video via http

This forum is about all development around libVLC.
GordyGordy
New Cone
New Cone
Posts: 1
Joined: 10 Dec 2014 17:02

Playing a video via http

Postby GordyGordy » 10 Dec 2014 17:14

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

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Playing a video via http

Postby Jean-Baptiste Kempf » 02 Jan 2015 16:59

Did you create the media player?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: Jona and 32 guests