Skip to content

Commit 51cc509

Browse files
authored
fix(camera): error on Safari rotation with 1 camera (#95)
1 parent 3e684c9 commit 51cc509

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/camera/camera.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,9 @@ export class CameraPWA {
256256

257257
if (!facingMode) {
258258
let c = track.getCapabilities();
259-
facingMode = c.facingMode[0];
259+
if (c.facingMode) {
260+
facingMode = c.facingMode[0];
261+
}
260262
}
261263

262264
if (facingMode === 'environment') {

0 commit comments

Comments
 (0)