Page 1 of 1

Mouse click & plugin

Posted: 21 May 2010 10:50
by thanaos
Hello,

I would to know how can I retrieve the javascript-mouse click on the vlc plugin?

Thanks

Re: Mouse click & plugin

Posted: 21 May 2010 11:57
by Ilasir
huh?

Re: Mouse click & plugin

Posted: 21 May 2010 16:02
by thanaos
When users "click" on the part of the browser where it is displayed plugin generates an event. This event is it recoverable by a javascript function?

I hope this is understandable. :)
Thanks

Re: Mouse click & plugin

Posted: 06 Jun 2010 10:37
by thanaos
up

Re: Mouse click & plugin

Posted: 07 Jun 2010 21:14
by Ilasir
"onclick" "prevent default"

Re: Mouse click & plugin

Posted: 09 Jun 2010 08:28
by thanaos
thank you for your response
Could you give me an example ?

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<title>Layout 1</title>
<object type="application/x-vlc-plugin" pluginspage="http://www.videolan.org"
version="VideoLAN.VLCPlugin.2" id="vlc1" width="1024" height="768" events="True" >
<param name="ShowDisplay" value="True" />
<param name="Toolbar" value="True">
<param name="MRL" value="video.ext" />
<param name="volume" value="50" />
<param name="autoplay" value="false" />
<param name="loop" value="false" />
<param name="fullscreen" value="false" />
</object>
<script src="./ihm/vsm.js" type="text/javascript"></script>
</head>
<body>
<script type="text/javascript">
var vlc = document.getElementById("vlc1");
vlc.playlist.playItem(vlc.playlist.add("rtsp://192.168.1.12:554/vsip2"));
</script>
</body>
</html>

Re: Mouse click & plugin

Posted: 10 Jun 2010 06:45
by Ilasir
<script typee="text/javascript" >
var vlcplugin = document.getElementById("vlc");
vlcplugin.onclick = function;
</script>


At least, that should work. I usually use the inline event registration.

Re: Mouse click & plugin

Posted: 10 Jun 2010 08:12
by thanaos
ok, i found. I'm using the focus event.
Thank you.
<object onfocus="alert('1');" type="application/x-vlc-plugin" pluginspage="http://www.videolan.org"
version="VideoLAN.VLCPlugin.2" id="vlc1" width="320" height="260" events="True" >
</object>

Re: Mouse click & plugin

Posted: 25 Aug 2010 10:49
by cctvcam
Can someone please tell me how to do this in IE as I have tried this code and it does not work?

thanks

Re: Mouse click & plugin

Posted: 26 Aug 2010 00:18
by Ilasir
If you copied verbatim, there are typos.

Re: Mouse click & plugin

Posted: 26 Aug 2010 10:57
by cctvcam
The code I have is

var vlc = document.getElementById('vlc');
vlc.onclick = function() { alert("here"); };

The alert is displayed in firefox, using the plugin, but not in InternetExplorer using the activeX control.

Visual studio warns that the
event
attribute is not support on the object tag. Could this be the problem? I got the object tag sample from http://wiki.videolan.org/ActiveX/HTML

<object id='vlc'
events='True' classid='clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921'
codebase="http://downloads.videolan.org/pub/video ... /axvlc.cab"
width="500"
height="370" >
<param name="ShowDisplay" value="True" />
<param name="AutoLoop" value="False" />
<param name="AutoPlay" value="True" />
<param name="Volume" value="100" />
</object>

Re: Mouse click & plugin

Posted: 26 Aug 2010 15:23
by Ilasir
Try defining and naming the function first. then use "vlc.onclick=function" No parenthases.

Re: Mouse click & plugin

Posted: 31 Aug 2010 11:58
by cctvcam
I did not copy exactly (with typos) I have now changed to

Code: Select all

function OnVlcClick() { alert("click event"); } var vlc = document.getElementById('vlc'); vlc.onclick = OnVlcClick;
This is run in the boby onload method, with the vlc object declared as

Code: Select all

<object id='vlc' classid='clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921' codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab" width="500" height="370" > <param name="ShowDisplay" value="True" /> <param name="AutoLoop" value="False" /> <param name="AutoPlay" value="True" /> <param name="Volume" value="100" /> </object>
but still does not work in IE6 or IE8? any other ideas or code sample that works that I can examine.

Re: Mouse click & plugin

Posted: 01 Sep 2010 16:02
by cctvcam
As an update although I have this working in firefox, as soon as a video stream is played the click functionality stops working.