akhaliq HF Staff commited on
Commit
def3655
·
verified ·
1 Parent(s): 1452eb4

Upload index.js with huggingface_hub

Browse files
Files changed (1) hide show
  1. index.js +3 -3
index.js CHANGED
@@ -144,9 +144,9 @@ class VideoCaptionApp {
144
  async captureCurrentFrame() {
145
  const video = this.elements.videoPlayer;
146
  const canvas = document.createElement('canvas');
147
- // Use even smaller resolution for faster processing
148
- canvas.width = Math.min(video.videoWidth, 320);
149
- canvas.height = Math.min(video.videoHeight, 180);
150
  const ctx = canvas.getContext('2d');
151
  ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
152
 
 
144
  async captureCurrentFrame() {
145
  const video = this.elements.videoPlayer;
146
  const canvas = document.createElement('canvas');
147
+ // Use larger resolution for better caption quality
148
+ canvas.width = Math.min(video.videoWidth, 640);
149
+ canvas.height = Math.min(video.videoHeight, 360);
150
  const ctx = canvas.getContext('2d');
151
  ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
152