react-scroll-video
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

React Scroll Video

This component allows scrolling in videos

How work

import React from "react";
import ScrollVideo from "react-scroll-video";

export default function Index() {
  return (
    <ScrollVideo
      // lower numbers = faster playback
      playback={5000}
      type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'
      src="https://www.apple.com/media/us/mac-pro/2013/16C1b6b5-1d91-4fef-891e-ff2fc1c1bb58/videos/macpro_main_desktop.mp4"
    />
  );
}

The parameter playback defines the speed of the scrolling of the video, the smaller the number, the faster the playback will be in scroll

Package Sidebar

Install

npm i react-scroll-video

Weekly Downloads

43

Version

1.0.6

License

ISC

Unpacked Size

18.1 kB

Total Files

9

Last publish

Collaborators

  • luis030821