
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
videojs-hotkeys
Advanced tools
A plugin for Video.js that enables keyboard hotkeys when the player has focus.
Note: clicking any of the control buttons such as Play/Pause, Fullscreen, or Mute, will remove focus on the player
which appears to "break" the hotkeys. This is for accessibility reasons so that people who do not use or know about
the hotkeys can still properly use the Tab
key to highlight the control buttons and press space
to toggle them.
To restore focus, just click on the video, or an empty part of the control bar at the bottom of the video player.
To override this behaviour, set the flag alwaysCaptureHotkeys
to true
.
This will "fix" hotkeys. For accessibility, the Tab
key may be used in combination with the Enter
/Return
key to navigate and activate control buttons.
Include the plugin:
You can either load the current release:
<script src="//cdn.sc.gl/videojs-hotkeys/0.2/videojs.hotkeys.min.js"></script>
Or always load the latest version:
<script src="//cdn.sc.gl/videojs-hotkeys/latest/videojs.hotkeys.min.js"></script>
<script src="/path/to/videojs.hotkeys.js"></script>
Add hotkeys to your Videojs ready function.
videojs('vidId').ready(function() {
this.hotkeys({
volumeStep: 0.1,
seekStep: 5,
enableMute: true,
enableFullscreen: true,
enableNumbers: true,
alwaysCaptureHotkeys: false
});
});
volumeStep
(decimal): The percentage to increase/decrease the volume level when using the Up and Down Arrow keys (default: 0.1
)seekStep
(integer): The number of seconds to seek forward and backwards when using the Right and Left Arrow keys (default: 5
)enableMute
(boolean): Enables the volume mute to be toggle by pressing the M key (default: true
)enableFullscreen
(boolean): Enables toggling the video fullscreen by pressing the F key (default: true
)enableNumbers
(boolean): Enables seeking the video by pressing the number keys (default true
)alwaysCaptureHotkeys
(boolean): Forces the capture of hotkeys, even when control elements are focused.
The Enter/Return key may be used instead to activate the control elements (default: false
)enableJogStyle
(boolean): Enables seeking the video in a broadcast-style jog by pressing the Up and Down Arrow keys.
seekStep
will also need to be changed to get a proper broadcast-style jog.
This feature and the changes for seekStep are explained a bit more in PR #12 (default false
)
(Note: This isn't a feature for everyone, and enabling JogStyle will disable the volume hotkeys)FAQs
Adds more hotkey support to video.js
We found that videojs-hotkeys demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.