Skip to content

Commit 8686ea9

Browse files
added 11.9.2
1 parent b63cd52 commit 8686ea9

File tree

4 files changed

+33
-9
lines changed

4 files changed

+33
-9
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Acuant JavaScript Web SDK v11.9.1
1+
# Acuant JavaScript Web SDK v11.9.2
22

3-
**July 2023**
3+
**December 2023**
44

55
See [https://github.com/Acuant/JavascriptWebSDKV11/releases](https://github.com/Acuant/JavascriptWebSDKV11/releases) for release notes.
66

@@ -803,6 +803,10 @@ See the single worker model in [Initialize and Start the SDK](#initialize-and-st
803803
804804
## Known Issues/FAQ
805805
806+
1. Some base model iPhones struggle to focus at close distances when running iOS 17.*.
807+
808+
The minimum focus distance for many iPhone cameras was increased in iOS 17 and has resulted in a diminished ability for users to meet both the dpi and sharpness constraints required to capture a good image. However, iOS 17 also exposed the ability to use WebRTC to perform optical zoom on iPhone devices that support it. With 11.9.2 the SDK applies a small optical zoom on affected devices to enable capturing a sharp image without sacrificing dpi.
809+
806810
1. iPhone 13 Pro, 13 Pro Max, 14 Pro, and 14 Pro Max struggle to focus at close distances when running iOS 16.0 through 16.3.
807811
808812
11.7.1 adds a workaround for this issue by having those devices capture from farther away. This is a workaround for an issue in iOS 16. There is a more detailed explanation of both the issue and the workaround in the 11.7.1 section of the [Migration Details](docs/MigrationDetails.md). We have been in contact with Apple and as of iOS 16.4 Apple has provided us with the tools to fix this issue properly. This fix was released as part of 11.8.2.

webSdk/AcuantCamera.js

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -797,17 +797,17 @@ var AcuantCamera = (() => {
797797
}
798798
}).finally(() => {
799799
if (isSamsungNote10OrS10OrNewer()) {
800-
//We found out that some triple camera Samsung devices (S10, S20, Note 20, etc) capture images blurry at edges.
801-
//Zooming to 2X, matching the telephoto lens, doesn't solve it completely but mitigates it.
802800
userConfig.primaryConstraints.video.zoom = 2.0;
801+
} else if (isDeviceAffectedByIOS17Issue()) {
802+
userConfig.primaryConstraints.video.zoom = 1.6;
803803
}
804804
startCamera(userConfig.primaryConstraints);
805805
});
806806
} else {
807807
if (isSamsungNote10OrS10OrNewer()) {
808-
//We found out that some triple camera Samsung devices (S10, S20, Note 20, etc) capture images blurry at edges.
809-
//Zooming to 2X, matching the telephoto lens, doesn't solve it completely but mitigates it.
810808
userConfig.primaryConstraints.video.zoom = 2.0;
809+
} else if (isDeviceAffectedByIOS17Issue()) {
810+
userConfig.primaryConstraints.video.zoom = 1.6;
811811
}
812812
startCamera(userConfig.primaryConstraints);
813813
}
@@ -879,7 +879,7 @@ var AcuantCamera = (() => {
879879
let file = event.target;
880880
let reader = new FileReader();
881881

882-
const isHeicFile = event.target.files[0] && event.target.files[0].name.includes('.HEIC');
882+
const isHeicFile = event.target.files[0] && event.target.files[0].name && event.target.files[0].name.toLowerCase().endsWith('.heic');
883883
if (isHeicFile) {
884884
reader.onload = (e) => {
885885
getImageDataFromHeic(e.target.result)
@@ -1051,6 +1051,26 @@ var AcuantCamera = (() => {
10511051
return ver && ver != -1 && ver.length >= 1 && ver[0] >= 16 && ver [1] >= 4;
10521052
}
10531053

1054+
function isiOS17() {
1055+
let ver = iOSversion();
1056+
return ver && ver != -1 && ver.length >= 1 && ver[0] >= 17;
1057+
}
1058+
1059+
function isDeviceAffectedByIOS17Issue() {
1060+
if (isiOS17()) {
1061+
let dims = [screen.width, screen.height];
1062+
let long = Math.max(...dims);
1063+
let short = Math.min(...dims);
1064+
if (long == 852 && short == 393) { //15
1065+
return true;
1066+
}
1067+
if (long == 844 && short == 390) { //14, 12, 13
1068+
return true;
1069+
}
1070+
}
1071+
return false;
1072+
}
1073+
10541074
function isDeviceAffectedByIOS16Issue() {
10551075
let decodedCookie = decodeURIComponent(document.cookie);
10561076
if (decodedCookie.includes('AcuantForceRegularCapture=true')) {

0 commit comments

Comments
 (0)