Skip to content

Commit 84bbe74

Browse files
committed
clean
1 parent 23b1bf9 commit 84bbe74

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

Diff for: packages/ui/src/elements/Thumbnail/index.scss

-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
overflow: hidden;
99

1010
img,
11-
video,
1211
svg {
1312
width: 100%;
1413
height: 100%;
@@ -22,7 +21,6 @@
2221
position: relative;
2322

2423
img,
25-
video,
2624
svg {
2725
position: absolute;
2826
top: 0;

Diff for: packages/ui/src/elements/Thumbnail/index.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,13 @@ export const Thumbnail = (props: ThumbnailProps) => {
4040
video.src = fileSrc
4141
video.crossOrigin = 'anonymous'
4242
video.onloadeddata = () => {
43-
// Create a canvas to capture the video frame
4443
const canvas = document.createElement('canvas')
4544
canvas.width = video.videoWidth
4645
canvas.height = video.videoHeight
4746
const ctx = canvas.getContext('2d')
4847
if (ctx) {
4948
ctx.drawImage(video, 0, 0, canvas.width, canvas.height)
50-
const thumbnail = canvas.toDataURL('image/png')
51-
setSrc(thumbnail)
49+
setSrc(canvas.toDataURL('image/png'))
5250
setFileExists(true)
5351
}
5452
}

0 commit comments

Comments
 (0)