This example uses constraints.
For more information, see Capturing Audio & Video in HTML5 on HTML5 Rocks.