Socket
Socket
Sign inDemoInstall

scrolly-video

Package Overview
Dependencies
0
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    scrolly-video

A webcomponent built with svelte for scroll-based (or other externally controlled) playback.


Version published
Weekly downloads
516
decreased by-23.78%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

scrolly-video

*** NOTE: THIS LIBRARY IS STILL IN EARLY DEVELOPMENT STAGES ***

A webcomponent built with svelte for scroll-based (or other externally controlled) playback.

🚀 Installation (Web)

  1. Add html code to your page:
<scrolly-video src="https://your-video-url.mp4" />
  1. Require javascript in your page (before </body>):
<script src="https://cdn.jsdelivr.net/npm/scrolly-video@latest/dist/scrolly-video.js" />

You can replace @latest with specific version, example @1.0.0.

Below is available a description of options values.

📦 Installation (NPM Module - Browserify/Webpack)

  1. Install npm module: npm install scrolly-video --save
  2. Add html code to your page:
<scrolly-video src="https://your-video-url.mp4" />
  1. Require javascript in your app:
require("scrolly-video");

or

import "scrolly-video";

Below is available a description of options values.

🔵 Installation (React)

  1. Install npm module with npm install scrolly-video --save:
  2. Import module in your src/App.js on header:
import "scrolly-video";
  1. Add html code to your App.js template:
<scrolly-video src="https://your-video-url.mp4" />

🔴 Installation (Angular)

  1. Install npm module with npm install scrolly-video --save:
  2. Import module in your app/app.modules.ts on header:
import "scrolly-video";
  1. Add html code to your html component:
<scrolly-video src="https://your-video-url.mp4" />

🟠 Installation (Svelte)

  1. Install npm module with npm install scrolly-video --save:
  2. Import module in your src/App.svelte on header:
import "scrolly-video";
  1. Add html code to your html component:
<scrolly-video src="https://your-video-url.mp4" />

🟢 Installation (Vue)

  1. Install npm module with npm install scrolly-video --save:
  2. Import module in your src/App.vue and add webcomponent to ignoreElements of vue config:
import Vue from "vue";
import "scrolly-video";

Vue.config.ignoredElements = ["scrolly-video"];
  1. Add html code to your html component:
<scrolly-video src="https://your-video-url.mp4" />

🧰 Options / Attributes

Any props added to this element will are passed into a standard HTML <video /> tag.

Additional parameters:

ParameterDescriptionValuesDefault value
transitionSpeedSets the maximum playbackRate for this videoNumber6

Additionally, there are two functions provided to set the currentTime:

setCurrentTime (setTime | Number): A number between 0 and video.duration that specifies the number of seconds into the video.

setCurrentTimePercent (setPercentage | Number): A number between 0 and 1 that specifies the percentage position of the video.

HTML Code with attributes:
<scrolly-video src="https://your-video-url.mp4" />

Keywords

FAQs

Last updated on 08 Sep 2022

Did you know?

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc