@aws-amplify/ui-react-liveness 3.4.1 → 3.4.3
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.
|
@@ -13,11 +13,11 @@ function useMediaStreamInVideo(stream) {
|
|
|
13
13
|
if (isObject(videoRef.current)) {
|
|
14
14
|
videoRef.current.srcObject = stream;
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
const settings = stream.getTracks()?.[0]?.getSettings();
|
|
17
|
+
if (settings) {
|
|
18
|
+
setVideoHeight(settings.height);
|
|
19
|
+
setVideoWidth(settings.width);
|
|
20
|
+
}
|
|
21
21
|
}
|
|
22
22
|
return () => {
|
|
23
23
|
if (stream) {
|
|
@@ -145,7 +145,7 @@ function drawStaticOval(canvasEl, videoEl, videoMediaStream) {
|
|
|
145
145
|
const ovalDetails = getStaticLivenessOvalDetails({
|
|
146
146
|
width: width,
|
|
147
147
|
height: height,
|
|
148
|
-
ratioMultiplier: 0.
|
|
148
|
+
ratioMultiplier: 0.5,
|
|
149
149
|
});
|
|
150
150
|
ovalDetails.flippedCenterX = width - ovalDetails.centerX;
|
|
151
151
|
// Compute scaleFactor which is how much our video element is scaled
|
package/dist/esm/version.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -285,7 +285,7 @@ function drawStaticOval(canvasEl, videoEl, videoMediaStream) {
|
|
|
285
285
|
const ovalDetails = getStaticLivenessOvalDetails({
|
|
286
286
|
width: width,
|
|
287
287
|
height: height,
|
|
288
|
-
ratioMultiplier: 0.
|
|
288
|
+
ratioMultiplier: 0.5,
|
|
289
289
|
});
|
|
290
290
|
ovalDetails.flippedCenterX = width - ovalDetails.centerX;
|
|
291
291
|
// Compute scaleFactor which is how much our video element is scaled
|
|
@@ -1055,7 +1055,7 @@ function createRequestStreamGenerator(stream) {
|
|
|
1055
1055
|
};
|
|
1056
1056
|
}
|
|
1057
1057
|
|
|
1058
|
-
const VERSION = '3.4.
|
|
1058
|
+
const VERSION = '3.4.3';
|
|
1059
1059
|
|
|
1060
1060
|
const BASE_USER_AGENT = `ui-react-liveness/${VERSION}`;
|
|
1061
1061
|
const getLivenessUserAgent = () => {
|
|
@@ -2706,11 +2706,11 @@ function useMediaStreamInVideo(stream) {
|
|
|
2706
2706
|
if (ui.isObject(videoRef.current)) {
|
|
2707
2707
|
videoRef.current.srcObject = stream;
|
|
2708
2708
|
}
|
|
2709
|
-
const
|
|
2710
|
-
|
|
2711
|
-
.
|
|
2712
|
-
|
|
2713
|
-
|
|
2709
|
+
const settings = stream.getTracks()?.[0]?.getSettings();
|
|
2710
|
+
if (settings) {
|
|
2711
|
+
setVideoHeight(settings.height);
|
|
2712
|
+
setVideoWidth(settings.width);
|
|
2713
|
+
}
|
|
2714
2714
|
}
|
|
2715
2715
|
return () => {
|
|
2716
2716
|
if (stream) {
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "3.4.
|
|
1
|
+
export declare const VERSION = "3.4.3";
|