AV Flash
Players : a skinable Flash application for websites that streams FLV, MP3,
SWF, JPG, & MID files
ƒlash AV Player is
designed to work viewed from a browser with an internet connection.It
can be used as a stand alone application but you won't have access to
some of the parameters that can be modified from a web page (on Mac OS X, the stand alone player will parse and play local files from your media folder and load individual media)
The basic principle to keep in mind is: The player (the skin file)
is called within a page, loads its program (the _pfs.swf file), then loads
an XML playlist file holding the path ways to your media subfolders and
files. The easiest way to start is just to let the player read your media
directory and make its own playlist out of it. You will then be able to
customize playlists and build all the categories you want.
Plug and play easy start:
1/ Place the player(s), its hosting html page, and the _pfs.swf file in
any chosen/created folder of your hosting server directory.
2/ In this folder create a subfolder, name it "media".
3/ Put "playlist.php" and all your media content (subfolders
and files) in the "media" subfolder.
4/ From your favorite web browser, connect to the html page and start
streaming.
which will look like:
www.domain.com¬ |
| |
...
...
...
streaming_folder ¬ |
| |
|
_pfs.swf
AV_player.html
AV_player.swf
media ¬ |
| |
|
|
playlist.php
mp3
video
images
etc... |
start streaming @ http://www.domain.com/streaming_folder/AV_player.html |
Note: If you intend to stream media content out of
the subdomain of the page, use an absolute url to embed the player, and
always keep the skin file, _pfs file, and the media content together in
the same subdomain.
Customizing
your playlist
Now that everything is working you might want to make some other playlists,
give a multiple connection choice, put backgrounds and comments to your
sound tracks, and create categories that are not obvious from your subfolders
tree.
First of all you have to embed the player passing "custom=true" in
its url. This will switch the player from reading the auto playlist.php
to reading a custom playlist.xml. It will look like : myPlayer.swf?custom=true.
Note: Remember that all (relative) paths are always
relative to your media folder hosting your XML playlist.
Here are simple steps to get started (using the Aquavideo Player skin
here, as an example -the one just on your left ;-) :
1/ If you intend to have a choice of different encodings,
create one subfolder per encoding in your "media" folder".
Then, make one version of each media file per encoding (FLV, SWF or MP3), and
put it in its corresponding folder (keep the same name for each version).
2/ If you intend to display JPEGs (as an album or/and
as backgrounds): create another subfolder in the "media" folder (or the corresponding media subfolder of the playlist),
name it "backgrounds", and put in all the JPEGs.
At this point, your files and folder map is all set. Next, comes the playlist
that will manage its content.
3/ Now, lets make that XML playlist (what
the XML playlist does is to tell the player how you want to list your
tracks and how the related files are maped).
a/ Open the av_XML_generator.swf
b/ Choose the "open media directory" option or the "new
playlist from scratch" if you want to start from an empty playlist.
This brings you to the PLAYLIST menu
c/ Rename playlists by entering new names in their fields. When using
the "open directory" option, the generator makes one playlist
per subfolder and give it the same name.
d/ GO to the TRACK menu by clicking a playlist.
e/ Enter the name of the track file that should be played as index #1,
and eventually: the path (relative to your media folder) of the image
you want as a background of this track, and -if different from the name
of the track file- the url to load the file from. If you want to write
a comment that will display with the track, click the button on the left
of the index and enter your comment.
f/ Click the "new track" button and repeat step 6/e for as many
tracks as you want to add. At the end you can change tracks orders by "swaping" the
lines with the up and down arrows.
g/ GO to the "INFOS" menu.
h/ If your tracks have several encodings, fill in the Kbps choices fields.
If your tracks are all MP3s or all JPEGs, change the extension field to
the correct value (.mp3 or .jpg).
i/ Your playlist is done.
j/ If you want to add or modify other playlists, GO back to the "PLAYLISTS" menu,
click "new playlist" button and repeat steps 6/c to 6/j for
as many playlists as you want. At the end you can change playlist orders
by "swaping" the lines with the up and down arrows.
k/ GO to the "generate..." menu.
l/ Copypaste the generated code in a text file and name it playlist.xml
m/ Save the file, place it in the "media" folder. Your XML playlist
is finished.
4/ You are done. Open the player and play your tracks.
Example
Lets take an example where you use the Aquavideo player:
1/ You want to broadcast 2 MP3 sound tracks (My
Favorite song & My Other Favorite Song) with 3 encoding
choices (32 Kbps, 64 Kbps, or 128 Kbps), 2 FLV movie clips (My Favorite
Clip & My Other Favorite clip) with 2 encoding choices (Low
or Medium) & one comment for each track, and a 4 JPEG pictures Gallery
(My Favorite Picture, My Other Favorite Picture, Some Other
Favorite Picture, & Some Other Picture).
2/ You want to have 3 playlists (in the following order): My
Favorite Sountracks with all your sound tracks, My Favorite
Movies with all your movie tracks, & My favorite Images with
all your pictures and that you want to have My Favorite Picture as
a background of My Favorite Song and My Other Favorite Picture as
a background of My Other Favorite Song.
3/ You want the player to connect to the mediumBandwidth
folder by default.
Your streaming_folder should loo like this:...
streaming_folder ¬ |
| |
aquavideo.html
aquavideo.swf
_pfs.swf
media ¬ |
| |
|
playlist.xml
lowBandwidth ¬ |
| |
|
|
My_Favorite_Clip.flv
My_Favorite_Song.mp3
My_Other_Favorite_Clip.flv
My_Other_Favorite_Song.mp3 |
| |
mediumBandwidth¬ |
| |
My_Favorite_Clip.flv
My_Favorite_Song.mp3
My_Other_Favorite_Clip.flv
My_Other_Favorite_Song.mp3 |
| |
highBandwidth¬ |
| |
My_Favorite_Song.mp3
My_Other_Favorite_Song.mp3 |
| |
backgrounds ¬ |
| |
My_Favorite_Picture.jpg
My_Other_Favorite_Picture.jpg
Some_Other_Favorite_Picture.jpg
Some_Other_Picture.jpg |
...your playlist.xml should look like this: |
<?xml version="1.0"?>
<PLAYLISTdb>
<!-- begin playlists-->
<PLAYLIST name="My Favorite Soundtracks" author="My
Self" defaultKbps="mediumBandwith" Xtension=".mp3">
<KBPS folderpath="lowBandwith">32Kbps</KBPS>
<KBPS folderpath="mediumBandwith">64Kbps</KBPS>
<KBPS folderpath="highBandwith">128Kbps</KBPS>
<!--begin track list -->
<TRACK name="My
Favorite Song" img="My_Favorite_Picture.jpg"/>
<TRACK name="My
Other Favorite Song img="My_Other_Favorite.jpg"/>
<!--end track list-->
</PLAYLIST>
<!--end playlist-->
<PLAYLIST name="My Favorite Movies" author="My
Self" defaultKbps="mediumBandwith" Xtension=".flv">
<KBPS folderpath="lowBandwith">Low</KBPS>
<KBPS folderpath="mediumBandwith">Medium</KBPS>
<!--begin
track list -->
<TRACK name="My
Favorite Clip">My Favorite Cip's
comment</TRACK>
<TRACK name="My
Other Favorite Clip">My Other Favorite
Clip's comment</TRACK>
<!--end track list-->
</PLAYLIST>
<!--end playlist-->
<PLAYLIST name="My Favorite Images" author="My
Self" Xtension=".jpg">
<!--begin track list -->
<TRACK name="My
Favorite Picture"/>
<TRACK name="My
Other Favorite Picture"/>
<TRACK name="Some
Other Favorite Picture"/>
<TRACK name="Some
Other Picture"/>
<!--end track list-->
</PLAYLIST>
<!--end playlist-->
</PLAYLISTdb>
<!---------- end of file ----------> |
|
|
Now, all you have to do is put your AV players folder
where ever you want (somewhere in your HD or on any Internet server) and
connect to the url of the HTML page in that folder.
Variables
that can be passed to the player in the flash object of the HTML page or when enclosed in a movie clip
(variable_1=value_1&variable_2=value2...&variable_n=value_n)
| variable |
=value |
| custom |
= true if you want the player to play from a custom playlist |
| folder |
= name of the alternative media folder relative to the root folder
hosting the player |
| filePrefX |
= eventual prefix of "playlist.xml" |
| PLindex |
= rank # of the default playlist to be loaded when opening the player |
| id |
= rank # of the default track to be loaded when opening the player |
| playlistNb |
= limited number of the first playlists to be loaded when opening
the player |
| playlist |
= true if the player should show the playlist on opening |
| loopTrack |
= true if the player should open in "loop track " mode |
| autoLoop |
= true if the player should open in "loop all" mode |
| pauseTrack |
= true if the player should open in "pause after each track" mode |
| randomTrack |
= true if the player should open in "random track" mode |
| allPlaylists |
= true if the player should open in "play all lists" mode |
| autoPlay |
= true if the player should auto play when opening |
| fullscreen |
= true if the player should auto play in fullscreen mode |
| _scale |
= a scale attribute to resize the player at launch |
| variables |
= (variable_1 = value_1)(variable_2 = value_2) ... (variable_n =
value_n) *: a list of variables to pass to the playlist.php |
singleTrack
singleName |
variables = (singleTrack = fileName)(singleName = aLabel) *: when passed to the playlist.php, the generated playlist will only contain the file specified by singleTrack and the player will display singleName as its name |
| lang |
= fr (french) or eng (english) or de (german) - sets the player main
language. |
| includeComments |
= true if track comments should be included in the playlist scroller
(default is false). |
* no spaces
Optional attributes
that can be passed to the player from the XML playlist for each playlist or track
(attribute="value")
| attribute |
="value" |
| <PLAYLISTdb> tag |
| name |
= name of the whole playlists list |
| FLV |
= the flv extension used by your flv files (default is "flv") * |
| SWF |
= the swf extension used by your swf files (default is "swf") * |
| MP3 |
= the mp3 extension used by your mp3 files (default is "mp3") * |
| JPG |
= the jpg extension used by your jpg files (default is "jpg") * |
| MID |
= the mid extension used by your mid files (default is "mid") * |
| <PLAYLIST> tag |
| author |
= name of the author attached to this playlist |
| subfolder |
= subfolder of the media folder countaining the tracks (track paths, if not absolute, will be relative to this subfolder) |
BGproperties
|
= color hexadecimal, alpha, x position, y
position, mask ID of the background object of the player (result depends
on the content of each skin's background) |
| <TRACK> tag |
| encrypted |
=1 if you want to redirect the track url through the nocache.php file. This will hide and avoid tracks to be cached by the browser. |
| rating |
=1-5 (or any rating scale). This will add as many '*' following the track name. |
| item_name |
for e-commerce option only.The name of the item that should appear when adding to cart. |
| price |
for e-commerce option only. The price that should be linked to the item. |
* in case you want to hide extension names from the user's activity window
Main functions
that can be called by external
swf using localConnection
//code in the sending swf
sending_av = new LocalConnection();
sending_av.send("av_local", "av_func",func, arg1,arg2,arg3,arg4);
// where func is the string reference of one of the bellow functions |
| functions |
description |
| outsideCtrl(a,b) |
where a is the playlist id to jump to and b the track
id in that playlist. |
| prevTrack() |
previous track - will reset the player if current track
is #1 of the playlist. |
| nextTrack() |
next track - will reset the player if current track
is the last track of the playlist. |
| pressRwdBUT() |
rewind the current track. |
| releaseRwdBUT() |
stop rewinding the current track. |
| pressRwdBUT() |
wind the current track. |
| releaseRwdBUT() |
stop winding the current track. |
| StopControl() |
stops and reset the player |
| PlayControl() |
plays the current track |
| PauseControl() |
pause the current |
| playmode() |
switches different playmode |
Embeding the player to open in playlist mode
In the embeded <object> of your html page, just pass the
variable and value: playlist=true after your player's url.
Dynamic backgrounds
You can change the Color, the Alpha percentage, the x offset, the y offset,
the scale factor, and the mask of each skin's designed background. To
change these properties, you have to set the BGproperties attribute
for each playlist in the playlist.xml OR pass this variable after the
url of the player. The format of the BGproperties value is : html
color(without the "#"),alpha percentage, x offset, y offset,
scale factor, mask ID.
To explain:
BGproperties is made of 6 fields, each separated by comas:
1st field: the html color that will eventually fill in the background
object. If the background is an image, the image will be "painted" by
that color. So you will only see a fill in color.
2nd field: the alpha (no-transparency) percentage of that background.
3rd field: a horizontal/x position for the background - In some skins,
the background image embeded in the player goes beyond the stage area,
which means there is room to scroll it to different position.
4th field: a vertical/y position for the background (same as above).
5th field: a scale factor to resize the background graphics. Can have
any value starting from 0. This is useful when resizing the player but
wanting the background to remane the same so it fits an image background
in the HTML page.
6th field: a mask nb starting from 1 (default) to as many mask where implemented
in the skin, that will eventually give a different overall shape to the
player.
You don't have to fill in all fields if not necessary but you have
to leave the comas so the program knows that nothing happens there.
When displaying different settings for each playlist, the Color can set
to no_change to remain as the previous setting. If the Alpha
is left empty, it will be set to 100 by default. If no value at all is
set to BGproperties, then the variable is ignored and all parameters
will remain as they are at the time moment. To remove the entire background,
you can set BGproperties to BgOff (or just turn its alpha to
0).
Auto Play, Auto Loop, loopTrack, pauseTrack, and randomTrack
To have the player play one specific track from a playlist, you have to
set the autoPlay variable in the embed src of the .swf. To be
activate, its value should be set to 1. You can also specifie which track
to play with the id variable (set to the track number) and which
playlist (the PLindex variable). If no id or PLindex is
specified the player will play the first id of the first playlist.
You can set the player to Auto Loop, Track Loop, pause at the end of each
track, play a random track in the same way by using the autoLoop, loopTrack, pauseTrack and randomTrack variables.
Example for the aquaplayer.swf autoplaying (autoPlay=1)
and looping (autoLoop=1) the 3rd track (id=3) of the
2nd playlist (PLindex=2):
|
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="290" height="298">
<param name="movie" value="aquaplayer.swf?custom=true&autoPlay=1&autoLoop=1&id=3&PLindex=2">
<param name="quality" value="high">
<param name="BGCOLOR" value="#FFFFFF">
<embed src="aquaplayer.swf?custom=true&autoPlay=1&autoLoop=1&id=3&PLindex=2" width="290" height="298" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#FFFFFF"></embed>
</object>
|
| *note: these variables can be added in the embed src with the ones
from other examples.
Launching the player to play any track from any playlist
You can open the player with a classic popup window java script and have
it play the track you want from any chosen playlist. Just pass the correct
variables (as seen above) in the window url of the script and use the
following script (in the player's page) to embed the player. Just replaceof
the classic <object></object> tag by embedPlayer(yourSkinURL,itsWidth,itsHeight,theDesiredBackgroundColor)
- if the background color is set to "" it will embed the player
as a transparent flash:
|
<SCRIPT language="JavaScript" type="text/JavaScript">
//***********************************************|
// embed flash AV player
//***********************************************|
function embedPlayer(playerUrl,playerWidth,playerHeight,playerBgColor) {
var postUrl=location.search;
if (playerUrl.indexOf("?")!=-1 && postUrl
!="") {
av_player=playerUrl+"&"+postUrl.split("?")[1];
} else {
av_player=playerUrl+postUrl;
}
object= "<object
classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0'
width='"+playerWidth+"' height='"+playerHeight+"'
id='player'>";
object+="<param
name='movie' value='"+av_player+"' />";
object+="<param
name='quality' value='high' />";
object+="<param
name='BGCOLOR' value='"+playerBgColor+"' />";
if(playerBgColor == ""){
object+="<param
name='wmode' value='transparent'>";
}
object+="<embed
src='"+av_player+"' width='"+playerWidth+"' height='"+playerHeight+"'
name='player' swliveconnect='true' ";
if(playerBgColor == ""){
object+="wmode='transparent'";
}
object+="quality='high'
pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'
bgcolor='"+playerBgColor+"'></embed></object>";
document.write(object);
}
//***********************************************
</SCRIPT>
|
Short keys for the player command
When the player is focused you can access main controls
withe the keys listed bellow:
| Action |
Control key |
play / pause
|
<space> |
| stop |
<control - space> |
| rewind |
<left> |
| forward |
<right> |
| previous track |
<control - left> |
| next track |
<control - right> |
| playlist scroll up |
<control - up arrow> |
| playlist scroll down |
<control - down
arrow> |
| search keywords |
<enter> |
| increase volume |
<up arrow> |
| decrease volume |
<down arrow> |
About
the application and skins
_pfs.swf
This is the application file. It is loaded by the skin embeded in your
HTML page. This file has to be placed on the first level of your AV folder.
your
AV player.swf
This is the player's skin. It is this file that will be called in local
or embeded in your HTML page. This file has to be on the same level as
the _pfs.swf. Its HTML page also has to be at the same level.
The HTML code that embeds the player (for the aquaplayer.swf as an example)
is:
|
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="290" height="298">
<param name="movie" value="aquaplayer.swf?custom=true">
<param name="quality" value="high">
<param name="BGCOLOR" value="#FFFFFF">
<embed src="aquaplayer.swf?custom=true" width="290" height="298" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#FFFFFF"></embed>
</object>
|
ƒlash AV Player plays regular mp3 files and sound files or Quicktime movies
embeded in a .swf using the Macromedia Flash MX application. These files should
be named as you want their title to display. For file names compatibility, white
spaces should be replaced by _underscores. So, the names of your files should
look like : my_track.swf.
If you want to title your tracks differently from the files, then you
should use the url attribute in the XML file. This alternative url can
be relative or absolute. The same goes for JPEGs.
MP3 sound
tracks
Use any of your regular MP3 tracks.
SWF sound
tracks
Open the "your_sound.fla" in Flash MX, import a sound track
in the first frame (set it as a streaming sound, NOT an event sound -
keep the number of frame/sec set to default -12- as the fps doesn't affect
sounds), adjust the number of frames up to the time length of the track,
and export. You can adjust the encoding parameters in Flash (export settings/sound/streaming).
Do all the tracks you need and write playlists in the playlist.xml, and
there is nothing more... or if there is, then you should contact flash@fodor.liane.net
Note: Keep in mind that Flash MX handles low bitrates
encoding (mostly under 64 Kbps) better than
usual MP3 encoders. This can be a point for choosing the right format
-mp3 or swf-.
SWF
movie tracks
Do the same as with a SWF sound tracks but import a Quicktime movie instead.
Choose "embed the movie" when importing. 80% as the percentage
of compression should give a good ratio of weight/rendering. Flash MX
will then ask you if it should adjust the correct number of frames. Agree.
Allways keep a stop() action on the first frame for security.
You can e-mail flash@fodor.liane.net for
specific questions.
Note: SWF tracks default frames per second is 12, if different you should
set the fps attribute of the TRACK in the XML playlist to the correct
value.
FLV
files
You can create FLV files by importing video into the Flash authoring
tool and exporting it as an FLV file. If you have Macromedia Flash MX
Professional 2004, you can use the FLV Export plug-in to export FLV files
from supported video-editing applications.
Using external FLV files provides certain capabilities that
are not available when using imported video:You can use longer video
clips in your Flash documents without slowing down playback. External
FLV files are played using cached memory. This means that large files
are stored in small pieces and accessed dynamically, and do not require
as much memory as embedded video files.
An external FLV file can have a different frame rate from the Flash document
in which it plays. For example, you can set the Flash document frame
rate to 30 fps and the video frame rate to 21 fps. This allows you greater
control in ensuring smooth video playback.
With external FLV files, Flash document playback does not have to be
interrupted while the video file is loading. Imported video files may
sometimes interrupt document playback to perform certain functions for
example, to access a CD-ROM drive. FLV files can perform functions independently
of the Flash document, and so do not interrupt playback.
JPEG
graphics
Use any web ready JPEG (be sure to put the ".jpg" extension.
JPEGs can be used either as backgrounds or be managed in a playlist to
create an album with comments.
MID files
We have a template ready page to embed the player using some javascript
to load and control midi files (.mid). It works on Mac and Windows OS
and was tested with Netscape, Mozilla/Firebird, Internet Explorer, Safari,
and Opera. Full control features are only supported by Netscape and Mozilla
browsers.
•Use the creativity of Flash
You can also create your own animations and display them as backgrounds
for your sound tracks, or else, create your own movies. About anything
that is done with Flash can go on screen.
Note: Allways use a first frame with a background
that fits your movie size so the player can be able to resize it correctly
on its screen. If you don't want any visible background... set its alpha
to 0.
the "Media" folder
The media folder is your root folder for all your media content,
and XML playlist files as well. It has to be at the same level as the
player. Its default name is "media". You can change that name
when embeding the .swf by adding a value to the folder variable
in the embed src parameter of the player.
Example for the aquaplayer.swf having its media folder renamed music ( folder=music):
|
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="290" height="298">
<param name="movie" value="aquaplayer.swf?custom=true&folder=music">
<param name="quality" value="high">
<param name="BGCOLOR" value="#FFFFFF">
<embed src="aquaplayer.swf?custom=true&folder=music" width="290" height="298" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#FFFFFF"></embed>
</object>
|
Media
subfolders [optional]
The media folder can be divided in different categories in order
to manage files as needed. Each playlist will then use the subfolder attribute
to find its way to a particular subfolder of the media folder.
This can be very helpful to manage different artists or styles on a web
site.
Each Media subfolder (or the media folder, if none)
will then contain the following:
Kbps
subfolders [optional]
A choice of 3 different Kbps is possible. If you want to make this feature
available then you have to:
1/ create as many subfolders as you have different Kbps (max = 3) in your "media" folder.
2/ name these folder as you want.
3/ assign the subfolders names as values to the folderpath attribute of
each <KBPS> tags in the XML playlist, and put the labels you want
the player to display within the tags.
4/Then, you MUST have one Kbps version for each track and set the defaultKbps variable
in the XML playlist for each concerned playlist so the player will know
which version to look for by default.
Note:If you don't intend to use several encodings,
don't bother using these folders and put your tracks directly in the Track
subfolder. You can use the defaultKbps attribute to have the player display
what is your Kbps encoding.
the "backgrounds" subfolder [optional]
This is where the player will look for any jpeg or swf graphics attached
to a track. Jpeg files must have the ".jpg" extension to be
recognized by the player.
Note: It seems that it is not recommended to use
a relative url to load the background if the track loading with it has
an absolute url - and vice et versa. It is safer to use relative OR absolute
urls, but not both at the same time...at least for now.
XML
Playlists
playlist.xml
This file feeds the player with all necessary playlists informations.
It is loaded with the player and can contain several different playlists.
The default name of that file is "playlist.xml". You can create
different XML playlists (each one being opend by different players) and
add a prefix for each one of them ( prefix_playlist.xml). Then,
you will need to tell the player which prefix to use in order to load
the correct XML playlist. This is done with the filePrefX variable
in the src parameter of the player.
Example for the aquaplayer.swf playing from john_playlist.xml ( filePrefX=john_):
|
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="290" height="298">
<param name="movie" value="aquaplayer.swf?custom=true&filePrefX=john_">
<param name="quality" value="high">
<param name="BGCOLOR" value="#FFFFFF">
<embed src="aquaplayer.swf?custom=true&filePrefX=john_" width="290" height="298" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#FFFFFF"></embed>
</object>
|
*note: these variables can be added in the embed src with the ones
from other examples.
In addition - for the media-pub players only - is
another tag named PUB. It lists the path of the commercials that
will play in between the tracks.
About XML
An XML file describes the structure of your data. The informations you
want to gather about your playlists could be stated this way:
You have a <PLAYLISTdb> data base of several <PLAYLIST>s that
eventually have unique attributes (its ID, name, author, subfolder, default
Kbps, Xtension, and BGproperties). Each <PLAYLIST> contains <URL> links
(just 1 for the time moment), <KBPS> choices, and all the <TRACK>s
with their informations (ID, name, img, Url) as well as some attached
text. Some attributes are optionals in the way that their information
just won't display but without causing malfunction. The most important
is informations about pathways and Kbps (which is about the same as pathways
since their main function in the playlist IS to give information on the
tracks pathway). Here is the resume tag scheme of an XML playlist:
<?XML declaration?>
<PLAYLISTdb>
<PLAYLIST attribute1="" attribute2="" etc...>
<URL attribute1="" attribute2="" etc...>some
label</URL>
<KBPS attribute1="" attribute2="" etc...>some
label</KBPS>
<TRACK attribute1="" attribute2="" etc...>some
optional text comment</TRACK>
<TRACK attribute1="" attribute2="" etc...>some
optional text comment</TRACK>
<TRACK attribute1="" attribute2="" etc...>some
optional text comment</TRACK>
etc...
</PLAYLIST>
...repeat playlist structure...
</PLAYLISTdb>
note: Attributes are within the tag and their
values are allways between double quotes. Tags must always be closed,
either in the form <TAG></TAG> or <TAG />. A non closed
tag, or unclosed quote, will fail to load the XML playlist. XML
doesn't leave much room for errors, but the player tries to parse the
XML in the most flexible way. It also reports some of the common XML
file errors. You mostly have to keep in mind that it is case sensitive
and to always close quotes and tags.
The detailed template of the XML playlist for AV players goes as follows
(texts between <!-- and --> are just comments, they are optional):
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
<PLAYLISTdb>
<!--begin playlists-->
<PLAYLIST ID="an optional id number if working
with a database" name="your playlist name" author="the
author" subfolder="the path of an optional media subfolder" defaultKbps="the
default Kbps folder to be streamed when the player first loads (or the Kbps to
be displayed if no Kbps multichoice is implemented)" Xtension=".mp3
or .swf or .jpg or .jpeg" BGproperties="HTML color
(without "#" -labeled undefined if none), Alpha percentage
(if not specified, default is 100), x offset, y offset, scale factor, mask ID"/>
<URL Url="a link
to be displayed by the player" Target="the
target window to open the link">the
label of the link</URL>
<KBPS folderpath="name
of the folder relative to the media folder">label
displayed by the player</KBPS>
<!--begin track list-->
<TRACK ID="an optional
id number if working with a database" name="track's
name" subfolder="the path of an optional media
subfolder" img="an optional swf or jpeg to
be displayed with a stand alone sound track -on video players-" Url="relative
or or absolute url of the track if different from media[/a KBPS folder]/name
+ the Xtension" fps="the
frame rate of a swf movie if different from 12" >any
text to display with the track (available only with Video Players)</TRACK>
<!--track n°2, track n°3, etc...to track
N°n -->
</PLAYLIST>
<!-- playlist n°2, playlist n°3, etc...
to playlist N°n -->
<!-- Publist (only for media-pub players)-->
<PUB>
<TRACK Url="absolute
or relative url (to the root folder - media/PUB/) of the commercial"/>
<!--track n°2, track n°3, etc...to track
N°n -->
</PUB>
</PLAYLISTdb>
|
|
note: Names of tags are case sensitive, and again
all attributes (anything after the equal signs) must be quoted. You don't
have to bother leaving empty attributes (anyhow, empty quotes will be
interpreted as no attribute).
Eventualy, you can have the player to play only some of the top playlists.
The variable having the value of the number of desired top playlists is playlisNb,
and the variable for the default playlist you will want the player to
open with is PLindex (= the rank of the playlist as displayed
by the XML file).
Example for the aquaplayer.swf only playing the first 3 playlists
(playlistNb=3) of the playlist.xml and opening with the 2nd playlist
(PLindex=2):
|
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="290" height="298">
<param name="movie" value="aquaplayer.swf?custom=true&playlistNb=3&PLindex=2">
<param name="quality" value="high">
<param name="BGCOLOR" value="#FFFFFF">
<embed src="aquaplayer.swf?custom=true&playlistNb=3&PLindex=2" width="290" height="298" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#FFFFFF"></embed>
</object>
|
|
*note: these variables can be added in the embed src with the ones from
other examples.
This playlist editor/generator let you connect to
your media folder (or what ever you called your media folder) over the
internet or with a local connection. Once you have created or modified
a playlist you can either copy-paste the resulting code or download the
XML file to your hard drive. Note that downloading is only possible with
a third party cgi which address is set when embeding the generator. The
embeded variable refering to the cgi is download_cgi.
note: The XML playlist generator only begins with
version 1.6 of the AV players.
for more informations:
|
|