
Purpose
The purpose of this guide is to introduce PNG skinning for the JW Player, and to provide detail on all of the elements associated with building a PNG skin for the JW Player for Flash v5.
With skins, you can customize the face of your JW player. You can alter the design of any of the player’s four component parts—Controlbar, Display, Dock and Playlist, as well as skinning-enabled plugins. Before JW Player 5, it was only possible to build skins using Flash. Now, with JW Player 5, designers can build skins in their graphical editor of choice, and save the visual elements as bitmaps. This allows for rapid prototyping without the need to compile a swf file, and opens up skinning to designers who don’t have Flash experience or software.
JW Player 5 will accept most commonly used bitmap image formats including:
Examples in this guide will use the PNG file format. It is the preferred format for creating slick skins due to its partial transparency support.
JW Player 5.2 and up support the use of SWF assets in the XML skinning format. However, we recommend that designers restrict themselves to the bitmap formats above, since skins created using SWF assets will not compatible with the JW Player for HTML5.
Note: Animated gif files are not supported.
The XML (Extensible Markup Language) file, or document, contains all the settings for your skin—the color settings for text and dock elements; margins and font-sizes for the Controlbar; and paths to images for every element in the skin.
A player skin consists of its own settings and its components. Here is an example of an XML document before the elements have been defined:
<?xml version="1.0"?>
<skin version="1.1" name="SkinName" author="http://www.yoursite.com/">
<components>
<component name="controlbar">
<settings>
<setting name="..." value="..." />
</setting>
<layout>
...
</layout>
<element name="..." src="..." />
<element name="..." src="..." />
<element name="..." src="..." />
</component>
<component name="display">
<settings>
<setting name="..." value="..." />
</setting>
<element name="..." src="..." />
<element name="..." src="..." />
<element name="..." src="..." />
</component>
<component name="dock">
<settings>
<setting name="..." value="..." />
</setting>
<element name="..." src="..." />
<element name="..." src="..." />
<element name="..." src="..." />
</component>
<component name="playlist">
<settings>
<setting name="..." value="..." />
</setting>
<element name="..." src="..." />
<element name="..." src="..." />
<element name="..." src="..." />
</component>
</components>
</skin>
The opening declaration of your XML document declares that it IS an XML document, and establishes that this is a JW Player skin. Inside the skin element are two attributes: name and author.
<?xml version="1.0"?>
<skin version="1.1" name="SkinName" author="http://www.yoursite.com/">
You can replace these with your skin’s name and your website, or your own name if you’d prefer not to have your URL in the author attribute.
Images must reside in a subdirectory corresponding to their parent container of the skin’s folder. For instance, Controlbar images should reside in the controlbar subdirectory.
The player’s controls are broken into four components. Each of these is defined in a <component> tag, and are all placed inside of the skin’s <components> block. The player controls are:
In addition to player controls, it is also possible to define skinning elements for skinnable plugins as well. These would be placed in another <component> tag, with the name attribute corresponding to the id of the plugin.

