Spaces:
Running
Running
Upload index.js with huggingface_hub
Browse files
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
|
148 |
-
canvas.width = Math.min(video.videoWidth,
|
149 |
-
canvas.height = Math.min(video.videoHeight,
|
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 |
|