-1

For security request, my project has been scanned by Sonatype Nexus Lifecycle. Which comes out with two issues by keycode:

enter image description here So, may I ask is it possible to remove keycode in videojs8? If yes, may I ask how can I remove then?

1 Answer 1

0

Yes, it's possible to remove the KeyCode. Try this:

const player = videojs('my-video');

player.on('keydown', (event) => {
  if (event.which === 32) { // 32 for Space key
    // Handle space key press
  } else if (event.which === 13) { // 13 for Enter key
    // Handle enter key press
  }
});

In here, keydown event provided by Video.js to listen for key presses.

You can also check this: How to listen on keydown event in video tag?

Sign up to request clarification or add additional context in comments.

1 Comment

I'm wonder is there any way to remove keycode which imported by default? How can i remove import and will it affect the function of videojs8?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.