Do you have a link to the live demo or provide the exact errors. It is hard to debug without these details. My guess however is that you need to:


Serve the webpage over HTTPS if trying to use webcam - else access will be denied.


Ensure CORS headers are set for video from remote sources or domains else your HTML Canvas will be tainted and not accessible in JavaScript. Please check resources on CORS if this is the issue:



  
      

      developer.mozilla.org
  

  
    

Allowing cross-origin use of images and canvas - HTML: HyperText Markup... 3

  HTML provides a crossorigin attribute for images that, in combination with an appropriate CORS header, allows images defined by the  element that are loaded from foreign origins to be used in a  as if they had been loaded from the current origin.


  

  
    
    
  

  


If you want a website that allows you to host simple websites for free on https and try out HTML/CSS/JS ideas check out Glitch.com 1. We even have a presence on there where you can fork our already working code as a starting point eg getting webcam imagery etc and classifying it.