@zappar/zappar-cv 3.0.0-beta.5 → 3.0.0-beta.6

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/3.0.0-beta.5/zappar-cv.js"></script>
21
+ <script src="https://libs.zappar.com/zappar-cv/3.0.0-beta.6/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/3.0.0-beta.5/zappar-cv.zip](https://libs.zappar.com/zappar-cv/3.0.0-beta.5/zappar-cv.zip)
25
+ [https://libs.zappar.com/zappar-cv/3.0.0-beta.6/zappar-cv.zip](https://libs.zappar.com/zappar-cv/3.0.0-beta.6/zappar-cv.zip)
@@ -122,7 +122,7 @@ export class CameraSource extends HTMLElementSource {
122
122
  deviceId: deviceId
123
123
  }
124
124
  };
125
- if (deviceId)
125
+ if (deviceId || profile.relyOnConstraintsForCameraSelection)
126
126
  return constraints;
127
127
  if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices)
128
128
  return constraints;
package/lib/profile.d.ts CHANGED
@@ -16,6 +16,7 @@ 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
  intervalMultiplier: number;
21
22
  trustSensorIntervals: boolean;
package/lib/profile.js CHANGED
@@ -18,6 +18,7 @@ export let profile = {
18
18
  preferMediaStreamTrackProcessorCamera: true,
19
19
  preferImageBitmapCamera: false,
20
20
  ios164CameraSelection: false,
21
+ relyOnConstraintsForCameraSelection: false,
21
22
  forceWindowOrientation: false,
22
23
  intervalMultiplier: 1,
23
24
  trustSensorIntervals: false,
@@ -85,5 +86,8 @@ function iDevice(version) {
85
86
  if (majorVersion === 16 && minorVersion >= 4) {
86
87
  profile.ios164CameraSelection = true;
87
88
  }
89
+ if (majorVersion >= 17) {
90
+ profile.relyOnConstraintsForCameraSelection = true;
91
+ }
88
92
  }
89
93
  }
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "3.0.0-beta.5";
1
+ export declare const VERSION = "3.0.0-beta.6";
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "3.0.0-beta.5";
1
+ export const VERSION = "3.0.0-beta.6";
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zappar/zappar-cv",
3
- "version": "3.0.0-beta.5",
3
+ "version": "3.0.0-beta.6",
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",