lightgallery
Advanced tools
Comparing version 2.3.0-beta to 2.3.0-beta.1
@@ -193,2 +193,3 @@ "use strict"; | ||
var playerParams = param(this.settings.vimeoPlayerParams); | ||
playerParams = playerParams ? '?' + playerParams : ''; | ||
video = "<iframe allow=\"autoplay\" id=" + videoId + " class=\"lg-video-object lg-vimeo " + addClass + "\" " + videoTitle + " src=\"//player.vimeo.com/video/" + (videoInfo.vimeo[1] + playerParams) + "\" " + commonIframeProps + "></iframe>"; | ||
@@ -199,2 +200,3 @@ } | ||
var playerParams = param(this.settings.wistiaPlayerParams); | ||
playerParams = playerParams ? '?' + playerParams : ''; | ||
video = "<iframe allow=\"autoplay\" id=\"" + wistiaId + "\" src=\"//fast.wistia.net/embed/iframe/" + (videoInfo.wistia[4] + playerParams) + "\" " + videoTitle + " class=\"wistia_embed lg-video-object lg-wistia " + addClass + "\" name=\"wistia_embed\" " + commonIframeProps + "></iframe>"; | ||
@@ -201,0 +203,0 @@ } |
/** | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
@@ -36,3 +36,3 @@ /** | ||
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -39,0 +39,0 @@ * Copyright (c) 2020 Sachin Neravath; |
@@ -14,3 +14,3 @@ var t,i;t=this,i=function(t,i){ | ||
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -17,0 +17,0 @@ * Copyright (c) 2020 Sachin Neravath; |
{ | ||
"name": "lightgallery", | ||
"version": "2.3.0-beta", | ||
"version": "2.3.0-beta.1", | ||
"description": "lightGallery is a feature-rich, modular JavaScript gallery plugin for building beautiful image and video galleries for the web and the mobile", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/** | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/** | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/** | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/** | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/** | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/** | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/** | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/** | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/** | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/** | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -253,2 +253,3 @@ * Copyright (c) 2020 Sachin Neravath; | ||
var playerParams = param(this.settings.vimeoPlayerParams); | ||
playerParams = playerParams ? '?' + playerParams : ''; | ||
video = "<iframe allow=\"autoplay\" id=" + videoId + " class=\"lg-video-object lg-vimeo " + addClass + "\" " + videoTitle + " src=\"//player.vimeo.com/video/" + (videoInfo.vimeo[1] + playerParams) + "\" " + commonIframeProps + "></iframe>"; | ||
@@ -259,2 +260,3 @@ } | ||
var playerParams = param(this.settings.wistiaPlayerParams); | ||
playerParams = playerParams ? '?' + playerParams : ''; | ||
video = "<iframe allow=\"autoplay\" id=\"" + wistiaId + "\" src=\"//fast.wistia.net/embed/iframe/" + (videoInfo.wistia[4] + playerParams) + "\" " + videoTitle + " class=\"wistia_embed lg-video-object lg-wistia " + addClass + "\" name=\"wistia_embed\" " + commonIframeProps + "></iframe>"; | ||
@@ -261,0 +263,0 @@ } |
/** | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -8,2 +8,2 @@ * Copyright (c) 2020 Sachin Neravath; | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).lgVideo=o()}(this,(function(){"use strict";var e=function(){return(e=Object.assign||function(e){for(var o,i=1,t=arguments.length;i<t;i++)for(var s in o=arguments[i])Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s]);return e}).apply(this,arguments)},o={autoplayFirstVideo:!0,youTubePlayerParams:!1,vimeoPlayerParams:!1,wistiaPlayerParams:!1,gotoNextSlideOnVideoEnd:!0,autoplayVideoOnSlide:!1,videojs:!1,videojsOptions:{}},i="lgHasVideo",t="lgSlideItemLoad",s="lgBeforeSlide",n="lgAfterSlide",l="lgPosterClick";function r(e){return Object.keys(e).map((function(o){return encodeURIComponent(o)+"="+encodeURIComponent(e[o])})).join("&")}return function(){function d(i){return this.core=i,this.settings=e(e({},o),this.core.settings),this}return d.prototype.init=function(){var e=this;this.core.LGel.on(i+".video",this.onHasVideo.bind(this)),this.core.LGel.on(l+".video",(function(){var o=e.core.getSlideItem(e.core.index);e.loadVideoOnPosterClick(o)})),this.core.LGel.on(t+".video",this.onSlideItemLoad.bind(this)),this.core.LGel.on(s+".video",this.onBeforeSlide.bind(this)),this.core.LGel.on(n+".video",this.onAfterSlide.bind(this))},d.prototype.onSlideItemLoad=function(e){var o=this,i=e.detail,t=i.isFirstSlide,s=i.index;this.settings.autoplayFirstVideo&&t&&s===this.core.index&&setTimeout((function(){if(o.core.galleryItems[s].poster){var e=o.core.getSlideItem(s);o.loadVideoOnPosterClick(e)}else o.playVideo(s)}),200)},d.prototype.onHasVideo=function(e){var o=e.detail,i=o.index,t=o.src,s=o.html5Video;o.hasPoster||(this.appendVideos(this.core.getSlideItem(i),{src:t,addClass:"lg-object",index:i,html5Video:s}),this.gotoNextSlideOnVideoEnd(t,i))},d.prototype.onBeforeSlide=function(e){if(this.core.lGalleryOn){var o=e.detail.prevIndex;this.pauseVideo(o)}},d.prototype.onAfterSlide=function(e){var o=this,i=e.detail,t=i.index,s=i.prevIndex;this.settings.autoplayVideoOnSlide&&t!==s&&setTimeout((function(){var e=o.core.getSlideItem(t);e.hasClass("lg-video-loaded")?o.playVideo(t):o.loadVideoOnPosterClick(e)}),100)},d.prototype.playVideo=function(e){this.controlVideo(e,"play")},d.prototype.pauseVideo=function(e){this.controlVideo(e,"pause")},d.prototype.getVideoHtml=function(e,o,i,t){var s="",n=this.core.galleryItems[i].__slideVideoInfo||{},l=this.core.galleryItems[i],d=l.title||l.alt;d=d?'title="'+d+'"':"";var a='allowtransparency="true"\n frameborder="0"\n scrolling="no"\n allowfullscreen\n mozallowfullscreen\n webkitallowfullscreen\n oallowfullscreen\n msallowfullscreen';if(n.youtube){var c="lg-youtube"+i,u="?"+(n.youtube[2]?n.youtube[2]+"&":"")+"wmode=opaque&autoplay=0&mute=1&enablejsapi=1"+(this.settings.youTubePlayerParams?"&"+r(this.settings.youTubePlayerParams):"");s='<iframe allow="autoplay" id='+c+' class="lg-video-object lg-youtube '+o+'" '+d+' src="//www.youtube.com/embed/'+(n.youtube[1]+u)+'" '+a+"></iframe>"}else if(n.vimeo){c="lg-vimeo"+i,u=r(this.settings.vimeoPlayerParams);s='<iframe allow="autoplay" id='+c+' class="lg-video-object lg-vimeo '+o+'" '+d+' src="//player.vimeo.com/video/'+(n.vimeo[1]+u)+'" '+a+"></iframe>"}else if(n.wistia){var f="lg-wistia"+i;u=r(this.settings.wistiaPlayerParams);s='<iframe allow="autoplay" id="'+f+'" src="//fast.wistia.net/embed/iframe/'+(n.wistia[4]+u)+'" '+d+' class="wistia_embed lg-video-object lg-wistia '+o+'" name="wistia_embed" '+a+"></iframe>"}else if(n.html5){for(var h="",g=0;g<t.source.length;g++)h+='<source src="'+t.source[g].src+'" type="'+t.source[g].type+'">';if(t.tracks){var y=function(e){var o="",i=t.tracks[e];Object.keys(i||{}).forEach((function(e){o+=e+'="'+i[e]+'" '})),h+="<track "+o+">"};for(g=0;g<t.tracks.length;g++)y(g)}var v="",p=t.attributes||{};Object.keys(p||{}).forEach((function(e){v+=e+'="'+p[e]+'" '})),s='<video class="lg-video-object lg-html5 '+(this.settings.videojs?"video-js":"")+'" '+v+">\n "+h+"\n Your browser does not support HTML5 video.\n </video>"}return s},d.prototype.appendVideos=function(e,o){var i,t=this.getVideoHtml(o.src,o.addClass,o.index,o.html5Video);e.find(".lg-video-cont").append(t);var s=e.find(".lg-video-object").first();if(o.html5Video&&s.on("mousedown.lg.video",(function(e){e.stopPropagation()})),this.settings.videojs&&(null===(i=this.core.galleryItems[o.index].__slideVideoInfo)||void 0===i?void 0:i.html5))try{return videojs(s.get(),this.settings.videojsOptions)}catch(e){console.error("lightGallery:- Make sure you have included videojs")}},d.prototype.gotoNextSlideOnVideoEnd=function(e,o){var i=this,t=this.core.getSlideItem(o).find(".lg-video-object").first(),s=this.core.galleryItems[o].__slideVideoInfo||{};if(this.settings.gotoNextSlideOnVideoEnd)if(s.html5)t.on("ended",(function(){i.core.goToNextSlide()}));else if(s.vimeo)try{new Vimeo.Player(t.get()).on("ended",(function(){i.core.goToNextSlide()}))}catch(e){console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(s.wistia)try{window._wq=window._wq||[],window._wq.push({id:t.attr("id"),onReady:function(e){e.bind("end",(function(){i.core.goToNextSlide()}))}})}catch(e){console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},d.prototype.controlVideo=function(e,o){var i=this.core.getSlideItem(e).find(".lg-video-object").first(),t=this.core.galleryItems[e].__slideVideoInfo||{};if(i.get())if(t.youtube)try{i.get().contentWindow.postMessage('{"event":"command","func":"'+o+'Video","args":""}',"*")}catch(e){console.error("lightGallery:- "+e)}else if(t.vimeo)try{new Vimeo.Player(i.get())[o]()}catch(e){console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(t.html5)if(this.settings.videojs)try{videojs(i.get())[o]()}catch(e){console.error("lightGallery:- Make sure you have included videojs")}else i.get()[o]();else if(t.wistia)try{window._wq=window._wq||[],window._wq.push({id:i.attr("id"),onReady:function(e){e[o]()}})}catch(e){console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},d.prototype.loadVideoOnPosterClick=function(e){var o=this;if(!e.hasClass("lg-video-loaded"))if(e.hasClass("lg-has-video"))this.playVideo(this.core.index);else{e.addClass("lg-has-video");var i=void 0,t=this.core.galleryItems[this.core.index].src,s=this.core.galleryItems[this.core.index].video;s&&(i="string"==typeof s?JSON.parse(s):s);var n=this.appendVideos(e,{src:t,addClass:"",index:this.core.index,html5Video:i});this.gotoNextSlideOnVideoEnd(t,this.core.index);var l=e.find(".lg-object").first().get();e.find(".lg-video-cont").first().append(l),e.addClass("lg-video-loading"),n&&n.ready((function(){n.on("loadedmetadata",(function(){o.onVideoLoadAfterPosterClick(e,o.core.index)}))})),e.find(".lg-video-object").first().on("load.lg error.lg loadeddata.lg",(function(){setTimeout((function(){o.onVideoLoadAfterPosterClick(e,o.core.index)}),50)}))}},d.prototype.onVideoLoadAfterPosterClick=function(e,o){e.addClass("lg-video-loaded"),this.playVideo(o)},d.prototype.destroy=function(){this.core.LGel.off(".lg.video"),this.core.LGel.off(".video")},d}()})); | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).lgVideo=o()}(this,(function(){"use strict";var e=function(){return(e=Object.assign||function(e){for(var o,i=1,t=arguments.length;i<t;i++)for(var s in o=arguments[i])Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s]);return e}).apply(this,arguments)},o={autoplayFirstVideo:!0,youTubePlayerParams:!1,vimeoPlayerParams:!1,wistiaPlayerParams:!1,gotoNextSlideOnVideoEnd:!0,autoplayVideoOnSlide:!1,videojs:!1,videojsOptions:{}},i="lgHasVideo",t="lgSlideItemLoad",s="lgBeforeSlide",n="lgAfterSlide",l="lgPosterClick";function r(e){return Object.keys(e).map((function(o){return encodeURIComponent(o)+"="+encodeURIComponent(e[o])})).join("&")}return function(){function d(i){return this.core=i,this.settings=e(e({},o),this.core.settings),this}return d.prototype.init=function(){var e=this;this.core.LGel.on(i+".video",this.onHasVideo.bind(this)),this.core.LGel.on(l+".video",(function(){var o=e.core.getSlideItem(e.core.index);e.loadVideoOnPosterClick(o)})),this.core.LGel.on(t+".video",this.onSlideItemLoad.bind(this)),this.core.LGel.on(s+".video",this.onBeforeSlide.bind(this)),this.core.LGel.on(n+".video",this.onAfterSlide.bind(this))},d.prototype.onSlideItemLoad=function(e){var o=this,i=e.detail,t=i.isFirstSlide,s=i.index;this.settings.autoplayFirstVideo&&t&&s===this.core.index&&setTimeout((function(){if(o.core.galleryItems[s].poster){var e=o.core.getSlideItem(s);o.loadVideoOnPosterClick(e)}else o.playVideo(s)}),200)},d.prototype.onHasVideo=function(e){var o=e.detail,i=o.index,t=o.src,s=o.html5Video;o.hasPoster||(this.appendVideos(this.core.getSlideItem(i),{src:t,addClass:"lg-object",index:i,html5Video:s}),this.gotoNextSlideOnVideoEnd(t,i))},d.prototype.onBeforeSlide=function(e){if(this.core.lGalleryOn){var o=e.detail.prevIndex;this.pauseVideo(o)}},d.prototype.onAfterSlide=function(e){var o=this,i=e.detail,t=i.index,s=i.prevIndex;this.settings.autoplayVideoOnSlide&&t!==s&&setTimeout((function(){var e=o.core.getSlideItem(t);e.hasClass("lg-video-loaded")?o.playVideo(t):o.loadVideoOnPosterClick(e)}),100)},d.prototype.playVideo=function(e){this.controlVideo(e,"play")},d.prototype.pauseVideo=function(e){this.controlVideo(e,"pause")},d.prototype.getVideoHtml=function(e,o,i,t){var s="",n=this.core.galleryItems[i].__slideVideoInfo||{},l=this.core.galleryItems[i],d=l.title||l.alt;d=d?'title="'+d+'"':"";var a='allowtransparency="true"\n frameborder="0"\n scrolling="no"\n allowfullscreen\n mozallowfullscreen\n webkitallowfullscreen\n oallowfullscreen\n msallowfullscreen';if(n.youtube){var c="lg-youtube"+i,u="?"+(n.youtube[2]?n.youtube[2]+"&":"")+"wmode=opaque&autoplay=0&mute=1&enablejsapi=1"+(this.settings.youTubePlayerParams?"&"+r(this.settings.youTubePlayerParams):"");s='<iframe allow="autoplay" id='+c+' class="lg-video-object lg-youtube '+o+'" '+d+' src="//www.youtube.com/embed/'+(n.youtube[1]+u)+'" '+a+"></iframe>"}else if(n.vimeo){c="lg-vimeo"+i;u=(u=r(this.settings.vimeoPlayerParams))?"?"+u:"",s='<iframe allow="autoplay" id='+c+' class="lg-video-object lg-vimeo '+o+'" '+d+' src="//player.vimeo.com/video/'+(n.vimeo[1]+u)+'" '+a+"></iframe>"}else if(n.wistia){var f="lg-wistia"+i;u=(u=r(this.settings.wistiaPlayerParams))?"?"+u:"",s='<iframe allow="autoplay" id="'+f+'" src="//fast.wistia.net/embed/iframe/'+(n.wistia[4]+u)+'" '+d+' class="wistia_embed lg-video-object lg-wistia '+o+'" name="wistia_embed" '+a+"></iframe>"}else if(n.html5){for(var h="",g=0;g<t.source.length;g++)h+='<source src="'+t.source[g].src+'" type="'+t.source[g].type+'">';if(t.tracks){var y=function(e){var o="",i=t.tracks[e];Object.keys(i||{}).forEach((function(e){o+=e+'="'+i[e]+'" '})),h+="<track "+o+">"};for(g=0;g<t.tracks.length;g++)y(g)}var v="",p=t.attributes||{};Object.keys(p||{}).forEach((function(e){v+=e+'="'+p[e]+'" '})),s='<video class="lg-video-object lg-html5 '+(this.settings.videojs?"video-js":"")+'" '+v+">\n "+h+"\n Your browser does not support HTML5 video.\n </video>"}return s},d.prototype.appendVideos=function(e,o){var i,t=this.getVideoHtml(o.src,o.addClass,o.index,o.html5Video);e.find(".lg-video-cont").append(t);var s=e.find(".lg-video-object").first();if(o.html5Video&&s.on("mousedown.lg.video",(function(e){e.stopPropagation()})),this.settings.videojs&&(null===(i=this.core.galleryItems[o.index].__slideVideoInfo)||void 0===i?void 0:i.html5))try{return videojs(s.get(),this.settings.videojsOptions)}catch(e){console.error("lightGallery:- Make sure you have included videojs")}},d.prototype.gotoNextSlideOnVideoEnd=function(e,o){var i=this,t=this.core.getSlideItem(o).find(".lg-video-object").first(),s=this.core.galleryItems[o].__slideVideoInfo||{};if(this.settings.gotoNextSlideOnVideoEnd)if(s.html5)t.on("ended",(function(){i.core.goToNextSlide()}));else if(s.vimeo)try{new Vimeo.Player(t.get()).on("ended",(function(){i.core.goToNextSlide()}))}catch(e){console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(s.wistia)try{window._wq=window._wq||[],window._wq.push({id:t.attr("id"),onReady:function(e){e.bind("end",(function(){i.core.goToNextSlide()}))}})}catch(e){console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},d.prototype.controlVideo=function(e,o){var i=this.core.getSlideItem(e).find(".lg-video-object").first(),t=this.core.galleryItems[e].__slideVideoInfo||{};if(i.get())if(t.youtube)try{i.get().contentWindow.postMessage('{"event":"command","func":"'+o+'Video","args":""}',"*")}catch(e){console.error("lightGallery:- "+e)}else if(t.vimeo)try{new Vimeo.Player(i.get())[o]()}catch(e){console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(t.html5)if(this.settings.videojs)try{videojs(i.get())[o]()}catch(e){console.error("lightGallery:- Make sure you have included videojs")}else i.get()[o]();else if(t.wistia)try{window._wq=window._wq||[],window._wq.push({id:i.attr("id"),onReady:function(e){e[o]()}})}catch(e){console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},d.prototype.loadVideoOnPosterClick=function(e){var o=this;if(!e.hasClass("lg-video-loaded"))if(e.hasClass("lg-has-video"))this.playVideo(this.core.index);else{e.addClass("lg-has-video");var i=void 0,t=this.core.galleryItems[this.core.index].src,s=this.core.galleryItems[this.core.index].video;s&&(i="string"==typeof s?JSON.parse(s):s);var n=this.appendVideos(e,{src:t,addClass:"",index:this.core.index,html5Video:i});this.gotoNextSlideOnVideoEnd(t,this.core.index);var l=e.find(".lg-object").first().get();e.find(".lg-video-cont").first().append(l),e.addClass("lg-video-loading"),n&&n.ready((function(){n.on("loadedmetadata",(function(){o.onVideoLoadAfterPosterClick(e,o.core.index)}))})),e.find(".lg-video-object").first().on("load.lg error.lg loadeddata.lg",(function(){setTimeout((function(){o.onVideoLoadAfterPosterClick(e,o.core.index)}),50)}))}},d.prototype.onVideoLoadAfterPosterClick=function(e,o){e.addClass("lg-video-loaded"),this.playVideo(o)},d.prototype.destroy=function(){this.core.LGel.off(".lg.video"),this.core.LGel.off(".video")},d}()})); |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -259,2 +259,3 @@ * Copyright (c) 2020 Sachin Neravath; | ||
var playerParams = param(this.settings.vimeoPlayerParams); | ||
playerParams = playerParams ? '?' + playerParams : ''; | ||
video = "<iframe allow=\"autoplay\" id=" + videoId + " class=\"lg-video-object lg-vimeo " + addClass + "\" " + videoTitle + " src=\"//player.vimeo.com/video/" + (videoInfo.vimeo[1] + playerParams) + "\" " + commonIframeProps + "></iframe>"; | ||
@@ -265,2 +266,3 @@ } | ||
var playerParams = param(this.settings.wistiaPlayerParams); | ||
playerParams = playerParams ? '?' + playerParams : ''; | ||
video = "<iframe allow=\"autoplay\" id=\"" + wistiaId + "\" src=\"//fast.wistia.net/embed/iframe/" + (videoInfo.wistia[4] + playerParams) + "\" " + videoTitle + " class=\"wistia_embed lg-video-object lg-wistia " + addClass + "\" name=\"wistia_embed\" " + commonIframeProps + "></iframe>"; | ||
@@ -267,0 +269,0 @@ } |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/** | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
/*! | ||
* lightgallery | 2.3.0-beta | August 29th 2021 | ||
* lightgallery | 2.3.0-beta.1 | August 31st 2021 | ||
* http://www.lightgalleryjs.com/ | ||
@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath; |
Sorry, the diff of this file is not supported yet
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 not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
5792769
49212