|
1 | 1 | /*! |
2 | | - * simpleParallax - simpleParallax is a simple JavaScript library that gives your website parallax animations on any images, |
3 | | - * @date: 07-04-2020 18:47:4, |
4 | | - * @version: 5.3.0, |
| 2 | + * simpleParallax - simpleParallax is a simple JavaScript library that gives your website parallax animations on any images or videos, |
| 3 | + * @date: 08-04-2020 8:7:34, |
| 4 | + * @version: 5.4.0, |
5 | 5 | * @link: https://simpleparallax.com/ |
6 | 6 | */ |
7 | 7 | (function webpackUniversalModuleDefinition(root, factory) { |
@@ -184,20 +184,25 @@ var cssTransform = function cssTransform() { |
184 | 184 |
|
185 | 185 | /* harmony default export */ var helpers_cssTransform = (cssTransform()); |
186 | 186 | // CONCATENATED MODULE: ./src/helpers/isImageLoaded.js |
187 | | -// check if image is fully loaded |
188 | | -var isImageLoaded = function isImageLoaded(image) { |
189 | | - // check if image is set as the parameter |
190 | | - if (!image) { |
| 187 | +// check if media is fully loaded |
| 188 | +var isImageLoaded = function isImageLoaded(media) { |
| 189 | + //if the media is a video, return true |
| 190 | + if (media.tagName.toLowerCase() == 'video') { |
| 191 | + return true; |
| 192 | + } // check if media is set as the parameter |
| 193 | + |
| 194 | + |
| 195 | + if (!media) { |
191 | 196 | return false; |
192 | | - } // check if image has been 100% loaded |
| 197 | + } // check if media has been 100% loaded |
193 | 198 |
|
194 | 199 |
|
195 | | - if (!image.complete) { |
| 200 | + if (!media.complete) { |
196 | 201 | return false; |
197 | | - } // check if the image is displayed |
| 202 | + } // check if the media is displayed |
198 | 203 |
|
199 | 204 |
|
200 | | - if (typeof image.naturalWidth !== 'undefined' && image.naturalWidth === 0) { |
| 205 | + if (typeof media.naturalWidth !== 'undefined' && media.naturalWidth === 0) { |
201 | 206 | return false; |
202 | 207 | } |
203 | 208 |
|
@@ -545,6 +550,7 @@ function () { |
545 | 550 | overflow: false, |
546 | 551 | transition: 'cubic-bezier(0,0,0,1)', |
547 | 552 | customContainer: false, |
| 553 | + customWrapper: false, |
548 | 554 | maxTransition: 0 |
549 | 555 | }; |
550 | 556 | this.settings = Object.assign(this.defaults, options); // check if the browser handle the Intersection Observer API |
|
0 commit comments