scrolly-video
Advanced tools
Comparing version 0.0.21 to 0.0.22
@@ -41,2 +41,3 @@ export default ScrollyVideo; | ||
video: HTMLVideoElement; | ||
videoPercentage: number; | ||
isSafari: boolean; | ||
@@ -62,3 +63,2 @@ currentTime: number; | ||
setVideoPercentage(percentage: any, options?: {}): void; | ||
videoPercentage: any; | ||
/** | ||
@@ -65,0 +65,0 @@ * Sets the style of the video or canvas to "cover" it's container |
@@ -87,2 +87,5 @@ import UAParser from 'ua-parser-js'; | ||
// Start the video percentage at 0 | ||
this.videoPercentage = 0; | ||
// Adds the video to the container | ||
@@ -201,2 +204,5 @@ this.container.appendChild(this.video); | ||
setVideoPercentage(percentage, options = {}) { | ||
// Early termination if the video percentage is already at the percentage that is intended. | ||
if (this.videoPercentage === percentage) return; | ||
if (this.transitioningRaf) { | ||
@@ -203,0 +209,0 @@ // eslint-disable-next-line no-undef |
{ | ||
"name": "scrolly-video", | ||
"version": "0.0.21", | ||
"version": "0.0.22", | ||
"description": "A component for scroll-based (or other externally controlled) playback.", | ||
@@ -5,0 +5,0 @@ "main": "dist/scrolly-video.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15648095
30471