FCPlayer Configuration

IndexA list of the configuration Variables in FCPlayerConfig.js



where is it
Below is a list of the configuration variables you will find in /FCPlayer/config/FCPlayerConfig.js with a brief explanation of their function. The examples reflect the default setup of the configuration file.

version

The current version.

Example:

version:"1.1.8",


domainKey

Some features of FCPlayer Pro, such as the adjustable skins, require a domain key to unlock. Those of you who purchased FCPlayer Pro may obtain a domain key here: http://www.fastcatsoftware.com/player/domainkey.aspx

Example:

domainKey:"75090-117602-73398",


top_domain

If you have a number of sub-domains on which FCplayer is installed, you need only aquire a domain key for the top level domain, provided that you set the top_domain variable to the top level domain. For instance, if you are running FCPlayer on seattle.craigslist.org and chicago.craigslist.org, you can use the domain key for "craigslist.org" for both sites, provided that you set top_domain to "craiglist.org". top_domain can only be set to a superdomain of the current domain.

Example:

top_domain:"",


path

Path to the FCPlayer folder
This is initially set to the value of fcp_path, a variable found in FCPlayer/js/import.config.js
If fc_path is not found, the value defaults to "/FCPlayer/".
If you need to set the path, you should not alter this, but instead set fcp_path.

Example:

path: window["fcp_path"] || "/FCPlayer/",


videoRoot

Path to the default video folder
The path must end in a backslash.

Example:

videoRoot: (window["fcp_path"] || "/FCPlayer/") + "videos/",


width

Default width of the player.

Example:

width:800,


height

Default height of the player.

Example:

height:432,


wmode

The window mode that the flash player operates under.
Acceptable values are window, opaque, and transparent.

Example:

wmode:"window",


logoText
logoImg

logoText is the text displayed in the top right corner of the player screen.
logoImg is a 16X16 pixel image that is displayed in the upper left corner of the player window. This image is located in the images folder.

Example:

logoText:"FCPlayer",
logoImg:"Fastcatlogo.gif",



title
loadingMsg
bufferMsg
F11Msg

Text displayed in the upper left corner of the player window.

Example:

title:"FCPlayer",
loadingMsg:" Media Loading...Please Wait",
bufferMsg:" Buffering ",
F11Msg:"Press F11 for full screen",



minimize_button_tooltip
maximize_button_tooltip
restore_button_tooltip
close_button_tooltip

Tooltips for the window control buttons.

Example:

minimize_button_tooltip:"minimize",
maximize_button_tooltip:"maximize",
restore_button_tooltip:"restore",
close_button_tooltip:"close",



styles

The styles object sets a few styles for FCPlayer, namely:

windowColor -The color of the player application window.
useframe -If this is set to true, a frame is drawn around the player when in embedded mode.
frameColor -The color of the frame in the embedded mode.
titleColor -The color of the title which appears in the top left corner.

Example:

styles:{
windowColor:"gray",
useFrame:true, //For the embedded mode
frameColor:"gray", //For the embedded mode
titleColor:"#ffffff",
DONOTTOUCHTHIS:0
},



slide_controls

Determines whether the controls are fixed in place, or allowed to slide in and out of view as needed.
The values this parameter accepts are true and false. This applies only to version 1.1.8 and later.

Example:

slide_controls:true,



use_loop_button
use_full_screen_button
use_popout_button

The loop button, popout button, and full screen button are optional, as of version 1.1.8. The values these parameters accept are true and false.

Example:

use_loop_button:true,
use_full_screen_button:true,
use_popout_button:true,



pageMarginTop
pageMarginBottom
pageMarginLeft
pageMarginRight

The page margins define a rectangular region of the page where the player is allowed to pop up.
This is to prevent the player from popping up over menu bars, advertisements, the page title, etc.

Example:

pageMarginTop:150,
pageMarginBottom:100,
pageMarginLeft:300,
pageMarginRight:100,



clientMarginTop
clientMarginLeft

The client margins define the location that the player will pop up, by default, with respect to the client viewing area.
Page margins will override client margins, if a confict arises.

Example:

clientMarginTop:100,
clientMarginLeft:100,



zIndex

Base z-index of the player. You may adjust the z-index to ensure that the player stays on top of other page elements.
Making the zIndex value larger brings the player forward on the page.

Example:

zIndex:100,


quality

Use Flash based video quality enhancement. (true/false).
Setting to true may affect playback performance for slow connections.

Example:

quality:false,


volume

Default volume. (Range is 0-1).

Example:

volume:.5,


duration

Default video duration in seconds (A fallback parameter for videos with no metadata)

Example:

duration:300,


noMeta

Videos assumed to have no metadata, by default (true/false).

Example:

noMeta:false,


back_tooltip
forward_tooltip
zoom_in_tooltip
zoom_out_tooltip
show_all_on_tooltip
show_all_off_tooltip
pop_out_tooltip
full_screen_tooltip
loop_tooltip
hide_ads_tooltip:

Tooltips for the player controls.

Example:

back_tooltip :"back",
forward_tooltip:"forward",
zoom_in_tooltip:"zoom in",
zoom_out_tooltip:"zoom out",
show_all_on_tooltip:"show all mode is ON",
show_all_off_tooltip:"show all mode is OFF",
pop_out_tooltip:"pop out",
full_screen_tooltip:"full screen",
loop_tooltip:"loop",
hide_ads_tooltip:"hide ads",



