Getting Camera on a 'canvas'

I would like to be able to create an automatic qr scanner, however we are unable to pass the permissions to the iframe. It would be even better if an api was added to allow the camera image be taken to then be used with the qr reader APIs.