How to whitelist custom port entry so Chrome offers the options to enable Camera and Mic2019 Community Moderator ElectiongetUserMedia is not working in chrome version 48.0.2560.0 while working in 46.0getUserMedia is not working in chrome version 48.0.2560.0 while working in 46.0navigator.mediaDevices.getUserMedia is not working and neither does webkitGetUserMediaWebRTC PermissionDeniedError getUserMedia on RTCMultiConnectionIn android's Google Chrome, how to set unsafely-treat-insecure-origin-as-secureHow to test HTML5 Audio recording on chrome 48How to access the camera feature in chrome latest version using http(insecure access)?WebRTC, browser doesn't ask for permission to use camera and microphone - but locally it doesUsing getUserMedia() on insecure origins in ChromeWebRTC on Chrome 67 working in US and not UKHow to access Camera and Microphone in Chrome without HTTPS?

When to use a slotted vs. solid turner?

Do I need to be arrogant to get ahead?

What does 高層ビルに何車線もの道路。mean?

Brexit - No Deal Rejection

New passport but visa is in old (lost) passport

What is the significance behind "40 days" that often appears in the Bible?

What's the meaning of a knight fighting a snail in medieval book illustrations?

I am confused as to how the inverse of a certain function is found.

Custom alignment for GeoMarkers

How difficult is it to simply disable/disengage the MCAS on Boeing 737 Max 8 & 9 Aircraft?

A single argument pattern definition applies to multiple-argument patterns?

A diagram about partial derivatives of f(x,y)

Why one should not leave fingerprints on bulbs and plugs?

World War I as a war of liberals against authoritarians?

Why does overlay work only on the first tcolorbox?

How to deal with taxi scam when on vacation?

Have the tides ever turned twice on any open problem?

What is the relationship between relativity and the Doppler effect?

What exactly is this small puffer fish doing and how did it manage to accomplish such a feat?

Aluminum electrolytic or ceramic capacitors for linear regulator input and output?

Did Ender ever learn that he killed Stilson and/or Bonzo?

Math equation in non italic font

How to explain that I do not want to visit a country due to personal safety concern?

About the actual radiative impact of greenhouse gas emission over time



How to whitelist custom port entry so Chrome offers the options to enable Camera and Mic



2019 Community Moderator ElectiongetUserMedia is not working in chrome version 48.0.2560.0 while working in 46.0getUserMedia is not working in chrome version 48.0.2560.0 while working in 46.0navigator.mediaDevices.getUserMedia is not working and neither does webkitGetUserMediaWebRTC PermissionDeniedError getUserMedia on RTCMultiConnectionIn android's Google Chrome, how to set unsafely-treat-insecure-origin-as-secureHow to test HTML5 Audio recording on chrome 48How to access the camera feature in chrome latest version using http(insecure access)?WebRTC, browser doesn't ask for permission to use camera and microphone - but locally it doesUsing getUserMedia() on insecure origins in ChromeWebRTC on Chrome 67 working in US and not UKHow to access Camera and Microphone in Chrome without HTTPS?










1















I added a custom port in etc/hosts file



127.0.0.1 testlocalhost.com


When launch server(http not https) from this port, I noticed Chrome banned Camera and Mic permissions, and threw



getUserMedia() no longer works on insecure origins


When launch from localhost directly, I can change these 2 permissions although still seeing Your connection to this site is not secure warning.



I was wondering if it's possible to whitelist the custom port.



thanks!!!



(When test in Firefox, it still gives me the options to change Camera and Mic permissions.)










share|improve this question






















  • Use localhost.

    – Josh Lee
    Mar 6 at 21:12











  • Possible duplicate of getUserMedia is not working in chrome version 48.0.2560.0 while working in 46.0

    – Josh Lee
    Mar 6 at 21:13











  • @JoshLee thanks for replying, it's intended to not use localhost but a custom port

    – user8355591
    Mar 6 at 21:14















1















I added a custom port in etc/hosts file



127.0.0.1 testlocalhost.com


When launch server(http not https) from this port, I noticed Chrome banned Camera and Mic permissions, and threw



getUserMedia() no longer works on insecure origins


When launch from localhost directly, I can change these 2 permissions although still seeing Your connection to this site is not secure warning.



I was wondering if it's possible to whitelist the custom port.



thanks!!!



(When test in Firefox, it still gives me the options to change Camera and Mic permissions.)










