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

Unable to open selfie mode camera in iPhoneXS #47

Closed
ahimani123 opened this issue May 10, 2019 · 4 comments
Closed

Unable to open selfie mode camera in iPhoneXS #47

ahimani123 opened this issue May 10, 2019 · 4 comments

Comments

@ahimani123
Copy link

I have set all the propertied of the library "enable camera switch", "switch camera" but still I am unable to open the camera through Safari browser in iPhone XS/ iPad Air 2 in selfie mode. the back camera works fine but I am unable to open front camera by switching as well.
I am using ngx-webcam v0.2.2 and Angular 7.2.4. iOS version is 12.2.
The test link "https://basst314.github.io/ngx-webcam/? " works perfectly fine on both these devices.

Very strangely, the same code is working on iphone .

An urgent resolution on this would be of great help.

@basst314
Copy link
Owner

Hi @ahimani123,
Thanks for using this library.
It looks like your phone and browser both support the necessary apis since you can see the back camera.

Can you see the camera switch icon in the upper right corner of the webcam view?
Also, could you share some more details/code on how you‘re using the webcam component in your app?

Thanks!

@ahimani123
Copy link
Author

ahimani123 commented May 10, 2019

Hi

Camera switch icon is visible however, it is not working for iOS 12.2
The code is exactly same as demo code shared by you.
we observed a strange behaviour though:

  1. I launch my web application on mobile Safari browser on iPhone/ iPad with iOS 12.2
  2. go to the page requiring camera launch
  3. It asks for "Camera permissions" I clicked on "Allow"
  4. I logged out of my web app and am redirected to login page
  5. without changing the browser window, I login again
  6. this time on the camera launch page, the camera switch icon works as expected and because it is the same browser window, i am not asked for permission again

Can you help resolve this with above behaviour?
Is there any way that by default I can open front camera in iOS 12.2 with Angular 7?

@basst314
Copy link
Owner

basst314 commented May 10, 2019

Thanks for all the details!
Wow, I just checked with my iPhone XS on iOS12.2 and I can reproduce the issue even on the demo page. For me, after asking for permissions the first time, it always shows the selfie-cam, but I can‘t switch to the back cam with the toggle icon. The camera preview flashes briefly (tries to switch to back cam) but then lands on the selfie cam again.

I‘ll definitely look into it, maybe the browser API throws an exception.

I‘ll look into it and see what I can find out.

basst314 added a commit that referenced this issue Jun 16, 2019
Expose native video element (#44)
@basst314
Copy link
Owner

Hi @ahimani123,

I just released a new version of this library (0.2.4) which fixes this issue.

Cheers!

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

2 participants