Page 1 of 1

How to add an event listener to the VLC ActiveX Plugin embedded in a Windows Forms application?

Posted: 15 Dec 2018 11:40
by rrrrrrrr
I am embedding the VLC ActiveX Plugin in a Windows Forms application with VB.NET.

In the documentation for the WebPlugin https://wiki.videolan.org/Documentation:WebPlugin/ there are methods like vlc.addEventListener(eventname, callback, bubble) and vlc.attachEvent(eventname, callback). But the documentation for the ActiveX Plugin https://wiki.videolan.org/ActiveX/ is obsolete and has no information about how to listen to the plugin's events.

How can I add an event listener to the plugin events?

Re: How to add an event listener to the VLC ActiveX Plugin embedded in a Windows Forms application?

Posted: 18 Dec 2018 22:44
by da2424
Hi,

in VB.NET, the kind of registration of an event listener is a little bit different.
Here are two examples:

Code: Select all

'MediaPlayerPlaying event Private Sub AxVLCPlugin21_MediaPlayerPlaying(sender As Object, e As System.EventArgs) Handles objVLC.MediaPlayerPlaying MsgBox("Media is playing") End Sub 'MediaPlayerTimeChanged event, returns time as integer Private Sub AxVLCPlugin21_MediaPlayerTimeChanged(sender As Object, e As AxAXVLC.DVLCEvents_MediaPlayerTimeChangedEvent) Handles objVLC.MediaPlayerTimeChanged MsgBox("Time has changed: " & e.time) End Sub

Re: How to add an event listener to the VLC ActiveX Plugin embedded in a Windows Forms application?

Posted: 02 Jan 2019 09:43
by SimPune
I am embedding the VLC ActiveX Plugin in a Windows Forms application.
In the documentation for the WebPlugin there are methods like vlc.addEventListener(event name, callback, bubble) and vlc.attachEvent(eventname, callback). But the documentation for the ActiveX Plugin is obsolete and has no information about how to listen to the plugin's events.

Re: How to add an event listener to the VLC ActiveX Plugin embedded in a Windows Forms application?

Posted: 22 Jan 2019 12:45
by colincourtfarm
Hi,

Maybe see my post today about the plugin and VB6 - might help you with your .NET problem?