是否有可能从HTML5音频元素的Icecast获取元数据? [英] Is it possible to get Icecast metadata from HTML5 audio element?

查看:185
本文介绍了是否有可能从HTML5音频元素的Icecast获取元数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的音频元素流从icecast服务的OGG来源。是否音频元素抽取冰冷的元数据,并有通过JavaScript访问它的方式?

I am using audio element to stream an ogg source from an icecast server. Does the audio element extract icy metadata and is there a way to access it through javascript?

基本上,我想显示正在播放一个广播电台,我流的信息。我有哪些选择?

Basically, I want to show "currently playing" information of a radio station I am streaming. What are my options?

谢谢!

推荐答案

没有,你的HTML5元素只知道流数据,并且甚至没有做出适当的请求来获取元数据。

No, your HTML5 elements are only aware of the stream data, and aren't even making the appropriate request to fetch the metadata.

请参阅这些文章:


  • <一个href=\"http://stackoverflow.com/questions/6061057/developing-the-client-for-the-icecast-server/6072488#6072488\">Developing客户端为icecast服务

<一个href=\"http://stackoverflow.com/questions/4911062/pulling-track-info-from-an-audio-stream-using-php/4914538#4914538\">Pulling曲目信息从音频流使用PHP

http://www.smackfu.com/stuff/programming/shoutcast html的

现在,这个以任何方式是不可能的。你只需做服务器端。 (见特别是第二个链接。)

Now, this isn't impossible by any means. You just have to do it server-side. (See that second link in particular.)

我还要指出的是,一个完全成熟的SHOUTcast服务器上(未与icecast理解,但它值得一试测试)生成7.html,它包含了监听器,监听器的最大峰值听众人数的数据,立体声/单声道,比特率和当前曲目的名称作为逗号分隔值。像这样的:

I should also point out that on a full-blown SHOUTcast Server (haven't tested with Icecast, but its worth a try) generates "7.html" which contains data on the number of listeners, max listeners, peak listeners, stereo/mono, bitrate, and current track name as comma-separated values. Like this:

2,1,33,625,2,128,J Mascis - 没有足够

如果你可以获取的http:// yourstreamingserver:端口/ 7.html ,那么你就可以得到这个数据很容易

If you can fetch http://yourstreamingserver:port/7.html, then you can get this data very easily.

这篇关于是否有可能从HTML5音频元素的Icecast获取元数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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