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

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

问题描述

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



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

解决方案

技术上'是'



(但不是真的......)



HTML 5的< video> tag是协议不可知的 - 它不关心。将协议放置在 src 属性中作为URL的一部分。例如:

 < video src =rtp://myserver.com/path/to/stream> 
您的浏览器不支持VIDEO标记和/或RTP流。
< / video>

或者可能

 < video src =http://myserver.com:1935/path/to/stream/myPlaylist.m3u8> 
您的浏览器不支持VIDEO标记和/或RTP流。
< / video>

也就是说,执行< video> 标记是浏览器特定的。由于HTML 5的早期版本,我期望经常更改支持(或缺乏支持)。

从W3C的HTML5规范(


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

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.

解决方案

Technically 'Yes'

(but not really...)

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>

or maybe

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

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).

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天全站免登陆