PDA

View Full Version : XML and Streaming Audio



Chella
05-03-2008, 10:14 AM
I have a flash music player that I wanted to stream music I've composed. I created a folder above my public_html and uploaded my music files (in swf format.)

I uploaded the flash music player and the XML file inside the public_html folder, and placed the relative path to my music samples inside the XML file as such:


<list>
<address>/home/account/musicfolder/songtitle1.swf</address>
<title>Song Title 1</title>
</list>


I'm receiving an error through the flash player that the URL is not found. Would someone be willing to point out my mistake? :D I'm a bit new to this.

Hot DesignZ
05-03-2008, 10:17 AM
I have a flash music player that I wanted to stream music I've composed. I created a folder above my public_html and uploaded my music files (in swf format.)

I uploaded the flash music player and the XML file inside the public_html folder, and placed the relative path to my music samples inside the XML file as such:


<list>
<address>/home/account/musicfolder/songtitle1.swf</address>
<title>Song Title 1</title>
</list>


I'm receiving an error through the flash player that the URL is not found. Would someone be willing to point out my mistake? :D I'm a bit new to this.
how about leave out /home/account/musicfolder/

I would think it would be /public_html/musicfolder/songtitle1.swf.... ohh I get what you are trying to do but I am not sure if that is doable???

pghcollectibles
05-03-2008, 10:31 AM
yes, but i think you said you put the folder above public_html it would need to be placed inside public_html and i would also put an index.html inside that folder redirecting someone browsing your stuff to send them back to your main index page or you would need to edit your htaccess file in that folder to only be able to browse indexes that is unless you dont care if they can browse the folder and download from it

pghcollectibles
05-03-2008, 10:34 AM
i cant remember but i think its ../musicfolder/ try that. skip what i said before about moving it. ive done this with more secure files

Chella
05-03-2008, 10:55 AM
Hi again,

I gave PGH's suggestion a go, but still receive the error. The reason I placed the swf music files outside of public_html was to prevent automatic downloading of the songs.

(Just a side thought, would I need to chmod my swf music files?)

sjlplat
05-04-2008, 08:39 AM
To deliver Flash files from above the public_html directory you will need to have a server-side script that can post the appropriate file headers and then deliver the requested file to the browser. You cannot link directly to the files.

Chella
05-04-2008, 08:53 AM
Ha, thanks :D