Wimpy MP3 Player API

Server Side

Actions:
serveMP3
downloadfile
dir
phpinfo
feedPlaylist
getCoverart
podcast

Directives:
wimpyConfigFile
media_types
wimpy_auth
getMyid3info
ecommerce
ecomWindow
useMysql
defaultVisualBaseName
defaultVisualExt
hide_folders
hide_files
startDir
getid3libPath
httpOption
blockPHPinfo

Client Side

wimpyApp
wimpySkin
startPlayingOnload
randomOnLoad
shuffleOnLoad
displayDownloadButton
autoAdvance
popUpHelp
forceDownload
startOnTrack
trackPlays
voteScript
getMyid3info
forceXMLplaylist
useSysCodePage
ecommerce
ecomWindow
useMysql
scrollInfoDisplay
infoDisplayTime
bufferAudio
theVolume
defaultImage
loopPlaylist
limitPlaytime
startupLogo

HTML display

wimpySkin
wimpySwf
bkgdColor
tptBkgd
wimpyHTMLpageTitle
useSysCodePage

 

 

 

SIFT playlist

SIFT stands for "Simple Flat Table" -- which is just an easier way to say, a simple UTF-8 text-based, flat-file, database table format.

By default, wimpy.php/asp/cfm returns Sift data (playlist) to the player. Using a Sift playlist is the most efficient way to get a large playlist into the player.

Wimpy can read both Sift and XML playlists. Wimpy determines what kind of playlist it is receiving by the extension of the file established with the wimpyApp option.

If the URL defined with wimpyApp ends with "xml" or "RSS," Wimpy will parse the incoming playlist data as if it were an XML playlist. If the URL does not end with "xml" or "RSS," Wimpy will parse the incoming playlist data as if it were a Sift-based playlist.

You can force Wimpy to always read incoming playlist data as if it were an XML playlist by using the forceXMLplaylist option -- regardless of whether the wimpyApp URL ends with "xml" or not. When forceXMLplaylist is set to "yes" Wimpy always reads the incoming playlist data as if it were and XML playlist.

Another sneaky way to "force" wimpy to recognize the incoming data as if it were an XML playlist is to tack on "?foo=bar.xml" to the end of the wimpyApp URL. This works because Wimpy only read the last three characters of the wimpyApp URL. When attempting to use this method, you must URL encode the '?foo=bar.xml" string as: %3Ffoo%3Dbar.xml so that the ? and or & symbols do not interfere with the other ? and & symbols that Wimpy uses to configure other settings.

The structure of a Sift playlist consists of three basic concepts: Items, Total Items and Data Setup. A simple example would look something like:

&item0=http://path/to/file.mp3|elo|my%20song&totalitems=1&datasetup=filename|artist|title

The efficiency of the Sift playlist hinges on the concept of creating a mini database table. Think of the "datasetup" variable as is if were the column names for a table. Each "item" would be a row in the table. The "totalitems" parameter defines how many items (or "rows") are available and enables Wimpy to iterate through the proper number of rows.

A pipe character is used to delimit each kind of data and allows for an association between datasetup and each "item." Think of the information between the pipes an "index" in an array -- or a "slot" to hold information.

When wimpy.php reads information about a track it puts the information into the proper "slot" -- if the data does not exist, or is un-readable, the slot is left empty, which ensures that the association between datasetup and the data for the item is maintained.

So for example, if datasetup is defined as:

&datasetup=filename | artist | title

And the artist name can not be determined, then the data for the item would be:

&item0=http://path/to/file.mp3 |    | my song

Extra spaces were included above for clarity, the end result would actually be output as:

&item0=http://path/to/file.mp3||my%20song&datasetup=filename|artist|title&totalitems=1

Each item must include a number immediately following the word "item," must start with zero and must be consecutive.

For example, to include three items in the playlist, you would output:

&item0=http://path/to/file1.mp3||my%20song%201
&item1=http://path/to/file2.mp3||my%20song
%202
&item2=http://path/to/file3.mp3||my%20song
%203
&datasetup=
filename|artist|title
&totalitems=3

The order in which the numbers appear does not have to be orderly, but there should not be any "gaps" in the numbering:

&item2=http://path/to/file3.mp3||my%20song%203
&datasetup=filename|artist|title
&item0=
http://path/to/file1.mp3||my%20song%201
&totalitems=3
&item1=http://path/to/file2.mp3||my%20song
%202

As long as there are no gaps in the consecutive numbering, the data will load OK.

Also, be aware the the data between the pipes must be URL encoded, and **should** be UTF-8.

 

 

 

 

 

 

.

See also:

defaultVisualExt, getMyid3info, wimpyApp

 

SIFT playlist (default)

 

 



©2002-2008 Plaino.