如何在 Flash (Shoutcast Flash Player) 中流式传输 Shoutcast 无线电广播 [英] How to stream a shoutcast radio broadcast in Flash (Shoutcast Flash Player)

查看:29
本文介绍了如何在 Flash (Shoutcast Flash Player) 中流式传输 Shoutcast 无线电广播的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

多年来我一直在寻找解决方案,但没有最终确定的记录.市面上有很多 Shoutcast Flash 播放器(例如 radio.de),所以我知道这是可能的.然而,我的大部分研究都导致了这一点:

I've been looking for a solution to this for years, but nothing is conclusively documented. There are many Shoutcast Flash players out there (e.g. radio.de) so I know it's possible. However, most of my research leads to this:

s = new Sound();
s.loadSound ("url.of.shoutcaststream:8003",true);

它在 FireFox 中对我有用,但在 IE 中不适用.我不想购买组件,我想知道这些组件是如何做到的,以便我可以构建自己的自定义播放器.

Which works for me in FireFox but not in IE. I don't want to buy a component, I want to know how those components do it so that I can build my own custom player.

推荐答案

大功告成.完整的口头禅是:

You're almost there. The full mantra is:

s = new Sound();
s.loadSound ("http://url.of.shoutcaststream:8003/;",true);

注意尾部的斜线和分号.Shoutcast 服务器 (DNAS) 查看请求的用户代理以检测在响应中发回的内容.如果它是一个浏览器,那么它会提供一个 HTML 页面.如果它不是浏览器 UA,它会发送流.尾随分号(出于某种未公开的原因)导致 DNAS 忽略 UA 并始终发送流.

Notice the trailing slash and semicolon. Shoutcast servers (DNAS) look at the useragent of a request to detect what to send back in the response. If it's a broswer then it serves a page of HTML. If it's not a browser UA, it sends the stream. Trailing semicolon (for some undocumented reason) causes DNAS to ignore the UA and always send a stream.

播放AAC流没有令人满意的解决方案,虽然Flash有设备可以这样做,但由于某些原因AAC的API完全不同,无法播放AAC Shoutcast.

There's no satisfactory solution to playing AAC streams, although Flash has the equipment to do so, for some reason the API for AAC is completely different and cannot play AAC Shoutcast.

这里的 NetStream 解决方案不太可能提供解决方案.

The NetStream solution here is unlikely to provide a solution.

查看我的博客了解更多信息:

See my blog for more info:

http://www.flexiblefactory.co.uk/flexible/?p=51

这篇关于如何在 Flash (Shoutcast Flash Player) 中流式传输 Shoutcast 无线电广播的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