Reputation: 362
My Windows Fomrs Application (Visual C++ - VS 2012) can't play video via VLC ActiveX Plugin and IE Web Plugin v2.
During VLC installation (Windows), I selected ActiveX controls, then I selected VLC ActiveX Plugin and IE Web Plugin v2 from COM Components on VS and I added it on the Form. I typed the full path of the video I want to play on Properties: MRL, but it is not responding when application runs.
Any help for what I am missing, would be appreciated.
Upvotes: 0
Views: 2009
Reputation: 63
Playing a local file works only if its path is preceded by "file:///", not otherwise. Discovered this after much fight. Here is the C# code:
string f = @"file:///D:\abc.mp4";
string f2 = @"file:///D:\def.avi";
int i = VLCPlayer.playlist.add(f);
int j = VLCPlayer.playlist.add(f2);
VLCPlayer.playlist.playItem(j); // to play def.avi
//VLCPlayer.playlist.play(); // to play abc.mp4
Upvotes: 1
Reputation: 362
I typed the full path of the video I want to play on Properties: MRL
Newer versions of VLC require "file///" in the beginning of the path.
(e.g. file///C:\Users...)
Upvotes: 1