share|improve this question






















  • Use localhost.

    – Josh Lee
    Mar 6 at 21:12











  • Possible duplicate of getUserMedia is not working in chrome version 48.0.2560.0 while working in 46.0

    – Josh Lee
    Mar 6 at 21:13











  • @JoshLee thanks for replying, it's intended to not use localhost but a custom port

    – user8355591
    Mar 6 at 21:14













1












1








1








I added a custom port in etc/hosts file



127.0.0.1 testlocalhost.com


When launch server(http not https) from this port, I noticed Chrome banned Camera and Mic permissions, and threw



getUserMedia() no longer works on insecure origins


When launch from localhost directly, I can change these 2 permissions although still seeing Your connection to this site is not secure warning.



I was wondering if it's possible to whitelist the custom port.



thanks!!!



(When test in Firefox, it still gives me the options to change Camera and Mic permissions.)










share|improve this question














I added a custom port in etc/hosts file



127.0.0.1 testlocalhost.com


When launch server(http not https) from this port, I noticed Chrome banned Camera and Mic permissions, and threw



getUserMedia() no longer works on insecure origins


When launch from localhost directly, I can change these 2 permissions although still seeing Your connection to this site is not secure warning.



I was wondering if it's possible to whitelist the custom port.



thanks!!!



(When test in Firefox, it still gives me the options to change Camera and Mic permissions.)







javascript google-chrome webrtc getusermedia






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 6 at 21:01









user8355591user8355591

224




224












  • Use localhost.

    – Josh Lee
    Mar 6 at 21:12











  • Possible duplicate of getUserMedia is not working in chrome version 48.0.2560.0 while working in 46.0

    – Josh Lee
    Mar 6 at 21:13











  • @JoshLee thanks for replying, it's intended to not use localhost but a custom port

    – user8355591
    Mar 6 at 21:14

















  • Use localhost.

    – Josh Lee
    Mar 6 at 21:12











  • Possible duplicate of getUserMedia is not working in chrome version 48.0.2560.0 while working in 46.0

    – Josh Lee
    Mar 6 at 21:13











  • @JoshLee thanks for replying, it's intended to not use localhost but a custom port

    – user8355591
    Mar 6 at 21:14
















Use localhost.

– Josh Lee
Mar 6 at 21:12





Use localhost.

– Josh Lee
Mar 6 at 21:12













Possible duplicate of getUserMedia is not working in chrome version 48.0.2560.0 while working in 46.0

– Josh Lee
Mar 6 at 21:13





Possible duplicate of getUserMedia is not working in chrome version 48.0.2560.0 while working in 46.0

– Josh Lee
Mar 6 at 21:13













@JoshLee thanks for replying, it's intended to not use localhost but a custom port

– user8355591
Mar 6 at 21:14





@JoshLee thanks for replying, it's intended to not use localhost but a custom port

– user8355591
Mar 6 at 21:14












2 Answers
2






active

oldest

votes


















1














Short answer is no - you cannot bypass the saved word localhost with an IP address which represents it. The reason is that Google Chrome uses the actual word localhost to detect develper debugging and allow using getUserMedia via HTTP. All other addresses, regardless if they represent localhost or not, are only allowed to use getUserMedia via HTTPS or WSS.






