Page 1 of 1

Handle clicks on plugin canvas.

Posted: 20 May 2009 11:51
by vice
I was thinking that it could be very nice to have some way to define a function callback when the user clicks on top of the plug-in with relative position as parameter.

For example, this could be a new property "onclick" of the VLC plugin's javascript object "video": vlc.video.onclick. It could get the name of a javascript function. When the user click on the canvas of the plugin this function could be called with the relative coordinates of the click as parameters.

Another way to do this (more difficult to handle) is to create a new log message that could be parsed with a message iterator.

There's another way to do this at present?
Do you think it's doable?
Do you think this function could be interesting?

Personally, I think this simple expansion could open the VLC plugin to a new range of interactive applications.

Applications examples:
* Camera PTZ control
* Now that we can have multiple VLC plugin: A video selector.
* (Your idea here)

Cheers