@area17/a17-lazyload
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -7,6 +7,10 @@ # A17 Lazy Load Change Log | ||
- initial release | ||
* initial release | ||
## 0.1.1 | ||
- Safari doesn't always auto play videos with `autoplay` after the `src` has been added - forcing it to play the video | ||
* Safari doesn't always auto play videos with `autoplay` after the `src` has been added - forcing it to play the video | ||
## 0.1.2 | ||
* Safari doesn't always auto play videos with `autoplay` after the `src` has been added. Added an option to force auto play of these videos by replacing the node *this will cause any event listeners on the video to fail* |
@@ -9,2 +9,3 @@ (function () { | ||
maxFrameCount: 10, // 60fps / 10 = 6 times a second | ||
forceAutoplayVideoPlay: true, // forces a lazy loaded `autoplay` video to play | ||
}; | ||
@@ -96,5 +97,8 @@ | ||
} | ||
if (autoplay) { | ||
if (options.forceAutoplayVideoPlay && autoplay && el.paused) { | ||
try { | ||
el.play(); | ||
el.load(); | ||
if (el.paused) { | ||
el.outerHTML = el.outerHTML; | ||
} | ||
} catch(err) { | ||
@@ -101,0 +105,0 @@ } |
{ | ||
"name": "@area17/a17-lazyload", | ||
"description": "A simple, tiny, no dependency, lazy loader - by A17", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "main": "./dist/a17-lazyload.js", |
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
13101
239