share|improve this answer






























    0














    Right in the error message you must have had, there is a link to this page, where there is a paragraph about Testing Powerful Features which enumerates a few options, and among them,




    1. You can run chrome with the --unsafely-treat-insecure-origin-as-secure="http://example.com" flag (replacing "example.com" with the origin you actually want to test), which will treat that origin as secure for this session. Note that on Android and ChromeOS this requires having a device with root access/dev mode. (This flag is broken in Chrome 63 but fixed in Chrome 64 and later. Prior to Chrome 62, you must also include the --user-data-dir=/test/only/profile/dir to create a fresh testing profile for the flag to work.)



    So you just have to start Chrome from command lines with the flag --unsafely-treat-insecure-origin-as-secure="http://testlocalhost.com"






    share|improve this answer






















      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55032062%2fhow-to-whitelist-custom-port-entry-so-chrome-offers-the-options-to-enable-camera%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      Short answer is no - you cannot bypass the saved word localhost with an IP address which represents it. The reason is that Google Chrome uses the actual word localhost to detect develper debugging and allow using getUserMedia via HTTP. All other addresses, regardless if they represent localhost or not, are only allowed to use getUserMedia via HTTPS or WSS.






      share|improve this answer



























        1














        Short answer is no - you cannot bypass the saved word localhost with an IP address which represents it. The reason is that Google Chrome uses the actual word localhost to detect develper debugging and allow using getUserMedia via HTTP. All other addresses, regardless if they represent localhost or not, are only allowed to use getUserMedia via HTTPS or WSS.






        share|improve this answer

























          1












          1








          1







          Short answer is no - you cannot bypass the saved word localhost with an IP address which represents it. The reason is that Google Chrome uses the actual word localhost to detect develper debugging and allow using getUserMedia via HTTP. All other addresses, regardless if they represent localhost or not, are only allowed to use getUserMedia via HTTPS or WSS.






          share|improve this answer













          Short answer is no - you cannot bypass the saved word localhost with an IP address which represents it. The reason is that Google Chrome uses the actual word localhost to detect develper debugging and allow using getUserMedia via HTTP. All other addresses, regardless if they represent localhost or not, are only allowed to use getUserMedia via HTTPS or WSS.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 7 at 8:41









          Koby DouekKoby Douek

          11.8k143863




          11.8k143863























              0














              Right in the error message you must have had, there is a link to this page, where there is a paragraph about Testing Powerful Features which enumerates a few options, and among them,




              1. You can run chrome with the --unsafely-treat-insecure-origin-as-secure="http://example.com" flag (replacing "example.com" with the origin you actually want to test), which will treat that origin as secure for this session. Note that on Android and ChromeOS this requires having a device with root access/dev mode. (This flag is broken in Chrome 63 but fixed in Chrome 64 and later. Prior to Chrome 62, you must also include the --user-data-dir=/test/only/profile/dir to create a fresh testing profile for the flag to work.)



              So you just have to start Chrome from command lines with the flag --unsafely-treat-insecure-origin-as-secure="http://testlocalhost.com"






              share|improve this answer



























                0














                Right in the error message you must have had, there is a link to this page, where there is a paragraph about Testing Powerful Features which enumerates a few options, and among them,




                1. You can run chrome with the --unsafely-treat-insecure-origin-as-secure="http://example.com" flag (replacing "example.com" with the origin you actually want to test), which will treat that origin as secure for this session. Note that on Android and ChromeOS this requires having a device with root access/dev mode. (This flag is broken in Chrome 63 but fixed in Chrome 64 and later. Prior to Chrome 62, you must also include the --user-data-dir=/test/only/profile/dir to create a fresh testing profile for the flag to work.)



                So you just have to start Chrome from command lines with the flag --unsafely-treat-insecure-origin-as-secure="http://testlocalhost.com"






                share|improve this answer

























                  0












                  0








                  0







                  Right in the error message you must have had, there is a link to this page, where there is a paragraph about Testing Powerful Features which enumerates a few options, and among them,




                  1. You can run chrome with the --unsafely-treat-insecure-origin-as-secure="http://example.com" flag (replacing "example.com" with the origin you actually want to test), which will treat that origin as secure for this session. Note that on Android and ChromeOS this requires having a device with root access/dev mode. (This flag is broken in Chrome 63 but fixed in Chrome 64 and later. Prior to Chrome 62, you must also include the --user-data-dir=/test/only/profile/dir to create a fresh testing profile for the flag to work.)



                  So you just have to start Chrome from command lines with the flag --unsafely-treat-insecure-origin-as-secure="http://testlocalhost.com"






                  share|improve this answer













                  Right in the error message you must have had, there is a link to this page, where there is a paragraph about Testing Powerful Features which enumerates a few options, and among them,




                  1. You can run chrome with the --unsafely-treat-insecure-origin-as-secure="http://example.com" flag (replacing "example.com" with the origin you actually want to test), which will treat that origin as secure for this session. Note that on Android and ChromeOS this requires having a device with root access/dev mode. (This flag is broken in Chrome 63 but fixed in Chrome 64 and later. Prior to Chrome 62, you must also include the --user-data-dir=/test/only/profile/dir to create a fresh testing profile for the flag to work.)



                  So you just have to start Chrome from command lines with the flag --unsafely-treat-insecure-origin-as-secure="http://testlocalhost.com"







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 7 at 9:15









                  KaiidoKaiido

                  44.2k466106




                  44.2k466106



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55032062%2fhow-to-whitelist-custom-port-entry-so-chrome-offers-the-options-to-enable-camera%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

                      Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

                      Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved