Skip to content

Commit

Permalink
fix: empty last frame on video knob
Browse files Browse the repository at this point in the history
  • Loading branch information
eye-wave committed Nov 26, 2024
1 parent 38c19ac commit 6e222ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "svelte-knobs",
"description": "Svelte component library for building customizable knob controls.",
"version": "0.3.1",
"version": "0.3.2",
"repository": {
"url": "https://github.com/eye-wave/svelte-knobs"
},
Expand Down
2 changes: 2 additions & 0 deletions src/lib/VideoKnob.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@
let i = -1;
async function decodeFrame() {
if (video.currentTime >= video.duration) return;
if (!dctx) throw Error('Failed to create canvas context');
dctx.clearRect(0, 0, decoderCanvas.width, decoderCanvas.height);
dctx.drawImage(video, 0, 0, decoderCanvas.width, decoderCanvas.height);
Expand Down

0 comments on commit 6e222ff

Please sign in to comment.