Take a snapshot from video using VLC mozilla plugin

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
jucas_lo
New Cone
New Cone
Posts: 3
Joined: 24 Apr 2009 15:13

Take a snapshot from video using VLC mozilla plugin

Postby jucas_lo » 24 Apr 2009 15:50

Hi!

I need to be able to take a snapshot of a video, that is being played in Firefox 2 using the VLC mozilla plugin (latest stable version 0.9..9a), on a Linux machine.

Looking through the forum I found some javascript code that theoretically will lead to the solution of my problem:

Code: Select all

<head> <script type="text/javascript"> function doSnapshot() { var VLC = document.getElementById("vlc"); var X = VLC.getVariable("key-snapshot"); VLC.setVariable("key-pressed", X); } </script> </head> <body> <embed type="application/x-vlc-plugin" name="VLC" pluginspage="http://www.videolan.org" id="VLC" autoplay="yes" loop="no" hidden="no" width="160" height="128" target="some_file.avi" /> <input type="button" value="Take Sanpshot" onclick="doSnapshot()"> </body>
but sadly it doesn't work. (I run firefox from console and watch the messages from the plugin and with every command play, stop, fullscreen i se some output on the console, with the code above I do not)

I checked and if I press shift+s while I'm playing the video (sometimes I have to actually click on the video) a snapshot is saved in ~/.local/vlc/vlcsnap***.png, so this functionality is supported on the plugin, but how can I do it from javascript???????

I would appreciate any suggestions,


thanks

Anatoly_B
Blank Cone
Blank Cone
Posts: 14
Joined: 20 Aug 2008 03:30

Re: Take a snapshot from video using VLC mozilla plugin

Postby Anatoly_B » 26 Apr 2009 12:04

.setVariable(..) and .getVariable(..) work only in very old versions. Now snapshot is inaccessible in javascript.

zeepee
Blank Cone
Blank Cone
Posts: 29
Joined: 17 Nov 2012 01:21

Re: Take a snapshot from video using VLC mozilla plugin

Postby zeepee » 22 Nov 2012 12:22

.setVariable(..) and .getVariable(..) work only in very old versions. Now snapshot is inaccessible in javascript.
is this still true ? I would also need to add a snapshot capability to a web applet I just developed (see my topic about subtitles not working with the VLC plugin).

TIA. :)


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 11 guests