@pixelverse/strichjs-sdk 1.4.1 → 1.4.2

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/CHANGELOG.md CHANGED
@@ -1,6 +1,17 @@
1
1
  # Changelog
2
2
 
3
- ## [Unreleased]
3
+ ## [1.4.2] - 2024-02-05
4
+
5
+ ### Added
6
+
7
+ - Allow overriding camera selection by providing a `constraints` object in the frame source configuration. This is an advanced option that should be used with care.
8
+
9
+ ### Fixed
10
+
11
+ - Significantly improved Data Matrix read rates where codes suffer from perspective warp (not viewed from above).
12
+ - GS1 QR codes with FNC1 in first position now no longer results in empty data.
13
+
14
+ ## [1.4.1] - 2024-01-26
4
15
 
5
16
  ### Fixed
6
17
 
package/dist/strich.d.ts CHANGED
@@ -56,6 +56,36 @@ export interface FrameSourceConfiguration {
56
56
  * @defaultValue false
57
57
  */
58
58
  rememberCameraDeviceId?: boolean;
59
+ /**
60
+ * Allow passing in exact constraints for camera device selection via
61
+ * [getUserMedia](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#constraints).
62
+ * If set, will override the {@link resolution} property and any other camera-related properties.
63
+ *
64
+ * @example
65
+ * In the example below, a camera device is explicitly selected by ID. Audio is explicitly not requested (never
66
+ * used by STRICH) and an HD-like resolution preference is specified by range.
67
+ *
68
+ * ```js
69
+ * constraints: {
70
+ * video: {
71
+ * deviceId: {
72
+ * exact: '2d122f8e0630b5a6a19c157f066e13e05115f12f7d4dfb29e5560b4acefe7308'
73
+ * },
74
+ * width: {min: 800, ideal: 1280, max: 1600},
75
+ * height: {min: 600, ideal: 720, max: 900}
76
+ * },
77
+ * audio: false
78
+ * }
79
+ * ```
80
+ *
81
+ * @remarks
82
+ * This is an advanced option, and should only be used if you are familiar with the
83
+ * [Media Capture and Streams API](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia)
84
+ * and have to build your own camera selection workflow.
85
+ *
86
+ * @defaultValue undefined
87
+ */
88
+ constraints?: MediaStreamConstraints;
59
89
  }
60
90
  export function defaultFrameSourceConfiguration(): FrameSourceConfiguration;
61
91
  /**