I understand the problem you are facing and have faced it before. Chrome and other similar browsers won't allow the Camera option on purpose due to security reasons. I have also heard that google sites doesn't support some methods part of JS. What I had to do for my personal project was to make sure permissions was allowed on each browser and the security was decreased. I allowed Camera and other permissions on my browser and it finally worked. If that doesn't work you could also try running it on your computer first to test it. I used VSCODE and opened the HTML file on my computer to test. This seemed to work temporarily for me. Good Luck, I hope this helps.