Page 1 of 1

How to get notified when buttons are clicked?

Posted: 18 Feb 2012 11:56
by dafengche
Any idea how an extension can get notified when a button in the main vlc windows is clicked? For example, the pause button. Thanks.

Re: How to get notified when buttons are clicked?

Posted: 18 Feb 2012 14:14
by Jean-Baptiste Kempf
You cannot know when buttons are clicked. But you can attach to events and variable callbacks.

Re: How to get notified when buttons are clicked?

Posted: 18 Feb 2012 15:16
by dafengche
That's what I want to ask. For example, I know how to subscribe to "input-listener" as below.

function descriptor()
...
capabilities = { "input-listener" }
...
end

-- Input change hook
function input_changed()
...
end

Where to find the event names and callback method names which extensions can use? Thanks.

Re: How to get notified when buttons are clicked?

Posted: 19 Feb 2012 12:33
by mederi
But you can attach to events and variable callbacks.
Please, Jean-Baptiste, could you reveal the secret of this? Just some brief example, please.
How great things could be done by users if there was any better documentation. But now only skilled programmers are able to find out how things work, what parameters to use... I am also trying to share my findings but it is not enough.

Re: How to get notified when buttons are clicked?

Posted: 01 Mar 2012 22:23
by mineirtoikd
Hi
I have been searching a solution how to count pause, and I've just found this for playing status change callback

Code: Select all

function descriptor() return { ... capabilities = { "input-listener", "meta-listener", "playing-listener" } } end function playing_changed(stat) vlc.osd.message("Status:" .. tostring(stat)) end
I think it is good for watch when the movie is paused.


Sorry for bad English