Difference between revisions of "HowTo Integrate VLC plugin in your webpage"

From VideoLAN Wiki
Jump to navigation Jump to search
(New page: == VLCjs javascript library == I've created this small javascript library to allows you to easyly add the VLC plugin in your web pages. Here's how you add the control to your page : * f...)
 
m
Line 23: Line 23:
  
 
Any comments are welcome to improve this lib !!
 
Any comments are welcome to improve this lib !!
 +
 +
It works on IE/Firefox and maybe Safari but i cannot test it

Revision as of 20:22, 17 January 2008

VLCjs javascript library

I've created this small javascript library to allows you to easyly add the VLC plugin in your web pages.

Here's how you add the control to your page :

  • first, download the source zip and extract it to your website (i suppose you create a VLCjs subfolder)
  • then, create a simple html test page like this on your server :
<script language="javascript" src="VLCjs/VLCjs.js"></script>
<object id="myplayer" classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab"></object>
<script language="javascript">
        window.onload = function() {
            var vlc = new VLCplayer("myplayer", 400, 300);
            vlc.setIdleImage("idle2.gif");
            vlc.play("http://example.com/movie.mpeg");
        }
</script>

this should create a player object and launch a movie ;)

Any comments are welcome to improve this lib !!

It works on IE/Firefox and maybe Safari but i cannot test it