Quazim0t0 commited on
Commit
584b8d0
·
verified ·
1 Parent(s): 1211b9e

Upload 37 files

Browse files
src/components/MultiSourceCaptioningView.tsx CHANGED
@@ -115,7 +115,8 @@ export default function MultiSourceCaptioningView() {
115
  if (Array.isArray(boxes) && boxes.length > 0) {
116
  const scaleX = canvas.width / video.videoWidth;
117
  const scaleY = canvas.height / video.videoHeight;
118
- drawBoundingBoxesOnCanvas(ctx, boxes, { scaleX, scaleY });
 
119
  }
120
  });
121
  };
 
115
  if (Array.isArray(boxes) && boxes.length > 0) {
116
  const scaleX = canvas.width / video.videoWidth;
117
  const scaleY = canvas.height / video.videoHeight;
118
+ ctx.clearRect(0, 0, canvas.width, canvas.height); // Clear canvas before drawing boxes
119
+ drawBoundingBoxesOnCanvas(ctx, boxes, { color: "#FF00FF", lineWidth: 4, font: "20px Arial", scaleX, scaleY }); // Use visible color and thick line
120
  }
121
  });
122
  };