Gestures plugin
0.8 KB gzipAdds touch gestures: double-tap the left or right side to seek, with a ripple showing how far you jumped.
On a touch screen, double-tap the left or right side of the video.
Install
npm i @tomato-player/plugin-gestures
Usage
player.ts — tsimport { createPlayer } from '@tomato-player/core';import { minimal } from '@tomato-player/skin-minimal';import { gestures } from '@tomato-player/plugin-gestures';createPlayer('#player', {src: 'movie.mp4',skin: minimal(),plugins: [gestures({ seekStep: 10, zone: 0.35 })],});
Options
| Option | Type | Description |
|---|---|---|
| seekStep | number | Seconds per double-tap (default 10). |
| zone | number | Width of each side zone as a fraction of the player (default 0.35). |