@kokotree-inc/videojs-smooth-slider-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

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.

Package Sidebar

Install

npm i @kokotree-inc/videojs-smooth-slider-plugin

Weekly Downloads

2

Version

1.1.4

License

MIT

Unpacked Size

6.97 kB

Total Files

4

Last publish

Collaborators

  • kokotree