The Controlbar component is used more than any of the other JW Player skin components. It controls video playback, shows you your point in time, toggles to full-screen mode and allows you to control the volume.
<component name="controlbar">
<settings>
<setting name="backgroundcolor" value="0x000000"/>
<setting name="margin" value="10" />
<setting name="font" value="_sans" />
<setting name="fontsize" value="10" />
<setting name="fontcolor" value="0x000000" />
<setting name="fontstyle" value="normal" />
<setting name="fontweight" value="normal" />
<setting name="buttoncolor" value="0xFFFFFF" />
</settings>
<layout>
...
</layout>
<elements>
<element name="background" src="file.png" />
<element name="capLeft" src="file.png" />
<element name="capRight" src="file.png" />
<element name="divider" src="file.png" />
<element name="playButton" src="file.png" />
<element name="playButtonOver" src="file.png" />
<element name="pauseButton" src="file.png" />
<element name="pauseButtonOver" src="file.png" />
<element name="prevButton" src="file.png" />
<element name="prevButtonOver" src="file.png" />
<element name="nextButton" src="file.png" />
<element name="nextButtonOver" src="file.png" />
<element name="stopButton" src="file.png" />
<element name="stopButtonOver" src="file.png" />
<element name="timeSliderRail" src="file.png" />
<element name="timeSliderBuffer" src="file.png" />
<element name="timeSliderProgress" src="file.png" />
<element name="timeSliderThumb" src="file.png" />
<element name="fullscreenButton" src="file.png" />
<element name="fullscreenButtonOver" src="file.png" />
<element name="normalscreenButton" src="file.png" />
<element name="normalscreenButtonOver" src="file.png" />
<element name="muteButton" src="file.png" />
<element name="muteButtonOver" src="file.png" />
<element name="unmuteButton" src="file.png" />
<element name="unmuteButtonOver" src="file.png" />
<element name="volumeSliderRail" src="file.png" />
<element name="volumeSliderBuffer" src="file.png" />
<element name="volumeSliderProgress" src="file.png" />
<element name="blankButton" src="file.png" />
<element name="blankButtonOver" src="file.png" />
</elements>
</component>
In the example above, you will notice the bit of code containing the settings element for the Controlbar component. It looks like this:
<settings>
<setting name="backgroundcolor" value="0x000000"/>
<setting name="margin" value="10" />
<setting name="font" value="_sans" />
<setting name="fontsize" value="10" />
<setting name="fontcolor" value="0x000000" />
<setting name="fontstyle" value="normal" />
<setting name="fontweight" value="normal" />
<setting name="buttoncolor" value="0xFFFFFF" />
</settings>
Here is a list of the Controlbar settings, along with their default values:
background is a graphic which stretches horizontally to fit the width of the Controlbar. capLeft and capRight are placed to the left and right of the background.
The Controlbar has a few elements which allow you to add space between elements. They are non-functioning bitmaps meant to give space to the right and left edges of the Controlbar.
Note: JW Player 5.1 and below will fail to load without the capLeft, capRight and volumeSlider elements in the XML File. This issue was resolved in version 5.2.
Buttons have two states. The button state is visible when the mouse is not hovering over the button. The buttonOver state – which should have the same dimensions as button – is shown when the user hovers the mouse above the button.
The two states of the button elements are:
Certain buttons replace each other depending on the state of the JW Player. For instance, when a video is playing, the playButton is replaced by the pauseButton element.
Toggle button pairs:
The timeSlider element is a unique element which is really several elements stacked on top of each other. Of those elements, three of them automatically scale to a width based on the free space in the player. Those elements are:
Additional timeSlider elements:

With that in mind it is important to design your elements to gracefully scale horizontally. The timeSliderBuffer and timeSliderProgress elements dynamically scale to indicate a percentage of progress of the total file length.
The volumeSlider element is quite similar to the timeSlider, except that it does not scale automatically. It will be as large as graphics you produce.
Right-hand end-cap, placed to the right of the volumeSliderRail element.
the handle to slide the volume, also indicates the volume level.

Note: JW Player 5.1’s skinning model will add 5 pixels of padding to each side of the volumeSlider if no end-caps are specified. JW Player 5.1 and below will fail to load without the volumeSliderRail element in the XML file.
The blankButton element is used when plugins insert additional buttons into the Controlbar. This element should simply be a button background; the foreground element will be added by the plugins.
Two text fields can be laid out in the controlbar:
The controlbar’s components (buttons, text fields, sliders and dividers) are laid out according to a block of XML code in the Controlbar section.
Inside the controlbar’s <component> block, you can insert an optional <layout> block which allows you to override the default controlbar layout.
<layout>
<group position="left">
<button name="play" />
<divider />
<button name="prev" />
<divider />
<button name="next" />
<divider />
<button name="stop" />
<divider />
<text name="duration" />
<divider />
</group>
<group position="center">
<slider name="time" />
</group>
<group position="right">
<text name="elapsed" />
<divider />
<button name="blank" />
<divider />
<button name="mute" />
<slider name="volume" />
<divider />
<button name="fullscreen" />
</group>
</layout>
The Controlbar’s layout is made up of three groupings, left, right and center.
The <group> tag can contain the following elements:
<divider element="alternate_divider" />
<divider width="10" />

