Keyboard and gestures

pluginaccessibility

Every shortcut, plus double-tap seeking on touch screens.

Click or tab into the player, then use the keys on the right. On a phone, double-tap either side of the video to jump 10 seconds; taps in a row add up.

KeyAction
Play or pause
Play or pause
Back 10 seconds
Forward 10 seconds
Back 5 seconds
Forward 5 seconds
Volume up
Volume down
Go to start
Go to end
Mute or unmute
Fullscreen
Captions on or off
Picture-in-picture
Big Buck Bunny © Blender Foundation, CC BY 3.0, via Wikimedia Commons. HLS test stream by Mux, DASH by Akamai.

The code

tsx
import { hotkeys } from '@tomato-player/plugin-hotkeys';
import { gestures } from '@tomato-player/plugin-gestures';
​
createPlayer('#player', {
src: 'movie.mp4',
skin: minimal(),
plugins: [
hotkeys({ scope: 'focus', bindings: { p: (player) => player.togglePip(), i: null } }),
gestures({ seekStep: 10 }),
],
});