Warning: HTML preview using PygmentsRenderer failed (TypeError: function() takes at least 2 arguments (0 given))

source: trunk/fl5/doc/publishers/skinning.rst @ 1104

Revision 1104, 26.6 KB checked in by jeroen, 3 years ago (diff)

rewritten playlists/mediaformats/options guides and fixed crosslinks, references to 'type' and pdf rendering.

Line 
1.. _skinning:
2
3PNG Skinning
4============
5
6With 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.
7
8
9Supported Graphics Formats
10--------------------------
11
12JW Player 5 will accept most commonly used bitmap image formats including:
13
14 * JPG
15 * GIF (*Allows Transparency*)
16 * PNG (8-Bit) (*Allows Transparency*)
17 * PNG (24-Bit) (*Allows Transparency and Partial Transparency*)
18 
19Examples in this guide will use the PNG file format. It is the preferred format for creating slick skins due to its partial transparency support.
20
21JW 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.
22
23.. note:: Animated gif files are not supported.
24
25
26
27
28The XML Document
29----------------
30
31The 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.
32
33A player skin consists of its own settings and its components. Here is an example of an XML document before the elements have been defined:
34
35Basic XML Structure
36^^^^^^^^^^^^^^^^^^^
37
38.. code-block:: xml
39
40   <?xml version="1.0"?>
41   <skin version="1.0" name="SkinName" author="http://www.yoursite.com/">
42      <components>
43         <component name="controlbar">
44            <settings>
45               <setting name="..." value="..." />
46            </setting>
47            <layout>
48               ...
49            </layout>
50            <element name="..." src="..." />
51            <element name="..." src="..." />
52            <element name="..." src="..." />
53         </component>
54         <component name="display">
55            <settings>
56               <setting name="..." value="..." />
57            </setting>
58            <element name="..." src="..." />
59            <element name="..." src="..." />
60            <element name="..." src="..." />
61         </component>
62         <component name="dock">
63            <settings>
64               <setting name="..." value="..." />
65            </setting>
66            <element name="..." src="..." />
67            <element name="..." src="..." />
68            <element name="..." src="..." />
69         </component>
70         <component name="playlist">
71            <settings>
72               <setting name="..." value="..." />
73            </setting>
74            <element name="..." src="..." />
75            <element name="..." src="..." />
76            <element name="..." src="..." />
77         </component>
78      </components>
79   </skin>
80
81
82Beginning Your XML Skin
83^^^^^^^^^^^^^^^^^^^^^^^
84
85The 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*.
86
87.. code-block:: xml
88
89   <?xml version="1.0"?>
90   <skin version="1.0" name="SkinName" author="http://www.yoursite.com/">
91     
92You 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.
93
94Linking to Images
95^^^^^^^^^^^^^^^^^
96
97Images 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.
98
99Component sections
100^^^^^^^^^^^^^^^^^^
101
102The 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:
103
104 * controlbar
105 * display
106 * dock
107 * playlist
108 
109In 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.
110
111.. image:: ../images/skinning/Components.png
112   :alt: Components layout
113
114
115
116
117The Controlbar
118--------------
119
120The 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.
121
122XML Syntax
123^^^^^^^^^^
124
125.. code-block:: xml
126
127   <component name="controlbar">
128      <settings>
129         <setting name="backgroundcolor" value="0x000000"/>
130         <setting name="margin" value="10" />
131         <setting name="font" value="_sans" />
132         <setting name="fontsize" value="10" />
133         <setting name="fontcolor" value="0x000000" />
134         <setting name="fontstyle" value="normal" />
135         <setting name="fontweight" value="normal" />
136         <setting name="buttoncolor" value="0xFFFFFF" />
137      </settings>
138      <layout>
139         ...
140      </layout>
141      <elements>
142         <element name="background" src="file.png" />
143         <element name="capLeft" src="file.png" />
144         <element name="capRight" src="file.png" />
145         <element name="divider" src="file.png" />
146           
147         <element name="playButton" src="file.png" />
148         <element name="playButtonOver" src="file.png" />   
149         <element name="pauseButton" src="file.png" />
150         <element name="pauseButtonOver" src="file.png" />
151           
152         <element name="prevButton" src="file.png" />
153         <element name="prevButtonOver" src="file.png" />
154         <element name="nextButton" src="file.png" />
155         <element name="nextButtonOver" src="file.png" />
156           
157         <element name="stopButton" src="file.png" />
158         <element name="stopButtonOver" src="file.png" />
159           
160         <element name="timeSliderRail" src="file.png" />
161         <element name="timeSliderBuffer" src="file.png" />
162         <element name="timeSliderProgress" src="file.png" />
163         <element name="timeSliderThumb" src="file.png" />
164           
165         <element name="fullscreenButton" src="file.png" />
166         <element name="fullscreenButtonOver" src="file.png" />
167         <element name="normalscreenButton" src="file.png" />
168         <element name="normalscreenButtonOver" src="file.png" />
169           
170         <element name="muteButton" src="file.png" />
171         <element name="muteButtonOver" src="file.png" />
172         <element name="unmuteButton" src="file.png" />
173         <element name="unmuteButtonOver" src="file.png" />
174           
175         <element name="volumeSliderRail" src="file.png" />
176         <element name="volumeSliderBuffer" src="file.png" />
177         <element name="volumeSliderProgress" src="file.png" />
178         
179         <element name="blankButton" src="file.png" />
180         <element name="blankButtonOver" src="file.png" />
181      </elements>
182   </component>
183
184
185Settings
186^^^^^^^^
187
188In the example above, you will notice the bit of code containing the settings element for the ControlBar component. It looks like this:
189
190
191.. code-block:: xml
192
193   <settings>
194      <setting name="backgroundcolor" value="0x000000"/>
195      <setting name="margin" value="10" />
196      <setting name="font" value="_sans" />
197      <setting name="fontsize" value="10" />
198      <setting name="fontcolor" value="0x000000" />
199      <setting name="fontstyle" value="normal" />
200      <setting name="fontweight" value="normal" />
201      <setting name="buttoncolor" value="0xFFFFFF" />
202   </settings>
203
204Here is a list of the Controlbar settings, along with their default values:
205
206.. describe:: backgroundcolor (undefined)
207   
208   Color to display underneath the controlbar. If the controlbar elements are transparent or semi-transparent, this color will show beneath those elements.  If this is not set, the Flash stage will be visible beneath the controlbar.
209
210.. describe:: margin (0)
211   
212   This is the margin which will wrap around the controlbar when the player is fullscreen mode, or when the player's *controlbar* setting is set to **over**.  The value is in pixels.
213
214.. describe:: font (_sans)
215   
216   The font face for the Controlbar's text fields, **elapsed** and **duration**.  (*_sans*, *_serif*, *_typewriter*)
217
218.. describe:: fontsize (10)
219   
220   The font size of the Controlbar's text fields.
221
222.. describe:: fontweight (normal)
223   
224   The font weight for the Controlbar's text fields. (*normal*, *bold*)
225
226.. describe:: fontstyle (normal)
227   
228   The font style for the Controlbar's text fields. (*normal*, *italic*)
229   
230.. describe:: fontcolor (undefined)
231   
232   The color for the Controlbar's text fields.
233
234.. describe:: buttoncolor (undefined)
235   
236   The color for any custom Controlbar icons.
237     
238.. note: Color values are defined in a hexidecimal value for the color, just like in HTML/CSS. So, for instance, you can make a color red in HTML by assigning the corresponding HTML color code value of #FF0000. In this XML document, to make a color red you will input the value as 0xFF0000. As you can see, instead of # you use 0x.
239
240
241Background
242^^^^^^^^^^
243
244**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.
245
246
247Caps and Dividers
248^^^^^^^^^^^^^^^^^
249
250The 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.
251
252.. describe:: capLeft
253   
254   The left cap graphic to your controlbar skin
255   
256.. describe:: capRight
257
258   The right cap graphic to your controlbar skin
259   
260.. describe:: divider
261
262   A separator element between buttons and sliders.  *(this same element can appear multiple times)*
263
264.. 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.
265   
266Buttons
267^^^^^^^
268
269Buttons 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.
270
271The two states of the button elements are:
272
273 * **playButton** / playButtonOver
274 * **pauseButton** / pauseButtonOver
275 * **prevButton** / prevButtonOver
276 * **nextButton** / nextButtonOver
277 * **stopButton** / stopButtonOver
278 * **fullscreenButton** / fullscreenButtonOver
279 * **normalscreenButton** / normalscreenButtonOver
280 * **muteButton** / muteButtonOver
281 * **unmuteButton** / unmuteButtonOver
282 * **blankButton** / blankButtonOver
283 
284Toggle Buttons
285^^^^^^^^^^^^^^
286
287Certain 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.
288
289Toggle button pairs:
290
291 * **playButton** / pauseButton
292 * **fullscreenButton** / normalscreenButton
293 * **muteButton** / unmuteButton
294
295The TimeSlider
296^^^^^^^^^^^^^^
297
298The **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:
299
300.. describe:: timeSliderRail
301
302   the *background* graphic which serves as the frame for the timeSlider
303
304.. describe:: timeSliderBuffer
305
306   the file's buffer indicator
307   
308.. describe:: timeSliderProgress
309
310   the file's progress indicator
311
312Additional **timeSlider** elements:
313
314.. describe:: timeSliderThumb
315
316   serves as a handle which can be dragged across the progress bar to allow the user to specify a seek position.
317   
318.. describe:: timeSliderCapLeft
319
320   Left-hand end-cap, placed to the left of the **timeSliderRail** element.
321
322.. describe:: timeSliderCapRight
323
324   Right-hand end-cap, placed to the right of the **timeSliderRail** element.
325
326.. image:: ../images/skinning/timeSlider.png
327   :alt: TimeSlider Screenshot
328
329
330With 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.
331
332
333The VolumeSlider
334^^^^^^^^^^^^^^^^
335
336The **volumeSlider** element is quite similar to the **timeSlider**, except that it does not scale automatically.  It will be as large as graphics you produce. 
337
338.. describe:: volumeSliderRail
339
340   the **background** graphic which serves as the frame for the volumeSlider
341
342.. describe:: volumeSliderBuffer
343
344   this shows the potential volume the slider can have.
345
346.. describe:: volumeSliderProgress
347
348   this is shows the current level at which the volumeSlider is set.
349
350.. describe:: volumeSliderThumb
351
352   the handle to slide the volume, also indicates the volume level.
353
354.. describe:: volumeSliderCapLeft
355
356   Left-hand end-cap, placed to the left of the **volumeSliderRail** element.
357
358.. describe:: volumeSliderCapRight
359
360   Right-hand end-cap, placed to the right of the **volumeSliderRail** element.
361
362
363   the handle to slide the volume, also indicates the volume level.
364
365.. image:: ../images/skinning/volumeSlider.png
366   :alt: VolumeSlider Screenshot
367
368
369.. note:: JW Player 5's skinning model will add 5 pixels of padding to each side of the **volumeSlider** if no end-caps are specified.
370.. note:: JW Player 5.1 and below will fail to load without the **volumeSliderRail** element in the XML file.
371 
372BlankButton
373^^^^^^^^^^^
374
375The **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.
376
377Text Fields
378^^^^^^^^^^^
379
380Two text fields can be laid out in the controlbar:
381
382.. describe:: elapsed
383
384   Amount of time elapsed since the start of the video (format: mm:ss)
385   
386.. describe:: duration
387
388   Duration of the currently playing video (format: mm:ss)
389
390
391
392
393Controlbar Layout
394-----------------
395
396The controlbar's components (*buttons*, *text fields*, *sliders* and *dividers*) are laid out according to a block of XML code in the Controlbar section.
397
398Layout XML Syntax
399^^^^^^^^^^^^^^^^^
400
401Inside the controlbar's **<component>** block, you can insert an optional **<layout>** block which allows you to override the default controlbar layout.
402
403.. code-block:: xml
404   
405   <layout>
406      <group position="left">
407         <button name="play" />
408         <divider />
409         <button name="prev" />
410         <divider />
411         <button name="next" />
412         <divider />
413         <button name="stop" />
414         <divider />
415         <text name="duration" />
416         <divider />
417      </group>
418      <group position="center">
419         <slider name="time" />               
420      </group>
421      <group position="right">
422         <text name="elapsed" />
423         <divider />
424         <button name="blank" />
425         <divider />
426         <button name="mute" />
427         <slider name="volume" />
428         <divider />
429         <button name="fullscreen" />
430      </group>
431   </layout>
432
433Layout Groups
434^^^^^^^^^^^^^
435
436The Controlbar's layout is made up of three groupings, *left*, *right* and *center*.
437
438* **Left**:Elements placed in the **<group position="left">** tag will be placed left to right and be left-aligned.
439* **Center**: Elements placed in the **<group position="center">** tag will be placed between the *left* and *right* groups.  Furthermore, if the **timeSlider** element is placed here, it will be stretched to any space not assigned to other elements.
440* **Right**: Elements placed in the **<group position="right">** tag will be placed left to right and be right-aligned.
441
442Layout Elements
443^^^^^^^^^^^^^^^
444
445The **<group>** tag can contain the following elements:
446
447.. describe:: <button name="..." />
448
449   Used to place the Controlbar button elements described above.  For example, the **play** button would appear as **<button name="play" />**
450
451.. describe:: <text name="..." />
452
453   Used to place the Controlbar text elements, **elapsed** and **duration**.
454
455.. describe:: <slider name="..." />
456
457   Used to place the Controlbar slider elements, **timeSlider** and **volumeSlider**.
458
459.. describe:: <divider />
460
461   Used to place the **divider** element.  This tag can define two optional attributes (only one attribute may be used at a time):
462   
463* *element*: Allows an arbitrary element to be placed between other elements.  If no *element* or *width* attribute is set, the default **divider** graphic is used.  Example:
464
465.. code-block:: xml
466
467         <divider element="alternate_divider" />
468* *width*: If this attribute is set, the specified number of pixels will be placed into the layout.  No graphical element will be used; the controlbar's **background** element will be visible.  Example:
469   
470.. code-block:: xml
471
472         <divider width="10" />
473
474
475Controlbar Composition
476^^^^^^^^^^^^^^^^^^^^^^
477
478.. image:: ../images/skinning/controlBar.png
479   :alt: Controlbar Screenshot
480
481
482Default Element Order
483+++++++++++++++++++++
484
485If 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:
486
487 * capLeft
488 * playButton/pauseButton
489 * prevButton
490 * nextButton
491 * stopButton
492 * divider
493 * elapsedText
494 * timeSliderCapLeft
495 * timeSliderRail/timeSliderBuffer/timeSliderProgress/timeSliderThumb
496 * timeSliderCapRight
497 * durationText
498 * divider (*reused element*)
499 * blankButton
500 * divider (*reused element*)
501 * fullscreenButton/normalscreenButton
502 * divider (*reused element*)
503 * muteButton/unmuteButton
504 * volumeSliderCapLeft
505 * volumeSliderRail/volumeSliderBuffer/volumeSliderProgress/volumeSliderThumb
506 * volumeSliderCapRight
507 * capRight
508   
509
510
511The Display
512-----------
513
514The 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.
515
516.. image:: ../images/skinning/Display.png
517   :alt: Display Screenshot
518
519.. note:: By default, the **bufferIcon** will rotate clockwise while buffering.
520
521Display XML Syntax
522^^^^^^^^^^^^^^^^^^
523
524.. code-block:: xml
525
526   <component name="display">
527      <settings>
528         <settings>
529            <setting name="backgroundcolor" value="0x000000" />
530            <setting name="bufferrotation" value="15" />
531            <setting name="bufferinterval" value="100" />
532         </settings>
533      </settings>
534      <elements>
535         <element name="background" src="file.png" />
536         <element name="playIcon" src="file.png" />
537         <element name="muteIcon" src="file.png" />
538         <element name="bufferIcon" src="file.png" />
539      </elements>
540   </component>
541
542Display Settings
543^^^^^^^^^^^^^^^^
544
545Here is a list of Display settings, along with their default values:
546
547.. describe:: backgroundcolor (0x000000)
548   
549   This is the color of the player's display window, which appears behind any playing media.
550
551.. describe:: bufferrotation (15)
552   
553   The number of degrees the buffer icon is rotated per rotation.  A negative value will result in the buffer rotating counter-clockwise.
554
555.. describe:: bufferinterval (100)
556   
557   The amount of time, in milliseconds between each buffer icon rotation.
558
559
560
561The Dock
562--------
563
564Dock 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:
565
566 * button
567 * buttonOver (*the button's mouseover state*)
568
569.. image:: ../images/skinning/Dock.png
570   :alt: Dock Screenshot
571
572 
573Dock XML Syntax
574^^^^^^^^^^^^^^^
575
576.. code-block:: xml
577
578   <component name="dock">
579      <settings>
580         <setting name="fontcolor" value="0x000000" />
581      </settings>
582      <elements>
583         <element name="button" src="file.png" />
584         <element name="buttonOver" src="file.png" />
585      </elements>
586   </component>
587
588
589Dock Settings
590^^^^^^^^^^^^^
591
592Here is a list of the settings that can be placed in the dock's **<settings>** block, along with their default values:
593
594.. describe:: fontcolor (0x000000)
595   
596   The color for the Dock buttons' text fields.
597
598
599The Playlist
600------------
601
602There 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.
603
604
605.. image:: ../images/skinning/Playlist.png
606   :alt: Playlist Screenshot
607
608The following Playlist elements are available:
609
610.. describe:: background
611
612   Stretched behind the playlist items
613   
614.. describe:: item
615
616   Background graphic for each playlist item.  Stretch to the width of the playlist, minus the slider width (if necessary).
617
618.. describe:: itemOver
619
620   Over state for **item**.  Replaces **item** whenever the user mouses over.
621
622.. describe:: itemImage
623
624   Image placeholder.  This element is visible when the playlist item does not have an image associated with it.  If the playlist item image is present, **itemImage**'s shape serves as a mask around the playlist item image.  If the playlist item image has any transparency, **itemImage** will be visible behind it.
625   
626.. describe:: itemActive
627
628   Active state for **item**.  Replaces **item** whenever the corresponding playlist item is the currently playing/loaded playlist item.
629   
630.. describe:: sliderRail
631
632   Background of the vertical slider.  When the playlist's slider is visible, **sliderRail** is stretched to the height of the playlist, minus the height of any end caps.
633   
634.. describe:: sliderThumb
635
636   Draggable thumb for the vertical slider.  This element is stretched vertically, and is proportional to the visible area of the playlist versus its total size.  For example, if 50% of the playlist items are currently visible in the playlist, the thumb will be 50% of the height of the playlist.
637   
638.. describe:: sliderCapTop
639
640   Top end cap for the playlist slider.  Placed above **sliderRail**.
641
642.. describe:: sliderCapBottom
643
644   Bottom end cap for the playlist slider.  Placed below **sliderRail**.
645
646Playlist XML Syntax
647^^^^^^^^^^^^^^^^^^^
648
649.. code-block:: xml
650
651   <component name="playlist">
652      <settings>
653         <setting name="fontcolor" value="0x999999" />
654         <setting name="overcolor" value="0xFFFFFF" />
655         <setting name="activecolor" value="0x990000" />
656         <setting name="backgroundcolor" value="0x000000"/>
657         <setting name="font" value="_sans" />
658         <setting name="fontsize" value="12" />
659         <setting name="fontweight" value="normal" />
660         <setting name="fontstyle" value="normal" />
661      </settings>
662      <elements>
663         <element name="background" src="background.png" />
664         <element name="item" src="item.png" />
665         <element name="itemOver" src="itemOver.png" />
666         <element name="itemActive" src="itemActive.png" />
667         <element name="itemImage" src="itemImage.png" />
668         <element name="sliderRail" src="sliderRail.png" />
669         <element name="sliderThumb" src="sliderThumb.png" />
670         <element name="sliderCapTop" src="sliderCapTop.png" />
671         <element name="sliderCapBottom" src="sliderCapBottom.png" />
672      </elements>
673   </component>
674
675Playlist Settings
676^^^^^^^^^^^^^^^^^
677
678Here is a list of the settings that can be placed in the dock's **<settings>** block, along with their default values:
679
680.. describe:: fontcolor (undefined)
681   
682   The color for the Dock buttons' text fields.
683
684.. describe:: overcolor (undefined)
685   
686   The color for the Dock buttons' text fields when the mouse is hovering over that item.
687
688.. describe:: activecolor (undefined)
689   
690   The color for the Dock buttons' text fields when that item is the currently active item.
691
692.. describe:: backgroundcolor (undefined)
693   
694   The playlist's background color.
695
696.. describe:: font (_sans)
697   
698   Font used for the playlist's text fields (*_sans*, *_serif*, *_typewriter*)
699
700.. describe:: fontsize (undefined)
701   
702   Font size for the playlist's text fields.  By default, the playlist item's title has a fontsize of 13 pixels; the rest of the fields are 11 pixels.  If **fontsize** is set, all text fields will have the same font size.
703
704.. describe:: fontstyle (normal)
705   
706   Can be used to set the font style for the playlist's text fields (*normal*, *italic*)
707
708.. describe:: fontweight (normal)
709   
710   Can be used to set the font weight for the playlist's text fields (*normal*, *bold*)
711
712
713Plugins
714-------
715
716Some 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*.
717
718In the following example, the skin defines the HD plugin's two skinnable elements:
719
720.. code-block:: xml
721
722   <component name="hd">
723      <elements>
724         <element name="dockIcon" src="dockIcon.png" />
725         <element name="controlbarIcon" src="controlbarIcon.png" />
726      </elements>
727   </component>
728
729
730
731
732Packaging your Skin
733-------------------
734
735Packaging your skin is as easy as zipping the skin XML file along with the subfolders containing the component graphics.
736
737Zip File Structure
738^^^^^^^^^^^^^^^^^^
739
740The 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.
741
742 * *skin_name*.xml
743 * controlbar (folder with images)
744 * display (folder with images)
745 * dock (folder with images)
746 * playlist (folder with images)
747
748Once you have zipped everything up, using a skin is a matter of:
749
750* Uploading the skin to your server
751* Setting the :ref:`skin option <options>` in your player's :ref:`embed code <embedding>` to the URL of the ZIP file.
752
753Example skins
754^^^^^^^^^^^^^
755
756A number of example skins can be freely downloaded from our `addons repository <http://www.longtailvideo.com/addons/>`_. Feel free to tweak any of these skins to make them fit your site design.
Note: See TracBrowser for help on using the repository browser.