@blinkk/degu
Advanced tools
Comparing version
@@ -32,2 +32,3 @@ "use strict"; | ||
'ipad': is_1.is.ipad, | ||
'android': is_1.is.android, | ||
}; | ||
@@ -34,0 +35,0 @@ for (const key in checks) { |
@@ -17,3 +17,3 @@ export declare const LazyVideoEvents: { | ||
onResize(): void; | ||
paint(): void; | ||
paint(force?: boolean): void; | ||
private playVideo; | ||
@@ -20,0 +20,0 @@ isPainted(): any; |
@@ -23,2 +23,9 @@ "use strict"; | ||
}); | ||
this.watcher.add({ | ||
element: this.el, | ||
on: 'force-lazy-load', | ||
callback: () => { | ||
this.paint(true); | ||
} | ||
}); | ||
const forwardScalar = this.el.getAttribute('lazy-video-forward-scalar'); | ||
@@ -47,4 +54,4 @@ this.forwardLoadScalar = | ||
} | ||
paint() { | ||
if (this.isPainted() && !this.setComplete) { | ||
paint(force = false) { | ||
if ((this.isPainted() && !this.setComplete) || force) { | ||
this.setComplete = true; | ||
@@ -51,0 +58,0 @@ this.el.setAttribute('src', this.url); |
{ | ||
"name": "@blinkk/degu", | ||
"version": "0.0.315", | ||
"version": "0.0.316", | ||
"description": "A general utility library for interactive websites, with a focus on performance.", | ||
@@ -5,0 +5,0 @@ "author": "Blinkk <hello@blinkk.com>", |
583625
0.04%16213
0.05%