MC Media Player

MC Classic Media Player Variables

The table below lists the variables you can use with the MC Classic media player. Remember, you don't have to use these variables for the player to work — they are here to provide additional functionality and customisation. These variables are defined either in the JavaScript file or HTML code, depending on your implementation.

Note: Colours are defined using a hexadecimal value without the "#", e.g. bgcolor=000000

Playlist

playlist   URL of the playlist menu XML file (relative to the web page).
If not set, it is assumed to be a file called mcmp720x360_playlist.xml in the same directory as the player. Use this option if you don't want the location of your playlist to be visible in your source code (although people familiar with the player will still be able to find it).
plresize   Determines whether the user can resize the playlist.
Values:
h Allow horizontal resizing only (default).
hv Allow horizontal and vertical resizing.
none Do not allow resizing.
plfolders   Determines how playlist folders behave when selected. Note: This only applies when the user clicks a folder name, not the triangular open/close arrow.
Values:
0 Folders remain open until closed by user (default).
1 Folders close when a new folder is opened.
desctxtcolor   Colour of the text in the description box (pops up when the mouse is over a playlist item).
descbgcolor   Background colour of the description box.

Files & Directories

mcplayerfile   URL of the main player file (relative to the web page). If not set, it is assumed to be a file called mcmp720x360_player.swf in the same directory as the web page.
mediadir   Base directory URL for video clips and other media files (relative to the player).
Note: URLs are set for individual media files in the playlist. The mediadir variable acts as a prefix for all files in the playlist, making it useful if most of your files are under the same remote directory.
dfile   The default file which is selected automatically when the player loads. The value can be either the number of the file in the playlist (e.g. dfile=1) or the URL of the file (e.g. dfile=myfile.flv). File URLs are relative to the player.
If the dfile variable is not set, the player shows a blank screen until a clip is selected.
Note: To create a slideshow which starts automatically, enable both the dfile and aseq variables.
dfileaction   Determines how the dfile will behave.
Values:
1 (Default) Highlight the file in the playlist (if possible) and begin playback automatically.
2 Highlight the file in the playlist but do not load the file or begin playback. The user must click the play button or the item in the playlist to start loading and playback.
3 Begin playback automatically but do not highlight it in the playlist.
defpreclip   The URL of a default clip to prepend to all items in the playlist. When a user selects a file to play, this clip will play first and then their selected clip will play. Currently only FLV files can be used as preclips. Preclips do not apply when playing a file from a custom location.
Preclips can also be assigned to individual items in the playlist (playlist preclips override the defpreclip).

Info Screen

infotype   This determines how the info screen will behave.
Values:
txt (Default) The screen contains a customizable heading and short paragraph of text. Text is defined by the infohead and infotxt variables (see below). HTML is allowed.
swf The screen plays swf (Flash) files which you define. These files can be linked to specific video clips or played randomly.
none The screen is not displayed at all, giving you more room for the playlist.
   
   
infohead   When using the txt infotype, this is the text heading.
infotxt   When using the txt infotype, this is the text content below the heading.
infoheadcl   When using the txt infotype, this is the colour of the heading.
infotxtcl   When using the txt infotype, this is the colour of the text.
infobg   Background colour of the Info Screen.
definfo   When using the swf infotype, this is the URL of the default SWF info file. This plays when the player is loaded and when no other info file is specified for a video clip. The SWF file must be 210x160 pixels, and will play at 12 frames per second.

General Options

fullscreenmode   Allow users to choose full-screen mode for the player. The player will always be in normal mode at startup — this option allows them to click the fullscreen button or use the right-click menu to enter fullscreen mode.
Values:
-1 Do not allow fullscreen
1 Allow fullscreen (default)
bgcolor   Background colour of the player.
buf   The amount of time in seconds each new video clip will buffer before playback begins. A lower value means the video will begin playback sooner, a higher value means there will be a longer wait but less chance that the video will stall and have to re-buffer. The default is 3.
zoom   Determines whether the auto-zoom option is turned on when the player loads (expand clips to fill screen).
Values:
0 Off (default)
1 On
infobutton   Determines whether the "i" button is visible.
Values:
on Visible (default)
none Hidden
dlinks   Creates a download link in the media information window window when a file is playing.
Values:
0 Off (default)
1 On
 
downloadDir   An optional separate directory for download files, used in conjunction with the dlinks variable above. If not defined, the file currently playing will be downloaded. If defined, the player will look in the specified directory for a file with the same name.
directlinkURL   The URL of the page used for direct linking to files (usually the same URL as the player's web page). If defined, a "Link to this file" button appears in the media information window. When clicked, this button provides users with a URL to use as a link to the current file. This link is not the actual file URL, but a link to the player with instructions to play the selected file automatically.
showfileURLs   Shows the "File URL" button in the media information window. When this button is clicked the URL of the currently playing media file is shown as a hyperlink. Use this option only if you want users to access the actual media files (flv, mp3, etc).
Values:
0 Off (default)
1 On
optmenu   Determines whether users can use the options menu.
Values:
all Allow all options (default)
none Hide the options button
startvol   The setting of the volume control at startup (users can change the volume from this value).
Values:
0 - 100 Any number from 0 to 100, with 0 being mute and 100 being full volume. 100 is the default.

Auto-Sequence

aseq   Auto-sequence. Determines whether the auto-sequence option is turned on when the player loads.
Values:
-1 Disabled
0 Off (default)
1 On
   
aseqd   Auto-sequence direction. Determines the order in which files in the playlist will be played when auto-sequence is on.
Values:
1 Top to Bottom (default)
2 Bottom to Top
   
imgdur   Image duration. The time each still image will be displayed when auto-sequence is on.
swfdur   SWF duration. The time each SWF file will be displayed when auto-sequence is on. Set to "0" to exempt SWF files from auto-sequence.

Search

allowsearch  
Values:
0 Off
1 On (default)
searchorder   tdk
searchdesc   Show the description box on mouseover in search results.
Values:
0 Off
1 On (default)

Other

playerwidth &
playerheight
  These can be defined in the JavaScript file to resize the entire player. Note that some distortion may occur in the player's text.
checkVersion   Check to make sure the user has at least version 8 of the Flash player. Note that this can cause problems with version 9 players so it is disabled by default.
Values:
1 Enabled
-1 Disabled (default)

Back to MC Media Player main page