ionic-team / ionic-team/capacitor-camera

@capacitor/camera - PWA in iOS: Camera rotate in landscape mode and bad quality of photo

Open
#39 5 comments 0 reactions 1 assignee Claimed by @theproducer View on GitHub
Dominant language
TypeScript
Stars
4
Forks
1
Avg merge
2d 1h
Merged PRs (30d)
2

Description

### Capacitor Version

npx cap doctor
Capacitor Doctor

Latest Dependencies:

@capacitor/cli: 8.0.0
@capacitor/core: 8.0.0
@capacitor/android: 8.0.0
@capacitor/ios: 8.0.0

Installed Dependencies:

@capacitor/android: not installed
@capacitor/ios: not installed
@capacitor/cli: 4.7.3
@capacitor/core: 4.7.3

FYI: we are working with web version only

### Other API Details

```Shell
node -v
v22.20.0

npm -v
10.9.3
```

### Platforms Affected

- [x] iOS
- [ ] Android
- [x] Web

### Current Behavior

I noticed that since IOS 18 (didn't test for versions before), picture rotation and quality degradation

happens after the picture is taken **when the IPad is in landscape mode** : In fact, when you turn the IPad in landscape mode the camera turn also but the width is smaller than expected and after you click on the take picture button, then you see **the image rotated 90 degree** before even you confirm it.

In addition, when you take a picture with the camera, before clicking on the "take picture" button, the image is of standard quality. Once you confirm, **it's getting darker and cropped**.

Here is screenshots for portrait mode which is OK and landscape mode which is KO:

**Portrait before confirm:**
![Image](https://github.com/user-attachments/assets/7ff9728f-7b4f-4edb-a67f-88d250cb546a)

**portrait after confirm:**
![Image](https://github.com/user-attachments/assets/c23f8d92-c1d7-40c8-afe2-41190bf45421)

**Landscape before confirm:**
![Image](https://github.com/user-attachments/assets/44713b8b-5a20-45bc-a829-c2ec9c672394)

**Landscape after confirm:**
![Image](https://github.com/user-attachments/assets/5af9640e-eb3b-4bcf-9d21-048fcb833ff1)

### Expected Behavior

The camera should behave like the native app of IOS do, when you turn to landscape and also when you go back to portrait mode

### Project Reproduction

The issue could be reproduced by any PWA application that uses the camera: for example try https://85m2c-5173.csb.app/tab1/ in IOS device and you will be able to reproduce the issue

### Additional Information

The issue is the same in web browser or installed mode.
It is also present for PWA app with react, angular or any other language

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.