HTML 5 <video> 标签和网络摄像头集成的状态如何?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1318834/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 00:40:04  来源:igfitidea点击:

What's the status of the HTML 5 <video> tag and webcam integration?

videohtmlwebcam

提问by JorenB

Even though it seems to be in some kind of jeopardy, the open video standard is a great idea. I saw some demos on motion tracking with it - just proofs-of-concept, but interesting nonetheless. Now, I'd say that concepts like these would reallybe a gain, if there would be access to the user's webcam... Just imagine browsing through Flickr with your hands in mid-air.

尽管它似乎处于某种危险之中,但开放视频标准是一个好主意。我看到了一些关于运动跟踪的演示 - 只是概念验证,但仍然很有趣。现在,我想说,如果可以访问用户的网络摄像头,像这样的概念真的会有所收获……想象一下,用手在半空中浏览 Flickr。

I have Googled a little, but I can't find any detailed discussion on the subject. It is mentioned in some places, but that doesn't get me very far. Does anybody know whether support for this is planned? If yes, any prognosis on the 'when'? ;-)

我在谷歌上搜索了一些,但找不到关于这个主题的任何详细讨论。在某些地方提到了它,但这并没有让我走得很远。有谁知道是否计划对此提供支持?如果是,关于“何时”的任何预测?;-)

Of course, I guess they'd have to dream up a pretty good security model for it..

当然,我猜他们必须为此设计一个非常好的安全模型。

采纳答案by JorenB

Ok, still no clear, definitive answers, so I went on and took a little action. The WHATWG would probably have an answer for me, so I decided to contact someone there. Didn't really know who it had to be, but fellow Dutchman Anne van Kesterenusually seems to know the Web's future pretty well - plus, he provides an e-mail address.

好吧,仍然没有明确、明确的答案,所以我继续采取了一些行动。WHATWG 可能会给我一个答案,所以我决定联系那里的某个人。并不真正知道它一定是谁,但荷兰人Anne van Kesteren通常似乎非常了解 Web 的未来——此外,他还提供了一个电子邮件地址。

Translating his response probably won't do any good, so in short: there are some rough ideas on how to make it all work, but there's nothing tangible at the moment. The Device APIs and Policy Working Groupis supposed to continue work on this.

翻译他的回答可能不会有任何好处,所以简而言之:关于如何使其全部工作有一些粗略的想法,但目前没有任何切实的想法。该设备的API和政策工作组应该继续这方面的工作。

Reading through their page makes me realize something else too - why only webcamaccess? If Google intends to move the OS to the browser, we'll need more than just webcams. Why not manage your iPod through a webapp too? Anything should be possible. I guess a whole new concept of 'trusted website' will have to evolve iffunctionality like this would come available, but well, there's a solution to pretty much anything, isn't there? ;-)

阅读他们的页面让我也意识到了其他一些事情——为什么只能访问网络摄像头?如果谷歌打算将操作系统转移到浏览器,我们需要的不仅仅是网络摄像头。为什么不也通过网络应用程序管理您的 iPod?任何事情都应该是可能的。如果像这样的功能可用,我想一个全新的“可信网站”概念将不得不发展,但是,几乎任何事情都有解决方案,不是吗?;-)

回答by Fostah

Updated!: HTMl5Rocks has a very good working demo of this now. Check it out here!

更新!:HTMl5Rocks 现在有一个非常好的工作演示。看看这里

Here is a very interesting article with a demo, however the source has not been released yet: (Read the comments for more information on codecs used, socket server tech, etc)

这是一篇带有演示的非常有趣的文章,但是源代码尚未发布:(阅读评论以获取有关所用编解码器、套接字服务器技术等的更多信息)

https://labs.ericsson.com/developer-community/blog/beyond-html5-conversational-voice-and-video-implemented-webkit-gtk

https://labs.ericsson.com/developer-community/blog/beyond-html5-conversational-voice-and-video-implemented-webkit-gtk

回答by Wouter Dorgelo

We're working on a project like this..

我们正在做一个这样的项目..

About the Ericsson's demo that people mentioned; It only works with a patched webkit which isn't released (yet).

关于人们提到的爱立信的demo;它仅适用于尚未发布的修补 webkit。

We haven't seen any other working projects so this is how we plan to do this:

