在 HTML5 中通过 RTSP 或 RTP 流式传输 [英] Streaming via RTSP or RTP in HTML5

查看:30
本文介绍了在 HTML5 中通过 RTSP 或 RTP 流式传输的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个网络应用程序,它应该从服务器播放 RTSP/RTP 流http://lscube.org/projects/feng.

I'm building a web app that should play back an RTSP/RTP stream from a server http://lscube.org/projects/feng.

HTML5 视频/音频标签是否支持 rtsp 或 rtp?如果没有,最简单的解决方案是什么?也许下拉到 VLC 插件或类似的东西.

Does the HTML5 video/audio tag support the rtsp or rtp? If not, what would the easiest solution be? Perhaps drop down to a VLC plugin or something like that.

推荐答案

技术上是"

(但不是真的……)

HTML 5 的 标签与协议无关——它不在乎.您将协议放在 src 属性中作为 URL 的一部分.例如:

HTML 5's <video> tag is protocol agnostic—it does not care. You place the protocol in the src attribute as part of the URL. E.g.:

<video src="rtp://myserver.com/path/to/stream">
    Your browser does not support the VIDEO tag and/or RTP streams.
</video>

也许

<video src="http://myserver.com:1935/path/to/stream/myPlaylist.m3u8">
    Your browser does not support the VIDEO tag and/or RTP streams.
</video>

也就是说, 标签的实现是特定于浏览器的.由于 HTML 5 还处于早期阶段,我预计会经常更改支持(或缺乏支持).

That said, the implementation of the <video> tag is browser specific. Since it is early days for HTML 5, I expect frequently changing support (or lack of support).

来自 W3C 的 HTML5 规范(视频元素):

From the W3C's HTML5 spec (The video element):

用户代理可能支持任何视频和音频编解码器和容器格式

User agents may support any video and audio codecs and container formats

这篇关于在 HTML5 中通过 RTSP 或 RTP 流式传输的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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