Is there any way to force showing ask permission in chrome?

729 views Asked by At

I don't know if this is code issue or browser issue.

Currently i'm using webcam.js to my web for showing camera.

But when i open the page url. It shows error because the camera is not allowed.

But why it's not showing permission before?

When i check the permissions, it set to "ask(default)" but why there's no popup about asking permission ?

How to solve this issue ?

Edit using below code already

navigator.mediaDevices.getUserMedia({video: true})
1

There are 1 answers

0
Sinal On

Could you try the following setting?

const stream = await navigator.mediaDevices.getUserMedia({
    audio: false,
    video: { facingMode: "environment" },
  });

However, Android chrome may face permission issue in alert and you probably fix it by following this video https://www.youtube.com/watch?v=xsNZnTFu0r8

Hopefully, it is helpful.