ActiveX/HTML

From VideoLAN Wiki
Revision as of 22:34, 19 April 2006 by 1145486355 (talk | contribs)
Jump to navigation Jump to search

Embedding Activex using Javascript

You can insert the ActiveX control in your HTML pages like this :

 <OBJECT classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8"
    codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab"
       width="640" height="480" id="vlc" events="True">
 <param name="Src" value="" />
 <param name="ShowDisplay" value="True" />
 <param name="AutoLoop" value="False" />
 <param name="AutoPlay" value="False" />
 </OBJECT>

Then, using Javascript, you can select another source, or change the audio track :

 document.vlc.playlistClear();
 var options=[":audio-track=5"]; // select audio track 5 (=6th, 1st is 0)
 document.vlc.addTarget("...",options,2,0); // replace entry 0
 document.vlc.play();

Embedding ActiveX using m3u Playlists

Maybe a better to show VLC in an HTML Website is to use m3u Playlists. It has got the advantage that users with turned-off Javascript can also use this plugin, since document.vlc.addTarget won't work with javascript turned off.

  • Step 1: Create the HTML website with the VLC-Object linked to the m3u playlist
  • Step 2: Create your m3u playlist with all options, save and upload it to your webspace.
  • Step 3 (optional): Create buttons and other objects to control VLC (like document.vlc.play();)


Step 1: Creating the website to embed ActiveX Control

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

   
     
       
       
       
       
       
     
   
 

You should modify the values of width, height and volume (0-100) fitting to your desires. If you don't know them, simply delete them (e.g. remove width="640" from the code).


Step 2: Creating the m3u playlist

Open Notepad, create your playlist and save it as 'myplaylist.m3u' for this example.

#EXTM3U                                     // Required to identify this file as m3u file
#EXTVLCOPT--input-repeat=-1                 // repeat the following file/playlist
#EXTVLCOPT--http-reconnect=true             // required for a streaming-client to enable repeat
#EXTVLCOPT--any further parameter goes here // see also VLC command-line help
#EXTINF:0, Test Description                 // set the title for the following file shown in your playlist
video.mpg                                // the actual file to be displayed


Annotations:

  • For actual looping of the entire playlist, the user has to have check 'Repeat all' under Preferences --> Playlist --> General
  • Mind that options have different names if you play a file locally or if you want to stream it (--sub-filter --> --s-filter)


Mind the different Options-styles:

 --option  A global option that is set for the duration of the program.
  -option  A single letter version of a global --option.
  :option  An option that only applies to the playlistitem directly before it
           and that overrides previous settings.

See also












[We are delicate. We do not delete your content.] [l_sp894] indoor tanning beds daybed comforter sets southwestern bedding leather sectional sofa thomasville bedding naturalizer shoes designer dog beds k1 visa fiancee visa rivotril cingular ringtone nail fungus bridesmaid dress formal prom dresses bcbg shoes tramadol hcl cingular ringtone bcbg shoes bridesmaid dress formal prom dresses nail fungus tanning bed bcbg shoes naturalizer shoes leather sectional sofa designer dog beds heated mattress pad bridesmaid dress 2006 prom dresses formal prom dresses sexy prom dresses cheap prom dresses nextel ringtone verizon ringtone cingular ringtone free sprint ringtone free nextel ringtone sprint ringtones verizon ringtone dianabol tribulus terrestris nutrex lipo 6 Tribex Xyience Vasopro caffeine pills scifit twinlab faxless payday loans cingular ringtone free verizon ringtone free kyocera ringtone free sprint ringtone kyocera ringtone ringtone maker monophonic ringtone us cellular ringtone cash until pay day loan faxless payday loans no fax payday loans fash cash personal loans