Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

camera is not showing in browser #39

Open
PratyushKes opened this issue Sep 13, 2020 · 12 comments
Open

camera is not showing in browser #39

PratyushKes opened this issue Sep 13, 2020 · 12 comments

Comments

@PratyushKes
Copy link

HI there, my chrome is unable to show the camera, i mean my camera is not opening on chrome.

@vinamramunot-tech
Copy link

are you using "localhost" or "127.0.0.1" or "0.0.0.0"? try one of those. Also check https flag at "chrome://flags" and enable that to check if it works

@Ikigainuxxxx
Copy link

are you using "localhost" or "127.0.0.1" or "0.0.0.0"? try one of those. Also check https flag at "chrome://flags" and enable that to check if it works

what should i enable?

@Dushyantsingh-ds
Copy link

This didn't work!

@vinamramunot-tech
Copy link

@Dushyantsingh-ds can you share an image and the output of the server when you try to run it? I want to see the output on terminal or the console in dev tools.

@vinamramunot-tech
Copy link

@WebDevSimplified you can close this issue

@AlexDinger
Copy link

@vinamramunot-tech I am having this issue as well and I have no errors whatsoever but the camera just wont show up

@vinamramunot-tech
Copy link

@AlexDinger are you running this on http or https?

one alternative is to enable chrome flags:

  1. go to chrome and in the url bar type "chrome://flags"
  2. enable this flag

Screen Shot 2021-04-03 at 11 35 30 PM

3. run your website as "localhost:". you can have the port number as anything you want, an example is localhost:5050

@vinamramunot-tech
Copy link

@AlexDinger Also check if any other application is using the camera. Are you running the code on mac/linux or windows?

@mister-bee
Copy link

The actual green camera light goes on, but no image appears on the screen, just a white background.
At this url: http://127.0.0.1:5500/face-detection/index.html
And this warning in the console:
Screen Shot 2021-04-26 at 8 07 49 AM

@vinamramunot-tech
Copy link

@mister-bee try "http://localhost:5500/face-detection/index.html" and enable the flag I have talked about in the previous comment.

@abdelmark
Copy link

function startVideo() { navigator.mediaDevices.getUserMedia({ video: {} }).then(stream => { const video = document.getElementById('video') video.srcObject = stream video.paly() }) .catch( err => { console.log('Failed to get local stream' ,err); }) }

use this startVideo function instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants