@kokotree-inc/videojs-smooth-slider-plugin
v1.1.4
Published
A Video.js plugin that enhances the seek bar with smooth seeking functionality, allowing for a more responsive and precise user interaction during video playback. It overrides the default handleMouseMove and getPercent methods of the SeekBar component to
Downloads
7
Maintainers
Readme
videojs-smooth-slider-plugin
Enhance your Video.js player with smooth seeking capabilities using videojs-smooth-slider-plugin
. This plugin provides an improved scrubbing experience, making the seek bar interactions more responsive and precise. It achieves this by customizing the handleMouseMove
and getPercent
methods of the Video.js SeekBar
component.
Installation
Install the plugin into your project with npm:
npm install @kokotree-inc/videojs-smooth-slider-plugin
Usage
To integrate the plugin with your Video.js player:
import videojs from "video.js";
import "@kokotree-inc/videojs-smooth-slider-plugin";
const player = videojs("my-video");
// Activate the smooth seek plugin with default settings
player.smoothSeek();
// Optionally, activate the plugin with custom settings
player.smoothSeek({
timeBuffer: 10, // time in seconds
});
Options
timeBuffer
: (number) Specifies the time in seconds to buffer from the end of the video when seeking. This prevents the seek slider from reaching the very end of the video, which could inadvertently trigger the end of the video. Default is 5 seconds.
Features
- Smooth Scrubbing: Offers a smoother and more intuitive seeking experience.
- Video.js Compatibility: Seamlessly integrates with the Video.js ecosystem.
- Easy Integration: Simple setup process with existing Video.js players.
Contributing
Contributions to the videojs-smooth-slider-plugin
are welcome. Please adhere to the established coding standards and include unit tests for any new or modified functionality.
License
This project is open-source and available under the MIT License.