Player Options

Player options are configured at runtime when establishing a player in a web page. Below are examples for how to incorporate the options into your code:

HTML Example

<div data-media="track.mp3" data-autoplay="true" data-image="poster.jpg"></div>

 

Javascript Example

PKL_AddPlayer( { media: "track.mp3", autoplay: "true", image: "poster.jpg" } );

 

NOTE: For items that are "true" or "false" use a string (not a boolean).

Example:

Good: <div data-foo="true" ...></div>
Bad:  <div data-foo=true ...></div>

 

 

Available options are:

HTML Javascript Description Example
data-media media

Defines the media file or XML playlist to use in the player.

"path/to/file.mp3"

"path/to/playlist.xml"

 

data-startuptext startuptext

Sets the default text in the "Info Display" area (if available) before the player starts to play a track. (e.g. before the user clicks "play").

 

"Click To Start"
data-timeformat timeformat

Determines what gets shown in the "time display" area (if available). 

Pickle will replace the number value with the corresponding time signature.

For example, setting "timeformat" to "1  /  3" will yield something similar to: "1:23 /  3:16"

 

There are three types of time signatures available:

1. Current Time
2. Remaining Time
3. Total Time

 

 

data-infoformat infoformat

Sets the order that the "Info Display" text appears when Artist and Title information is available.

Also allows for customizing the seperater *** between the two scrolling "blocks"

Pickle will replace the number value with the corresponding "info" item.

Example:
1 - 2 ***

... will render :
Artist - Title *** Artist - Title

 

There are three types of "info" available:

1. Artist
2. Title
3. Album

 

 

data-loop loop

Will loop a single track continuously.

NOTE: Tracks will NOT loop seemlessly. There will be a small gap inbetween each loop.

 

"true"
data-random random

If using a playlist, tracks will be randomly selected.

 

"true"
data-autoplay autoplay

When set to "true", the player will start playing as soon as the player is loaded and ready.

 

"true"
data-image image

Sets the poster image to display before and after a track plays. Only available if there is a view port in the skin.

 

"poster.jpg"
data-artist artist

Sets or updates the Artist information in the "Info Display" window (If available).

 

"My Artist"
data-title title

Sets or updates the Title information in the "Info Display" window (If available).

 

"My Title"
data-album album

Sets or updates the Album information in the "Info Display" window (If available).

 

"My Album"
data-controls controls

Establishes which control elements to render in the player. The control elements must be available in the skin in order for them to be used.

When defining the "controls" option, separate each item with a comma.

Example:

"poster, screen_play, playpause, play, pause, rewind, next, mute"

Available Controls:

poster
screen_play
playpause
play
pause
rewind
next
mute
infoBkgd
info
time
scrubBkgd
scrubBar
loading
scrubHandl
thinker
playlist
playlistScrollBkgd
playlistScrollHandle

 

data-autoadvance autoadvance

Enable or disable the player from automatically advancing to the next playlist track.

 

 

"true" or "false"

 

 

Javascript Specific Options
className Establishes the class to use for the player when using Javascript to render a player. "myCSSclass"
id Sets the ID to assign to the player for additional CSS and Javascript control. "myID"
target Sets the target DIV to write the player into. If no target is defined, the player will be written where ever PKL_AddPlayer was called within the HTML code. "myID"