HowTo Integrate VLC plugin in your webpage

From VideoLAN Wiki
Revision as of 20:18, 17 January 2008 by Revolunet (talk | contribs) (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...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 !!