Spaces:
Running
Running
Update index.html
Browse files- index.html +1 -6
index.html
CHANGED
@@ -521,7 +521,7 @@
|
|
521 |
</div>
|
522 |
<!-- γγ¬γΌγ γγ¬γγ₯γΌ -->
|
523 |
<div class="frame-preview" id="framePreview">
|
524 |
-
<
|
525 |
<div class="frame-time" id="frameTime">
|
526 |
</div>
|
527 |
</div>
|
@@ -874,7 +874,6 @@ function setupFramePreview() {
|
|
874 |
// γγ£γγ·γ₯γγγγ°γγγδ½Ώγ
|
875 |
const cacheKey = Math.floor(previewTime);
|
876 |
if (frameCache[cacheKey]) {
|
877 |
-
previewImage.src = frameCache[cacheKey];
|
878 |
return;
|
879 |
}
|
880 |
|
@@ -885,8 +884,6 @@ function setupFramePreview() {
|
|
885 |
canvas.width = VideoForThumbnail.videoWidth;
|
886 |
canvas.height = VideoForThumbnail.videoHeight;
|
887 |
ctx.drawImage(VideoForThumbnail, 0, 0, canvas.width, canvas.height);
|
888 |
-
const imageData = canvas.toDataURL('image/jpeg');
|
889 |
-
previewImage.src = imageData;
|
890 |
frameCache[cacheKey] = imageData; // γγ£γγ·γ₯γ«δΏε
|
891 |
}, { once: true });
|
892 |
});
|
@@ -970,7 +967,6 @@ function setupFramePreview() {
|
|
970 |
// γγ£γγ·γ₯γγγγ°γγγδ½Ώγ
|
971 |
const cacheKey = Math.floor(previewTime);
|
972 |
if (frameCache[cacheKey]) {
|
973 |
-
previewImage.src = frameCache[cacheKey];
|
974 |
return;
|
975 |
}
|
976 |
|
@@ -982,7 +978,6 @@ function setupFramePreview() {
|
|
982 |
endTime: previewTime + 0.1
|
983 |
}).then((frames) => {
|
984 |
if (frames.length > 0) {
|
985 |
-
previewImage.src = frames[0].image;
|
986 |
frameCache[cacheKey] = frames[0].image; // γγ£γγ·γ₯γ«δΏε
|
987 |
}
|
988 |
}).catch(err => {
|
|
|
521 |
</div>
|
522 |
<!-- γγ¬γΌγ γγ¬γγ₯γΌ -->
|
523 |
<div class="frame-preview" id="framePreview">
|
524 |
+
<canvas id="canvas" crossorigin="anonymous" id="previewImage">
|
525 |
<div class="frame-time" id="frameTime">
|
526 |
</div>
|
527 |
</div>
|
|
|
874 |
// γγ£γγ·γ₯γγγγ°γγγδ½Ώγ
|
875 |
const cacheKey = Math.floor(previewTime);
|
876 |
if (frameCache[cacheKey]) {
|
|
|
877 |
return;
|
878 |
}
|
879 |
|
|
|
884 |
canvas.width = VideoForThumbnail.videoWidth;
|
885 |
canvas.height = VideoForThumbnail.videoHeight;
|
886 |
ctx.drawImage(VideoForThumbnail, 0, 0, canvas.width, canvas.height);
|
|
|
|
|
887 |
frameCache[cacheKey] = imageData; // γγ£γγ·γ₯γ«δΏε
|
888 |
}, { once: true });
|
889 |
});
|
|
|
967 |
// γγ£γγ·γ₯γγγγ°γγγδ½Ώγ
|
968 |
const cacheKey = Math.floor(previewTime);
|
969 |
if (frameCache[cacheKey]) {
|
|
|
970 |
return;
|
971 |
}
|
972 |
|
|
|
978 |
endTime: previewTime + 0.1
|
979 |
}).then((frames) => {
|
980 |
if (frames.length > 0) {
|
|
|
981 |
frameCache[cacheKey] = frames[0].image; // γγ£γγ·γ₯γ«δΏε
|
982 |
}
|
983 |
}).catch(err => {
|