If no <layout> block is included in the skin, the player will use a default layout, based on which skin elements have been defined in the <elements> block. The elements will be layed out in the following order:
The display largely consists of the buttons you see in the middle of the player. You see the familiar triangular play icon before the movie is playing, and also when you pause. When the user has muted the player, the Mute icon appears. Display Icons come in two parts: a global background element to every icon, and the icon itself, which is programmatically centered over the background layer. All images must reside in the display subdirectory of the skin.

Note: By default, the bufferIcon will rotate clockwise while buffering.
<component name="display">
<settings>
<settings>
<setting name="backgroundcolor" value="0x000000" />
<setting name="bufferrotation" value="15" />
<setting name="bufferinterval" value="100" />
</settings>
</settings>
<elements>
<element name="background" src="file.png" />
<element name="playIcon" src="file.png" />
<element name="playIconOver" src="file.png" />
<element name="playIcon" src="file.png" />
<element name="muteIconOver" src="file.png" />
<element name="bufferIcon" src="file.png" />
</elements>
</component>
Here is a list of Display settings, along with their default values:
The following elements are available for the Display. All of the elements are optional, and will be excluded from the player if they are not
Dock Icons elements sit at the top right corner of your player and can be both informative or functional. For instance, if you’ve installed the HD plugin, once you’ve toggled High Definition Playback to ON, a small HD Dock Icon will appear in top corner of your player, letting you know you’re watching in HD. The Dock Icon only has one element:

<component name="dock">
<settings>
<setting name="fontcolor" value="0x000000" />
</settings>
<elements>
<element name="button" src="file.png" />
<element name="buttonOver" src="file.png" />
</elements>
</component>
Here is a list of the settings that can be placed in the dock’s <settings> block, along with their default values:
There are two main Playlist skin elements; Playlist Items, and the Playlist Slider. Item graphics scale horizontally and are placed behind the description/thumbnail of videos in your playlist. The slider is a vertical scrollbar rail and handle (thumb), with optional top and bottom endcaps. The background element serves as the default background of the playlist if there are fewer elements than the height of the playlist.

The following Playlist elements are available:
<component name="playlist">
<settings>
<setting name="fontcolor" value="0x999999" />
<setting name="overcolor" value="0xFFFFFF" />
<setting name="activecolor" value="0x990000" />
<setting name="backgroundcolor" value="0x000000"/>
<setting name="font" value="_sans" />
<setting name="fontsize" value="12" />
<setting name="fontweight" value="normal" />
<setting name="fontstyle" value="normal" />
</settings>
<elements>
<element name="background" src="background.png" />
<element name="item" src="item.png" />
<element name="itemOver" src="itemOver.png" />
<element name="itemActive" src="itemActive.png" />
<element name="itemImage" src="itemImage.png" />
<element name="sliderRail" src="sliderRail.png" />
<element name="sliderThumb" src="sliderThumb.png" />
<element name="sliderCapTop" src="sliderCapTop.png" />
<element name="sliderCapBottom" src="sliderCapBottom.png" />
</elements>
</component>
Here is a list of the settings that can be placed in the dock’s <settings> block, along with their default values:
Some plugins allow their elements to be skinned as well. If so, you can place those elements directly in your skin, the same way you skin built-in player components. The name attribute must match the plugin’s id. All plugin elements must be placed in a folder whose name also matches the plugin’s id.
In the following example, the skin defines the HD plugin’s two skinnable elements:
<component name="hd">
<elements>
<element name="dockIcon" src="dockIcon.png" />
<element name="controlbarIcon" src="controlbarIcon.png" />
</elements>
</component>
Packaging your skin is as easy as zipping the skin XML file along with the subfolders containing the component graphics.
The XML file should named the same as the skin itself. For example, a skin called myskin would contain an XML file called myskin.xml, and would be zipped into myskin.zip. All images belong in their corresponding folders and reside on the same level as the XML file.
Once you have zipped everything up, using a skin is a matter of:
A number of example skins can be freely downloaded from our addons repository. Feel free to tweak any of these skins to make them fit your site design.