getUserMedia in Opera 12

June 14th, 2012. Tagged: (x)HTML(5), browsers

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.

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

You can start playing with it right now in Opera, no need to install nightly versions and enable secret flags. Here's how:

1. Install Opera
2. Load any page
3. Press Command + Alt + I (on a Mac) to bring the Dragonfly console (like Firebug)
4. Type:

document.body.innerHTML = '<video autoplay>';

and then

  function(stream){document.getElementsByTagName('video')[0].src = stream}

This is it, enjoy :)

Ever so slightly disappointed that {audio: true} gives a "not supported" error

Tell your friends about this post: Facebook, Twitter, Google+

3 Responses

  1. I’m trying to find out how to enable Media Stream in Opera Mobile 12.

  2. Actually, I don’t need to. It already enable.

  3. Seems to not work in Linux (Opera/9.80 (X11; Linux x86_64; U; ru) Presto/2.10.289 Version/12.00)

Leave a Reply