Closed jankal13 closed 2 years ago
Just browsing this due to me looking at another issue.
@mrzyte While your fix resolves the error, I think it is not the right thing todo. You just disable reading the capabilities completely, when the facingMode could not be identified by the getConstraints
call.
Shouldn't you better check inside of the if
whether the call to getCapabilities
returned something reasonable instead of skipping the whole thing?
I've sent a similar PR that checks if capabilities returned facingMode. https://github.com/ionic-team/pwa-elements/pull/95
Also, looks like there is a missing closing bracket or your forgot to delete/replace the previous line
As described in #74, there are issues rotating the camera in a Safari browser. Adding a small change to the code solves this problem.