-
Notifications
You must be signed in to change notification settings - Fork 50
Description
I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com
Current behavior:
When clicking the camera rotate (div.rotate) button in Safari 14.0.1, the screen becomes black and the camera stops working. Switching back (to the front camera) is not possible.
Expected behavior:
I would expect that similarly to e.g. Chrome, the camera cannot be switched if only one camera is detected.
Steps to reproduce:
0. Use pwa-elements in Safari
- Start camera
- Click
Related code:
Not needed. It's reproducible when using 'npm run start' on pwa-elements' main branch.
Other information:
The console will give out the following error:
[Error] TypeError: undefined is not an object (evaluating 'c.facingMode[0]') rotate (pwa-camera.entry.js:404) (anonymous function) (pwa-camera.entry.js:185)
Suggested solution:
Add && facingMode !== undefined solves the problem:


