是否可以使用 html5 播放 Shotcast Internet 广播流? [英] Is it possible to play shoutcast internet radio streams with html5?

查看:23
本文介绍了是否可以使用 html5 播放 Shotcast Internet 广播流?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用 html5 播放shoutcast(或某些)互联网广播流?

Is it possible to play shoutcast (or some) internet radio streams with html5?

所以我有下一个代码:

<html>
<body>
<audio src="http://shoutcast.internet-radio.org.uk:10272/" />
</body>
</html>

我将其保存为 HTML 页面并启动浏览器(Google chrome 4.0.249.78、safary 或 FF)

I save it as HTML page and start my browser (Google chrome 4.0.249.78, safary or FF)

但它不玩/不工作!(

而且它不能与我尝试播放的任何其他网络电台一起播放!(

And it does not play with any other internet radio I tried to play!(

为什么!?!我做错了什么?

Why!?! What am I doing wrong?

顺便说一句:来自 HTML5(包括下一代添加仍在开发中)2.6.1 协议概念用户代理可以实现多种传输协议,但该规范主要根据 HTTP 定义行为.[HTTP]

btw: from HTML5 (including next generation additions still in development) 2.6.1 Protocol concepts User agents can implement a variety of transfer protocols, but this specification mostly defines behavior in terms of HTTP. [HTTP]

HTTP GET 方法相当于协议的默认检索动作.例如,FTP 中的 RETR.就 HTTP 而言,此类操作是幂等且安全的.

The HTTP GET method is equivalent to the default retrieval action of the protocol. For example, RETR in FTP. Such actions are idempotent and safe, in HTTP terms.

HTTP 响应码相当于其他协议中具有相同基本含义的状态.例如,找不到文件"错误相当于 404 代码,服务器错误相当于 5xx 代码,等等.

The HTTP response codes are equivalent to statuses in other protocols that have the same basic meanings. For example, a "file not found" error is equivalent to a 404 code, a server error is equivalent to a 5xx code, and so on.

HTTP 标头相当于其他协议中具有相同基本含义的字段.例如,HTTP 身份验证标头等效于 FTP 协议的身份验证方面.

The HTTP headers are equivalent to fields in other protocols that have the same basic meaning. For example, the HTTP authentication headers are equivalent to the authentication aspects of the FTP protocol.

推荐答案

你不能用 ShoutCast 但用 Icecast 和 edcast 客户端你可以通过 HTML5 <audio> 标签流式传输实时 vorbis.只需将其指向 http://your-url.com:port/stream.ogg:p

You can't do it with ShoutCast but with Icecast and edcast client you can stream live vorbis trough HTML5 <audio> tag. Just point it to http://your-url.com:port/stream.ogg :p

这篇关于是否可以使用 html5 播放 Shotcast Internet 广播流?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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