| Server IP : 156.238.232.47 / Your IP : 216.73.216.150 Web Server : nginx/1.25.3 System : Linux C202504152095410 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : www ( 1000) PHP Version : 8.3.25 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /www/data/wwwroot/2025_11_26_01/skin/js/ |
Upload File : |
/*! lightgallery - v1.2.0 - 2015-08-26
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2015 Sachin N; Licensed Apache 2.0 */(function($,window,document,undefined){'use strict';var defaults={videoMaxWidth:'855px',youtubePlayerParams:false,vimeoPlayerParams:false,videojs:false};var Video=function(element){this.core=$(element).data('lightGallery');this.$el=$(element);this.core.s=$.extend({},defaults,this.core.s);this.videoLoaded=false;this.init();return this;};Video.prototype.init=function(){var _this=this;_this.core.$el.on('hasVideo.lg.tm',function(event,index,src,html){_this.core.$slide.eq(index).find('.lg-video').append(_this.loadVideo(src,'lg-object',true,index,html));if(html){if(_this.core.s.videojs){try{videojs(_this.core.$slide.eq(index).find('.lg-html5').get(0),{},function(){if(!_this.videoLoaded){this.play();}});}catch(e){console.error('Make sure you have included videojs');}}else{_this.core.$slide.eq(index).find('.lg-html5').get(0).play();}}});_this.core.$el.on('onAferAppendSlide.lg.tm',function(event,index){_this.core.$slide.eq(index).find('.lg-video-cont').css('max-width',_this.core.s.videoMaxWidth);_this.videoLoaded=true;});var loadOnClick=function($el){if($el.find('.lg-object').hasClass('lg-has-poster')){if(!$el.hasClass('lg-has-video')){$el.addClass('lg-video-palying lg-has-video');var _src;var _html;var _loadVideo=function(_src,_html){$el.find('.lg-video').append(_this.loadVideo(_src,'',false,_this.core.index,_html));if(_html){if(_this.core.s.videojs){try{videojs(_this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0),{},function(){this.play();});}catch(e){console.error('Make sure you have included videojs');}}else{_this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0).play();}}};if(_this.core.s.dynamic){_src=_this.core.s.dynamicEl[_this.core.index].src;_html=_this.core.s.dynamicEl[_this.core.index].html;_loadVideo(_src,_html);}else{_src=_this.core.$items.eq(_this.core.index).attr('data-src');_html=_this.core.$items.eq(_this.core.index).attr('data-html');_loadVideo(_src,_html);}
var $tempImg=$el.find('.lg-object');$el.find('.lg-video').append($tempImg);if(!$el.find('.lg-video-object').hasClass('lg-html5')){$el.removeClass('lg-complete');$el.find('.lg-video-object').on('load.lg error.lg',function(){$el.addClass('lg-complete');});}}else{var youtubePlayer=$el.find('.lg-youtube').get(0);var vimeoPlayer=$el.find('.lg-vimeo').get(0);var html5Player=$el.find('.lg-html5').get(0);if(youtubePlayer){youtubePlayer.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}','*');}else if(vimeoPlayer){try{$f(vimeoPlayer).api('play');}catch(e){console.error('Make sure you have included froogaloop2 js');}}else if(html5Player){if(_this.core.s.videojs){try{videojs(html5Player).play();}catch(e){console.error('Make sure you have included videojs');}}else{html5Player.play();}}
$el.addClass('lg-video-palying');}}};if(_this.core.doCss()){_this.core.$el.on('onSlideClick.lg.tm',function(){var $el=_this.core.$slide.eq(_this.core.index);loadOnClick($el);});}else{_this.core.$slide.on('click.lg',function(){loadOnClick($(this));});}
_this.core.$el.on('onBeforeSlide.lg.tm',function(event,prevIndex){var $videoSlide=_this.core.$slide.eq(prevIndex);var youtubePlayer=$videoSlide.find('.lg-youtube').get(0);var vimeoPlayer=$videoSlide.find('.lg-vimeo').get(0);var html5Player=$videoSlide.find('.lg-html5').get(0);if(youtubePlayer){youtubePlayer.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}','*');}else if(vimeoPlayer){try{$f(vimeoPlayer).api('pause');}catch(e){console.error('Make sure you have included froogaloop2 js');}}else if(html5Player){if(_this.core.s.videojs){try{videojs(html5Player).pause();}catch(e){console.error('Make sure you have included videojs');}}else{html5Player.pause();}}});_this.core.$el.on('onAfterSlide.lg.tm',function(event,prevIndex){_this.core.$slide.eq(prevIndex).removeClass('lg-video-palying');});};Video.prototype.loadVideo=function(src,addClass,noposter,index,html){var video='';var autoplay=1;var a='';var isVideo=this.core.isVideo(src,index)||{};if(noposter){if(this.videoLoaded){autoplay=0;}else{autoplay=1;}}
if(isVideo.youtube){a='?wmode=opaque&autoplay='+autoplay+'&enablejsapi=1';if(this.core.s.youtubePlayerParams){a=a+'&'+$.param(this.core.s.youtubePlayerParams);}
video='<iframe class="lg-video-object lg-youtube '+addClass+'" width="560" height="315" src="//www.youtube.com/embed/'+isVideo.youtube[1]+a+'" frameborder="0" allowfullscreen></iframe>';}else if(isVideo.vimeo){a='?autoplay='+autoplay+'&api=1';if(this.core.s.vimeoPlayerParams){a=a+'&'+$.param(this.core.s.vimeoPlayerParams);}
video='<iframe class="lg-video-object lg-vimeo '+addClass+'" width="560" height="315" src="http://player.vimeo.com/video/'+isVideo.vimeo[1]+a+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';}else if(isVideo.html5){var fL=html.substring(0,1);if(fL==='.'||fL==='#'){html=$(html).html();}
video=html;}
return video;};Video.prototype.destroy=function(){this.videoLoaded=false;};$.fn.lightGallery.modules.video=Video;})(jQuery,window,document);