Skip to content

fix: camera rotate not working on safari#75

Closed
jankal13 wants to merge 1 commit intoionic-team:masterfrom
jankal13:fix/safari-camera-rotate
Closed

fix: camera rotate not working on safari#75
jankal13 wants to merge 1 commit intoionic-team:masterfrom
jankal13:fix/safari-camera-rotate

Conversation

@jankal13
Copy link

As described in #74, there are issues rotating the camera in a Safari browser. Adding a small change to the code solves this problem.

See ionic-team#74

Signed-off-by: Jan Kalbantner <Jan.Kalbantner@wechselgott.com>
@jankal13 jankal13 changed the title fix(#74): camera rotate not working on safari fix: camera rotate not working on safari Dec 20, 2020
@pfeigl
Copy link

pfeigl commented Jan 7, 2021

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?

@jcesarmobile
Copy link
Member

I've sent a similar PR that checks if capabilities returned facingMode.
#95

Also, looks like there is a missing closing bracket or your forgot to delete/replace the previous line

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

Successfully merging this pull request may close these issues.

3 participants