我们还没有看到任何其他工作项目,所以我们计划这样做:

  • Implement the HTML Media Capturedraft (available here) in order to access the raw data.
  • Using websockets for sending local data and receiving remote data at the same time.
  • Clients "register" on the websocket server with a callerID.
  • Server has an "invite" API where caller1 "invites" caller2.
  • The browser will play this using the HTML5 audio- and HTML5 video tag.
  • 实施HTML Media Capture草案(可在此处获得)以访问原始数据。
  • 使用 websockets 同时发送本地数据和接收远程数据。
  • 客户端与网页套接字服务器上的“注册”来电显示
  • 服务器有一个“邀请”API,调用者1“邀请”调用者2。
  • 浏览器将使用 HTML5 音频和 HTML5 视频标签播放此内容。

回答by newfront

html5 is with us for good, the flash vs silverlight vs html5 question has been around for a while now, but it seems that the trends are pointing towards a merger between our desktop world and our online world. If you've taken a sneak peak at Mac's Lion OS, it is basically app centric, which rides that line between OS level and Online.

html5 永远伴随着我们,flash vs silverlight vs html5 的问题已经存在一段时间了,但似乎趋势指向我们的桌面世界和我们的在线世界之间的合并。如果您对 Mac 的 Lion OS 有所了解,那么它基本上是以应用程序为中心的,它介于操作系统级别和在线之间。

The Device API has been drafted and will come to all major browsers with time (WebKit is always the early adopter), but as we all know the w3c takes longer to officially approve additions to the HTML5 specification. Erikson Labs has released their camera/sound capture API (https://labs.ericsson.com/developer-community/blog/beyond-html5-audio-capture-web-browsers) so you can get started today with HTML5 and peripheral support.

设备 API 已经起草,随着时间的推移将出现在所有主要浏览器中(WebKit 始终是早期采用者),但众所周知,w3c 需要更长的时间来正式批准对 HTML5 规范的补充。Erikson Labs 发布了他们的摄像头/声音捕获 API (https://labs.ericsson.com/developer-community/blog/beyond-html5-audio-capture-web-browsers),因此您可以立即开始使用 HTML5 和外围设备支持.

回答by Keshan

have a look at this WebRTC projectwhich is an open source project and gives us the chance to access webcam, microphone without installing any plugings. which i guess Google uses for their developments. so worth trying.

看看这个WebRTC 项目,它是一个开源项目,让我们有机会在不安装任何插件的情况下访问网络摄像头、麦克风。我猜谷歌将其用于他们的开发。所以值得一试。

回答by cdanzig

You can now access video / audio hardware directly from the browser (hooray HTML5) but there is no good way to record the stream. To accomplish this you still need to utilize a Flash Media Server (or clone). There are a few good services out there that make this turn-key instead of a giant headache:

您现在可以直接从浏览器(万岁 HTML5)访问视频/音频硬件,但没有好的方法来记录流。为此,您仍然需要使用 Flash Media Server(或克隆)。有一些很好的服务可以使这个交钥匙而不是一个巨大的头痛:

http://cameratag.com

http://cameratag.com

http://framebase.io

http://framebase.io

http://framey.com

http://framey.com

回答by artificialidiot

It will never be possible because it is the last use of plugins which open web standards cannot accomplish. The day streaming audio/video from client to server will be the end of flash/silverlight/what have you. Also there is software patents issue which will make it impossible to encode media if current state of affairs on decoding means anything. There are just too many obstacles before privacy or technical issues. Flash has been doing it for years without anybody whinning about any privacy problems. Geolocation is potentially more dangerous but nobody thinks twice considering its rich possibilities. The closest thing you can get is a webcam with MJPEG stream that is wrapped in multipart-replace and using canvas API to get the image pixels.

这是永远不可能的,因为这是开放 Web 标准无法实现的插件的最后使用。从客户端到服务器流式传输音频/视频的那一天将是 flash/silverlight/你拥有的一切的终结。此外还有软件专利问题,如果解码的当前状态意味着什么,这将使得无法对媒体进行编码。在隐私或技术问题之前有太多障碍。Flash 多年来一直这样做,没有人抱怨任何隐私问题。地理定位可能更危险,但考虑到其丰富的可能性,没有人会三思而后行。你能得到的最接近的东西是一个带有 MJPEG 流的网络摄像头,它被包裹在 multipart-replace 中,并使用 canvas API 来获取图像像素。