The following instructions are normally not required for basic use of the playhead. users wishing to change some of the default settings should read on..
By default, the playhead looks for a file called 'XXX.xml' where XXX is the player's
own filename. If you generate your configuration files dynamically using PHP or ASP, then
you will need to tell the playhead to load this new URL. This can be done by adding a special
variable to the page code, both in the OBJECT and the EMBED tags. If we wanted to tell
'player01.swf' to open a configuration file called 'dynamic.php', then you need to add
this line to the OBJECT param list:-
<param name="flashVars" value="config=dynamic.php" />
and in the EMBED tag, add the variable definition
You can specify any filename, but if you wish to use a URL containing non-alphabetical characters you MUST URLencode the name using RFC2396. For example, if your configuration file is at
then the URLencoded version is
With Flash Player 7 and above, enhanced security prevents a Flash document from loading data (XML files) from another website unless that site has given permission. This means that a remote server hosting your configuration file must also publish a small XML file called "crossdomain.xml", that informs the Flash Player that they allow others to read their data. If this file is missing, Minicaster will display an error.
This is only a concern where the config file or a DNAS playlist is on a different website domain to your SWF playhead. If they are on the same domain, then a policy file is not needed.
For example, if our playhead is at
Then it tries to load a configuration file from
Policy files are not needed to access MP3 data. For more information on the format of a Policy file, CLICK HERE.
You can toggle the play button (play-pause-play) using the second function, for example:-
It is perfectly possible to deliver a Shoutcast stream to our playhead, however there are some important issues that you must be aware of that will limit the playhead's operation:-
Firstly, Flash Player cannot connect to the 'root' of a Shoutcast server, as it is not possible to change the browser agent string passed by the plugin. Shoutcast uses this agent string to decide what is to be sent - if the agent string is a web browser, Shoutcast sends the server status page. If the agent string isn't a web browser it sends the MP3 stream. The user agent string cannot be changed in Flash Player - it is a security feature and is impossible to bypass. As a result if the server receives a connection to the root, it will not send the MP3 stream to Minicaster. If your Shoutcast server uses a folder name in the stream, then it will connect perfectly.
For example if your Shoutcast server's stream is linked to:-
It is impossible to collect the DNAS playlist file directly from Shoutcast, as there is no way for a Shoutcast server to send the 'crossdomain.xml' security policy file to Flash. It is possible to use a proxy script to pass the data through a normal webserver or to simply place a copy of the DNAS playlist file on another website and use that. Of course the webserver that runs your proxy script or hosts the DNAS playlist file has to contain the crossdomain.xml policy file as well, and in this case it must be available at the top level.
For example, suppose we have a Shoutcast stream running on a network of servers, all of which use a folder name so don't hit the
problem we described above. We also have a 'normal' website at http://www.radio.com
We can collect the audio data OK, as it's got a folder name. We can put a copy of the DNAS playlist on the website and we can put the policy file online at http://www.radio.com/crossdomain.xml - so the config file ends up looking something like this:-