The ‘Advanced’ mode editor gives direct access to the player CSS and XML, virtually providing a limitless way to customize the player. Changes can be made directly to the code and instantly reflected by selecting the ‘Preview’ button at the bottom of the code editor. The sections that follow provide guidance on accomplishing common customizations.
6.1 Text Size, Font and Color
Changing the size and color of the different text elements is very easy. Simply look for the
fontSize and
color styles inside of the appropriate class and adjust the values to your liking.
Some elements have special names in addition to or in place of
fontSize and
color. For example, in the
BasicPlaylist class (the class that controls the look of a playlist) you’ll find
headerFontSize,
timeFontSize, and
nowPlayingFontSize – all of which allow you to set different values for each text element.
The font used to display text in the playlist can be easily set by adding the
fontFamily style to the
BasicPlaylist class. In the following example we set the playlist font to 'times':
6.2 Control Bar
Changing the background color of the control bar is a great place to start customizing and can offer some dramatic results.
There are 3 styles within the
ControlBar class that affect the control bar colors:
backgroundGradientColors,
backgroundGradientAlphas and
backgroundGradientRatios. The
backgroundGradientColors is a list of hex values (e.g. white is #FFFFFF) that make up the gradient colors of the control bar background. The
backgroundGradientAlphas is a list of numbers that correspond to the colors in
backgroundGradientColors and represent the alpha, or transparency of each of those colors. The range for each is 0 (totally transparent) to 1 (totally opaque). The
backgroundGradientRatios is a list of numbers that correspond to the colors in
backgroundGradientColors and represent the location of each of those colors over the spread of the gradient. The range of values begins at 0 (the start of the gradient) and ends at 255 (the end of the gradient). The background gradient for the control bar starts at the top and goes downward, so 0 represents the very top of the control bar and 255 represents the very bottom. If, for example, you wanted an evenly spread gradient of opaque Red – White – Blue with White in the dead center of the control bar, you’d enter the following values:
backgroundGradientColors: #FF0000, #FFFFFF, #0000FF;
backgroundGradientAlphas: 1, 1, 1;
backgroundGradientRatios: 0, 127, 255;
It’s important to note that although you can enter as many or few colors for your gradients as you want, you must match that same number of values for each of the three styles. For example, if there are 5 gradient color values, you need 5 alpha values and 5 ratio values. Likewise, if you wanted a single, solid color – you simply enter 1 hex value, 1 alpha and 1 ratio (0). This parity holds true for every instance of gradient colors you’ll find throughout the styles.
6.3 Player Buttons
The first step in styling your buttons is setting the global fill, hover, stroke and stroke hover colors (and of course the appropriate alphas and ratios). For example, if you wanted a slightly chrome-looking style for your buttons you could enter the following values into the
ControlBarButton class:
fillColors: #FFFFFF, #ABABAB, #ABABAB, #FFFFFF;
fillAlphas: 1, 1, 1, 1;
fillRatios: 0, 75, 155, 255;
hoverFillColors: #ABABAB, #FFFFFF, #FFFFFF, #ABABAB;
iconStrokeColor: #3E3E3E;
iconStrokeHoverColor: #ABABAB;
Notice that the hover values are simply the inverse of the normal state. This is a quick and easy way to show your users the state of your buttons without having to come up with a ton of different colors and styles. There are 3 other styles should you want to customize further:
iconGlowColor,
iconGlowAlpha and
iconGlowRadius. These styles specify a glow effect shown when the user rolls their mouse over a button.
The
ControlBarButton colors take care of all of the buttons except the Play button, which is handled separately. We added a separate style for the Play button so you could make it stand out from the other buttons – drawing your users’ focus and encouraging interaction. To change the Play button’s colors you edit the
playIconFillColors style inside the
ControlBar class. You need to include the same number of gradient values here as you included in the
fillColors for all buttons. The hover state remains as you set it in the
controlBarButton class.
Lastly, when you roll over the Volume button you see the Volume Slider popup. These styles are located in the
VolumeSlider class. The color and transparency of the popup background are handled by the
backgroundColor and
backgroundAlpha styles. The color of the slider track itself is the
trackBackgroundColor. The color of the slider that shows below the thumb is the
trackFillColor. You can dictate the length of the Volume Slider Track by setting the
sliderWidth style in the
VolumeControl class.
6.4 The Progress Bar
The progress bar is where you view the media’s progress and can jump directly to any point in the stream by clicking on the track or dragging the scrubber thumb (this process is called scrubbing). The progress bar styles are found in the Scrubber class.
The styles that dictate what the track looks like are the fill and border colors, alphas and ratios. If you set the left, top, right and bottom padding to 0, you won’t see the border at all. To change the color of the scrubber thumb itself edit the thumbColor style.
6.5 Custom Play Overlay Button
Customizing the play overlay button is a quick and easy way to make the player reflect your brand. The conventional 'triangle' can be replaced with a corporate logo or image by simply adding a few styles to the
playOverlay class. For example, the following styles are used to create the overlay in the player below:
downIconImageUrl: "http://pluggd-public-read.s3.amazonaws.com/3c6fb16add8a4928b9e0fcdd876ed5cd/0";
overIconImageUrl: "http://pluggd-public-read.s3.amazonaws.com/3c6fb16add8a4928b9e0fcdd876ed5cd/0";
upIconImageUrl:"http://pluggd-public-read.s3.amazonaws.com/28f2311ad8c240cdb676276d5360f9ea/0";
disabledIconImageUrl: "http://pluggd-public-read.s3.amazonaws.com/28f2311ad8c240cdb676276d5360f9ea/0";
6.6 Setting the Player Language
By default, the player will automatically detect the viewer's OS language and adjust the controls to accommodate. For example, if a Japanese viewer loaded a player the controls would automatically display in Japanese. If you would like to override auto-detection or if you would like the player to only show a particular language, simply add (or modify, if the line already exists) the following line to the player 'XML' substituting your desired values. The line should be added at the top, right below the player declaration.
<delvePlayer version="2.0" showPlaylist="false" showTabs="false" showOverlays="true" height="321" width="480">
<localize defaultLanguage="ja" autoSelectLanguage="false"/>
The code above would result in a Japanese player with no auto-detection.
The following languages are currently supported:
| Code |
Language |
| ar |
Arabic |
| de |
German |
| en |
English |
| es |
Spanish |
| fr |
French |
| it |
Italian |
| ja |
Japanese |
| ko |
Korean |
| nl |
Dutch |
| pt |
Portuguese |
| pt-br |
Portuguese (Brazil) |
| ru |
Russian |
| zh |
Chinese |
| zh-hk |
Chinese (Hong Kong) |
| zh-tw |
Chinese (Taiwan) |
6.7 Adding Custom Header Images and Links
Additional images can be added to a player by declaring 'logo' tags in the player XML. For example, you can add linkable images that direct the user to various pages on your site. In the example below we have declared four images that each represent a specific page on the publisher's site. Images can be added to both the player and playlist by declaring a
<videoHeaderLogo> tag or a
<playlistHeaderLogo> tag in the player XML. The following code is used to create the links for 'Video', 'Photos', 'News' and 'Blogs' in the player below. Notice that the tag attributes are used to declare the location of the image as well as the image url and click url.
<delvePlayer version="2.0" showPlaylist="true" showTabs="false" playlistOrientation="inline" height="371" width="470">
<videoHeaderLogo verticalAlign="middle" horizontalAlign="right" source="http://pluggd-public-read.s3.amazonaws.com/536ffb15555b46e795908275cf6e3416/0" linkUrl="http://blogs.nfl.com"/>
<videoHeaderLogo verticalAlign="middle" horizontalAlign="right" source="http://pluggd-public-read.s3.amazonaws.com/718a6d6d232b48b8a720716804a8f022/0"/>
<videoHeaderLogo verticalAlign="middle" horizontalAlign="right" source="http://pluggd-public-read.s3.amazonaws.com/25610be8834a4a48af8d0f6266c52864/0" linkUrl="http://nfl.com/news"/>
<videoHeaderLogo verticalAlign="middle" horizontalAlign="right" source="http://pluggd-public-read.s3.amazonaws.com/718a6d6d232b48b8a720716804a8f022/0"/>
<videoHeaderLogo verticalAlign="middle" horizontalAlign="right" source="http://pluggd-public-read.s3.amazonaws.com/7a24434d3f564e27949775c5e6e881f5/0" linkUrl="http://nfl.com/photos"/>
<videoHeaderLogo verticalAlign="middle" horizontalAlign="right" source="http://pluggd-public-read.s3.amazonaws.com/718a6d6d232b48b8a720716804a8f022/0"/>
<videoHeaderLogo verticalAlign="middle" horizontalAlign="right" source="http://pluggd-public-read.s3.amazonaws.com/e9bb19cf508e46879da3f2b0b102c1cd/0" linkUrl="http://nfl.com/videos"/>