|
|
|
|
#1 |
|
Junior Member
Join Date: Feb 2003
Posts: 2
|
macromedia flash/shoutcast
OK.
How to stream a Shoutcast station from a Flash movie ![]() Is anyone in the know? If so, you'll be 4-ever in my heart! - Ace |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Feb 2003
Location: NYC Metro
Posts: 209
|
? what do you mean exactly? do you mean? do you want to use flash to play the stream? is this for a web page?
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Feb 2003
Posts: 2
|
exactly.
first of all I wanna know if it can be done, it ought to. then I just need something to start with.. then I'll be fine.. thankx ace |
|
|
|
|
|
#4 | |
|
Junior Member
|
do this... (and it still won't work) :'o(
attach this to a movie clip:
Quote:
but when you view it in a web page, it won't make any sound. can anyone tell us why??? |
|
|
|
|
|
|
#5 | |
|
Junior Member
|
or even this (OOPS):
Quote:
|
|
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Mar 2003
Location: NL
Posts: 19
|
Headers
In a standalone player it works cause you computer knows how to handle the shoutcast headers or something like that..
the solution mentioned before works on icecast servers.. it only supports HTTP headers... and with http headers it will work on a webpage.. unfortunatly SC uses custom ICY headers in this case... |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Mar 2003
Posts: 4
|
Macromedia have prevented streaming content from one server through web pages hosted on another under the guise of security. In reality, they just want to boost take up of their own streaming media server which costs a fortune and is crap.
Check this guy out: http://www.jessewarden.com/ He'll tell you all about it. |
|
|
|
|
|
#8 |
|
Member
Join Date: Jul 2003
Posts: 70
|
If you use a serverside script (php or ASP) to get the playlist from another server, then that script can dish up the playlist to your flash app sitting on your site. Then the Flash can stream the audio into your app.
I've got a basic test file working, so email with any questions: pfriedl@nebulus.org |
|
|
|
|
|
#9 |
|
Senior Member
Join Date: Nov 2000
Posts: 294
|
There's no way to access content across domains. This is a very common in-browser security restriction and also applies to JavaScript/JScript/VBScript.
One possible workaround (altho, quite unlikely to work) is to request a 403 redirect to the SHOUTcast server. Another option (and I'm not very familiar with the Sound object in ActionScript), but try to load a PLS file that points to the stream instead of the stream itself. --Randall Executive Director, SWCI www.smallwebcaster.org // Redefining Music Royalties for Small Webcasters Legal Disclaimer: The information hereinbefore is not intended to constitute legal advice or consultation nor does it form a legally binding contract. |
|
|
|
|
|
#10 |
|
Member
Join Date: Jul 2003
Posts: 70
|
Well, in both standalone SWF and in a page, I was able to use the allowDomain method to get a .pls file to load from shoutCast. One interesting thing to note here is that the file I'm loading is in a Windows ini file format, not XML. The XML object loads it with no problem, and then I split on carriage returns, then loop through the array to pick out the tracks (check for "File" in the string, then split on "=").
Now, the standalone SWF will stream just fine, but the SWF embeded in a page just flat out won't work. What I find strange is that with the sacred security model, I'm able to load XML from ShoutCast - a completely different and non compatible domain, but I can't stream and audio file? Something is messed up here. I suspect that it has something to do with the streams coming from an IP address and port - a possible Macromedia bug? Oh, and sorry for the really nasty interface on the player - it's a test only
|
|
|
|
|
|
#11 |
|
Senior Member
Join Date: Nov 2000
Posts: 294
|
Ooops my bad. I meant HTTP 302 redirect (mixing up my status codes since I was just in a thread about a 403 error
Executive Director, SWCI www.smallwebcaster.org // Redefining Music Royalties for Small Webcasters Legal Disclaimer: The information hereinbefore is not intended to constitute legal advice or consultation nor does it form a legally binding contract. |
|
|
|
|
|
#12 |
|
Member
Join Date: Jun 2000
Posts: 65
|
yes, embedded flash works with live365 and icecast coz they use HTTP headers, shoutcast doesn't work coz it uses these ICY headers, users listening to my icecast stream don't download any player(no winamp, no realplayer, nothing), they just use the flash embedded player(the player is only 18k in size!)
|
|
|
|
|
|
#13 |
|
Junior Member
Join Date: Aug 2003
Posts: 13
|
could we get a copy of it?
|
|
|
|
|
|
#14 | |
|
Forum Loser
(Forum King) |
Quote:
|
|
|
|
|
|
|
#15 |
|
Senior Member
Join Date: Nov 2000
Posts: 294
|
I'm going to have to read up more about the allowDomain option. I didn't know that there were any methods or properties for cross-domain file loading within an embedded flash player (only standalone). Unfortunately I recently uninstalled Flash MX cuz of limited hard disk space. Which reminds me, time to get new hard drive
![]() --Randall Executive Director, SWCI www.smallwebcaster.org // Redefining Music Royalties for Small Webcasters Legal Disclaimer: The information hereinbefore is not intended to constitute legal advice or consultation nor does it form a legally binding contract. |
|
|
|
|
|
#16 | |
|
Member
Join Date: Jun 2000
Posts: 65
|
Quote:
http://zamalekradio.port5.com -works with icecast/live365 -includes user authentication -ability to switch between stations |
|
|
|
|
|
|
#17 |
|
Senior Member
Join Date: Nov 2000
Posts: 294
|
Niiice! Both the player and the music. I'm impressed.
|
|
|
|
|
|
#18 | |
|
Junior Member
|
cant we use xml or php to create http headers just like live365 and icecast
Quote:
|
|
|
|
|
|
|
#19 |
|
Junior Member
|
an add on to my idea above ^^^
use xml or php to bring in http headers into the flash file, as well as the stream address, i dont know wether that would work better!? cheers |
|
|
|
|
|
#20 | |
|
Member
Join Date: Jun 2000
Posts: 65
|
Quote:
|
|
|
|
|
|
|
#21 | |
|
Junior Member
|
Quote:
i use php to parse the xml from the shoutcast servers we use so we get our stats live on creativeradio.co.uk, our PODplayer for easy listening and the php generated images below in my sig we should we able to do something like that, seem as tho flash 5+ will understand xml, or php files imported as action script (let the server execute and add what we need, then flash reads the php file like any http browser/client would, alrdy tried and works =) |
|
|
|
|
|
|
#22 |
|
Junior Member
|
what happen then..does any of these flash files work? is this doable. even if i could get it work off my desktop it would be cool but in teh web page even better..whats up?
|
|
|
|
|
|
#23 |
|
Junior Member
|
ei yea they do work on ya desktop piss easy, just need to do the above an we can get it workin, just need a hand wid the xml and php interegation into flash, if ne1 wants to give me a hand pm me an we'll sort sumot =)
|
|
|
|
|
|
#24 |
|
Member
Join Date: Jun 2000
Posts: 65
|
the latest I found is that embedded flash player works for shoutcast in Mozilla and netscape (not IE), icecast and live365 works in all browsers, the problem of shoutcast+flash+IE isn't the user-agent as some people suggested because Mozilla has same user-agent as IE and Mozilla works while IE doesn't
|
|
|
|
|
|
#25 |
|
Member
Join Date: Jun 2000
Posts: 65
|
I even changed IE user-agent value in the registery to look exactly like Mozilla, so wehn I check my IE user-agent it looks like this:
The user agent string your browser is giving: Mozilla/5.0 (Widnows; U; Windows NT 5.0) it sill doesn't work, if if I changed this Mozilla/5.0 to whatever it doesn't work |
|
|
|
|
|
#26 |
|
Junior Member
|
so it could possibly be a bug or security thing in the flash player for ie ?
|
|
|
|
|
|
#27 | |
|
Member
Join Date: Jun 2000
Posts: 65
|
Quote:
not a security thing because icecast and live365 works in IE, user-agent isn't the reason, try changing your IE user-agent and it will not work, I think it is a shoutcast problem http://www.winguides.com/registry/display.php/799/ |
|
|
|
|
|
|
#28 |
|
Junior Member
|
there is a security loop hole in flash, where it wont allow to access streams across domains, i fink it culd b shoutcast ur ryte, tis just wierd how it will work locally, but whern embeded onto a webpage and usin ie's user agent, its a bit wierd!
|
|
|
|
|
|
#29 |
|
Member
Join Date: Jun 2000
Posts: 65
|
flash works through domains, I was able to listen to live365 and icecast streams in all browsers, was able to listen to shoutcast stream in Netscape and Mozilla but not IE
|
|
|
|
|
|
#30 |
|
Junior Member
|
ei yea thats ryte, well its gotta b something to do with shoutcast, flash and ie, probably is the user agent cos when u change it, it still does not work, shuld b a way to work around it, fink i ave an idea =) ill get bak to ya if it works lol
|
|
|
|
|
|
#31 |
|
Junior Member
|
any1 figured this out yet? i have the same problem, locally works fine, but on the web server and no joy ..
|
|
|
|
|
|
#32 |
|
Senior Member
Join Date: Nov 2000
Posts: 294
|
Okay, I'm going to reinstall Flash MX this Saturday (yay long weekend!) so I can finally give this a try. I really like the idea of an embeded player, so I should do this anyway. I'll post my findings here.
![]() --Randall |
|
|
|
|
|
#33 |
|
Junior Member
|
it does work, fink we gotta work around the bug in flash an the security flaw which does not allow to use data from different domains within a web browser, due to the http headors (shoutcast doesnt give any cos of the yp.shoutcast.com so we need to create them in an xml file or sumot!?)
it does work locally on a machine and will connect to the shoutcast server even if its on a different domain or workstation, so its the flash plugin for and internet explorer itself, as it works in gekko and mozzilla applications wotcha wreckon then? cos after readin wot every1 else has said and tried i fink this sums it up?? |
|
|
|
|
|
#34 |
|
Member
Join Date: Jun 2000
Posts: 65
|
tom_taylor,
there is no security problem in flash, because it works with icecast and live365 so, flash + (icecast or live365) + (netscape or mozilla or IE) works flash + (shoutcast) + (netscape or mozilla) works flash + (shoutcast) + (IE) doesn't work |
|
|
|
|
|
#35 |
|
Junior Member
|
ok so if we put the security crap 2 one side, is it due to the fact that icecast and live365 use http headers, and shoutcast does not as it has the yp (yellow pages)
ova than that i cant understand it, or cant we dummy it and use xml to bring the stream in?? or an external actionscript file, which we can generate info via php or wot eva (just runnin sum ideas off like) |
|
|
|
|
|
#36 |
|
Junior Member
Join Date: Mar 2004
Posts: 1
|
Works in Central
Shoutcast + Flash 6.0.65.0 + Central v1 = works
F'n A... I hated IE anyway. BTW, anyone ever figured out how to parse those ICY headers? I can help with both PHP, XML, and Flash stuff. --JesterXL |
|
|
|
|
|
#37 |
|
Junior Member
Join Date: Mar 2004
Posts: 1
|
Sorry, I'm not a coder. Any one can post a sample in how to retrieve the the album/artist name when playing shoutcast stream with Flash?
I got it playing, but don't know how to retrieve the info. I know a bit o ASP, XML and ActionScript1,2. Thanks in advanced, |
|
|
|
|
|
#38 |
|
Junior Member
|
OK i am kinda lost. My shoutcas server is served thru a dedicated server that i got. Meaning that if i decided to put the flash the problem of the flash tring to get the stream remotetly is goned?. Becuase it is in the same server as the server so i can use the localhost feature. Now i know that there alot of us that are in this same situation. and would like to know how can we inplement the flash radio to ur sites.
PS my dedicated server is a Linux |
|
|
|
|
|
#39 |
|
Member
Join Date: Jul 2003
Posts: 70
|
notsozen,
to get ID3 data info form the stream, you can use this code when you load the audio: var my_sound = new Sound('path_to'stream',1); my_sound.onId3 = function(){ // put all your id3 handling code in here. // flash help files have a full listing of supported ID3 tags. } djboxny, you can load content from other sites by loading an xml permission file on the server that's hosting the content. When a flash movie requests data from a domain other than the one it's sitting on, the server serving the content has to have a file, crossdomain.xml in the root of the website. the format of the crossdomain.xml looks like this: <cross-domain-policy> <allow-access-from domain="*.your_site.com" /> <allow-access-from domain="*.somebodyelses_site.com" /> <allow-access-from domain="*.another_site.com" /> </cross-domain-policy> any domain listed in the crossdomain.xml file can have access to the site's content now. Hope that helps! |
|
|
|
|
|
#40 |
|
Junior Member
|
MY Domain is Latinspot.com = its a Dedicated server so i installed 2 shout cast servers. There are in the same server as my webiste. So its not a remote connection. Now being that what can i do now to add a flash player to my site. And wich program should i use to build the flash aplication. Any help is welcomed
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|