Media Control skins specification
Sections
Skin definition file must have these sections:
- [general]
- [options]
- [item#] where # is the zero based index of skin item
Section [general]
This section contain description of the skin. Values:
- SkinName - The name of skin
- Author - Name of author
- AuthorURL - The url of athor's home page (optional)
- AuthorEmail - The email of author (optional)
Section [options]
You must include the version=2 value to make skin compatible with newest version of Media Control. Other values:
- size = width height :the size of the skin. Write width and heigh of skin in pixels here
- background = image.png :the background picture of the skin.
These options are defined in the Media Control version 6.0:
- sizeNoPlayer = width height :the size of the skin when no player opened. Write width and heigh of skin in pixels here. This the optional parameter.
- backgroundNoPlayer = image.png :the background picture of the skin when no player opened. This the optional parameter.
- trans-player-noplayer, trans-noplayer-player: the image file name with transition animation frames tiled horizontaly or vertically. TLB play this animation when player is opened or closed. You can difne the one transition image. If plugin will play the animation in the reverse order if there no the second image.
- trans-player-noplayer-frames, trans-noplayer-player-frames: the transition frames count in the image file.
These options are defined in the Media Control version 6.1:
- transIsVertical: 0 - if the transitions images in the trans-player-noplayer, trans-noplayer-player values contain the horizontal tiled frames; 1 - if the image contain the vertical tiled frames. If this parameter is omitted, the frames are tiled into the greatest side.
You must include one of the size or background values. If you background value is included then the size value will be ignored and the size of plugin will be set into the background picture size. For background picture you can use PNG format files only.
Sections [item#]
Every element of skin must be in separate section with item0, item1, item2 etc. names. The values depends of item type. There are 4 item types: button, artwork, roller and animation.
BUTTON:
include value:
type = button
to make the button. Other values:
- command :the command for the player
- rect :rectangle of the button in the form left top right bottom
- font :font name for the text (if command does not have text this value is ignored)
- bold :1 if text must be bold or 0 for normal text
- italic :1 if text must be italic or 0 for normal text
- align :can be left(default) right or center The alignment of the text
- image :PNG image file for the button
- overStateImages :Number of images in the button image
- state# :the state values in the button image
- color :The color of the text in the form: red green blue
- colorOver :The color of the text when mose is over it. red green blue
- colorDown :The color of the text when button is pressed. red green blue
- colorDisable :The color of the text when button is disabled. red green blue
- skinTextChars :The string of chars that must be skinned
- skinTextImage :The image of the skinned text
- overStateSkinText :Number of over-states images in the text skin
These options are defined in the Media Control version 6.0:
- showWithPlayer: 1 (default) show element when the player is opened; 0: hide element if the player is opened
- showWithOutPlayer: 1 (default) show element when the player is not opened; 0: hide element if the player is not opened
- noMouse: 0 (default) element can change state on mouse move or click; 1: element ignore the mouse
- glowSize: the text glow size in the pixels
- glowColor: The color of the text glow in the form: red green blue
- glowColorOver: The color of the text glow when mose is over it. red green blue
- glowColorDown: The color of the text glow when button is pressed. red green blue
- glowColorDisable: The color of the text glow when button is disabled. red green blue
- textAlpha: The transparency level of the text: 0-255
- textAlphaOver: The transparency level of the text when mose is over it. 0-255
- textAlphaDown: The transparency level of the text when button is pressed. 0-255
- textAlphaDisable: The transparency level of the text when button is disabled. 0-255
- skinTextChars#: # is the index beginning with 1. The additional string of chars that must be skinned
- skinTextImage#: # is the index beginning with 1. The additional image of the skinned text
- trans-<overstate1>-<overstate2>: the image file name with transition animation frames tiled horizontaly.
Replace the <overstate1> and <overstate2> with one of the following values:- normal
- over
- down
- disable
trans-normal-over = trans-normal-over.png
TLB will play transition from the over to the normal state in reverse order. The size of the each frame must me the same as the image in the image parameter. - trans-#-#-<overstate>: the image file name with transition animation frames tiled horizontaly or vertically. This parameter defines the transition from one state to the other. Replace # with the state index (zero based). The state index is the same as for the state# values. The <overstate> can be normal, over, down, disabled. The size of the each frame must me the same as the image in the image parameter.
Every button must have the command that it send to player. Player can return the text for the command also. This text can be Artist Name, Track Title etc. The commands are depends of player you have selected in the the Media Control properties. Anyway there are some commands that must be supported almost all players:
- playpause :Togle play/pause state. Also have two states "pause" and "play"
- stop :Stop player
- play :Play currect track
- pause :Pause current track
- next :Play next track
- prev :Play previouse track
- title :title of current track (text)
- album :Album name of current track (text)
- artist :Artist name of current track (text)
- trackname :Track name only (text)
- tracktime :Duration of track (text)
- volume :Volume
- mute :Mute state. State can be "on" and "off"
- eject :Eject/open
- quit :Close player
- shuffle :State can be "on" and "off"
- repeat :State can be "on" and "off"
- *playlist :Opens menu with playlist
To set the button command write the command value in the [item#] section. Example:
[item0]
type=button
command=playpause
image=play.png
state0=pause
state1=play
rect=0 16 19 35
In this example you create the button that Togle play/pause state. Also you can see the state# values in this example. Using the states you can change the buttons depend of the player state.playpause command have two states: pause (when player is stopped or paused) and play (when player play something). The play.png must have button images for every state:
The first column have the image for "pause" state and the second column have image for the "play" state. In the rows the images of button for: Normal, When mouse is over the button, For pressed button and for disabled button. You can control the count of the over-state by using overStateImages value. Set this value into 1, 2, 3 if you do not want to implement some over-states.
ARTWORK:
include value:
type = artwork
to make the artwrk. Other values:
- rect :rectangle of the artwork image in the form: left top right bottom
Please note, not all players supports the album artworks.
ROLLERS:
Rollers is used to adjust volume, track time etc. To make rolles include value:
type=roller
Rollers can be "horizontal" (rollerType=horizontal), "vertical" (rollerType=vertical) or "knob"(rollerType=knob)
For vertical/horizontal rollers:
- thumb=thumb.png : thumb.png is the thumb image file in PNG format
- invert=1 to invert the roller positions of min and max values
For knob roller:
- invertX - invert the horizontal min/max positions
- invertY - invert the vertical min/max positions
- minAngle - Minimum angle (Degrees)
- maxAngle - Maximum angle (Degrees)
- rotate - Additional rotation (Degrees)
- thumb - the thumb image file in PNG format
- centerX - the X of the center from the left/top corner of the button
- centerY - the Y of the center from the left/top corner of the button
- radius - the radius of the rotation
Also you must include the image value like for buttons. Image must have two state: the roller at the left of thumb and the roller at the right of thumb:
Also you can include the the over-state images.
ANIMATION:
include value:
type = animation
to make the artwrk. Other values:
- rect :rectangle of the artwork image in the form: left top right bottom
- showWithPlayer: 1 (default) show element when the player is opened; 0: hide element if the player is opened
- showWithOutPlayer: 1 (default) show element when the player is not opened; 0: hide element if the player is not opened
- frames: the image file with the animation frames tiled horizontaly.
- framesCount: the frames count in the image file.
- repeatType: forward - each new iteration starts with the first frame; forward-back - play animaition in straight order and the in reverse order.
- whenPlay: always - play animation always; state-changed - play when the parameter is changed; state - when state is equal the value from the value parameter.
- param: any command with states
- value: the state value
- stopFrame: defines the frame when animation is stopped. hide - don't draw any frame; first - show the first frame; current - show the current frame (where animation is stopped)
- playCount: set this parameter into 0 to play animation always. Or set it into any number to play it some times.
- speed: the animation speed. 0 is the maximum speed, the larger value is lower speed.
- isVertical: 0 - if the images in the frames value contain the horizontal tiled frames; 1 - if the image contain the vertical tiled frames. If this parameter is omitted, the frames are tiled into the greatest side.
Players specific commands and states
iTunes
- repeatall : states "off", "on"
- repeatoff : states "off", "on"
- repeatone : states "off", "on"
foo2k
- order:random
- order:repeat
- order:default
- order:repeatone
- order :States "random", "repeat", "default", "repeatone"
QCD
- genre (text)
- bitrate (text)
- samplerate (text)
- channels (text)
jetAudio
- repeatall :States "on", "off"
- repeatoff :States "on", "off"
- repeatone :States "on", "off"
- diskmode :States "on", "off"
- filemode :States "on", "off"