• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

can't get the webcam to work

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 2 Posters 5.2k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    xela
    last edited by Feb 19, 2018, 12:51 PM

    I’ve tried 3 different webcams, played with resolutions and doesn’t matter what I do, I always get the following message:

    Webcam.js Error: Could not access webcam:
    NotSupportedError: Only secure origins are allowed
    (see: https://goo.gl/Y0ZkNV). NotSupportedError: Only
    secure origins are allowed (see: https://goo.gl/Y0ZkNV).

    anyone knows by any chance what it means and how to get the webcam to work?

    N 1 Reply Last reply Feb 19, 2018, 1:24 PM Reply Quote 0
    • N Offline
      ninjabreadman @xela
      last edited by Feb 19, 2018, 1:24 PM

      @xela Apparently this was happening when trying to request an image larger than 720px from webcamjs. See the notes here for Chrome and requiring SSL, and exceptions for localhost and 127.*.*.*. Is the address in your config still localhost?

      Problem with config or JavaScript? Copy/paste it into JSHint.
      Check out the detailed walkthroughs on install, config, modules, etc.

      X 1 Reply Last reply Feb 19, 2018, 1:35 PM Reply Quote 0
      • X Offline
        xela @ninjabreadman
        last edited by Feb 19, 2018, 1:35 PM

        @ninjabreadman That’s the address in my config:
        var config =
        {
        address: “0.0.0.0”,
        electronOptions: {

        },
        ipWhitelist: [
        	"127.0.0.1",
        	"::ffff:127.0.0.1",
        	"::1",
        	"192.168.44.1/24"
        ],
        
        N 1 Reply Last reply Feb 19, 2018, 1:58 PM Reply Quote 0
        • N Offline
          ninjabreadman @xela
          last edited by ninjabreadman Feb 19, 2018, 2:06 PM Feb 19, 2018, 1:58 PM

          @xela You’ll want the address to be localhost or 127.0.0.1.

          I don’t know exactly how it’s working with 0.0.0.0 and reaching the loopback to display the server, but Chromium (and therefore electron) will only allow the camera over http for those addresses.

          Problem with config or JavaScript? Copy/paste it into JSHint.
          Check out the detailed walkthroughs on install, config, modules, etc.

          1 Reply Last reply Reply Quote 0
          • X Offline
            xela
            last edited by Feb 19, 2018, 11:11 PM

            It works! thank you very much!
            but now I can’t connect via remote control…

            N 1 Reply Last reply Feb 20, 2018, 12:30 AM Reply Quote 0
            • N Offline
              ninjabreadman @xela
              last edited by ninjabreadman Feb 20, 2018, 12:32 AM Feb 20, 2018, 12:30 AM

              @xela That’s a whitelist issue; the ipWhiteList controls which computers can connect to the MM server. address controls what the electron instance connects to.

              Have a look here for @mochman’s ipWhiteList config walkthrough. If you’re on an IPv6 network, it’s not altogether intuitive for those of us who grew accustomed to IPv4.

              Problem with config or JavaScript? Copy/paste it into JSHint.
              Check out the detailed walkthroughs on install, config, modules, etc.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                6/6
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy