Are you sure it's not because you are trying to open your page directly from the file, not from a webserver and thus with a file:///
prefix and not a http(s)://
one ?
If the url in the bar address looks like file:///...
then chrome will not allow access to the camera.
However if you launch your page through a basic webserver (python -m SimpleHTTPServer
in the folder where your page is) or with JSFiddle (http://jsfiddle.net/7Hkws/), it works perfectly fine.
In chrome settings, Privacy > Content Settings > Medias
should be set to
Ask when a site requires access to your camera and microphone (recommended)