VLC and javascript

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
sdankeny
New Cone
New Cone
Posts: 2
Joined: 02 Sep 2011 05:23

VLC and javascript

Postby sdankeny » 20 Feb 2012 01:43

I have been trying to use the VLC plug-in in javascript (specifically in the Mozilla browser). There are two things that the user is going to initiate via a button/link click: take snapshot and start/stop record.

I have not been able to find the javascript API in order to do this though. First of all, is it even possible?

The following HTML will be generated dynamically when the user clicks to open up the stream:

Code: Select all

<html> <head> <script type="text/javascript"> function snapshotClicked() { // take a snapshot var player = document.getElementById('video: my video'); } function videoClicked() { // maybe do something...but for now not. } function recordClicked() { // start recording var player = document.getElementById('video: my video'); } function stopRecordClicked() { // stop recording var player = document.getElementById('video: my video'); } </script> </head> <body> <div id="embeddedVideo"> <embed type="application/x-vlc-plugin" version="VideoLAN.VLCPlugin.2" name="video" id="video: my video" autoplay="yes" loop="yes" target="movie4.mpg" width="75%" height="75%" onfocus="javascript:videoClicked();" /> </div> <div id="snapshotButton"> <a href="javascript:snapshotClicked();">SNAPSHOT!!</a> <a href="javascript:recordClicked();">Record</a> <a href="javascript:stopRecordClicked();">Stop Record</a> </div> </body> </html>
I have tried several things so far that have not panned out. I also am unable to find any documentation online that shows good examples. It seems like these two functions would be part of the basic functionality. Any help would be appreciated 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: VLC and javascript

Postby RSATom » 20 Feb 2012 04:34

http://git.videolan.org/?p=npapi-vlc.gi ... ml;hb=HEAD

it's not very good, but it works...

xiaotuzihehe
New Cone
New Cone
Posts: 2
Joined: 07 Apr 2013 03:36

Re: VLC and javascript

Postby xiaotuzihehe » 07 Apr 2013 04:13

Dear sdankeny ,

Did you finish it,if yes,Could you post your code on here ?
Thx!


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 17 guests