Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Flash General Questions > Other Flash General Questions

Reply
 
Thread Tools Rate Thread Display Modes
Old 12-31-2004, 10:28 AM   #1
nathanwheeler
Registered User
 
Join Date: Dec 2004
Posts: 1
Default flash mp3 streaming player for .pls stream

i am looking for a flash player that can play a stream from http://IP/listen.pls
anyone has an example maybe?
nathanwheeler is offline   Reply With Quote
Old 01-05-2005, 04:41 AM   #2
altdev
Registered User
 
Join Date: Jan 2005
Posts: 1
Default

I have been pulling my hair out for a while over this. This is the closest thing I have found for a solution. Unfortunately it's not a solution, for me anyway...

//begin quote from "rmax" @ http://forums.devshed.com/t70020/s.html
///////////////////////////////////////////////////////////////////////////////

As far as i know the trick is that flash, once embedded in a html page will acces teh shoutcast stream with a normal http header and will therefor not connect.
When u use your swf and run ut from your desktop as an executable it will work just fine. So the 'trick' is to fool the shoutcast server into thinking you are not requesting it as a flash movie embedded in html, but as a program like winamp.

If you are using ASp, like me, i cant help you, since im still looking for a way to do this (IF ANYONE CAN HELP PLEASE POST HERE!).

If your using PHP, you're in luck cuz this is what you have to do:


--
PHP Code:
$streamname "64.236.34.141"// put in whatever stream you want to play 
$port "80"// put in the port of the stream 
$path "/stream/1022"// put in any extra path, this is usually just a / 

header("Content-type: audio/mpeg"); 
$sock fsockopen($streamname,$port); 

fputs($sock"GET $path HTTP/1.0\r\n"); 
fputs($sock"Host: $streamname\r\n"); 
fputs($sock"User-Agent: WinampMPEG/2.8\r\n"); 
fputs($sock"Accept: */*\r\n"); 
fputs($sock"Icy-MetaData:1\r\n"); 
fputs($sock"Connection: close\r\n\r\n"); 


fpassthru($sock); 

fclose($sock); 
Then in flash,
ActionScript Code:
loadSound("yoururl.com/thisphpfile.php")
--

is anyone has an idea for asp, let me know !

//end quote from "rmax" @ http://forums.devshed.com/t70020/s.html
/////////////////////////////////////////////////////////////////////////////

unfortunately this solution requires a flash communication server and I am not using that. Further, I'm not clear if this is for an .mp3 stream or if it will grab a .pls which is what I want. I know some php but I don't understand the proxy connection he's making and so I have yet to make it work. I am also fairly new to flash and am a total newb with AS and it's capabilities. I have had great success with the php/flash combination thus far though!

I assume you want this as a single click method for your visitors to be able to listen to your shoutcast stream regardless of browser and without having to download anything other than possibly flash-plugin.

If you have any luck or ideas at all, please post them.

good luck...

Last edited by CyanBlue; 02-18-2005 at 01:13 AM.. Reason: PHP tag is applied
altdev is offline   Reply With Quote
Old 02-18-2005, 01:04 AM   #3
neonleif
Registered User
 
Join Date: Sep 2003
Posts: 40
Default

ok. I tried the solution

I haven't tested it online, and i'm not sure the bandwith is desireable... but anyway... It works fine locally.

By the way, the most optimal way would be to stream directly from source to client, but it seams impossible. Proof me wrong, please.

Next step mut be to clear out the memory on the fly. The stream just builds up in the memory, causing great lag after a while.

Well it does not work properly.
After a little while, the stream stops, but i tried streaming directly between source and client. Works almost fine though it should not, due to flash security... i guess.
But after a while it fills up my cache, and my computer works very slowly.
try it:
neonleif.dk/flasnd/streaming.swf

Last edited by neonleif; 02-25-2005 at 12:00 AM.. Reason: Well it does not work properly.
neonleif is offline   Reply With Quote
Old 10-25-2006, 05:15 AM   #4
undefinedmatrix
Registered User
 
Join Date: Oct 2006
Posts: 1
Default

Sorry for the reply to an old topic, but this is being indexed by Google so it could help others.

in flash use

PHP Code:
loadSound('http://radio.server.com:8000/;stream.nsv'); 
to play a ShoutCast stream in Flash.
undefinedmatrix is offline   Reply With Quote
Old 02-20-2007, 02:16 PM   #5
klaus_15
Klaus_15 TS2
 
Join Date: Feb 2007
Posts: 1
Send a message via ICQ to klaus_15 Send a message via MSN to klaus_15 Send a message via Yahoo to klaus_15
Default

Thanks undefinedmatrix!!! Thanks for replying to an old topic, indexed by Google!! I've been looking for the solution of this problem for a long time. Now I will reply all topics referring to this in spanish forums!
klaus_15 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:42 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.