Sunday, April 15, 2012

CAPTURING AUDIO & VIDEO IN HTML5

Hot from the W3 standards committee
HTML Media Capture   W3C Working Draft 14 April 2011


HTML5 ROCKS site has a great article on this.

"Audio/Video capture has been the "Holy Grail" of web development for a long time. For many years we've had to rely on browser plugins (Flash or Silverlight) to get the job done. Come on!

HTML5 to the rescue. It might not be apparent, but the rise of HTML5 has brought a surge of access to device hardware. Geolocation (GPS), the Orientation API (accelerometer), WebGL (GPU), and the Web Audio API (audio hardware) are perfect examples. These features are ridiculously powerful, exposing high level JavaScript APIs that sit on top of the system's underlying hardware capabilities.

This tutorial introduces a new API, navigator.getUserMedia(), which allows web apps to access a user's camera and microphone."


I've done a little exploring and getUserMedia isn't quite ready for prime time. So far for PC's it only works with in Chrome and Opera. My first hand experience, I only tested on Chrome, was that it was grabbing the wrong camera device and there was no way to select which camera device to capture from. 

It seems a lot of these new api's are driven by phone developers that have found HTML/JavaScript an easy way to write universally supported application.  So there are a number of tools that basically take your web site and turn it in to an Android or iPhone application.  

Support:
  • Android 3.0 browser - one of the first implementations. Check out this video to see it in action.
  • Chrome for Android (0.16)
  • Firefox Mobile 10.0


From my notes:

Web video input

No comments: