How to capture mouse events on web-based streaming?

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
hax001
Blank Cone
Blank Cone
Posts: 20
Joined: 27 Aug 2013 01:38

How to capture mouse events on web-based streaming?

Postby hax001 » 27 Aug 2013 02:03

I'm new to this forum and have been searching for an end-to-end example of how to to capture mouse events while hovering over a live RTSP video stream.

I have seen on example that alludes to being able to place a div over top of the stream. This would be great, as I can simply bind my event handlers to that div. This obviously does not work with the VLC player.

I need this to work in at least Chrome, Firefox and IE.

Is there some fbvlc option?

Can someone please assist with this?


Thanks.

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: How to capture mouse events on web-based streaming?

Postby RSATom » 27 Aug 2013 14:24

Did you try native browser mouse event handling with VLC web plugin's windowless mode enabled? I think it should work.

hax001
Blank Cone
Blank Cone
Posts: 20
Joined: 27 Aug 2013 01:38

Re: How to capture mouse events on web-based streaming?

Postby hax001 » 27 Aug 2013 18:30

Yes, setting windowless to true allowed me to overlay my div and detect mouse events.

hax001
Blank Cone
Blank Cone
Posts: 20
Joined: 27 Aug 2013 01:38

Re: How to capture mouse events on web-based streaming?

Postby hax001 » 29 Aug 2013 20:21

Yes, setting windowless to true allowed me to overlay my div and detect mouse events.
However this is not working in IE - not well at least.

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: How to capture mouse events on web-based streaming?

Postby RSATom » 30 Aug 2013 03:26

you can try fbvlc, but it work only under windows...

hax001
Blank Cone
Blank Cone
Posts: 20
Joined: 27 Aug 2013 01:38

Re: How to capture mouse events on web-based streaming?

Postby hax001 » 03 Sep 2013 22:12

you can try fbvlc, but it work only under windows...
It appears that I am already using it:

Code: Select all

<object id="vlc-player" type="application/x-fb-vlc" width="352" height="288" classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" windowless="true" codebase="http://download.videolan.org/pub/videolan/vlc/last/win32/axvlc.cab" > <param name="windowless" value="true" /> <param name="bgcolor" value="#0b0" /> @*<param name="src" value="rtsp://10.120.7.193/stream1" />*@ <param name="AutoPlay" value="True" /> <param name="version" value="VideoLAN.VLCPlugin.2" /> <param name="toolbar" value="false" /> <param name="fullscreenenabled" value="false"/> </object>

I am adding the stream location in JavaScript as follows:

Code: Select all

var id = vlc.playlist.add("http://people.videolan.org/~dionoea/vlc-plugin-demo/streams/sw_h264.asf", "LIVE STREAM", options);
As I see that this is a spin off from VLC Web Plugins is there something that has to be installed on my server to enable fbvlc, and if so, what's the process for getting this working? I'm just not clear on how using the object type links into using fbvlc.


Thanks.

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: How to capture mouse events on web-based streaming?

Postby RSATom » 04 Sep 2013 03:56

to start using fbvlc you should install it ( http://sourceforge.net/projects/fbvlc/f ... i/download ) on client

hax001
Blank Cone
Blank Cone
Posts: 20
Joined: 27 Aug 2013 01:38

Re: How to capture mouse events on web-based streaming?

Postby hax001 » 04 Sep 2013 16:43

I uninstalled all instances of the VLC media plugin - verified in IE that the video did not play. I then installed fbvlc from the link you provided, and installed at FireBreathed VLC / RSATom / v0.0.4.

Before the video appears, mouse events are trapped and fed back properly. However, just like with the previously-installed VLC plugin, as soon as the video appears, it's no go.

You can take a look at the code that I am using from here:http://www.whatsinyourlunch.com/capturi ... pt-jquery/ and see if you see the same results in IE.


Thanks.

hax001
Blank Cone
Blank Cone
Posts: 20
Joined: 27 Aug 2013 01:38

Re: How to capture mouse events on web-based streaming?

Postby hax001 » 04 Sep 2013 17:03

After installing flvlc,I tried the following:

Code: Select all

console.log("VLC plugin version: " + vlc.vlcVersion);
... which returned undefined:
LOG: VLC plugin version: undefined
This is how I'm getting the VLC plugin instance:

Code: Select all

function getVLC(name) { if (window.document[name]) { return window.document[name]; } if (navigator.appName.indexOf("Microsoft Internet") == -1) { if (document.embeds && document.embeds[name]) return document.embeds[name]; } else // if (navigator.appName.indexOf("Microsoft Internet")!=-1) { return document.getElementById(name); } return null; } var vlc = getVLC('vlc-player'); // where 'vlc-player' is the ID

Let's say we get this working in IE. How do you make it the default suggested plugin to install if not installed? Even with fbvlc installed, the plugin location still points to VLC, doesn't it?

Code: Select all

object id="vlc-player" type="application/x-fb-vlc" width="352" height="288" classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" windowless="true" codebase="http://download.videolan.org/pub/videolan/vlc/last/win32/axvlc.cab"
Lastly, in Chrome, I have the following plugin enabled:

FireBreathed VLC - Version: 0.0.4
VLC Web Plugin (powered by FireBreath)

However the video does not appear.

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: How to capture mouse events on web-based streaming?

Postby RSATom » 05 Sep 2013 04:24

You are mix all together...
look here:
http://code.google.com/p/fbvlc/source/browse/FBVLC.htm

classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" and codebase="http://download.videolan.org/pub/videol ... /axvlc.cab" related to original web plugins, not fbvlc

hax001
Blank Cone
Blank Cone
Posts: 20
Joined: 27 Aug 2013 01:38

Re: How to capture mouse events on web-based streaming?

Postby hax001 » 05 Sep 2013 17:13

Great thank you... that works.

Since I don't what users to download VLC, how do I set the do plugin download location if it is not installed? Is it possible to detect if they have the VLC plugin installed rather than fbvlc?
For instance, I will host the .msi installer in ~/Downloads/FBVLC_0.0.2.0_vlc_2.0.5.msi.

I added the following codebase parameter to the object. In IE, the client is prompted to continue with the download, but not in Chrome:

Code: Select all

<object id="vlc-player" type="application/x-fb-vlc" width="320" height="240" codebase="~/Downloads/FBVLC_0.0.2.0_vlc_2.0.5.msi" ...

Thanks.

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: How to capture mouse events on web-based streaming?

Postby RSATom » 06 Sep 2013 03:01

There are no way to automatic download and install not of fbvlc nor vlc web plugin.
Since http://download.videolan.org/pub/videol ... /axvlc.cab - not exists for a long time,
and there are no fbvlc .cab. So users have install both of them by hand.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 20 guests