Technical Question - Streaming MP3s From Amazon S3

by
Kris Turner
Profile picture of Kris Turner
Posts: Threads: Thanks: Account age: less than a second
1 replies
I've always used the 1 Pixel Out Audio player for my MP3s.

But for some reason, I can never make it work with Amazon S3 storage on non-Wordpress sites. Is there something obvious that I might be overlooking, cos I've tried everything?

Here's some sample code of what I'm trying to use:

<script language="JavaScript" src="http://mysitename.com/audio/audio-player.js"></script>
<object type="application/x-shockwave-flash"

data="http://mysitename/audio/player.swf"id="audioplayer1"

height="24" width="290">
<param name="movie" value="http://mysitename.com/audio/player.swf">
<param name="FlashVars"

value="playerID=audioplayer1&soundFile=http://Amazon_bucketname.s3.amazonaws.com/mp3filename.mp3">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="wmode" value="transparent">
</object>

So the player files are located on my own webspace and the mp3 is located on my Amazon S3 storage. Is there a way to code this so that it all works? At the moment, the player loads, but hitting play just results in it looking for the mp3 file and then closing.

Another problem is, Amazon S3 says "failed" every time I try to upload the javascript player file, which is why those have to be hosted on my own webspace.

A long, rambling question. Sorry. But this is driving me mad!
#amazon #mp3s #question #streaming #technical
  • Profile picture of the author RemingtonSteele
    RemingtonSteele
    Profile picture of RemingtonSteele
    Posts: Threads: Thanks: Account age: less than a second
    I think the problem is that you're using a flash player to play the audio, and a security feature of flash is that you can't request data from a domain other than the domain where the flash player is being used, unless you set up a cross-domain policy.

    For more information, try these queries in Google:

    site:adobe.com "Policy file changes in Flash Player 9 and Flash Player 10"
    site:adobe.com "Cross-domain policy for Flash movies"
    site:stackoverflow.com "Streaming MP3s from Amazon S3"

    (I would've liked to have posted the links for you, but my post count is too low.)

Trending Topics