Need help - my keyboard shortcuts not working when video is at the beginning for NextJS 14? [CODESANDBOX] #1381
Unanswered
ameytessact
asked this question in
Q&A
Replies: 2 comments
-
Try playing a video a little, sorry I couldn't get the controls visible, but spacebar should play it. After playing for few seconds, if you try arrow keys, it will work perfectly and seek frame by frame. But, reload and try from the start of the video, arrow keys won't seek. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Unfortunately, having issues trying to use the sandbox. Keeps erroring out with random CodeSandbox stuff. I'm testing this right now in my dev environment and everything seems okay. It's seeking as expected. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am trying to add custom keyboard shortcuts that override the default ArrowLeft and ArrowRight shortcuts that come from
MEDIA_KEY_SHORTCUTS
.I want to seek by a single frame, hence, I've added keydown shortcut in
keyShortcuts
, that for the next frame's timestamp, callremote.seek(timestamp)
.The keyboard events are being detected, as I can confirm from the console logs, but when the video is at 0:00 and you press ArrowRight, the video will not seek.
I tried to replicate this in a Vite codesandbox, but it works perfectly there. On a NextJS 14 codesandbox, player behaves differently.
Here are my props for keyboard shortcuts:
Why does it behave differently? Pls check attached codesandbox:
https://codesandbox.io/p/devbox/vidstack-repro-6fvm5g
Beta Was this translation helpful? Give feedback.
All reactions