Have a look for the getUserMedia API and message the user if it's not available.