Pregunta

I am using a VLC 2.0.6 ActiveX control in a Visual Studio 2012 windows application. I figured out how to load and play a basic video using the following code:

        axVLCPlugin21.playlist.add(filename, title, null);
        axVLCPlugin21.playlist.play();

I am trying to figure out how to programmatically seek the video to a certain location. I scowered the internet and found people talking about shuttle(), MoveToPosition(), Position, and more, but none of those methods/properties are available to me. All I can see is axVLCPlugin21.StartTime, which is an int, and setting that either before, or after calling play() has no affect.

Thanks in advance!

¿Fue útil?

Solución

According to the documentation here

http://wiki.videolan.org/Documentation:WebPlugin

one can set the seek position by using

axVLCPlugin21.input.time = 20000; // in milliseconds

There is more information there on getting the total length in milliseconds.

And if it doesn't show up in your auto-generated COM wrapper, ditch it altogether and roll your own. It's not too difficult to make your own inheritor of AxHost and use a "dynamic" (the .NET 4 keyword) OCX object.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top