getusermedia
Opera 12 wins - the first stable desktop browser to ship getUserMedia()
. I believe they had shipped it already in a mobile version of the browser.
Opera 12获胜-第一个稳定的桌面浏览器发布getUserMedia()
。 我相信他们已经在浏览器的移动版本中发布了它。
(I'll need to fix my example from last night because Chrome Canary uses webkitGetUserMedia and also uses a stream URL to assign to video element's src)
(我需要从昨晚开始修复示例,因为Chrome Canary使用webkitGetUserMedia并还使用流URL分配给视频元素的src)
You can start playing with it right now in Opera, no need to install nightly versions and enable secret flags. Here's how:
您可以立即在Opera中开始使用它,而无需安装夜间版本并启用秘密标志。 这是如何做:
1. Install Opera 2. Load any page 3. Press Command + Alt + I (on a Mac) to bring the Dragonfly console (like Firebug) 4. Type:
1.安装Opera 2.加载任何页面3.按Command + Alt + I(在Mac上)以打开Dragonfly控制台(如Firebug)。4.键入:
document.body.innerHTML = '<video autoplay>';
and then
接着
navigator.getUserMedia(
{video:true},
function(stream){document.getElementsByTagName('video')[0].src = stream}
)
This is it, enjoy 🙂
就是这样,享受🙂
Ever so slightly disappointed that {audio: true} gives a "not supported" error
曾经有些失望,{audio:true}给出了“不支持”错误
Tell your friends about this post on Facebook and Twitter
在Facebook和Twitter上告诉您的朋友有关此帖子的信息
翻译自: https://www.phpied.com/getusermedia-in-opera-12/
getusermedia