CoSolvent Player » Installation & Configuration
CoSolvent Player is deployed as a Flash 9 'Applet'. All configuration is done via the flashvars parameter of the html object tag representing the player on a page. There are several Javascript libraries available that make embedding flash easy and safe across multiple browsers. We recommend swfobject.
Our standard configuration method is to set a single flashvar property encoded in JSON. Below is a code example of embedding the CoSolvent Player using swfobject.
The following example configures a playlist consisting of two FLV videos. Note the height setting in the swfobject call; 24 pixels are added to the video height. Each of our three default control bars are 24 pixels high.
var flashvars = {
JSON: '{"debug":true,' +
'"ui":{"style":"light"},' +
'"vitems":[' +
'{' +
'"id":"1",' +
'"layer":"video",' +
'"url":"Bourne Ultimatum - Trailer.flv",' +
'"variant":"flv",' +
'"width":1920, "height":816' +
'},' +
'{' +
'"id":"2",' +
'"layer":"video",' +
'"url":"I Am Legend - Trailer.flv",' +
'"variant":"flv",' +
'"width":1920, "height":816' +
'}' +
']}'
};
var params = {
swfliveconnect: "true",
allowScriptAccess: "always",
salign: "lt",
scale: "noscale",
loop: "false"
};
var attributes = {
name: "CosolventPlayer",
id: "CosolventPlayer"
};
swfobject.embedSWF("CosolventPlayer.swf", "flashcontent",
"1920", "840", "9.0.0", "expressInstall.swf",
flashvars, params, attributes);
The above example is self-contained with the exception of swfobject, thus the JSON string is presented inline; however, there are a number of Javascript libraries available which provide functions to generate JSON serializations. The Dojo Toolkit is one such library.
Configuration options, along with the corresponding default values, are listed below.
If set to true, the player will attempt to open a local connection to communicate with the Alcon debugging utility.
debug: "true" | "false"
Default is false.
Configuration is to be done inside of an object called ui:
ui: {
trackUsage: true | false (default false)
buttonHoverColor: "<color>" (e.g. 0xff0000)
video: {
backgroundInsideColor: "<color>" (inside of radial gradient)
backgroundOutsideColor: "<color>" (outside of radial gradient)
backgroundInsideRatio: "<color>" (inside ratio of radial gradient)
backgroundOutsideRatio: "<color>" (outside ratio of radial gradient)
}
}
autoplay set to true indicates that playback should begin automatically after sufficient loading.
autoplay: "true" | "false" (defaults to false)
driverLayer: "<layer name>" (video or audio, default is video)
assetURL indicates a prefix for all urls specified with in the vitems array
assetURL: "<url>"
vitems is a javascript array containing an object for each desired virtual item
vitems: [
{
id: <id>,
layer: "<layer name>",
url: "<url>",
variant: "<variant>",
start: <mark in>,
end: <mark out>,
...
}
]
Each object would represent one virtual item.


In the following code samples, times are measured in milliseconds. If the script has a linkTo parameter set in the timeline, the times will be local to a video. Otherwise, they reference the virtual timeline.
Subtitles are described in xml as follows:
<innerscript>
<script>
<timeddata start"0" end"3000">Text for first subtitle.</timeddata>
</script>
</innerscript>
Markers are described similarly:
<innerscript>
<script>
<marker name="marker1" time="28000" />
</script>
</innerscript>
Actions and Interactions are placed in a separate element:
<innerscript>
<interactions>
<perform action="gotoMarker|marker1" time="36000" />
<button text="continue" action="play" placement="bottom right" time="43000" />
</interactions>
</interactions>
The button interaction will, by default, first pause the video, then display a button to the user at the specified placement, and then perform the specified action when the button is clicked.
These features are only available in the Professional version of the CoSolvent Player.