Remcoman / AIRShoutcast

Shoutcast API for Adobe AIR
MIT License
5 stars 2 forks source link

cross domain limitations #1

Open benbro opened 13 years ago

benbro commented 13 years ago

Is it possible to play mp3 stream in flash across domains but not the metadata or none of them?

If it is just the metadata, I think using a server side script can help.

Remcoman commented 13 years ago

You can use the flash.media.Sound object to play mp3 files/ streams. However this has some limitations:

Other reasons i only build the api for Adobe AIR is that flash has some limitations when running in the browser.

You might try to create a server side script to strip out the metadata and publish the result back to flash (Of course this will cost you a lot of bandwidth because most people listen to streams all day and all the data will pass through your scripts!) Instead of returning a mp3 stream i would wrap the mp3 or aac into a flv file (which is just a container format and can also be audio only). This would prevent the memory problems (i've run my Shoutcast API for a couple of hours without seeing the memory usage rise above 30 mb) and give you more control over the buffer. You could read my code to determine how to use the flv format or check http://download.macromedia.com/f4v/video_file_format_spec_v10_1.pdf.

Good luck!

Op 9 aug 2011, om 01:40 heeft benbro het volgende geschreven:

Is it possible to play mp3 stream in flash across domains but not the metadata or none of them?

If it is just the metadata, I think using a server side script can help.

Reply to this email directly or view it on GitHub: https://github.com/Remcoman/AIRShoutcast/issues/1