Difference between revisions of "ActiveX"

From VideoLAN Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
The [[Windows]] build of VLC includes an (optionaly installed) '''ActiveX control'''.  The ActiveX control enables VLC to be embedded in web browsers and third-party applications.   
 
The [[Windows]] build of VLC includes an (optionaly installed) '''ActiveX control'''.  The ActiveX control enables VLC to be embedded in web browsers and third-party applications.   
  
==Properties and Methods==
+
==Properties==
 
<!--
 
<!--
 
NOTE TO EDITORS!
 
NOTE TO EDITORS!
 
PLEASE LEAVE THE SYNTAX AS VB (6 or 98, not .net or 2005).  IF NEEDED, WE SHOULD CREATE A SEPERATE SECTION FOR EACH LANGUAGE/VARIANT AND LINK TO IT.   
 
PLEASE LEAVE THE SYNTAX AS VB (6 or 98, not .net or 2005).  IF NEEDED, WE SHOULD CREATE A SEPERATE SECTION FOR EACH LANGUAGE/VARIANT AND LINK TO IT.   
 
-->
 
-->
The ActiveX control includes the following properties and methods (functions):
+
The ActiveX control includes the following properties:
 
{|
 
{|
 
|'''''name'''''
 
|'''''name'''''
 
|'''''type'''''
 
|'''''type'''''
 
|'''''description'''''
 
|'''''description'''''
|'''''syntax ([[wikipedia:Visual Basic|VB]])'''''
+
|'''''type'''''
 
|-
 
|-
 
|Length
 
|Length
 
|property (get only)
 
|property (get only)
 
|Returns length of the current clip.
 
|Returns length of the current clip.
 +
|-
 +
|playlistCount
 +
|property (get only)
 +
|Returns the count of items in the playlist
 +
|-
 +
|playlistIndex
 +
|property (get only) <!-- may be settable too, unsure -->
 +
|Returns the index of the current item in the playlist. 
 +
|-
 +
|AutoLoop
 +
|property
 +
|Boolean value, determines if the player should automatically loop when it finishes the current playlist. 
 +
|-
 +
|AutoPlay
 +
|property
 +
|Boolean value, determines if the player should start playing a new file/playlist immediately upon being loaded. 
 +
|-
 +
|Volume
 +
|property
 +
|Presumably sets and gets the volume of VLC's waveout.
 +
|-
 +
|MRL
 +
|property
 +
|Presumably returns the MRL of the currently loaded file.
 +
|-
 +
|Time
 +
|property
 +
|Unknown
 +
|-
 +
|object
 +
|property
 +
|Unknown, possibly a way to access objects and then use getVariable/setVariable on them?
 +
|}
 +
==Methods==
 +
The ActiveX control includes the following methods (functions):
 +
{|
 +
|'''''name'''''
 +
|'''''type'''''
 +
|'''''description'''''
 +
|'''''syntax ([[wikipedia:Visual Basic|VB]])'''''
 
|-
 
|-
 
|Position
 
|Position
Line 75: Line 115:
 
|Goes to previous item in the playlist
 
|Goes to previous item in the playlist
 
|controlname.playlistPrev
 
|controlname.playlistPrev
|-
 
|playlistCount
 
|property (get only)
 
|Returns the count of items in the playlist
 
|-
 
|playlistIndex
 
|property (get only) <!-- may be settable too, unsure -->
 
|Returns the index of the current item in the playlist. 
 
|-
 
|AutoLoop
 
|property
 
|Boolean value, determines if the player should automatically loop when it finishes the current playlist. 
 
|-
 
|AutoPlay
 
|property
 
|Boolean value, determines if the player should start playing a new file/playlist immediately upon being loaded. 
 
 
|-
 
|-
 
|addTarget
 
|addTarget
Line 96: Line 120:
 
|Adds a uri to the current playlist or replaces the current playlist with the uri.   
 
|Adds a uri to the current playlist or replaces the current playlist with the uri.   
 
|controlname.addTarget(uri as String, options, mode as [[VLCPlaylistMode]], Position as Long)
 
|controlname.addTarget(uri as String, options, mode as [[VLCPlaylistMode]], Position as Long)
|-
 
|Volume
 
|property
 
|Presumably sets and gets the volume of VLC's waveout.
 
 
|-
 
|-
 
|toggleMute
 
|toggleMute
Line 110: Line 130:
 
|Presumably toggles between fullscreen and non-fullscreen modes.
 
|Presumably toggles between fullscreen and non-fullscreen modes.
 
|controlname.fullscreen
 
|controlname.fullscreen
|-
 
|MRL
 
|property
 
|Presumably returns the MRL of the currently loaded file.
 
|-
 
|Time
 
|property
 
|Unknown
 
|-
 
|object
 
|property
 
|Unknown, possibly a way to access objects and then use getVariable/setVariable on them?
 
 
|}
 
|}
  

Revision as of 06:38, 18 January 2006

The Windows build of VLC includes an (optionaly installed) ActiveX control. The ActiveX control enables VLC to be embedded in web browsers and third-party applications.

Properties

The ActiveX control includes the following properties:

name type description type
Length property (get only) Returns length of the current clip.
playlistCount property (get only) Returns the count of items in the playlist
playlistIndex property (get only) Returns the index of the current item in the playlist.
AutoLoop property Boolean value, determines if the player should automatically loop when it finishes the current playlist.
AutoPlay property Boolean value, determines if the player should start playing a new file/playlist immediately upon being loaded.
Volume property Presumably sets and gets the volume of VLC's waveout.
MRL property Presumably returns the MRL of the currently loaded file.
Time property Unknown
object property Unknown, possibly a way to access objects and then use getVariable/setVariable on them?

Methods

The ActiveX control includes the following methods (functions):

name type description syntax (VB)
Position property (get and set) Return or set the playback position on the current clip.
setVariable method Assigns a value to a variable that is defined in libvlc.c controlname.setVariable name as String, value
getVariable method Returns the contents of a variable that is defined in libvlc.c x = controlname.getVariable(name as String)
pause method Pauses the currently playing clip controlname.pause
play method Plays as in the normal player, if a clip is not loaded, does nothing. controlname.play
playFaster method Makes the currently playing clip play faster. controlname.playFaster
playSlower method Makes the currently playing clip play slower. controlname.playSlower
stop method Makes the currently playing clip stop. controlname.stop
shuttle method Presumably moves the playback position a specified number of seconds in either direction. controlname.shuttle(seconds as Long)
playlistClear method Clears the playlist controlname.playlistClear
playlistNext method Goes to next item in the playlist controlname.playlistNext
playlistPrev method Goes to previous item in the playlist controlname.playlistPrev
addTarget method Adds a uri to the current playlist or replaces the current playlist with the uri. controlname.addTarget(uri as String, options, mode as VLCPlaylistMode, Position as Long)
toggleMute method Presumably toggles between the muted/unmuted state of the embedded player. controlname.toggleMute
fullscreen method Presumably toggles between fullscreen and non-fullscreen modes. controlname.fullscreen

Installing

The ActiveX control can be installed as an option when using the Windows installer, it is also included in the Windows zip file. Also note that the ActiveX control can be automatically installed using the http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab file. This can be useful if you want to embed the ActiveX control in a web page.