gpt4 book ai didi

streaming - 如何在 Flash 中流式传输 Shoutcast radio 广播 (Shoutcast Flash Player)

转载 作者:行者123 更新时间:2023-12-02 22:21:59 24 4
gpt4 key购买 nike

多年来我一直在寻找解决方案,但没有任何明确的记录。有很多 Shoutcast Flash 播放器(例如 radio.de),所以我知道这是可能的。然而,我的大部分研究都得出这样的结论:

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

这在 FireFox 中适用,但在 IE 中无效。我不想购买组件,我想知道这些组件是如何实现的,以便我可以构建自己的自定义播放器。

最佳答案

你就快到了。完整的咒语是:

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

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

播放 AAC 流还没有令人满意的解决方案,尽管 Flash 有这样做的设备,但由于某种原因 AAC 的 API 完全不同,无法播放 AAC Shoutcast。

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

请参阅我的博客了解更多信息:

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

关于streaming - 如何在 Flash 中流式传输 Shoutcast radio 广播 (Shoutcast Flash Player),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1273454/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com