title: Webcam js Error in Chrome: Could not access webcam
body: <p>I am using Webcam JS in one of my projects.</p>
  <p><a href="https://github.com/jhuckaby/webcamjs" rel="nofollow noreferrer">https://github.com/jhuckaby/webcamjs</a></p>
  <p>version I was using: 1.0.0
  Latest version available: 1.0.5</p>
  <p>It was working fine in both Chrome and Firefox. But lately webcam error started showing only in CHROME. Firefox still works fine.</p>
  <p>Error that I received in 1.0.0: <code>Webcam.JS Error: cannot access webcam.</code></p>
  <p>I upgraded the version and now the error I'm getting in chrome is</p>
  <pre><code>Webcam.js Error: Could not access webcam.
  Permission Error: Only secure origins are allowed
  </code></pre>
  <p><a href="https://www.chromium.org/Home/chromium-security/prefer-secure-origins-for-powerful-new-features" rel="nofollow noreferrer">https://www.chromium.org/Home/chromium-security/prefer-secure-origins-for-powerful-new-features</a></p>
  <p>My website has a secure origin.</p>
  <p>Can anyone tell me why I'm facing errors like that?</p>
  <p>I believe there's no point in copy pasting webcam.js code.</p>
  <p>Here's the code I use:</p>
  <pre><code>Webcam.set({
        width: 320,
       height: 240,
       dest_width: 320,
       dest_height: 240,
       image_format: 'jpeg',
       jpeg_quality: 90,
       force_flash: false
      });
      Webcam.attach( '#my_camera' );
  </code></pre>