How to allow Chrome to access my camera on localhost?

前端 未结 9 2155
庸人自扰
庸人自扰 2020-11-29 03:10

I cloned a project about real-time image processing on a web browser from this link: Then I could not allow my browser to access my camera. I got this javascript alert:

相关标签:
9条回答
  • 2020-11-29 03:19

    Chrome now only allows https:// servers to persistent list (version 39.xx)

    https://support.google.com/chrome/answer/2693767?hl=en

    Allow: This allows the site to access your camera and microphone at this time and a notification will appear confirming that you’ve granted access. If you select Allow on a "http" URL your preference will not be remembered in future visits. If you select Allow on a "https" URL, your preference will be remembered in future visits.

    Maybe this link helps to set your local secure server if you are using Wamp. http://forum.wampserver.com/read.php?2,32986

    Then you can add your local server to persistent allow list of chrome.

    0 讨论(0)
  • 2020-11-29 03:21

    Got this problem for days, only this helped:

    Reinstall Chrome by removing configuration as well. And try not to sync all the extensions, as they may interfere.

    sudo apt-get purge google-chrome-stable
    rm -rf ~/.config/google-chrome
    

    Then install from official.

    0 讨论(0)
  • 2020-11-29 03:24

    Open localhost/webcam.swf then right click on the flash file then allow the webcam and tick remember that will add exception for localhost

    0 讨论(0)
  • 2020-11-29 03:28

    You can choose a different default permission setting and manage exceptions in Content settings.

    1. Click the Chrome menu Chrome menu on the browser toolbar.
    2. Select Settings.
    3. Click Show advanced settings.
    4. In the "Privacy" section, click Content settings.
    5. In the "Media" section:

    * Ask me when a site requires access to my camera and microphone: Select this option if you want Chrome to alert you whenever a site requests access to your camera and microphone.

    * Do not allow sites to access my camera and microphone: Select this option to automatically deny any site requests to access your camera and microphone.

    Or click Manage exceptions to remove previously-granted permissions for specific sites. Source: https://support.google.com/chrome/answer/2696491?hl=en

    P/D: the link you provided has an error. I can't access.

    0 讨论(0)
  • 2020-11-29 03:33

    To ignore Chrome’s secure origin policy, follow these steps.

    Navigate to chrome://flags/#unsafely-treat-insecure-origin-as-secure in Chrome.

    Find and enable the Insecure origins treated as secure section (see below).

    Add any addresses you want to ignore the secure origin policy for. Remember to include the port number too (if required).

    Save and restart Chrome.

    I found solution from below link.Hope it will help to someone

    https://medium.com/@Carmichaelize/enabling-the-microphone-camera-in-chrome-for-local-unsecure-origins-9c90c3149339

    0 讨论(0)
  • 2020-11-29 03:34

    Chrome on HTTP or any other port won't save the preference of Camara share choice.

    To save the selection you will need to run on HTTPs, even if you don't have SSL certificate on localhost that fine. Just add https before the localhost url and it will ask you its unsafe, if you want to proceed add it as an exception under Advance options. Do that and then Chrome will save you camera sharing preference for this website. and won't ask you to select allow

    0 讨论(0)
提交回复
热议问题