New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-video-seek-slider

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-video-seek-slider

React video seek slider like youtube

  • 5.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7K
increased by16.9%
Maintainers
1
Weekly downloads
 
Created
Source

react-video-seek-slider

The simplest and light weight video seeker like YouTube for React

Demo react-video-seek-slider

react-video-seek-slider

Braking changes from v4 -> v5

All time values you pass to props like max, currentTime and progress now are im milliseconds instead of seconds.

onChange prop will also return time param in milliseconds as well.

How to install

npm i react-video-seek-slider
or
yarn add react-video-seek-slider

How to import

For TypeScript usage there is a index.d.ts

import { VideoSeekSlider } from "react-video-seek-slider";

Also you have to use css file in a lib folder:

import "react-video-seek-slider/styles.css"

How to use

//JSX
    const [currentTime, setCurrentTime] = useState(0);
    /// ..... 
    <VideoSeekSlider
        max={1152}
        currentTime={currentTime}
        progress={400}
        onChange={setCurrentTime}
        offset={0}
        secondsPrefix="00:00:"
        minutesPrefix="00:"
    />

Specification

  • max (number, required) - video duration (in milliseconds)
  • currentTime (number, required) - current video progress (in milliseconds)
  • progress (number) - Current buffer progress (in milliseconds)
  • hideSeekTimes (boolean) - hide hover seek time (Default: false)
  • onChange ((time:number, offsetTime:number)=>void, required) - script to be run when thumb change position
  • offset (number, default:0) - when you need start slider with offset time
  • minutesPrefix (string, default: '') - when video duration is less than an hour you can use time prefix like "0:" so the time tooltip will show e.g "0:25:23"
  • secondsPrefix (string, default: '') - when video duration is less than one minute it's possible to use time prefix like "0:00:" and the time tooltip will show e.g "0:00:10"
  • limitTimeTooltipBySides (boolean, default: true) - limit the time tooltip position inside of the slider

For development

just use:

$ npm i
$ npm run dev

open your browser http://localhost:3000

For Build

$ npm run build

FAQs

Package last updated on 15 Aug 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc