I would actually recommend against that. If the user gets prompted for camera access the moment they reach your webpage, it will turn most people off immediately. They need to click "yes I want to try this" before they get the security prompt, it needs to be asking for permission to do something THEY initiated.