Reputation: 2478
I've used this code (reference to source code) where I try to show a stream of video for the user and allow him to take a snapshot, this is working fine on Chrome for example but does not work on Microsoft Edge at all and no errors are shown. Any idea why this is not working and maybe reference a different approach I should take? I'm pretty sure it does not work on Safari either...
Even the Microsoft's Demo page is not working! here is a screenshot of the error I get:
EDIT (3 Sep 15): I have turned on "Let apps use my Camera" in my Windows Settings and now this demo works well on all browsers but Safari. Anyone know what is the best approach to capturing an image from a webcam stream in Safari?
Upvotes: 5
Views: 12007
Reputation: 29
for me #Michael Wanyoike hit it on the head. You have to enable camera permissions. The weird thing is that no prompt requesting permission appeared, simply a black screen. It could be that previously I had click deny but still not a smooth flow.
Upvotes: 0
Reputation: 39
You need to open Privacy Settings. Enable Camera and Microphone for Edge, otherwise you will get a permission error.
Upvotes: 3
Reputation: 5432
I tried the Photo Capture using webcam demo on Edge and it is working quite fine. you can check the below screenshot.
You need to use navigator.mediaDevices.getUserMedia
. Even though Chrome 45 has navigator.mediaDevices
and a getUserMedia
function which returns a Promise, it does not accept spec-style constraints.
Note: Make sure to turn on the Camera setting "Let apps use my camera" and from the list of apps that can use your camera turn on Microsoft Edge as well.
Upvotes: 2