diff options
-rw-r--r-- | package.json | 1 | ||||
-rw-r--r-- | pages/editor.tsx | 4 | ||||
-rw-r--r-- | yarn.lock | 5 |
3 files changed, 10 insertions, 0 deletions
diff --git a/package.json b/package.json index 7ada30e..8b6f2d4 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@mdi/js": "^5.9.55", "@mdi/react": "^1.5.0", "ajv": "^8.3.0", + "mousetrap": "^1.6.5", "next": "^10.2.0", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/pages/editor.tsx b/pages/editor.tsx index 7a7a52b..8f0637b 100644 --- a/pages/editor.tsx +++ b/pages/editor.tsx @@ -166,6 +166,10 @@ function TimelineEditor(props: { var frame = Math.max(0, Math.round(getFrameAtOffset(x - 240, timelineZoom)) - 1); setFrame(frame); scrubberSpring.start({ frame }); + if(props.player.player) { + var player = props.player.player; + player.currentTime = props.player.frameToTimestamp(frame + 1); + } }, { domTarget: scrubberDragRef, eventOptions: { passive: false } }); return <> @@ -1474,6 +1474,11 @@ minimist@^1.2.0: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +mousetrap@^1.6.5: + version "1.6.5" + resolved "https://registry.yarnpkg.com/mousetrap/-/mousetrap-1.6.5.tgz#8a766d8c272b08393d5f56074e0b5ec183485bf9" + integrity sha512-QNo4kEepaIBwiT8CDhP98umTetp+JNfQYBWvC1pc6/OAibuXtRcxZ58Qz8skvEHYvURne/7R8T5VoOI7rDsEUA== + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" |