@zappar/zappar-cv 2.1.6 → 2.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,8 +18,8 @@ npm i @zappar/zappar-cv
18
18
 
19
19
  You can use our CDN from within your HTML:
20
20
  ```
21
- <script src="https://libs.zappar.com/zappar-cv/2.1.6/zappar-cv.js"></script>
21
+ <script src="https://libs.zappar.com/zappar-cv/2.1.7/zappar-cv.js"></script>
22
22
  ```
23
23
 
24
24
  Or you can download and host our standalone JavaScript bundle:
25
- [https://libs.zappar.com/zappar-cv/2.1.6/zappar-cv.zip](https://libs.zappar.com/zappar-cv/2.1.6/zappar-cv.zip)
25
+ [https://libs.zappar.com/zappar-cv/2.1.7/zappar-cv.zip](https://libs.zappar.com/zappar-cv/2.1.7/zappar-cv.zip)
@@ -109,7 +109,7 @@ export class CameraSource extends HTMLElementSource {
109
109
  deviceId: deviceId
110
110
  }
111
111
  };
112
- if (deviceId)
112
+ if (deviceId || profile.relyOnConstraintsForCameraSelection)
113
113
  return constraints;
114
114
  if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices)
115
115
  return constraints;
package/lib/profile.d.ts CHANGED
@@ -16,5 +16,6 @@ export declare let profile: {
16
16
  preferMediaStreamTrackProcessorCamera: boolean;
17
17
  preferImageBitmapCamera: boolean;
18
18
  ios164CameraSelection: boolean;
19
+ relyOnConstraintsForCameraSelection: boolean;
19
20
  forceWindowOrientation: boolean;
20
21
  };
package/lib/profile.js CHANGED
@@ -18,6 +18,7 @@ export let profile = {
18
18
  preferMediaStreamTrackProcessorCamera: false,
19
19
  preferImageBitmapCamera: false,
20
20
  ios164CameraSelection: false,
21
+ relyOnConstraintsForCameraSelection: false,
21
22
  forceWindowOrientation: false,
22
23
  };
23
24
  if (typeof window !== "undefined") {
@@ -80,5 +81,8 @@ function iDevice(version) {
80
81
  if (majorVersion === 16 && minorVersion >= 4) {
81
82
  profile.ios164CameraSelection = true;
82
83
  }
84
+ if (majorVersion >= 17) {
85
+ profile.relyOnConstraintsForCameraSelection = true;
86
+ }
83
87
  }
84
88
  }
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "2.1.6";
1
+ export declare const VERSION = "2.1.7";
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "2.1.6";
1
+ export const VERSION = "2.1.7";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zappar/zappar-cv",
3
- "version": "2.1.6",
3
+ "version": "2.1.7",
4
4
  "description": "Zappar's core computer vision library, supporting image, face and world tracking.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",