سؤال

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.

هل كانت مفيدة؟

المحلول

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...)

نصائح أخرى

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
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top