How to include VLC in my C # project?

I’ve been trying to do this for a couple of days, and I won’t go anywhere. I used / downloaded Vlc.DotNet.Core / Interops / Forms, built them and imported the DLLs, and my problem occurs when I try to reference AXVLC.DLL and try to use the COM plugin in my form.

I get two errors

  • ActiveX VLC Plugin and IE Web Plugin v1 - Failed to import ActiveX control. Please make sure it is registered correctly.

  • ActiveX VLC plugin and IE Web Plugin v2 - Visual Studio 2015 crashes completely.

I installed 6+ different nightly releases of the VLC player and tried each AXVLC.DLL, but they all do the same. VLC 3.0.x and VLC 2.2.x

I also tried this in Visual Studio 2012 with the same results.

+4
source share
1 answer

I would say using Vlc.DotNet.Forms from the nuget package manager under the tools. Use is quite simple than ActiveX.

FileInfo media = new FileInfo(<fullpath to mediafile>);
VlcControl1.SetMedia(media);
VlcControl1.play();

VlcControl1.Video.Adjustment(.Enable = true → under the same tree all video settings) and

VlcControl1.Audio (all sound settings)

If you need to use an ActiveX player, I would go with WMP (Project → Add reference → Windows Media Player (ActiveX)), which is several times better and native if you use ActiveX.

0
source

Source: https://habr.com/ru/post/1618137/


All Articles