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

video-scroller

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

video-scroller

Scrubbs html5 video based on scroll position with easing

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
301
increased by63.59%
Maintainers
1
Weekly downloads
 
Created
Source

VideoScroller.js

Video scrubbing on scroll with easing using no dependencies.

Demo

http://finnursig.github.io/VideoScroller

Installation

npm install video-scroller

Usage

HTML

Normal use:

<video src="video.mp4">

Using XHR to blob for performance

<video data-src="video.mp4">

Javascript

new VideoScroller({
    el: document.getElementById('myVideoElement')
});

Options

PropertyTypeTextDefault
elelementvideo element
invertboolreverses playback directions / scroll directionfalse
scrollTimeoutnumberhow often new position is calculated when scrolling in milliseconds300
easingFunctionstring / functioncustom easing function, using only one parameter [0-1] and returning [0-1]easeOutQuint

Easing functions

See [EasingFunctions.js] (https://github.com/finnursig/VideoScroller/blob/master/src/EasingFunctions.js)

Video requirements

To get the video to scroll smoothly it has to have a generous number of keyframes, here is how you would do that using ffmpeg

ffmpeg -i input.mp4 -g 10 output.mp4

Changes

  • 1.1.0
    • Added XHR to blog option to get rid of "206 Partal Content" requests.
    • Easingfunction option can now be a string.
  • 1.0.3
    • Changed code from ES5 to ES6 using babel.
  • 1.0.2
  • 1.0.1
  • 1.0.0

Keywords

FAQs

Package last updated on 02 Mar 2015

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