AckerApple / ack-angular-webcam

MIT License
37 stars 19 forks source link

Chrome on Android 7.0: NotReadableError: Could not start source #40

Closed devakone closed 6 years ago

devakone commented 6 years ago

Thanks for this very useful lib. I am running into an issue where on some devices (Android 7.0), I am unable to start the camera using Chrome with the error:

NotReadableError: Could not start source

The camera is not being used by any other device.

Any pointers on what could be the issue and how to resolve it?

AckerApple commented 6 years ago

Does the demo page have the same issue you are having? https://ackerapple.github.io/ack-angular-webcam/

I have no immediate tips for you

AckerApple commented 6 years ago

Reminders, https is required. User must allow camera access...

Ya know, check the basics

AckerApple commented 6 years ago

This package uses standard HTML5 getUserMedia() calls.

Check that your platform is covered, I'm sure it is: https://caniuse.com/#search=getusermedia

devakone commented 6 years ago

On https://ackerapple.github.io/ack-angular-webcam/ it works for the front camera and fails for the back. I am also using https.

devakone commented 6 years ago

On a side note, how does the fallback mechanism works, like in this case, if onCamError is triggered, should the fallback kick in immediately?

AckerApple commented 6 years ago

The swf flash fallback is auto engaged without ever calling the onCamError bindings.

On Android I dont think you use the facingMode... Thats iOs only doing things different from all other browsers. On Android, Chrome and modern behaving browser, you select the camera you want from the devices list, again NOT using facingMode what so ever.

Goog luck. If the demo works, its your fault your code doesn't work ;)

AckerApple commented 6 years ago

Is this issue closable?

devakone commented 6 years ago

Yes you can go ahead and close thanks!

arjunkm commented 6 years ago

On https://ackerapple.github.io/ack-angular-webcam/ it works for the front camera and fails for the back. I am also using https.

@devakone Were you able to solve this?

devakone commented 6 years ago

@arjunkm honestly I don't remember, it's been a minute, I ended up switching to an <input type=file to trigger the camera on mobile browsers, I did not need the video camera after all.