Flex/Flash Shoutcast player

故事扮演 提交于 2019-12-01 09:08:28

问题


I am trying to build a flash player for my company's Shoutcast server, and have seen a few articles about it on the 'net, including this SO question here.

However, I can't seem to get the audio stream to actually play. It seems to be connecting alright, but calling stream.play() doesn't seem to do anything.

I have tried the code in the SO question I have linked to, and have also tried something similar to this (sorry i don't remember the exact syntax):

public function stream() {  
    private var url:URLREQUEST = "my.domain.com";
    private var sStream:Sound = new Sound();
    sStream.load(url);
    sStream.play();
}

If anyone has any revelations for me I'd appreciate it.


回答1:


I just posted a solution on this thread:

How to stream a shoutcast radio broadcast in Flash (Shoutcast Flash Player)




回答2:


Did you try this - (corrected some typos in the code you posted)?

public function stream() 
{  
    private var url:URLRequest = new URLRequest("my.domain.com/song.mp3");
    private var sStream:Sound = new Sound();
    sStream.load(url);
    sStream.play();
}


来源:https://stackoverflow.com/questions/1704121/flex-flash-shoutcast-player

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!