

Ask HN: Embed MP3 stream player? - yeti

I make a chat website, and I'd like to add music streaming to the user chatrooms.<p>ie - the chatroom host can enter in a URL of a streaming MP3 and then everyone in the chatroom hears that stream - the music files are not stored on our servers, but just browser client to another URL<p>Any suggestions?
======
bittersweet
Soundmanager2 [1] is widely used, and I've used it myself in a couple of
projects.

It may be a bit to full-featured for the small thing you are trying to
accomplish but you can customize it quite a bit.

You can just listen for mp3 links in the chatroom and queue it up in
soundmanager.

[1] <http://www.schillmania.com/projects/soundmanager2/>

~~~
what
Doesn't flash have a same origin policy that would prevent you from streaming
mp3s from random URLS. I thought you have to host both the player and mp3 at
the same domain? Or at least have a policy file on both domains that says you
can access it. I could be mistaken, but this is how I remember it from the
last time I checked.

~~~
schill
Flash can load MP3s from remote domains, but it cannot read certain metadata
(eg. ID3 tags, waveform/eq/spectrum data) unless granted permissions via a
crossdomain.xml policy file. For hosting, the SWF should be on the same domain
as the HTML document or JS-Flash communication will be restricted (or, use the
cross-domain version of the SWF.)

~~~
yeti
Thanks Schill, can it load MP3 streams as well as MP3 files? Assume so, but
just to check. Any suggestion on player?

