@iam-protocol/pulse-sdk 0.3.6 → 0.3.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/dist/index.js CHANGED
@@ -1441,7 +1441,8 @@ async function extractFeatures(data) {
1441
1441
  }
1442
1442
  const audioFeatures = await extractSpeakerFeatures(data.audio);
1443
1443
  const hasMotion = data.motion.length >= MIN_MOTION_SAMPLES;
1444
- const motionFeatures = hasMotion ? extractMotionFeatures(data.motion) : extractMouseDynamics(data.touch);
1444
+ const hasTouch = data.touch.length >= MIN_TOUCH_SAMPLES;
1445
+ const motionFeatures = hasMotion && hasTouch ? extractMouseDynamics(data.touch) : hasMotion ? extractMotionFeatures(data.motion) : extractMouseDynamics(data.touch);
1445
1446
  const touchFeatures = extractTouchFeatures(data.touch);
1446
1447
  return fuseFeatures(audioFeatures, motionFeatures, touchFeatures);
1447
1448
  }