jack 3 anni fa
parent
commit
6283fa06a6
1 ha cambiato i file con 8 aggiunte e 3 eliminazioni
  1. 8 3
      src/components/functionFan2.vue

+ 8 - 3
src/components/functionFan2.vue

@@ -285,9 +285,14 @@ export default {
       this.updateMessage = false;
     },
     async handsFind(video) {
-      let hands = await this.detector.estimateHands(video, {
-        flipHorizontal: false,
-      });
+      let hands = [];
+      try {
+        hands = await this.detector.estimateHands(video, {
+          flipHorizontal: false,
+        });
+      } catch (e) {
+        return;
+      }
       console.log(hands);
       if (hands.length > 0 && this.isCamera) {
         let handsA = hands[0].keypoints;