adTemplates

The adTemplates object defines templates which can be used to load advertisements into the player. Ad templates are discussed in the section Add advertisements to your videos with the ad loader.

Example:

adTemplates:{
template1:{
name:"template1",
superimpose:false,
layout:"vertical",
width:160,
hideButton:true,
adList:[
{
url:"",
link:"",
alpha:.5
},
{
url:"",
link:"",
alpha:.5
}
]
},
template2:{
name:"template2",
superimpose:true,
layout:"horizontal",
width:80,
hideButton:false,
adList:[
{
url:"",
link:"",
alpha:1
}
]
},
DONOTTOUCHTHIS:0
},



Streamer script resources

The variables below map the first argument of the FCPlayer.play function to a streamer script.
(you can have up to four different different scripts)

Example:

p_resource:"xmoov",
p_script: (window["fcp_path"] || "/FCPlayer/") + "streamers/xmoov.php",

p_resource2:"CodeShop_h264",
p_script2:"",

p_resource3:"",
p_script3:"",

p_resource4:"",
p_script4:"",



Buffering parameters

The variables below control how FCPlayer buffers video.
Most of these are low level controls that should be left alone, unless you know what you are doing.
The one variable that you may want to adjust is startBuffer, which tells the player how much of the video to buffer before starting playback.

Example:

//How much of the video (in seconds) to buffer to before starting.
startBuffer:.1,

//Buffer time after a seek
seekBuffer:.1,

//Dual buffering parameters
emptyBuffer:.1,
fullBuffer:3,

//Number of slow buffering intervals before switching to slowBuffer
bufferCount:6,

//Number of seconds between rebuffering intervals, which, if exceeded, causes a revert back to fastBuffer
slowBufferTimeout:4,

//Default buffer time for fast connections
fastBuffer:.1,

//Fallback buffer time for slow connections
slowBuffer:4,



plugins

The plugins array enumerates the plugins which are to be displayed, by default, in the player's menu bar. Plugins are discussed in the section Adding plugins to the menu bar.

Example:

plugins:null,


plugin scripts

Enumerates the plugin scripts that are loaded into the player. If you develop your own plugin script, you may add it to this list. Plugins are discussed in the section Adding plugins to the menu bar.

Example:

pluginScripts:[
//"comments/plugin.js",
"defaultplugins.min.js",
"customplugins.js"
],



share

The share object defines some parameters which allow you to share your videos with others. See Enabling your videos to be shared with other sites. for more in depth details on this subject.

host - The domain that will host shared videos. If host is not specified, the current domain will be inserted into the embed code.
baseLink - baseLink is prepended to the share.link parameter that you use in the FCPlayer.play function. Thus baseLink + share.link = the full linking url.
width - The default width of shared videos.
height - The default height of shared videos.
allowEmbedded - (true/false) If disabled, the Embed/Link plugin will not display an embed code.
useCustomEmbedTag - (true/false) If true, you will supply your own custom embedding code, instead of letting the player generate the default embedding code.
customEmbedTag - Custom HTML code for embedding your videos.
customEmbedURL - A URL to replace the %url% part of your custom embed tag
customEmbedID - An id to replace the %id% part of your custom embed tag
allowOptions - (true/false) Enables/disables the use of menu options with shared videos.
linkOptionEnabled - (true/false) Enables/disables the use of the Embed/Link menu options with shared videos.


Example:

share:{
host:"",
baseLink:"",
width:500,
height:350,
allowEmbedded:true,
useCustomEmbedTag:false,
customEmbedTag:"",
customEmbedURL:"",
customEmbedID:"",
allowOptions:true,
options:{
linkOptionEnabled:true
},
DONOTTOUCHTHIS:0
},



menuStyle

The menuStyle object sets the default style for menus.


Example:

menuStyle:{
left:null,
top:null,
offsetLeft:0,
offsetTop:0,
width:250,
height:null,
color:"black",
opacity:.7,
shadow:true,
padding:"10px",
backgroundImage:null,
fontStyles:"font-size: 8pt;font-family:arial;color:white",
border:"1px solid silver",
DONOTTOUCHTHIS:0
},



captionStyle

The captionStyle object sets the default style for the caption box.


Example:

captionStyle:{
left:null,
top:null,
offsetLeft:-15,
offsetTop:-5,
width:250,
height:null,
color:"black",
opacity:.7,
shadow:true,
padding:"10px",
backgroundImage:null,
fontStyles:"font-size: 8pt;font-family:arial;color:white",
border:"1px solid silver",
DONOTTOUCHTHIS:0
},



usePlugins

(true/false) If true, the plugin script is preloaded when the player loads, and plugins can be added to the menu bar.


Example:

usePlugins:true,


skin

As of version 1.1.8, there are two different skins that can be loaded into the player: "default.swf" and "pro_adustable.swf".

Example:

skin:"default.swf",


controls

controls represent a set of options that can be used to style the Streamline Adjustable skin ("pro_adustable.swf"). These options are discussed in more detail in How to: Customize the player controls

Example:

controls:{
...
(full text not shown for brevity)
...
},





If you have a pre-sales question, submit your inquiry via our sales contact page. For general, non-sales inquiries, contact us at support@fastcatsoftware.com.

Solution Graphics