Html 哪些网络浏览器支持 HTML5 <device> 标签?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3012002/
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
Which web browsers support the HTML5 <device> tag?
提问by Felix
I read some time ago about the possibility to use media stream from a USB or rs232 device with the <device>
tag such as a webcam with HTML5.
前段时间我读到了关于使用来自 USB 或 rs232 设备的媒体流与<device>
标签(例如带有 HTML5 的网络摄像头)的可能性。
Is there a web browser that supports this right now? (i.e. nighty builds of Chrome, Webkit...)
现在有支持这个的网络浏览器吗?(即 Chrome、Webkit 的夜间构建......)
采纳答案by Stefan ?lund
Now we have released our modified WebKit library so that you can test these features yourself. Note that the "device" element is no longer available in the WhatWG spec, it has been replaced with a JavaScript API (navigator.getUserMedia(...)).
现在我们发布了修改后的 WebKit 库,以便您可以自己测试这些功能。请注意,WhatWG 规范中不再提供“设备”元素,它已被 JavaScript API (navigator.getUserMedia(...)) 取代。
You can read more at: https://labs.ericsson.com/developer-community/blog/beyond-html5-experiment-real-time-communication-browser
您可以在以下位置阅读更多信息:https: //labs.ericsson.com/developer-community/blog/beyond-html5-experiment-real-time-communication-browser
回答by Anurag
Unfortunately, no browsers support the device APIs yet. The specification seems to be in a rather early stage and can be found here - http://dev.w3.org/html5/html-device/
不幸的是,目前还没有浏览器支持设备 API。该规范似乎处于相当早期的阶段,可以在这里找到 - http://dev.w3.org/html5/html-device/
Ericsson Labs did a blog postwith some snippets of code which is great, but there's no playground to try these out.
Ericsson Labs发表了一篇博客文章,其中包含一些很棒的代码片段,但没有任何地方可以尝试这些代码。
Another related questionwas asked on SO last year, but looks like things haven't changed much since.
去年在 SO 上提出了另一个相关问题,但自那以后情况似乎没有太大变化。
However, you might find this interesting - nothing production worthy but still fun. This blog posttalks about using the <video>
tag to stream from a webcam via VLC.
但是,您可能会发现这很有趣 - 没有什么值得制作的,但仍然很有趣。这篇博文讨论了使用<video>
标签通过 VLC 从网络摄像头流式传输。
回答by webinista
There's also an experimental build of Opera Mobile for Android that supports navigator.getUserMedia().
还有一个支持 navigator.getUserMedia() 的 Android 版 Opera Mobile 实验版本。
http://my.opera.com/core/blog/2011/03/23/webcam-orientation-preview
http://my.opera.com/core/blog/2011/03/23/webcam-orientation-preview
回答by Michiel Trimpe
As @stefan-lund already mentioned the device tag has been replaced by the WebRTC specification.
正如@stefan-lund 已经提到的,设备标签已被 WebRTC 规范取代。
Opera has a dev build available at http://dev.opera.com/articles/view/labs-more-fun-using-the-web-with-getusermedia-and-native-pages/which supports WebRTC.
Opera 在http://dev.opera.com/articles/view/labs-more-fun-using-the-web-with-getusermedia-and-native-pages/ 上有一个支持 WebRTC的开发版本。
Chrome should get support in early 2012 (http://techcrunch.com/2011/11/24/chrome-getting-native-gamepad-webcam-and-webrtc-support-in-early-2012/)
Chrome 应该在 2012 年初获得支持(http://techcrunch.com/2011/11/24/chrome-getting-native-gamepad-webcam-and-webrtc-support-in-early-2012/)
If you just want to receive a video upload you can also use the Media Capture API instead, which is a special type of the input type=file
element.
如果您只想接收视频上传,您也可以改用 Media Capture API,这是一种特殊类型的input type=file
元素。
<input type="file" accept="image/*;capture=camera" />
Browser support for that is covered here: The Media Capture API - any existing implementations?
此处涵盖了浏览器对此的支持:媒体捕获 API - 任何现有的实现?
回答by Ahi Tuna
Chrome just added support for this today (dev channel Chrome) >> https://groups.google.com/forum/#!topic/discuss-webrtc/LuY7zYLA8sA
Chrome 今天刚刚添加了对此的支持(开发频道 Chrome)>> https://groups.google.com/forum/#!topic/discuss-webrtc/LuY7zYLA8sA