Search code examples
c#media-playervlcocx

Unable to play media with vlc ocx


I want to embed the vlc media player in a .NET application I've found a lot of solutions

  1. VLC .Net interface <- didn't work with me
  2. wrappers for dll functions <>
  3. http://vlcdotnet.codeplex.com this is nice
  4. the activex of VLC - i really liked to use it it must be less bugs and errors but errors found

I found 2 controls "VLC ActiveX plugin and IE web plugin v1" , "VLC ActiveX plugin and IE web plugin v2" What is the difference between them?? i dragged and dropped the fist one and used the following code

axVLCPlugin1.addTarget(@"D:\video\English\10,000.b.c\10000bc.rmvb", null, AXVLC.VLCPlaylistMode.VLCPlayListAppendAndGo, -666);
axVLCPlugin1.play();

that had no effect i dragged and dropped the second one and used the following code

axVLCPlugin21.playlist.add(@"D:\video\English\10,000.b.c\10000bc.rmvb");
axVLCPlugin21.playlist.play();
//i also tried this
axVLCPlugin21.playlist.playItem(0);

also it had no effect

I didn't found many details and documentations of the VLC OCX what is the error ?


Solution

  • The v1 of the ActiveX is deprecated and v2 is primarily for browser integration thus not intended to be used like you tried...

    Use http://vlcdotnet.codeplex.com/ - this is a well-working library...