diff --git a/index.js b/index.js index 404b744..1fa3c9f 100644 --- a/index.js +++ b/index.js @@ -5399,7 +5399,7 @@ return /******/ (function(modules) { // webpackBootstrap return false; }, canAutoplayVideo: function() { - return !navigator.userAgent.match(/Mobile|Android|BlackBerry/i); + return !navigator.userAgent.match(/BlackBerry/i); }, videoSources: function() { switch (false) { @@ -5478,8 +5478,9 @@ return /******/ (function(modules) { // webpackBootstrap } }, respondToAutoplay: function() { + var ref; switch (false) { - case this.autoplay !== true: + case (ref = this.autoplay) !== true && ref !== '': return this.play(); case !(this.autoplay === 'visible' && this.videoInViewport): return this.play(); @@ -5819,6 +5820,7 @@ return /******/ (function(modules) { // webpackBootstrap attrs: { "controls": _vm.controls, "loop": _vm.loop, + "playsinline": "playsinline", "preload": "auto", "aria-label": _vm.alt }, diff --git a/index.min.js b/index.min.js index 55956e3..0c8f622 100644 --- a/index.min.js +++ b/index.min.js @@ -1,2 +1,2 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("is-numeric"),require("scrollmonitor"),require("vue"));else if("function"==typeof define&&define.amd)define(["is-numeric","scrollmonitor","vue"],e);else{var n="object"==typeof exports?e(require("is-numeric"),require("scrollmonitor"),require("vue")):e(t["is-numeric"],t.scrollmonitor,t.vue);for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(this,function(t,e,n){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){n(58);var r=n(146)(n(46),n(147),null,null);t.exports=r.exports},function(t,e,n){var r=n(29),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e){var n=Array.isArray;t.exports=n},function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){function r(t,e){var n=i(t,e);return o(n)?n:void 0}var o=n(74),i=n(100);t.exports=r},function(t,e,n){function r(t){return null==t?void 0===t?u:s:c&&c in Object(t)?i(t):a(t)}var o=n(9),i=n(97),a=n(124),s="[object Null]",u="[object Undefined]",c=o?o.toStringTag:void 0;t.exports=r},function(t,e,n){function r(t){if("string"==typeof t||o(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}var o=n(14),i=1/0;t.exports=r},function(t,e){function n(t){return null!=t&&"object"==typeof t}t.exports=n},function(t,e,n){function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=r}var r=9007199254740991;t.exports=n},function(t,e,n){function r(t){var e=this.__data__=new o(t);this.size=e.size}var o=n(8),i=n(128),a=n(129),s=n(130),u=n(131),c=n(132);r.prototype.clear=i,r.prototype.delete=a,r.prototype.get=s,r.prototype.has=u,r.prototype.set=c,t.exports=r},function(t,e,n){function r(t,e){var n=a(t),r=!n&&i(t),l=!n&&!r&&s(t),d=!n&&!r&&!l&&c(t),p=n||r||l||d,h=p?o(t.length,String):[],v=h.length;for(var g in t)!e&&!f.call(t,g)||p&&("length"==g||l&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,v))||h.push(g);return h}var o=n(85),i=n(36),a=n(2),s=n(38),u=n(18),c=n(40),l=Object.prototype,f=l.hasOwnProperty;t.exports=r},function(t,e){function n(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++nd))return!1;var h=l.get(t);if(h&&l.get(e))return h==e;var v=-1,g=!0,b=n&u?new o:void 0;for(l.set(t,e),l.set(e,t);++v=this.containerWidth)return n;return n}}}}},function(t,e,n){var r,o,i;r=n(150),i=n(43),o=function(t){return t===!1||t===!0||"visible"===t},t.exports={props:{load:{type:[String,Boolean],default:!0,validator:o},loadPoster:{type:[String,Boolean],default:null,validator:o},loadImage:{type:[String,Boolean],default:null,validator:o},loadVideo:{type:[String,Boolean],default:null,validator:o},loader:[String,Object],loaderThrottle:{type:Number,default:100}},data:function(){return{posterLoading:!1,posterLoaded:!1,imageLoading:!1,imageLoaded:!1,videoLoading:!1,videoLoaded:!1,fallbackLoading:!1,fallbackLoaded:!1}},mounted:function(){return["poster","image","video","fallback"].forEach(function(t){return function(e){return t.$watch(e+"ShouldLoad",function(n){if(n)return t.loadAsset(e)},{immediate:!0})}}(this))},destroyed:function(){var t,e,n,r;for(r=["poster","image","fallback"],e=0,n=r.length;ethis.videoNativeAspect?"pillarbox":"letterbox"}},watch:{playing:function(){return this.$refs.video?this.playing?this.$refs.video.play():this.$refs.video.pause():this.playing=!1},autoplay:function(){return this.respondToAutoplay()},autopause:function(){return this.respondToAutopause()},videoLoaded:function(){return this.respondToAutoplay()},videoInViewport:function(t){return t?this.respondToAutoplay():this.respondToAutopause()}},methods:{play:function(){return this.playing=!0},pause:function(){return this.playing=!1},restart:function(){return this.$refs.video&&(this.$refs.video.currentTime=0),this.play()},togglePlayback:function(t){return null==t&&(t=null),(t=null)?this.togglePlayback(!this.playing):t?this.play():this.pause()},respondToAutoplay:function(){switch(!1){case this.autoplay!==!0:return this.play();case!("visible"===this.autoplay&&this.videoInViewport):return this.play()}},respondToAutopause:function(){switch(!1){case!("visible"===this.autopause&&!this.videoInViewport):return this.pause()}},mime:function(t){return r(t)}}}},function(t,e,n){var r,o,i,a,s;a=n(149),s=n(43),r=n(53),n(148),i=[],o=function(){var t,e,n,r;for(n=[],t=0,e=i.length;t-1}var o=n(10);t.exports=r},function(t,e,n){function r(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var o=n(10);t.exports=r},function(t,e,n){function r(){this.size=0,this.__data__={hash:new o,map:new(a||i),string:new o}}var o=n(60),i=n(8),a=n(15);t.exports=r},function(t,e,n){function r(t){var e=o(this,t).delete(t);return this.size-=e?1:0,e}var o=n(12);t.exports=r},function(t,e,n){function r(t){return o(this,t).get(t)}var o=n(12);t.exports=r},function(t,e,n){function r(t){return o(this,t).has(t)}var o=n(12);t.exports=r},function(t,e,n){function r(t,e){var n=o(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var o=n(12);t.exports=r},function(t,e){function n(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}t.exports=n},function(t,e,n){function r(t){var e=o(t,function(t){return n.size===i&&n.clear(),t}),n=e.cache;return e}var o=n(139),i=500;t.exports=r},function(t,e,n){var r=n(34),o=r(Object.keys,Object);t.exports=o},function(t,e){function n(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}t.exports=n},function(t,e,n){(function(t){var r=n(29),o="object"==typeof e&&e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o,s=a&&r.process,u=function(){try{return s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=u}).call(e,n(44)(t))},function(t,e){function n(t){return o.call(t)}var r=Object.prototype,o=r.toString;t.exports=n},function(t,e){function n(t){return this.__data__.set(t,r),this}var r="__lodash_hash_undefined__";t.exports=n},function(t,e){function n(t){return this.__data__.has(t)}t.exports=n},function(t,e){function n(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}t.exports=n},function(t,e,n){function r(){this.__data__=new o,this.size=0}var o=n(8);t.exports=r},function(t,e){function n(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}t.exports=n},function(t,e){function n(t){return this.__data__.get(t)}t.exports=n},function(t,e){function n(t){return this.__data__.has(t)}t.exports=n},function(t,e,n){function r(t,e){var n=this.__data__;if(n instanceof o){var r=n.__data__;if(!i||r.length=e||n<0||O&&r>=x}function p(){var t=i();return d(t)?h(t):void(w=setTimeout(p,f(t)))}function h(t){return w=void 0,k&&y?r(t):(y=m=void 0,_)}function v(){void 0!==w&&clearTimeout(w),j=0,y=S=m=w=void 0}function g(){return void 0===w?_:h(i())}function b(){var t=i(),n=d(t);if(y=arguments,m=this,S=t,n){if(void 0===w)return l(S);if(O)return w=setTimeout(p,e),r(S)}return void 0===w&&(w=setTimeout(p,e)),_}var y,m,x,_,w,S,j=0,L=!1,O=!1,k=!0;if("function"!=typeof t)throw new TypeError(s);return e=a(e)||0,o(n)&&(L=!!n.leading,O="maxWait"in n,x=O?u(a(n.maxWait)||0,e):x,k="trailing"in n?!!n.trailing:k),b.cancel=v,b.flush=g,b}var o=n(3),i=n(140),a=n(144),s="Expected a function",u=Math.max,c=Math.min;t.exports=r},function(t,e,n){function r(t,e,n){var r=null==t?void 0:o(t,e);return void 0===r?n:r}var o=n(17);t.exports=r},function(t,e,n){function r(t,e){return null!=t&&i(t,e,o)}var o=n(70),i=n(101);t.exports=r},function(t,e){function n(t){return t}t.exports=n},function(t,e,n){function r(t){return a(t)?o(t,!0):i(t)}var o=n(23),i=n(78),a=n(37);t.exports=r},function(t,e,n){function r(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(i);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(r.Cache||o),n}var o=n(16),i="Expected a function";r.Cache=o,t.exports=r},function(t,e,n){var r=n(1),o=function(){return r.Date.now()};t.exports=o},function(t,e,n){function r(t,e){if(null==t)return{};var n=o(s(t),function(t){return[t]});return e=i(e),a(t,n,function(t,n){return e(t,n[0])})}var o=n(24),i=n(76),a=n(81),s=n(94);t.exports=r},function(t,e,n){function r(t){return a(t)?o(s(t)):i(t)}var o=n(82),i=n(83),a=n(19),s=n(6);t.exports=r},function(t,e){function n(){return!1}t.exports=n},function(t,e,n){function r(t){if("number"==typeof t)return t;if(i(t))return a;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(s,"");var n=c.test(t);return n||l.test(t)?f(t.slice(2),n?2:8):u.test(t)?a:+t}var o=n(3),i=n(14),a=NaN,s=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^0o[0-7]+$/i,f=parseInt;t.exports=r},function(t,e,n){function r(t){return null==t?"":o(t)}var o=n(86);t.exports=r},function(t,e){t.exports=function(t,e,n,r){var o,i=t=t||{},a=typeof t.default;"object"!==a&&"function"!==a||(o=t,i=t.default);var s="function"==typeof i?i.options:i;if(e&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns),n&&(s._scopeId=n),r){var u=s.computed||(s.computed={});Object.keys(r).forEach(function(t){var e=r[t];u[t]=function(){return e}})}return{esModule:o,exports:i,options:s}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vv-visual",class:t.containerClasses,style:t.containerStyles},[t.showShim?n("div",{staticClass:"vv-shim",class:t.shimClasses,style:{paddingTop:t.aspectPadding}}):t._e(),t.$slots.prepend?n("div",{staticClass:"vv-slot-prepend"},[t._t("prepend")],2):t._e(),n("transition",{attrs:{name:t.assetPropVal("poster","transition")}},[t.posterShouldRender?n("div",{staticClass:"vv-transition vv-poster-transition",class:t.transitionClasses},[t.background?t.background?n("div",{staticClass:"vv-asset vv-poster",class:t.assetClasses,style:t.backgroundStyles("poster"),attrs:{"aria-label":t.alt}}):t._e():n("img",{staticClass:"vv-asset vv-poster",class:t.assetClasses,attrs:{src:t.posterSrc,alt:t.alt}})]):t._e()]),n("transition",{attrs:{name:t.assetPropVal("image","transition")}},[t.imageShouldRender?n("div",{staticClass:"vv-transition vv-image-transition",class:t.transitionClasses},[t.background?t.background?n("div",{staticClass:"vv-asset vv-image",class:t.assetClasses,style:t.backgroundStyles("image"),attrs:{"aria-label":t.alt}}):t._e():n("img",{staticClass:"vv-asset vv-image",class:t.assetClasses,attrs:{src:t.imageSrc,alt:t.alt}})]):t._e()]),n("transition",{attrs:{name:t.assetPropVal("video","transition")}},[t.fallbackShouldRender?n("div",{staticClass:"vv-transition vv-fallback-transition",class:t.transitionClasses},[t.background?t.background?n("div",{staticClass:"vv-asset vv-fallback",class:t.assetClasses,style:t.backgroundStyles("fallback"),attrs:{"aria-label":t.alt}}):t._e():n("img",{staticClass:"vv-asset vv-fallback",class:t.assetClasses,attrs:{src:t.fallbackSrc,alt:t.alt}})]):t._e()]),n("transition",{attrs:{name:t.assetPropVal("video","transition")}},[t.videoShouldLoad?n("div",{directives:[{name:"show",rawName:"v-show",value:t.videoShouldRender,expression:"videoShouldRender"}],staticClass:"vv-transition vv-video-transition",class:t.transitionClasses},[n("video",{ref:"video",staticClass:"vv-asset vv-video",class:t.assetClasses,attrs:{controls:t.controls,loop:t.loop,preload:"auto","aria-label":t.alt},domProps:{muted:t.muted}},t._l(t.videoSources,function(e){return n("source",{key:"url",attrs:{src:e,type:t.mime(e)}})}))]):t._e()]),t.filledSlot?n("div",{staticClass:"vv-slot",class:t.slotClasses},[t._t("default")],2):t._e(),n("transition",{attrs:{name:t.assetPropVal("loader","transition")}},[t.showLoader?n(t.loaderComponent,{tag:"component",staticClass:"vv-loader"}):t._e()],1)],1)},staticRenderFns:[]}},function(t,e){!function(){function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}return"undefined"!=typeof window&&"function"!=typeof window.CustomEvent&&(t.prototype=window.Event.prototype,void(window.CustomEvent=t))}()},function(t,n){t.exports=e},function(t,e){t.exports=n}])}); \ No newline at end of file +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("is-numeric"),require("scrollmonitor"),require("vue"));else if("function"==typeof define&&define.amd)define(["is-numeric","scrollmonitor","vue"],e);else{var n="object"==typeof exports?e(require("is-numeric"),require("scrollmonitor"),require("vue")):e(t["is-numeric"],t.scrollmonitor,t.vue);for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(this,function(t,e,n){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){n(58);var r=n(146)(n(46),n(147),null,null);t.exports=r.exports},function(t,e,n){var r=n(29),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e){var n=Array.isArray;t.exports=n},function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){function r(t,e){var n=i(t,e);return o(n)?n:void 0}var o=n(74),i=n(100);t.exports=r},function(t,e,n){function r(t){return null==t?void 0===t?u:s:c&&c in Object(t)?i(t):a(t)}var o=n(9),i=n(97),a=n(124),s="[object Null]",u="[object Undefined]",c=o?o.toStringTag:void 0;t.exports=r},function(t,e,n){function r(t){if("string"==typeof t||o(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}var o=n(14),i=1/0;t.exports=r},function(t,e){function n(t){return null!=t&&"object"==typeof t}t.exports=n},function(t,e,n){function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=r}var r=9007199254740991;t.exports=n},function(t,e,n){function r(t){var e=this.__data__=new o(t);this.size=e.size}var o=n(8),i=n(128),a=n(129),s=n(130),u=n(131),c=n(132);r.prototype.clear=i,r.prototype.delete=a,r.prototype.get=s,r.prototype.has=u,r.prototype.set=c,t.exports=r},function(t,e,n){function r(t,e){var n=a(t),r=!n&&i(t),l=!n&&!r&&s(t),d=!n&&!r&&!l&&c(t),p=n||r||l||d,h=p?o(t.length,String):[],v=h.length;for(var g in t)!e&&!f.call(t,g)||p&&("length"==g||l&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,v))||h.push(g);return h}var o=n(85),i=n(36),a=n(2),s=n(38),u=n(18),c=n(40),l=Object.prototype,f=l.hasOwnProperty;t.exports=r},function(t,e){function n(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++nd))return!1;var h=l.get(t);if(h&&l.get(e))return h==e;var v=-1,g=!0,b=n&u?new o:void 0;for(l.set(t,e),l.set(e,t);++v=this.containerWidth)return n;return n}}}}},function(t,e,n){var r,o,i;r=n(150),i=n(43),o=function(t){return t===!1||t===!0||"visible"===t},t.exports={props:{load:{type:[String,Boolean],default:!0,validator:o},loadPoster:{type:[String,Boolean],default:null,validator:o},loadImage:{type:[String,Boolean],default:null,validator:o},loadVideo:{type:[String,Boolean],default:null,validator:o},loader:[String,Object],loaderThrottle:{type:Number,default:100}},data:function(){return{posterLoading:!1,posterLoaded:!1,imageLoading:!1,imageLoaded:!1,videoLoading:!1,videoLoaded:!1,fallbackLoading:!1,fallbackLoaded:!1}},mounted:function(){return["poster","image","video","fallback"].forEach(function(t){return function(e){return t.$watch(e+"ShouldLoad",function(n){if(n)return t.loadAsset(e)},{immediate:!0})}}(this))},destroyed:function(){var t,e,n,r;for(r=["poster","image","fallback"],e=0,n=r.length;ethis.videoNativeAspect?"pillarbox":"letterbox"}},watch:{playing:function(){return this.$refs.video?this.playing?this.$refs.video.play():this.$refs.video.pause():this.playing=!1},autoplay:function(){return this.respondToAutoplay()},autopause:function(){return this.respondToAutopause()},videoLoaded:function(){return this.respondToAutoplay()},videoInViewport:function(t){return t?this.respondToAutoplay():this.respondToAutopause()}},methods:{play:function(){return this.playing=!0},pause:function(){return this.playing=!1},restart:function(){return this.$refs.video&&(this.$refs.video.currentTime=0),this.play()},togglePlayback:function(t){return null==t&&(t=null),(t=null)?this.togglePlayback(!this.playing):t?this.play():this.pause()},respondToAutoplay:function(){var t;switch(!1){case(t=this.autoplay)!==!0&&""!==t:return this.play();case!("visible"===this.autoplay&&this.videoInViewport):return this.play()}},respondToAutopause:function(){switch(!1){case!("visible"===this.autopause&&!this.videoInViewport):return this.pause()}},mime:function(t){return r(t)}}}},function(t,e,n){var r,o,i,a,s;a=n(149),s=n(43),r=n(53),n(148),i=[],o=function(){var t,e,n,r;for(n=[],t=0,e=i.length;t-1}var o=n(10);t.exports=r},function(t,e,n){function r(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var o=n(10);t.exports=r},function(t,e,n){function r(){this.size=0,this.__data__={hash:new o,map:new(a||i),string:new o}}var o=n(60),i=n(8),a=n(15);t.exports=r},function(t,e,n){function r(t){var e=o(this,t).delete(t);return this.size-=e?1:0,e}var o=n(12);t.exports=r},function(t,e,n){function r(t){return o(this,t).get(t)}var o=n(12);t.exports=r},function(t,e,n){function r(t){return o(this,t).has(t)}var o=n(12);t.exports=r},function(t,e,n){function r(t,e){var n=o(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var o=n(12);t.exports=r},function(t,e){function n(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}t.exports=n},function(t,e,n){function r(t){var e=o(t,function(t){return n.size===i&&n.clear(),t}),n=e.cache;return e}var o=n(139),i=500;t.exports=r},function(t,e,n){var r=n(34),o=r(Object.keys,Object);t.exports=o},function(t,e){function n(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}t.exports=n},function(t,e,n){(function(t){var r=n(29),o="object"==typeof e&&e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o,s=a&&r.process,u=function(){try{return s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=u}).call(e,n(44)(t))},function(t,e){function n(t){return o.call(t)}var r=Object.prototype,o=r.toString;t.exports=n},function(t,e){function n(t){return this.__data__.set(t,r),this}var r="__lodash_hash_undefined__";t.exports=n},function(t,e){function n(t){return this.__data__.has(t)}t.exports=n},function(t,e){function n(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}t.exports=n},function(t,e,n){function r(){this.__data__=new o,this.size=0}var o=n(8);t.exports=r},function(t,e){function n(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}t.exports=n},function(t,e){function n(t){return this.__data__.get(t)}t.exports=n},function(t,e){function n(t){return this.__data__.has(t)}t.exports=n},function(t,e,n){function r(t,e){var n=this.__data__;if(n instanceof o){var r=n.__data__;if(!i||r.length=e||n<0||O&&r>=x}function p(){var t=i();return d(t)?h(t):void(w=setTimeout(p,f(t)))}function h(t){return w=void 0,k&&y?r(t):(y=m=void 0,_)}function v(){void 0!==w&&clearTimeout(w),j=0,y=S=m=w=void 0}function g(){return void 0===w?_:h(i())}function b(){var t=i(),n=d(t);if(y=arguments,m=this,S=t,n){if(void 0===w)return l(S);if(O)return w=setTimeout(p,e),r(S)}return void 0===w&&(w=setTimeout(p,e)),_}var y,m,x,_,w,S,j=0,L=!1,O=!1,k=!0;if("function"!=typeof t)throw new TypeError(s);return e=a(e)||0,o(n)&&(L=!!n.leading,O="maxWait"in n,x=O?u(a(n.maxWait)||0,e):x,k="trailing"in n?!!n.trailing:k),b.cancel=v,b.flush=g,b}var o=n(3),i=n(140),a=n(144),s="Expected a function",u=Math.max,c=Math.min;t.exports=r},function(t,e,n){function r(t,e,n){var r=null==t?void 0:o(t,e);return void 0===r?n:r}var o=n(17);t.exports=r},function(t,e,n){function r(t,e){return null!=t&&i(t,e,o)}var o=n(70),i=n(101);t.exports=r},function(t,e){function n(t){return t}t.exports=n},function(t,e,n){function r(t){return a(t)?o(t,!0):i(t)}var o=n(23),i=n(78),a=n(37);t.exports=r},function(t,e,n){function r(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(i);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(r.Cache||o),n}var o=n(16),i="Expected a function";r.Cache=o,t.exports=r},function(t,e,n){var r=n(1),o=function(){return r.Date.now()};t.exports=o},function(t,e,n){function r(t,e){if(null==t)return{};var n=o(s(t),function(t){return[t]});return e=i(e),a(t,n,function(t,n){return e(t,n[0])})}var o=n(24),i=n(76),a=n(81),s=n(94);t.exports=r},function(t,e,n){function r(t){return a(t)?o(s(t)):i(t)}var o=n(82),i=n(83),a=n(19),s=n(6);t.exports=r},function(t,e){function n(){return!1}t.exports=n},function(t,e,n){function r(t){if("number"==typeof t)return t;if(i(t))return a;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(s,"");var n=c.test(t);return n||l.test(t)?f(t.slice(2),n?2:8):u.test(t)?a:+t}var o=n(3),i=n(14),a=NaN,s=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^0o[0-7]+$/i,f=parseInt;t.exports=r},function(t,e,n){function r(t){return null==t?"":o(t)}var o=n(86);t.exports=r},function(t,e){t.exports=function(t,e,n,r){var o,i=t=t||{},a=typeof t.default;"object"!==a&&"function"!==a||(o=t,i=t.default);var s="function"==typeof i?i.options:i;if(e&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns),n&&(s._scopeId=n),r){var u=s.computed||(s.computed={});Object.keys(r).forEach(function(t){var e=r[t];u[t]=function(){return e}})}return{esModule:o,exports:i,options:s}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vv-visual",class:t.containerClasses,style:t.containerStyles},[t.showShim?n("div",{staticClass:"vv-shim",class:t.shimClasses,style:{paddingTop:t.aspectPadding}}):t._e(),t.$slots.prepend?n("div",{staticClass:"vv-slot-prepend"},[t._t("prepend")],2):t._e(),n("transition",{attrs:{name:t.assetPropVal("poster","transition")}},[t.posterShouldRender?n("div",{staticClass:"vv-transition vv-poster-transition",class:t.transitionClasses},[t.background?t.background?n("div",{staticClass:"vv-asset vv-poster",class:t.assetClasses,style:t.backgroundStyles("poster"),attrs:{"aria-label":t.alt}}):t._e():n("img",{staticClass:"vv-asset vv-poster",class:t.assetClasses,attrs:{src:t.posterSrc,alt:t.alt}})]):t._e()]),n("transition",{attrs:{name:t.assetPropVal("image","transition")}},[t.imageShouldRender?n("div",{staticClass:"vv-transition vv-image-transition",class:t.transitionClasses},[t.background?t.background?n("div",{staticClass:"vv-asset vv-image",class:t.assetClasses,style:t.backgroundStyles("image"),attrs:{"aria-label":t.alt}}):t._e():n("img",{staticClass:"vv-asset vv-image",class:t.assetClasses,attrs:{src:t.imageSrc,alt:t.alt}})]):t._e()]),n("transition",{attrs:{name:t.assetPropVal("video","transition")}},[t.fallbackShouldRender?n("div",{staticClass:"vv-transition vv-fallback-transition",class:t.transitionClasses},[t.background?t.background?n("div",{staticClass:"vv-asset vv-fallback",class:t.assetClasses,style:t.backgroundStyles("fallback"),attrs:{"aria-label":t.alt}}):t._e():n("img",{staticClass:"vv-asset vv-fallback",class:t.assetClasses,attrs:{src:t.fallbackSrc,alt:t.alt}})]):t._e()]),n("transition",{attrs:{name:t.assetPropVal("video","transition")}},[t.videoShouldLoad?n("div",{directives:[{name:"show",rawName:"v-show",value:t.videoShouldRender,expression:"videoShouldRender"}],staticClass:"vv-transition vv-video-transition",class:t.transitionClasses},[n("video",{ref:"video",staticClass:"vv-asset vv-video",class:t.assetClasses,attrs:{controls:t.controls,loop:t.loop,playsinline:"playsinline",preload:"auto","aria-label":t.alt},domProps:{muted:t.muted}},t._l(t.videoSources,function(e){return n("source",{key:"url",attrs:{src:e,type:t.mime(e)}})}))]):t._e()]),t.filledSlot?n("div",{staticClass:"vv-slot",class:t.slotClasses},[t._t("default")],2):t._e(),n("transition",{attrs:{name:t.assetPropVal("loader","transition")}},[t.showLoader?n(t.loaderComponent,{tag:"component",staticClass:"vv-loader"}):t._e()],1)],1)},staticRenderFns:[]}},function(t,e){!function(){function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}return"undefined"!=typeof window&&"function"!=typeof window.CustomEvent&&(t.prototype=window.Event.prototype,void(window.CustomEvent=t))}()},function(t,n){t.exports=e},function(t,e){t.exports=n}])}); \ No newline at end of file diff --git a/package.json b/package.json index 1fe3ef3..c21e92f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-visual", - "version": "0.4.1", + "version": "0.5.0", "description": "Vue 2 image and video loader supporting lazy loading, background videos, fixed aspect ratios, low rez poster images, transitions, loaders, slotted content and more and more", "main": "index.js", "scripts": {