Skip to content

Commit

Permalink
fix(camera): set camera direction for web (#665)
Browse files Browse the repository at this point in the history
Co-authored-by: LeonardoPineda <leo135pineda@gmail.com>
Co-authored-by: Julio César <jcesarmobile@gmail.com>
  • Loading branch information
3 people authored Dec 16, 2021
1 parent 2bf99a3 commit 4afedb9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions camera/src/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export class CameraWeb extends WebPlugin implements CameraPlugin {
) {
if (customElements.get('pwa-camera-modal')) {
const cameraModal: any = document.createElement('pwa-camera-modal');
cameraModal.facingMode =
options.direction === CameraDirection.Front ? 'user' : 'environment';
document.body.appendChild(cameraModal);
try {
await cameraModal.componentOnReady();
Expand Down

0 comments on commit 4afedb9

Please sign in to comment.