j1-template 2024.3.27 → 2024.3.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/assets/data/banner.html +3 -1
- data/assets/theme/j1/adapter/js/masonry.js +6 -8
- data/assets/theme/j1/core/js/template.js +28 -1
- data/assets/theme/j1/core/js/template.min.js +4 -4
- data/assets/theme/j1/modules/lightGallery/js/lightgallery.js +4 -2
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-autoplay.js +6 -3
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-comment.js +6 -3
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-fullscreen.js +6 -3
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-hash.js +6 -3
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-medium-zoom.js +6 -3
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-pager.js +6 -3
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-relative-caption.js +6 -3
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-rotate.js +6 -4
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-share.js +6 -3
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-thumbnail.js +6 -3
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.js +113 -76
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.min.js +1 -2
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-vimeo-thumbnail.js +6 -3
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-zoom.js +6 -3
- data/assets/theme/j1/modules/swiperjs/js/modules/layoutPanorama.min.js +1 -1
- data/assets/theme/j1/modules/videojs/plugins/players/yt/js/youtube.js +21 -6
- data/assets/theme/j1/modules/videojs/plugins/players/yt/js/youtube.min.js +1 -1
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/README.md +5 -5
- data/lib/starter_web/_config.yml +1 -1
- data/lib/starter_web/_data/blocks/banner.yml +29 -18
- data/lib/starter_web/_data/blocks/panel.yml +79 -124
- data/lib/starter_web/_data/modules/blog_navigator.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/blog_navigator.yml +2 -2
- data/lib/starter_web/_data/modules/gallery.yml +145 -19
- data/lib/starter_web/_data/modules/masonry.yml +9 -10
- data/lib/starter_web/_data/templates/feed.xml +1 -1
- data/lib/starter_web/_includes/attributes.asciidoc +2 -1
- data/lib/starter_web/_plugins/index/lunr.rb +1 -1
- data/lib/starter_web/assets/image/module/attic/1920x1280/nick-fewings.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/no-revisions.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/wolfgang-weiser.jpg +0 -0
- data/lib/starter_web/assets/image/page/features/example-content-1280x800.jpg +0 -0
- data/lib/starter_web/assets/image/page/features/google-lighthouse-1080x300.jpg +0 -0
- data/lib/starter_web/assets/image/page/features/google-lighthouse-scores.jpg +0 -0
- data/lib/starter_web/assets/image/page/features/master-header-1280x600.jpg +0 -0
- data/lib/starter_web/assets/image/page/features/nav-module-1280x300.jpg +0 -0
- data/lib/starter_web/assets/image/page/features/teaser-banner-1280x600.jpg +0 -0
- data/lib/starter_web/assets/image/page/features/tts-1280x500.jpg +0 -0
- data/lib/starter_web/assets/video/tracks/html5/peck_pocketed/captions/video.vtt +2 -3
- data/lib/starter_web/assets/video/tracks/html5/peck_pocketed/chapters/video.vtt +4 -6
- data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1.adoc.erb +18 -20
- data/lib/starter_web/collections/posts/public/featured/_posts/2021-01-01-about-cookies.adoc +6 -7
- data/lib/starter_web/collections/posts/public/featured/_posts/{2023-10-18-url-types.adoc → 2022-10-18-url-types.adoc} +7 -4
- data/lib/starter_web/collections/posts/public/featured/_posts/{2021-02-01-static-site-generators.adoc → 2023-02-01-static-site-generators.adoc} +5 -6
- data/lib/starter_web/collections/posts/public/featured/_posts/{2022-02-01-about-j1.adoc → 2024-02-01-about-j1.adoc} +4 -5
- data/lib/starter_web/index.html +17 -73
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/features/{general.adoc → core-features.adoc} +92 -47
- data/lib/starter_web/pages/public/features/{template.adoc → theme-features.adoc} +313 -195
- data/lib/starter_web/pages/public/tools/tester/app_tester_swiperjs.adoc +10 -15
- data/lib/starter_web/pages/public/tools/tester/videojs_macro_tester.adoc +43 -2
- data/lib/starter_web/pages/public/tour/asciidoc_extensions.adoc +13 -21
- data/lib/starter_web/pages/public/tour/audio_data.adoc +2 -2
- data/lib/starter_web/pages/public/tour/highlghter_rouge.adoc +2 -2
- data/lib/starter_web/pages/public/tour/icon_fonts.adoc +1 -1
- data/lib/starter_web/pages/public/tour/image_data.adoc +138 -234
- data/lib/starter_web/pages/public/tour/quicksearch.adoc +2 -2
- data/lib/starter_web/pages/public/tour/responsive_tables.adoc +2 -2
- data/lib/starter_web/pages/public/tour/video_data.adoc +74 -85
- metadata +12 -9
- data/lib/starter_web/assets/image/module/attic/cookies-1920x1200.jpg +0 -0
- data/lib/starter_web/pages/public/tour/modal_extentions.adoc +0 -126
@@ -16,5 +16,4 @@
|
|
16
16
|
# -----------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
-
!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,t=1,i=arguments.length;t<i;t++)for(var s in o=arguments[t])Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s]);return e},e.apply(this,arguments)},o={autoplayFirstVideo:!0,htmlPlayerParams:!1,youTubePlayerParams:!1,vimeoPlayerParams:!1,dailymotionPlayerParams:!1,wistiaPlayerParams:!1,tiktokPlayerParams:!1,gotoNextSlideOnVideoEnd:!0,autoplayVideoOnSlide:!1,videojs:!1,videojsTheme:"",videojsOptions:{}},t="lgHasVideo",i="lgSlideItemLoad",s="lgBeforeSlide",n="lgAfterSlide",a="lgPosterClick",l=function(e){return 0===Object.keys(e).length},r=function(e){return Object.keys(e).map((function(o){return encodeURIComponent(o)+"="+encodeURIComponent(e[o])})).join("&")},d=function(o,t){if(!o.youtube)return"";var i=o.youtube[2]?o.youtube[2].slice(1).split("&").map((function(e){return e.split("=")})).reduce((function(e,o){var t=o.map(decodeURIComponent),i=t[0],s=t[1];return e[i]=s,e}),{}):"",s=t||{},n=e(e(e({},{wmode:"opaque",autoplay:0,mute:1,enablejsapi:1}),s),i);return"?"+r(n)},c=function(o,t,i){const s=j1.modules.videojs.options;var n,a,r,d,c,u;function p(e,o){e.find(".vjs-chapter-marker").remove()}function v(e){var o,t,i=$(e.controlBar.progressControl.children_[0].el_),s=e.id(),n=new WebVTTParser,a=[];o=e.chapterTracksSource,t=function(e){for(var o,t=n.parse(e,"metadata"),i=0;i<t.cues.length;i++)o={time:t.cues[i].startTime,label:t.cues[i].text},a.push(o)},new WebVTTParser,$.ajax({url:o,type:"GET",success:t,error:function(e){JSON.stringify(e,void 0,2)}}),p(i),j1.modules.videojs.data.players[s].videoData.tracks.length&&setTimeout((function(){var o=setInterval((function(){if(a.length){const d=e.duration();for(var t=0;t<a.length;t++){var n=a[t].time/d*100+"%",l=a[t].time,r=$('<div class="vjs-chapter-marker" style="left: '+n+'" data-time="'+l+'" data-player-id="'+s+'"><span>'+a[t].label+"</span></div>");!function(e,o){r.click((function(){e.currentTime(o)}))}(e,l),i.append(r)}clearInterval(o)}else clearInterval(o)}),10)}),100)}n=setInterval((()=>{var m,h,y="finished"===j1.adapter.gallery.getState(),g=!l(o.settings.videojsOptions);if(y&&g){_=t.id(),m={tracks:[]},{paused:(h=t).paused(),currentTime:h.currentTime(),duration:h.duration(),muted:h.muted(),bufferedPercent:h.bufferedPercent()},m.tracks.chapters=[];var f={volumeStep:s.plugins.hotKeys.volumeStep,seekStep:s.plugins.hotKeys.seekStep,enableMute:s.plugins.hotKeys.enableMute,enableVolumeScroll:s.plugins.hotKeys.enableVolumeScroll,enableHoverScroll:s.plugins.hotKeys.enableHoverScroll,enableFullscreen:s.plugins.hotKeys.enableFullscreen,enableNumbers:s.plugins.hotKeys.enableNumbers,enableJogStyle:s.plugins.hotKeys.enableJogStyle,alwaysCaptureHotkeys:s.plugins.hotKeys.alwaysCaptureHotkeys,captureDocumentHotkeys:s.plugins.hotKeys.captureDocumentHotkeys,enableModifiersForNumbers:s.plugins.hotKeys.enableModifiersForNumbers,enableInactiveFocus:s.plugins.hotKeys.enableInactiveFocus,skipInitialFocus:s.plugins.hotKeys.skipInitialFocus},b={backward:s.plugins.skipButtons.backward,forward:s.plugins.skipButtons.forward,backwardIndex:0,forwardIndex:1},j={moveX:s.plugins.zoomButtons.moveX,moveY:s.plugins.zoomButtons.moveY,rotate:s.plugins.zoomButtons.rotate,zoom:s.plugins.zoomButtons.zoom},k=t.controlBar;const y=k.addChild("Component",{el:videojs.dom.createEl("div",{className:"vjs-theme-uno custom-progressbar-container"})}),g=k.progressControl;g&&y.el().appendChild(g.el());const O=k.currentTimeDisplay;O&&y.el().insertBefore(O.el(),g.el());const C=k.durationDisplay;if(C&&y.el().appendChild(C.el()),!l(o.settings.videojsOptions)){if(d=o.settings.videojsOptions.hotKeysPlugin,c=o.settings.videojsOptions.controlBar.skipButtonsPlugin,u=o.settings.videojsOptions.controlBar.zoomPlugin,r=o.settings.videojsOptions.controlBar.playbackRates,void 0!==o.settings.videojsOptions.videoStart&&(a=o.settings.videojsOptions.videoStart[index],t.on("play",(function(){var e=new Date("1970-01-01T"+a+"Z").getTime()/1e3;t.currentTime(e)}))),t.playbackRates(r),void 0!==d&&d.enabled&&void 0!==t.hotKeys){d.options=e(e({},f),d.options);var w=!1;void 0!==t.activePlugins_&&void 0!==t.activePlugins_.hotKeys&&(w=t.activePlugins_.hotKeys),w||t.hotKeys({volumeStep:d.options.volumeStep,seekStep:d.options.seekStep,enableMute:d.options.enableMute,enableFullscreen:d.options.enableFullscreen,enableNumbers:d.options.enableNumbers,enableVolumeScroll:d.options.enableVolumeScroll,enableHoverScroll:d.options.enableHoverScroll,alwaysCaptureHotkeys:d.options.alwaysCaptureHotkeys,captureDocumentHotkeys:d.options.captureDocumentHotkeys,documentHotkeysFocusElementFilter:d.options.documentHotkeysFocusElementFilter,seekStep:function(e){return e.ctrlKey&&e.altKey?300:e.ctrlKey?60:e.altKey?10:15}})}if(void 0!==c&&c.enabled&&void 0!==t.skipButtons){c.options=e(e({},b),c.options);var V=!1;void 0!==t.activePlugins_&&void 0!==t.activePlugins_.skipButtons&&(V=t.activePlugins_.skipButtons),V||t.skipButtons({backward:c.options.backward,forward:c.options.forward,backwardIndex:c.options.backwardIndex,forwardIndex:c.options.forwardIndex})}if(i.youtube&&(u.enabled=!1),void 0!==u&&u.enabled&&void 0!==t.zoomButtons){u.options=e(e({},j),u.options);var P=!1;void 0!==t.activePlugins_&&void 0!==t.activePlugins_.zoomButtons&&(P=t.activePlugins_.zoomButtons),P||t.zoomButtons({moveX:u.options.moveX,moveY:u.options.moveY,rotate:u.options.rotate,zoom:u.options.zoom})}var S;void 0!==o.core.galleryItems[o.core.index].video&&(m=JSON.parse(o.core.galleryItems[o.core.index].video),t.videoData=m,void 0===j1.modules.videojs.data.players[_]&&(j1.modules.videojs.data.players[_]={},j1.modules.videojs.data.players[_].videoData={},j1.modules.videojs.data.players[_].videoData.tracks=m.tracks||[]));for(var x=0;x<t.videoData.tracks.length;x++)"chapters"==t.videoData.tracks[x].kind&&(S=t.videoData.tracks[x].src,t.chapterTracksSource=S);if(j1.modules.videojs.data.players[_].videoData.tracks.length)_=t.id(),p(I=$(t.controlBar.progressControl.children_[0].el_)),function(e){return!e.paused()||e.currentTime()>0}(t)&&v(t),t.on("pause",(function(){p($(t.controlBar.progressControl.children_[0].el_),t.id())})),t.on("play",(function(){v(t)})),t.on("dispose",(function(){p($(t.controlBar.progressControl.children_[0].el_),t.id())}));else{var I=$(t.controlBar.progressControl.children_[0].el_),_=t.id();p(I)}}clearInterval(n)}}),10)};return function(){function l(t){return this.core=t,this.settings=e(e({},o),this.core.settings),this}return l.prototype.init=function(){var e=this;this.core.LGel.on(t+".video",this.onHasVideo.bind(this)),this.core.LGel.on(a+".video",(function(){var o=e.core.getSlideItem(e.core.index);e.loadVideoOnPosterClick(o)})),this.core.LGel.on(i+".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))},l.prototype.onSlideItemLoad=function(e){var o=this,t=e.detail,i=t.isFirstSlide,s=t.index;this.settings.autoplayFirstVideo&&i&&s===this.core.index&&setTimeout((function(){o.loadAndPlayVideo(s)}),200),!i&&this.settings.autoplayVideoOnSlide&&s===this.core.index&&this.loadAndPlayVideo(s)},l.prototype.onHasVideo=function(e){var o=e.detail,t=o.index,i=o.src,s=o.html5Video;o.hasPoster||(this.appendVideo(this.core.getSlideItem(t),{src:i,addClass:"lg-object",index:t,html5Video:s}),this.gotoNextSlideOnVideoEnd(i,t))},l.prototype.onBeforeSlide=function(e){if(this.core.lGalleryOn){var o=e.detail.prevIndex;this.pauseVideo(o)}},l.prototype.onAfterSlide=function(e){var o=this,t=e.detail,i=t.index,s=t.prevIndex,n=this.core.getSlideItem(i);this.settings.autoplayVideoOnSlide&&i!==s&&n.hasClass("lg-complete")&&setTimeout((function(){o.loadAndPlayVideo(i)}),100)},l.prototype.loadAndPlayVideo=function(e){var o=this.core.getSlideItem(e);this.core.galleryItems[e].poster?this.loadVideoOnPosterClick(o,!0):this.playVideo(e)},l.prototype.playVideo=function(e){this.controlVideo(e,"play")},l.prototype.pauseVideo=function(e){this.controlVideo(e,"pause")},l.prototype.getVideoHtml=function(e,o,t,i){var s,n,a,l,c;if(n=this.core.galleryItems[t].__slideVideoInfo||{},(s=this.core.galleryItems[t]).subHtml.includes("<h2>")?a=s.subHtml.split("</h2>")[0].replace("<h2>",""):s.subHtml.includes("<h5>")&&(a=s.subHtml.split("</h5>")[0].replace("<h5>","")),a=a?'title="'+a+'"':"",c='allowtransparency="true"\n frameborder="0"\n scrolling="no"\n allowfullscreen\n mozallowfullscreen\n webkitallowfullscreen\n oallowfullscreen\n msallowfullscreen',n.youtube){var u="lg-youtube"+t,p=(d(n,this.settings.youTubePlayerParams),e.includes("youtube-nocookie.com"),n.youtube[1]);"youtube",l=`\n <video\n id="${u}"\n class="video-js lg-video-object lg-youtube vjs-theme-uno">\n <source\n type="video/youtube",\n src="//youtube.com/watch?v=${p}"\n >\n\n Your browser does not support HTML5 video.\n </video>\n `}else if(n.vimeo){u="lg-vimeo"+t;var v=function(e,o){if(!o||!o.vimeo)return"";var t=o.vimeo[2]||"",i=Object.assign({},{autoplay:0,muted:1},e),s=i&&0!==Object.keys(i).length?r(i):"",n=((o.vimeo[0].split("/").pop()||"").split("?")[0]||"").split("#")[0],a=o.vimeo[1]!==n;a&&(t=t.replace("/"+n,""));var l=a?"h="+n:"";return"?"+l+(s=l?"&"+s:s)+("?"==t[0]?"&"+t.slice(1):t||"")}(this.settings.vimeoPlayerParams,n);l='<iframe allow="autoplay" id='+u+' class="lg-video-object lg-vimeo '+o+'" '+a+' src="//player.vimeo.com/video/'+(n.vimeo[1]+v)+'" '+c+"></iframe>"}else if(n.wistia){var m="lg-wistia"+t;v=(v=r(this.settings.wistiaPlayerParams))?"?"+v:"",l='<iframe allow="autoplay" id="'+m+'" src="//fast.wistia.net/embed/iframe/'+(n.wistia[4]+v)+'" '+a+' class="wistia_embed lg-video-object lg-wistia '+o+'" name="wistia_embed" '+c+"></iframe>"}else if(n.dailymotion){var h="lg-dailymotion"+t;v=(v=r(this.settings.dailymotionPlayerParams))?"?"+v:"",l=`\n <iframe\n id="${h}"\n src="//dailymotion.com/embed/video/${n.dailymotion[1]}?api=1 ${v}"\n ${a}\n class="dailymotion_embed lg-video-object lg-dailymotiion ${o}"\n name="dailymotion_embed"\n ${c}>\n </iframe>\n `}else if(n.html5){for(var y="",g=0;g<i.source.length;g++){var f=i.source[g].type,b=f?'type="'+f+'"':"";y+='<source src="'+i.source[g].src+'" '+b+">"}if(i.tracks){var j=function(e){var o="",t=i.tracks[e];Object.keys(t||{}).forEach((function(e){o+=e+'="'+t[e]+'" '})),y+="<track "+o+">"};for(g=0;g<i.tracks.length;g++)j(g)}var k="",w=i.attributes||{};Object.keys(w||{}).forEach((function(e){k+=e+'="'+w[e]+'" '})),l='<video class="lg-video-object lg-html5 '+(this.settings.videojs&&this.settings.videojsTheme?this.settings.videojsTheme+" ":"")+" "+(this.settings.videojs?" video-js":"")+'" '+k+">\n "+y+"\n Your browser does not support HTML5 video.\n </video>"}return l},l.prototype.appendVideo=function(e,o){var t,i,s={},n=this.getVideoHtml(o.src,o.addClass,o.index,o.html5Video);e.find(".lg-video-cont").append(n);var a=e.find(".lg-video-object").first();if(a.get()){if(o.html5Video&&a.on("mousedown.lg.video",(function(e){e.stopPropagation()})),(s=this.core.galleryItems[o.index].__slideVideoInfo).videojs={enabled:!1},i=n.includes("iframe"),s.videojs.enabled=!i,this.settings.videojs&&(null==s?void 0:s.html5))try{if(s.videojs.enabled)return t=videojs(a.get(),this.settings.videojsOptions),this.settings.vjsPlayer=t,s.videojs.player=t,t}catch(e){console.warn("lightGallery: Make sure you have included //github.com/vimeo/player.js")}if(this.settings.videojs&&(null==s?void 0:s.youtube))try{if(s.videojs.enabled)return t=videojs(a.get(),this.settings.videojsOptions),this.settings.vjsPlayer=t,s.videojs.player=t,t}catch(e){console.warn("lightGallery: Make sure you have included //github.com/vimeo/player.js")}}},l.prototype.gotoNextSlideOnVideoEnd=function(e,o){var t=this,i=this.core.getSlideItem(o).find(".lg-video-object").first();if(i.get()){var s=this.core.galleryItems[o].__slideVideoInfo||{};if(this.settings.gotoNextSlideOnVideoEnd)if(s.html5)i.on("ended",(function(){t.core.goToNextSlide()}));else if(s.vimeo)try{new Vimeo.Player(i.get()).on("ended",(function(){t.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:i.attr("id"),onReady:function(e){e.bind("end",(function(){t.core.goToNextSlide()}))}})}catch(e){console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}}},l.prototype.controlVideo=function(e,o){var t,i,s="not_set";if((t=this.core.getSlideItem(e).find(".lg-video-object").first()).get())if(((i=this.core.galleryItems[e].__slideVideoInfo||{}).html5||i.youtube)&&(void 0!==t.selector.player&&(s=t.selector.player),"not_set"!==s&&c(this,s,i)),i.html5)if(this.settings.videojs)try{videojs(t.get())[o]()}catch(e){console.warn("lightGallery: Make sure you have included videojs")}else t.get()[o]();else if(i.youtube)if(this.settings.videojs)try{videojs(t.get())[o]()}catch(e){console.warn("lightGallery: Make sure you have included videojs")}else try{t.get().contentWindow.postMessage('{"event":"command","func":"'+o+'Video","args":""}',"*")}catch(e){console.error("lightGallery:- "+e)}else if(i.vimeo)try{new Vimeo.Player(t.get())[o]()}catch(e){console.warn("lightGallery: Make sure you have included //github.com/vimeo/player.js")}else if(i.wistia)try{window._wq=window._wq||[],window._wq.push({id:t.attr("id"),onReady:function(e){e[o]()}})}catch(e){console.warn("lightGallery: Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},l.prototype.loadVideoOnPosterClick=function(e,o){var t=this;if(e.hasClass("lg-video-loaded"))o&&this.playVideo(this.core.index);else if(e.hasClass("lg-has-video"))this.playVideo(this.core.index);else{e.addClass("lg-has-video");var i=void 0,s=this.core.galleryItems[this.core.index].src,n=this.core.galleryItems[this.core.index].video;n&&(i="string"==typeof n?JSON.parse(n):n);var a=this.appendVideo(e,{src:s,addClass:"",index:this.core.index,html5Video:i});this.gotoNextSlideOnVideoEnd(s,this.core.index);var l=e.find(".lg-object").first().get();e.find(".lg-video-cont").first().append(l),e.addClass("lg-video-loading"),a&&a.ready((function(){a.on("loadedmetadata",(function(){t.onVideoLoadAfterPosterClick(e,t.core.index)}))})),e.find(".lg-video-object").first().on("load.lg error.lg loadedmetadata.lg",(function(){setTimeout((function(){t.onVideoLoadAfterPosterClick(e,t.core.index)}),50)}))}},l.prototype.onVideoLoadAfterPosterClick=function(e,o){e.addClass("lg-video-loaded"),this.playVideo(o)},l.prototype.destroy=function(){this.core.LGel.off(".lg.video"),this.core.LGel.off(".video")},l}()}));
|
20
|
-
|
19
|
+
!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,t=1,i=arguments.length;t<i;t++)for(var s in o=arguments[t])Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s]);return e},e.apply(this,arguments)},o={autoplayFirstVideo:!0,htmlPlayerParams:!1,youTubePlayerParams:!1,vimeoPlayerParams:!1,dailymotionPlayerParams:!1,wistiaPlayerParams:!1,tiktokPlayerParams:!1,gotoNextSlideOnVideoEnd:!0,autoplayVideoOnSlide:!1,videojs:!1,videojsTheme:"",videojsOptions:{}},t="lgHasVideo",i="lgSlideItemLoad",s="lgBeforeSlide",n="lgAfterSlide",a="lgPosterClick",l=function(e){return 0===Object.keys(e).length},r=function(e){return Object.keys(e).map((function(o){return encodeURIComponent(o)+"="+encodeURIComponent(e[o])})).join("&")},d=function(o,t){if(!o.youtube)return"";var i=o.youtube[2]?o.youtube[2].slice(1).split("&").map((function(e){return e.split("=")})).reduce((function(e,o){var t=o.map(decodeURIComponent),i=t[0],s=t[1];return e[i]=s,e}),{}):"",s=t||{},n=e(e(e({},{wmode:"opaque",autoplay:0,mute:1,enablejsapi:1}),s),i);return"?"+r(n)},c=function(o,t,i){const s=j1.modules.videojs.options;var n,a,r,d,c,u;function p(e,o){e.find(".vjs-chapter-marker").remove()}function v(e){var o,t,i=$(e.controlBar.progressControl.children_[0].el_),s=e.id(),n=new WebVTTParser,a=[];o=e.chapterTracksSource,t=function(e){for(var o,t=n.parse(e,"metadata"),i=0;i<t.cues.length;i++)o={time:t.cues[i].startTime,label:t.cues[i].text},a.push(o)},new WebVTTParser,$.ajax({url:o,type:"GET",success:t,error:function(e){JSON.stringify(e,void 0,2)}}),p(i),j1.modules.videojs.data.players[s].videoData.tracks.length&&setTimeout((function(){var o=setInterval((function(){if(a.length){const d=e.duration();for(var t=0;t<a.length;t++){var n=a[t].time/d*100+"%",l=a[t].time,r=$('<div class="vjs-chapter-marker" style="left: '+n+'" data-time="'+l+'" data-player-id="'+s+'"><span>'+a[t].label+"</span></div>");!function(e,o){r.click((function(){e.currentTime(o)}))}(e,l),i.append(r)}clearInterval(o)}else clearInterval(o)}),10)}),100)}n=setInterval((()=>{var m,y,h="finished"===j1.adapter.gallery.getState(),g=!l(o.settings.videojsOptions);if(h&&g){_=t.id(),m={tracks:[]},{paused:(y=t).paused(),currentTime:y.currentTime(),duration:y.duration(),muted:y.muted(),bufferedPercent:y.bufferedPercent()};var f={volumeStep:s.plugins.hotKeys.volumeStep,seekStep:s.plugins.hotKeys.seekStep,enableMute:s.plugins.hotKeys.enableMute,enableVolumeScroll:s.plugins.hotKeys.enableVolumeScroll,enableHoverScroll:s.plugins.hotKeys.enableHoverScroll,enableFullscreen:s.plugins.hotKeys.enableFullscreen,enableNumbers:s.plugins.hotKeys.enableNumbers,enableJogStyle:s.plugins.hotKeys.enableJogStyle,alwaysCaptureHotkeys:s.plugins.hotKeys.alwaysCaptureHotkeys,captureDocumentHotkeys:s.plugins.hotKeys.captureDocumentHotkeys,enableModifiersForNumbers:s.plugins.hotKeys.enableModifiersForNumbers,enableInactiveFocus:s.plugins.hotKeys.enableInactiveFocus,skipInitialFocus:s.plugins.hotKeys.skipInitialFocus},b={backward:s.plugins.skipButtons.backward,forward:s.plugins.skipButtons.forward,backwardIndex:0,forwardIndex:1},j={moveX:s.plugins.zoomButtons.moveX,moveY:s.plugins.zoomButtons.moveY,rotate:s.plugins.zoomButtons.rotate,zoom:s.plugins.zoomButtons.zoom},k=t.controlBar;const h=k.addChild("Component",{el:videojs.dom.createEl("div",{className:"vjs-theme-uno custom-progressbar-container"})}),g=k.progressControl;g&&h.el().appendChild(g.el());const O=k.currentTimeDisplay;O&&h.el().insertBefore(O.el(),g.el());const C=k.durationDisplay;if(C&&h.el().appendChild(C.el()),!l(o.settings.videojsOptions)){if(d=o.settings.videojsOptions.hotKeysPlugin,c=o.settings.videojsOptions.controlBar.skipButtonsPlugin,u=o.settings.videojsOptions.controlBar.zoomPlugin,r=o.settings.videojsOptions.controlBar.playbackRates,void 0!==o.settings.videojsOptions.videoStart&&(a=o.settings.videojsOptions.videoStart[index],t.on("play",(function(){var e=new Date("1970-01-01T"+a+"Z").getTime()/1e3;t.currentTime(e)}))),t.playbackRates(r),void 0!==d&&d.enabled&&void 0!==t.hotKeys){d.options=e(e({},f),d.options);var w=!1;void 0!==t.activePlugins_&&void 0!==t.activePlugins_.hotKeys&&(w=t.activePlugins_.hotKeys),w||t.hotKeys({volumeStep:d.options.volumeStep,seekStep:d.options.seekStep,enableMute:d.options.enableMute,enableFullscreen:d.options.enableFullscreen,enableNumbers:d.options.enableNumbers,enableVolumeScroll:d.options.enableVolumeScroll,enableHoverScroll:d.options.enableHoverScroll,alwaysCaptureHotkeys:d.options.alwaysCaptureHotkeys,captureDocumentHotkeys:d.options.captureDocumentHotkeys,documentHotkeysFocusElementFilter:d.options.documentHotkeysFocusElementFilter,seekStep:function(e){return e.ctrlKey&&e.altKey?300:e.ctrlKey?60:e.altKey?10:15}})}if(void 0!==c&&c.enabled&&void 0!==t.skipButtons){c.options=e(e({},b),c.options);var V=!1;void 0!==t.activePlugins_&&void 0!==t.activePlugins_.skipButtons&&(V=t.activePlugins_.skipButtons),V||t.skipButtons({backward:c.options.backward,forward:c.options.forward,backwardIndex:c.options.backwardIndex,forwardIndex:c.options.forwardIndex})}if(i.youtube&&(u.enabled=!1),void 0!==u&&u.enabled&&void 0!==t.zoomButtons){u.options=e(e({},j),u.options);var P=!1;void 0!==t.activePlugins_&&void 0!==t.activePlugins_.zoomButtons&&(P=t.activePlugins_.zoomButtons),P||t.zoomButtons({moveX:u.options.moveX,moveY:u.options.moveY,rotate:u.options.rotate,zoom:u.options.zoom})}if(o.settings.videojsOptions.tracks&&void 0!==o.core.galleryItems[o.core.index].video){var S;m=JSON.parse(o.core.galleryItems[o.core.index].video),t.videoData=m,void 0===j1.modules.videojs.data.players[_]&&(j1.modules.videojs.data.players[_]={},j1.modules.videojs.data.players[_].videoData={},j1.modules.videojs.data.players[_].videoData.tracks=m.tracks||[]);for(var x=0;x<t.videoData.tracks.length;x++)"chapters"==t.videoData.tracks[x].kind&&(S=t.videoData.tracks[x].src,t.chapterTracksSource=S);if(j1.modules.videojs.data.players[_].videoData.tracks.length)_=t.id(),p(I=$(t.controlBar.progressControl.children_[0].el_)),function(e){return!e.paused()||e.currentTime()>0}(t)&&v(t),t.on("pause",(function(){p($(t.controlBar.progressControl.children_[0].el_),t.id())})),t.on("play",(function(){v(t)})),t.on("dispose",(function(){p($(t.controlBar.progressControl.children_[0].el_),t.id())}));else{var I=$(t.controlBar.progressControl.children_[0].el_),_=t.id();p(I)}}}clearInterval(n)}}),10)};return function(){function l(t){return this.core=t,this.settings=e(e({},o),this.core.settings),this}return l.prototype.init=function(){var e=this;this.core.LGel.on(t+".video",this.onHasVideo.bind(this)),this.core.LGel.on(a+".video",(function(){var o=e.core.getSlideItem(e.core.index);e.loadVideoOnPosterClick(o)})),this.core.LGel.on(i+".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))},l.prototype.onSlideItemLoad=function(e){var o=this,t=e.detail,i=t.isFirstSlide,s=t.index;this.settings.autoplayFirstVideo&&i&&s===this.core.index&&setTimeout((function(){o.loadAndPlayVideo(s)}),200),!i&&this.settings.autoplayVideoOnSlide&&s===this.core.index&&this.loadAndPlayVideo(s)},l.prototype.onHasVideo=function(e){var o=e.detail,t=o.index,i=o.src,s=o.html5Video;o.hasPoster||(this.appendVideo(this.core.getSlideItem(t),{src:i,addClass:"lg-object",index:t,html5Video:s}),this.gotoNextSlideOnVideoEnd(i,t))},l.prototype.onBeforeSlide=function(e){if(this.core.lGalleryOn){var o=e.detail.prevIndex;this.pauseVideo(o)}},l.prototype.onAfterSlide=function(e){var o=this,t=e.detail,i=t.index,s=t.prevIndex,n=this.core.getSlideItem(i);this.settings.autoplayVideoOnSlide&&i!==s&&n.hasClass("lg-complete")&&setTimeout((function(){o.loadAndPlayVideo(i)}),100)},l.prototype.loadAndPlayVideo=function(e){var o=this.core.getSlideItem(e);this.core.galleryItems[e].poster?this.loadVideoOnPosterClick(o,!0):this.playVideo(e)},l.prototype.playVideo=function(e){this.controlVideo(e,"play")},l.prototype.pauseVideo=function(e){this.controlVideo(e,"pause")},l.prototype.getVideoHtml=function(e,o,t,i){var s,n,a,l,c;if(n=this.core.galleryItems[t].__slideVideoInfo||{},(s=this.core.galleryItems[t]).subHtml.includes("<h2>")?a=s.subHtml.split("</h2>")[0].replace("<h2>",""):s.subHtml.includes("<h5>")&&(a=s.subHtml.split("</h5>")[0].replace("<h5>","")),a=a?'title="'+a+'"':"",c='allowtransparency="true"\n frameborder="0"\n scrolling="no"\n allowfullscreen\n mozallowfullscreen\n webkitallowfullscreen\n oallowfullscreen\n msallowfullscreen',n.youtube){var u="lg-youtube"+t,p=(d(n,this.settings.youTubePlayerParams),e.includes("youtube-nocookie.com"),n.youtube[1]);"youtube",l=`\n <video\n id="${u}"\n class="video-js lg-video-object lg-youtube vjs-theme-uno">\n <source\n type="video/youtube",\n src="//youtube.com/watch?v=${p}"\n >,\n <tracks>\n\n Your browser does not support HTML5 video.\n </video>\n `}else if(n.vimeo){u="lg-vimeo"+t;var v=function(e,o){if(!o||!o.vimeo)return"";var t=o.vimeo[2]||"",i=Object.assign({},{autoplay:0,muted:1},e),s=i&&0!==Object.keys(i).length?r(i):"",n=((o.vimeo[0].split("/").pop()||"").split("?")[0]||"").split("#")[0],a=o.vimeo[1]!==n;a&&(t=t.replace("/"+n,""));var l=a?"h="+n:"";return"?"+l+(s=l?"&"+s:s)+("?"==t[0]?"&"+t.slice(1):t||"")}(this.settings.vimeoPlayerParams,n);l='<iframe allow="autoplay" id='+u+' class="lg-video-object lg-vimeo '+o+'" '+a+' src="//player.vimeo.com/video/'+(n.vimeo[1]+v)+'" '+c+"></iframe>"}else if(n.wistia){var m="lg-wistia"+t;v=(v=r(this.settings.wistiaPlayerParams))?"?"+v:"",l='<iframe allow="autoplay" id="'+m+'" src="//fast.wistia.net/embed/iframe/'+(n.wistia[4]+v)+'" '+a+' class="wistia_embed lg-video-object lg-wistia '+o+'" name="wistia_embed" '+c+"></iframe>"}else if(n.dailymotion){var y="lg-dailymotion"+t;v=(v=r(this.settings.dailymotionPlayerParams))?"?"+v:"",l=`\n <iframe\n id="${y}"\n src="//dailymotion.com/embed/video/${n.dailymotion[1]}?api=1 ${v}"\n ${a}\n class="dailymotion_embed lg-video-object lg-dailymotiion ${o}"\n name="dailymotion_embed"\n ${c}>\n </iframe>\n `}else if(n.html5){for(var h="",g=0;g<i.source.length;g++){var f=i.source[g].type,b=f?'type="'+f+'"':"";h+='<source src="'+i.source[g].src+'" '+b+">"}if(i.tracks){var j=function(e){var o="",t=i.tracks[e];Object.keys(t||{}).forEach((function(e){o+=e+'="'+t[e]+'" '})),h+="<track "+o+">"};for(g=0;g<i.tracks.length;g++)j(g)}var k="",w=i.attributes||{};Object.keys(w||{}).forEach((function(e){k+=e+'="'+w[e]+'" '})),l='<video class="lg-video-object lg-html5 '+(this.settings.videojs&&this.settings.videojsTheme?this.settings.videojsTheme+" ":"")+" "+(this.settings.videojs?" video-js":"")+'" '+k+">\n "+h+"\n Your browser does not support HTML5 video.\n </video>"}return l},l.prototype.appendVideo=function(e,o){var t,i,s={},n=this.getVideoHtml(o.src,o.addClass,o.index,o.html5Video);e.find(".lg-video-cont").append(n);var a=e.find(".lg-video-object").first();if(a.get()){if(o.html5Video&&a.on("mousedown.lg.video",(function(e){e.stopPropagation()})),(s=this.core.galleryItems[o.index].__slideVideoInfo).videojs={enabled:!1},i=n.includes("iframe"),s.videojs.enabled=!i,this.settings.videojs&&(null==s?void 0:s.html5))try{if(s.videojs.enabled)return t=videojs(a.get(),this.settings.videojsOptions),this.settings.vjsPlayer=t,s.videojs.player=t,t}catch(e){console.warn("lightGallery: Make sure you have included //github.com/vimeo/player.js")}if(this.settings.videojs&&(null==s?void 0:s.youtube))try{if(s.videojs.enabled)return t=videojs(a.get(),this.settings.videojsOptions),this.settings.vjsPlayer=t,s.videojs.player=t,t}catch(e){console.warn("lightGallery: Make sure you have included //github.com/vimeo/player.js")}}},l.prototype.gotoNextSlideOnVideoEnd=function(e,o){var t=this,i=this.core.getSlideItem(o).find(".lg-video-object").first();if(i.get()){var s=this.core.galleryItems[o].__slideVideoInfo||{};if(this.settings.gotoNextSlideOnVideoEnd)if(s.html5)i.on("ended",(function(){t.core.goToNextSlide()}));else if(s.vimeo)try{new Vimeo.Player(i.get()).on("ended",(function(){t.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:i.attr("id"),onReady:function(e){e.bind("end",(function(){t.core.goToNextSlide()}))}})}catch(e){console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}}},l.prototype.controlVideo=function(e,o){var t,i,s="not_set";if((t=this.core.getSlideItem(e).find(".lg-video-object").first()).get())if(((i=this.core.galleryItems[e].__slideVideoInfo||{}).html5||i.youtube)&&(void 0!==t.selector.player&&(s=t.selector.player),"not_set"!==s&&c(this,s,i)),i.html5)if(this.settings.videojs)try{videojs(t.get())[o]()}catch(e){console.warn("lightGallery: Make sure you have included videojs")}else t.get()[o]();else if(i.youtube)if(this.settings.videojs)try{videojs(t.get())[o]()}catch(e){console.warn("lightGallery: Make sure you have included videojs")}else try{t.get().contentWindow.postMessage('{"event":"command","func":"'+o+'Video","args":""}',"*")}catch(e){console.error("lightGallery:- "+e)}else if(i.vimeo)try{new Vimeo.Player(t.get())[o]()}catch(e){console.warn("lightGallery: Make sure you have included //github.com/vimeo/player.js")}else if(i.wistia)try{window._wq=window._wq||[],window._wq.push({id:t.attr("id"),onReady:function(e){e[o]()}})}catch(e){console.warn("lightGallery: Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},l.prototype.loadVideoOnPosterClick=function(e,o){var t=this;if(e.hasClass("lg-video-loaded"))o&&this.playVideo(this.core.index);else if(e.hasClass("lg-has-video"))this.playVideo(this.core.index);else{e.addClass("lg-has-video");var i=void 0,s=this.core.galleryItems[this.core.index].src,n=this.core.galleryItems[this.core.index].video;n&&(i="string"==typeof n?JSON.parse(n):n);var a=this.appendVideo(e,{src:s,addClass:"",index:this.core.index,html5Video:i});this.gotoNextSlideOnVideoEnd(s,this.core.index);var l=e.find(".lg-object").first().get();e.find(".lg-video-cont").first().append(l),e.addClass("lg-video-loading"),a&&a.ready((function(){a.on("loadedmetadata",(function(){t.onVideoLoadAfterPosterClick(e,t.core.index)}))})),e.find(".lg-video-object").first().on("load.lg error.lg loadedmetadata.lg",(function(){setTimeout((function(){t.onVideoLoadAfterPosterClick(e,t.core.index)}),50)}))}},l.prototype.onVideoLoadAfterPosterClick=function(e,o){e.addClass("lg-video-loaded"),this.playVideo(o)},l.prototype.destroy=function(){this.core.LGel.off(".lg.video"),this.core.LGel.off(".video")},l}()}));
|
@@ -27,9 +27,11 @@
|
|
27
27
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
28
28
|
typeof define === 'function' && define.amd ? define(factory) :
|
29
29
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgVimeoThumbnail = factory());
|
30
|
-
}(this, (function () {
|
30
|
+
}(this, (function () {
|
31
|
+
'use strict';
|
31
32
|
|
32
|
-
/*!
|
33
|
+
/*!
|
34
|
+
****************************************************************************
|
33
35
|
Copyright (c) Microsoft Corporation.
|
34
36
|
|
35
37
|
Permission to use, copy, modify, and/or distribute this software for any
|
@@ -42,7 +44,8 @@
|
|
42
44
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
43
45
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
44
46
|
PERFORMANCE OF THIS SOFTWARE.
|
45
|
-
|
47
|
+
****************************************************************************
|
48
|
+
*/
|
46
49
|
|
47
50
|
var __assign = function() {
|
48
51
|
__assign = Object.assign || function __assign(t) {
|
@@ -27,9 +27,11 @@
|
|
27
27
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
28
28
|
typeof define === 'function' && define.amd ? define(factory) :
|
29
29
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgZoom = factory());
|
30
|
-
}(this, (function () {
|
30
|
+
}(this, (function () {
|
31
|
+
'use strict';
|
31
32
|
|
32
|
-
/*!
|
33
|
+
/*!
|
34
|
+
****************************************************************************
|
33
35
|
Copyright (c) Microsoft Corporation.
|
34
36
|
|
35
37
|
Permission to use, copy, modify, and/or distribute this software for any
|
@@ -42,7 +44,8 @@
|
|
42
44
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
43
45
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
44
46
|
PERFORMANCE OF THIS SOFTWARE.
|
45
|
-
|
47
|
+
****************************************************************************
|
48
|
+
*/
|
46
49
|
|
47
50
|
var __assign = function() {
|
48
51
|
__assign = Object.assign || function __assign(t) {
|
@@ -14,4 +14,4 @@
|
|
14
14
|
# -----------------------------------------------------------------------------
|
15
15
|
*/
|
16
16
|
|
17
|
-
"use strict";function
|
17
|
+
"use strict";function LayoutPanorama(a){var{swiper:s,extendParams:e,on:r}=a;r("beforeInit",(function(a){if("panorama"!==a.params.effect)return;a.classNames.push(`${a.params.containerModifierClass}panorama`),a.classNames.push(`${a.params.containerModifierClass}3d`);Object.assign(a.params,{watchSlidesProgress:!0})})),r("progress",(function(a,s){if("panorama"!==a.params.effect)return;const{depth:e=200,rotate:r=30}=a.params.panoramaEffect,t=a.slidesSizesGrid,n=r*Math.PI/180/2,o=1/(180/r);for(let s=0;s<a.slides.length;s+=1){const i=a.slides[s],c=i.progress,p=t[s],m=c+(a.params.centeredSlides?0:.5*(a.params.slidesPerView-1)),l=1-Math.cos(m*o*Math.PI),f=m*(p/3)*l+"px",d=m*r,u=.5*p/Math.sin(n)*l-e+"px";i.style.transform="horizontal"===a.params.direction?`translateX(${f}) translateZ(${u}) rotateY(${d}deg)`:`translateY(${f}) translateZ(${u}) rotateX(${-d}deg)`}})),r("click",(function(a,s){if("panorama"!==a.params.effect)return;const{on_click:e=!1}=a.params.panorama;"next"===e&&a.slideNext()}))}
|
@@ -597,19 +597,34 @@
|
|
597
597
|
} // END
|
598
598
|
|
599
599
|
playbackRate() {
|
600
|
-
|
601
|
-
|
600
|
+
// jadams, 2025-06-22: check to prevent "Cannot read properties of undefined"
|
601
|
+
try {
|
602
|
+
return this.ytPlayer ? this.ytPlayer.getPlaybackRate() : 1;
|
603
|
+
} catch (error) {
|
604
|
+
return 1; // getDuration is not available/supported
|
605
|
+
}
|
606
|
+
} // END playbackRate
|
602
607
|
|
603
608
|
setPlaybackRate(suggestedRate) {
|
604
609
|
if (!this.ytPlayer) {
|
605
610
|
return;
|
606
611
|
}
|
607
612
|
|
608
|
-
|
609
|
-
|
613
|
+
// jadams, 2025-06-22: check to prevent "Cannot read properties of undefined"
|
614
|
+
try {
|
615
|
+
this.ytPlayer.setPlaybackRate(suggestedRate);
|
616
|
+
} catch (error) {
|
617
|
+
this.ytPlayer.setPlaybackRate(1); // getDuration is not available/supported
|
618
|
+
}
|
619
|
+
} // END setPlaybackRate
|
610
620
|
|
611
621
|
duration() {
|
612
|
-
|
622
|
+
// jadams, 2025-06-22: check to prevent "Cannot read properties of undefined"
|
623
|
+
try {
|
624
|
+
return this.ytPlayer ? this.ytPlayer.getDuration() : 0;
|
625
|
+
} catch (error) {
|
626
|
+
return 0; // return 0, if getDuration is not available/supported
|
627
|
+
}
|
613
628
|
} // END duration
|
614
629
|
|
615
630
|
currentSrc() {
|
@@ -861,4 +876,4 @@
|
|
861
876
|
console.error('\n' + 'invalid version of videoJS detected: ' + videojs.VERSION);
|
862
877
|
}
|
863
878
|
|
864
|
-
}));
|
879
|
+
}));
|
@@ -18,4 +18,4 @@
|
|
18
18
|
|
19
19
|
/* Version 3.0.1, modified version for J1 Template */
|
20
20
|
|
21
|
-
!function(e,t){if("object"==typeof exports&&"undefined"!=typeof module){var i=require("video.js");module.exports=t(i.default||i)}else"function"==typeof define&&define.amd?define(["videojs"],(function(i){return e.Youtube=t(i)})):e.Youtube=t(e.videojs)}(this,(function(e){"use strict";const t="development"===j1.env||"dev"===j1.env;var i,s,o=log4javascript.getLogger("videoJS.plugin.youtube"),a=e.browser.IS_IOS||e.browser.IS_NATIVE_ANDROID,r=e.getTech("Tech");class n extends r{constructor(e,t){super(e,t),this.setPoster(e.poster),this.setSrc(this.options_.source,!0),this.setTimeout(function(){this.el_&&(this.el_.parentNode.className+=" vjs-youtube",a&&(this.el_.parentNode.className+=" vjs-youtube-mobile"),n.isApiReady?this.initYTPlayer():n.apiReadyQueue.push(this))}.bind(this))}dispose(){if(this.ytPlayer)this.ytPlayer.stopVideo&&this.ytPlayer.stopVideo(),this.ytPlayer.destroy&&this.ytPlayer.destroy();else{var e=n.apiReadyQueue.indexOf(this);-1!==e&&n.apiReadyQueue.splice(e,1)}this.ytPlayer=null,this.el_.parentNode.className=this.el_.parentNode.className.replace(" vjs-youtube","").replace(" vjs-youtube-mobile",""),this.el_.parentNode.removeChild(this.el_),r.prototype.dispose.call(this)}createEl(){var e=document.createElement("div");e.setAttribute("id",this.options_.techId),e.setAttribute("style","width:100%;height:100%;top:0;left:0;position:absolute"),e.setAttribute("class","vjs-tech");var t=document.createElement("div");if(t.appendChild(e),!a&&!this.options_.ytControls){var i=document.createElement("div");i.setAttribute("class","vjs-iframe-blocker"),i.setAttribute("style","position:absolute;top:0;left:0;width:100%;height:100%"),i.onclick=function(){this.pause()}.bind(this),t.appendChild(i)}return t}initYTPlayer(){var e=j1.modules.videojs.options.players.youtube,i={autoplay:e.autoplay,controls:e.controls,cc_load_policy:e.cc_load_policy,disablekb:e.disablekb,enablejsapi:e.enablejsapi,fs:e.fs,iv_load_policy:e.iv_load_policy,loop:e.loop,modestbranding:e.modestbranding,rel:e.rel,showinfo:e.showinfo};if(void 0!==this.options_.autohide&&(i.autohide=this.options_.autohide),void 0!==this.options_.loop&&(i.loop=this.options_.loop),void 0!==this.options_.cc_load_policy&&(i.cc_load_policy=this.options_.cc_load_policy),void 0!==this.options_.cc_load_policy&&(i.iv_load_policy=this.options_.iv_load_policy),void 0!==this.options_.ytControls&&(i.controls=this.options_.ytControls),void 0!==this.options_.disablekb&&(i.disablekb=this.options_.disablekb),void 0!==this.options_.color&&(i.color=this.options_.color),i.controls?void 0!==this.options_.fs&&(i.fs=this.options_.fs):i.fs=0,-1!==this.options_.source.src.indexOf("end=")){var s=this.options_.source.src.match(/end=([0-9]*)/);this.options_.end=parseInt(s[1])}if(void 0!==this.options_.end&&(i.end=this.options_.end),void 0!==this.options_.hl?i.hl=this.options_.hl:void 0!==this.options_.language&&(i.hl=this.options_.language.substr(0,2)),void 0!==this.options_.iv_load_policy&&(i.iv_load_policy=this.options_.iv_load_policy),void 0!==this.options_.list?i.list=this.options_.list:this.url&&void 0!==this.url.listId&&(i.list=this.url.listId),void 0!==this.options_.listType&&(i.listType=this.options_.listType),void 0!==this.options_.modestbranding&&(i.modestbranding=this.options_.modestbranding),void 0!==this.options_.playlist&&(i.playlist=this.options_.playlist),void 0!==this.options_.playsinline&&(i.playsinline=this.options_.playsinline),void 0!==this.options_.rel&&(i.rel=this.options_.rel),void 0!==this.options_.showinfo&&(i.showinfo=this.options_.showinfo),-1!==this.options_.source.src.indexOf("start=")){var a=this.options_.source.src.match(/start=([0-9]*)/);this.options_.start=parseInt(a[1])}if(void 0!==this.options_.start&&(i.start=this.options_.start),void 0!==this.options_.theme&&(i.theme=this.options_.theme),void 0!==this.options_.customVars){var r=this.options_.customVars;Object.keys(r).forEach((e=>{i[e]=r[e]}))}this.activeVideoId=this.url?this.url.videoId:null,this.activeList=i.list;var n={videoId:this.activeVideoId,playerVars:i,events:{onReady:this.onPlayerReady.bind(this),onPlaybackQualityChange:this.onPlayerPlaybackQualityChange.bind(this),onPlaybackRateChange:this.onPlayerPlaybackRateChange.bind(this),onStateChange:this.onPlayerStateChange.bind(this),onVolumeChange:this.onPlayerVolumeChange.bind(this),onError:this.onPlayerError.bind(this)}};void 0!==this.options_.enablePrivacyEnhancedMode&&this.options_.enablePrivacyEnhancedMode&&(n.host="https://www.youtube-nocookie.com"),this.ytPlayer=new YT.Player(this.options_.techId,n),t&&o.debug("\ncreated "+this.name_+" player on ID: "+this.el_.firstChild.id)}onPlayerReady(){this.options_.muted&&this.ytPlayer.mute(),this.ytPlayer.getAvailablePlaybackRates().length>1&&(this.featuresPlaybackRate=!0),this.playerReady_=!0,this.triggerReady(),this.playOnReady?this.play():this.cueOnReady&&(this.cueVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId)}onPlayerPlaybackQualityChange(){}onPlayerPlaybackRateChange(){this.trigger("ratechange")}onPlayerStateChange(e){var t=e.data;if(t!==this.lastState&&!this.errorNumber)switch(this.lastState=t,t){case-1:this.trigger("loadstart"),this.trigger("loadedmetadata"),this.trigger("durationchange"),this.trigger("ratechange");break;case YT.PlayerState.ENDED:this.trigger("ended");break;case YT.PlayerState.PLAYING:this.trigger("timeupdate"),this.trigger("durationchange"),this.trigger("playing"),this.trigger("play"),this.isSeeking&&this.onSeeked();break;case YT.PlayerState.PAUSED:this.trigger("canplay"),this.isSeeking?this.onSeeked():this.trigger("pause");break;case YT.PlayerState.BUFFERING:this.player_.trigger("timeupdate"),this.player_.trigger("waiting")}}onPlayerVolumeChange(){this.trigger("volumechange")}onPlayerError(e){this.errorNumber=e.data,this.trigger("pause"),this.trigger("error")}error(){var e=1e3+this.errorNumber;switch(this.errorNumber){case 5:return{code:e,message:"Error while trying to play the video"};case 2:case 100:return{code:e,message:"Unable to find the video"};case 101:case 150:return{code:e,message:"Playback on other Websites has been disabled by the video owner."}}return{code:e,message:"YouTube unknown error ("+this.errorNumber+")"}}loadVideoById_(e){var t={videoId:e};this.options_.start&&(t.startSeconds=this.options_.start),this.options_.end&&(t.endSeconds=this.options_.end),this.ytPlayer.loadVideoById(t)}cueVideoById_(e){var t={videoId:e};this.options_.start&&(t.startSeconds=this.options_.start),this.options_.end&&(t.endSeconds=this.options_.end),this.ytPlayer.cueVideoById(t)}poster(){return a?null:this.poster_}setPoster(e){this.poster_=e}src(e){return e&&this.setSrc({src:e}),this.source}setSrc(e){if(e&&e.src){delete this.errorNumber,this.source=e,this.url=n.parseUrl(e.src);!1,this.options_.autoplay&&!a?this.isReady_?this.play():this.playOnReady=!0:this.activeVideoId!==this.url.videoId&&(this.isReady_?(this.cueVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId):this.cueOnReady=!0)}}autoplay(){return this.options_.autoplay}setAutoplay(e){this.options_.autoplay=e}loop(){return this.options_.loop}setLoop(e){this.options_.loop=e}play(){this.url&&this.url.videoId&&(this.wasPausedBeforeSeek=!1,this.isReady_?(this.url.listId&&(this.activeList===this.url.listId?this.ytPlayer.playVideo():(this.ytPlayer.loadPlaylist(this.url.listId),this.activeList=this.url.listId)),this.activeVideoId===this.url.videoId?this.ytPlayer.playVideo():(this.loadVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId)):(this.trigger("waiting"),this.playOnReady=!0))}pause(){this.ytPlayer&&this.ytPlayer.pauseVideo()}paused(){return!this.ytPlayer||this.lastState!==YT.PlayerState.PLAYING&&this.lastState!==YT.PlayerState.BUFFERING}currentTime(){return this.ytPlayer?this.ytPlayer.getCurrentTime():0}setCurrentTime(e){this.lastState===YT.PlayerState.PAUSED&&(this.timeBeforeSeek=this.currentTime()),this.isSeeking||(this.wasPausedBeforeSeek=this.paused()),this.ytPlayer.seekTo(e,!0),this.trigger("timeupdate"),this.trigger("seeking"),this.isSeeking=!0,this.lastState===YT.PlayerState.PAUSED&&this.timeBeforeSeek!==e&&(clearInterval(this.checkSeekedInPauseInterval),this.checkSeekedInPauseInterval=setInterval(function(){this.lastState===YT.PlayerState.PAUSED&&this.isSeeking?this.currentTime()!==this.timeBeforeSeek&&(this.trigger("timeupdate"),this.onSeeked()):clearInterval(this.checkSeekedInPauseInterval)}.bind(this),250))}seeking(){return this.isSeeking}seekable(){return this.ytPlayer?e.time.createTimeRanges(0,this.ytPlayer.getDuration()):e.time.createTimeRanges()}onSeeked(){clearInterval(this.checkSeekedInPauseInterval),this.isSeeking=!1,this.wasPausedBeforeSeek&&this.pause(),this.trigger("seeked")}playbackRate(){return this.ytPlayer?this.ytPlayer.getPlaybackRate():1}setPlaybackRate(e){this.ytPlayer&&this.ytPlayer.setPlaybackRate(e)}duration(){return this.ytPlayer?this.ytPlayer.getDuration():0}currentSrc(){return this.source&&this.source.src}ended(){return!!this.ytPlayer&&this.lastState===YT.PlayerState.ENDED}volume(){return this.ytPlayer?this.ytPlayer.getVolume()/100:1}setVolume(e){this.ytPlayer&&this.ytPlayer.setVolume(100*e)}muted(){return!!this.ytPlayer&&this.ytPlayer.isMuted()}setMuted(e){this.ytPlayer&&(this.muted(!0),e?this.ytPlayer.mute():this.ytPlayer.unMute(),this.setTimeout((()=>{this.trigger("volumechange")}),50))}buffered(){if(!this.ytPlayer||!this.ytPlayer.getVideoLoadedFraction)return e.time.createTimeRanges();this.ytPlayer.getVideoLoadedFraction(),this.ytPlayer.getDuration();return e.time.createTimeRanges(0,this.ytPlayer.getDuration())}preload(){}load(){}reset(){}networkState(){if(!this.ytPlayer)return 0;switch(this.ytPlayer.getPlayerState()){case-1:return 0;case 3:return 2;default:return 1}}readyState(){if(!this.ytPlayer)return 0;switch(this.ytPlayer.getPlayerState()){case-1:return 0;case 5:return 1;case 3:return 2;default:return 4}}supportsFullScreen(){return document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled}checkHighResPoster(){var e="https://img.youtube.com/vi/"+this.url.videoId+"/maxresdefault.jpg";try{var t=new Image;t.onload=function(){if("naturalHeight"in t){if(t.naturalHeight<=90||t.naturalWidth<=120)return}else if(t.height<=90||t.width<=120)return;this.poster_=e,this.trigger("posterchange")}.bind(this),t.onerror=function(){},t.src=e}catch(e){}}}function l(){YT.ready((()=>{n.isApiReady=!0,t&&o.debug("\nAPI loaded successfully");for(var e=0;e<n.apiReadyQueue.length;++e)n.apiReadyQueue[e].initYTPlayer();t&&o.debug("\ncreated all players from queue: #"+e),s=Date.now(),t&&o.debug("\ninitializing plugin: finished"),t&&o.debug("\nplugin initializing time: "+(s-i)+"ms")}))}n.isSupported=()=>!0,n.canPlaySource=e=>n.canPlayType(e.type),n.canPlayType=e=>"video/youtube"===e,n.parseUrl=e=>{var t={videoId:null},i=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);i&&11===i[2].length&&(t.videoId=i[2]);return(i=e.match(/[?&]list=([^#\&\?]+)/))&&i[1]&&(t.listId=i[1]),t},n.apiReadyQueue=[];var h=setInterval((()=>{var s="block"===$("#content").css("display");"finished"===j1.getState()&&s&&(i=Date.now(),t&&o.debug("\ninitializing plugin: started"),t&&o.debug("\nversion of videoJS detected: "+e.VERSION),function(e,t){var i=!1,s=document.createElement("script"),o=document.getElementsByTagName("script")[0];o&&(o.parentNode.insertBefore(s,o),s.onload=()=>{i||(i=!0,t())},s.onreadystatechange=()=>{i||"complete"!==this.readyState&&"loaded"!==this.readyState||(i=!0,t())},s.src=e)}("//www.youtube.com/iframe_api",l),function(){const e="\n .vjs-youtube .vjs-iframe-blocker { display: none; }\n .vjs-youtube.vjs-user-inactive .vjs-iframe-blocker { display: block; }\n .vjs-youtube .vjs-poster { background-size: cover; }\n .vjs-youtube-mobile .vjs-big-play-button { display: none; }\n ";var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e)),i.appendChild(s),t&&o.debug("\nadded additional CSS styles")}(),clearInterval(h))}),10);void 0!==e.registerTech?e.registerTech("Youtube",n):console.error("\ninvalid version of videoJS detected: "+e.VERSION)}));
|
21
|
+
!function(t,e){if("object"==typeof exports&&"undefined"!=typeof module){var i=require("video.js");module.exports=e(i.default||i)}else"function"==typeof define&&define.amd?define(["videojs"],(function(i){return t.Youtube=e(i)})):t.Youtube=e(t.videojs)}(this,(function(t){"use strict";log4javascript.getLogger("videoJS.plugin.youtube");var e=t.browser.IS_IOS||t.browser.IS_NATIVE_ANDROID,i=t.getTech("Tech");class s extends i{constructor(t,i){super(t,i),this.setPoster(t.poster),this.setSrc(this.options_.source,!0),this.setTimeout(function(){this.el_&&(this.el_.parentNode.className+=" vjs-youtube",e&&(this.el_.parentNode.className+=" vjs-youtube-mobile"),s.isApiReady?this.initYTPlayer():s.apiReadyQueue.push(this))}.bind(this))}dispose(){if(this.ytPlayer)this.ytPlayer.stopVideo&&this.ytPlayer.stopVideo(),this.ytPlayer.destroy&&this.ytPlayer.destroy();else{var t=s.apiReadyQueue.indexOf(this);-1!==t&&s.apiReadyQueue.splice(t,1)}this.ytPlayer=null,this.el_.parentNode.className=this.el_.parentNode.className.replace(" vjs-youtube","").replace(" vjs-youtube-mobile",""),this.el_.parentNode.removeChild(this.el_),i.prototype.dispose.call(this)}createEl(){var t=document.createElement("div");t.setAttribute("id",this.options_.techId),t.setAttribute("style","width:100%;height:100%;top:0;left:0;position:absolute"),t.setAttribute("class","vjs-tech");var i=document.createElement("div");if(i.appendChild(t),!e&&!this.options_.ytControls){var s=document.createElement("div");s.setAttribute("class","vjs-iframe-blocker"),s.setAttribute("style","position:absolute;top:0;left:0;width:100%;height:100%"),s.onclick=function(){this.pause()}.bind(this),i.appendChild(s)}return i}initYTPlayer(){var t=j1.modules.videojs.options.players.youtube,e={autoplay:t.autoplay,controls:t.controls,cc_load_policy:t.cc_load_policy,disablekb:t.disablekb,enablejsapi:t.enablejsapi,fs:t.fs,iv_load_policy:t.iv_load_policy,loop:t.loop,modestbranding:t.modestbranding,rel:t.rel,showinfo:t.showinfo};if(void 0!==this.options_.autohide&&(e.autohide=this.options_.autohide),void 0!==this.options_.loop&&(e.loop=this.options_.loop),void 0!==this.options_.cc_load_policy&&(e.cc_load_policy=this.options_.cc_load_policy),void 0!==this.options_.cc_load_policy&&(e.iv_load_policy=this.options_.iv_load_policy),void 0!==this.options_.ytControls&&(e.controls=this.options_.ytControls),void 0!==this.options_.disablekb&&(e.disablekb=this.options_.disablekb),void 0!==this.options_.color&&(e.color=this.options_.color),e.controls?void 0!==this.options_.fs&&(e.fs=this.options_.fs):e.fs=0,-1!==this.options_.source.src.indexOf("end=")){var i=this.options_.source.src.match(/end=([0-9]*)/);this.options_.end=parseInt(i[1])}if(void 0!==this.options_.end&&(e.end=this.options_.end),void 0!==this.options_.hl?e.hl=this.options_.hl:void 0!==this.options_.language&&(e.hl=this.options_.language.substr(0,2)),void 0!==this.options_.iv_load_policy&&(e.iv_load_policy=this.options_.iv_load_policy),void 0!==this.options_.list?e.list=this.options_.list:this.url&&void 0!==this.url.listId&&(e.list=this.url.listId),void 0!==this.options_.listType&&(e.listType=this.options_.listType),void 0!==this.options_.modestbranding&&(e.modestbranding=this.options_.modestbranding),void 0!==this.options_.playlist&&(e.playlist=this.options_.playlist),void 0!==this.options_.playsinline&&(e.playsinline=this.options_.playsinline),void 0!==this.options_.rel&&(e.rel=this.options_.rel),void 0!==this.options_.showinfo&&(e.showinfo=this.options_.showinfo),-1!==this.options_.source.src.indexOf("start=")){var s=this.options_.source.src.match(/start=([0-9]*)/);this.options_.start=parseInt(s[1])}if(void 0!==this.options_.start&&(e.start=this.options_.start),void 0!==this.options_.theme&&(e.theme=this.options_.theme),void 0!==this.options_.customVars){var o=this.options_.customVars;Object.keys(o).forEach((t=>{e[t]=o[t]}))}this.activeVideoId=this.url?this.url.videoId:null,this.activeList=e.list;var a={videoId:this.activeVideoId,playerVars:e,events:{onReady:this.onPlayerReady.bind(this),onPlaybackQualityChange:this.onPlayerPlaybackQualityChange.bind(this),onPlaybackRateChange:this.onPlayerPlaybackRateChange.bind(this),onStateChange:this.onPlayerStateChange.bind(this),onVolumeChange:this.onPlayerVolumeChange.bind(this),onError:this.onPlayerError.bind(this)}};void 0!==this.options_.enablePrivacyEnhancedMode&&this.options_.enablePrivacyEnhancedMode&&(a.host="https://www.youtube-nocookie.com"),this.ytPlayer=new YT.Player(this.options_.techId,a)}onPlayerReady(){this.options_.muted&&this.ytPlayer.mute(),this.ytPlayer.getAvailablePlaybackRates().length>1&&(this.featuresPlaybackRate=!0),this.playerReady_=!0,this.triggerReady(),this.playOnReady?this.play():this.cueOnReady&&(this.cueVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId)}onPlayerPlaybackQualityChange(){}onPlayerPlaybackRateChange(){this.trigger("ratechange")}onPlayerStateChange(t){var e=t.data;if(e!==this.lastState&&!this.errorNumber)switch(this.lastState=e,e){case-1:this.trigger("loadstart"),this.trigger("loadedmetadata"),this.trigger("durationchange"),this.trigger("ratechange");break;case YT.PlayerState.ENDED:this.trigger("ended");break;case YT.PlayerState.PLAYING:this.trigger("timeupdate"),this.trigger("durationchange"),this.trigger("playing"),this.trigger("play"),this.isSeeking&&this.onSeeked();break;case YT.PlayerState.PAUSED:this.trigger("canplay"),this.isSeeking?this.onSeeked():this.trigger("pause");break;case YT.PlayerState.BUFFERING:this.player_.trigger("timeupdate"),this.player_.trigger("waiting")}}onPlayerVolumeChange(){this.trigger("volumechange")}onPlayerError(t){this.errorNumber=t.data,this.trigger("pause"),this.trigger("error")}error(){var t=1e3+this.errorNumber;switch(this.errorNumber){case 5:return{code:t,message:"Error while trying to play the video"};case 2:case 100:return{code:t,message:"Unable to find the video"};case 101:case 150:return{code:t,message:"Playback on other Websites has been disabled by the video owner."}}return{code:t,message:"YouTube unknown error ("+this.errorNumber+")"}}loadVideoById_(t){var e={videoId:t};this.options_.start&&(e.startSeconds=this.options_.start),this.options_.end&&(e.endSeconds=this.options_.end),this.ytPlayer.loadVideoById(e)}cueVideoById_(t){var e={videoId:t};this.options_.start&&(e.startSeconds=this.options_.start),this.options_.end&&(e.endSeconds=this.options_.end),this.ytPlayer.cueVideoById(e)}poster(){return e?null:this.poster_}setPoster(t){this.poster_=t}src(t){return t&&this.setSrc({src:t}),this.source}setSrc(t){if(t&&t.src){delete this.errorNumber,this.source=t,this.url=s.parseUrl(t.src);!1,this.options_.autoplay&&!e?this.isReady_?this.play():this.playOnReady=!0:this.activeVideoId!==this.url.videoId&&(this.isReady_?(this.cueVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId):this.cueOnReady=!0)}}autoplay(){return this.options_.autoplay}setAutoplay(t){this.options_.autoplay=t}loop(){return this.options_.loop}setLoop(t){this.options_.loop=t}play(){this.url&&this.url.videoId&&(this.wasPausedBeforeSeek=!1,this.isReady_?(this.url.listId&&(this.activeList===this.url.listId?this.ytPlayer.playVideo():(this.ytPlayer.loadPlaylist(this.url.listId),this.activeList=this.url.listId)),this.activeVideoId===this.url.videoId?this.ytPlayer.playVideo():(this.loadVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId)):(this.trigger("waiting"),this.playOnReady=!0))}pause(){this.ytPlayer&&this.ytPlayer.pauseVideo()}paused(){return!this.ytPlayer||this.lastState!==YT.PlayerState.PLAYING&&this.lastState!==YT.PlayerState.BUFFERING}currentTime(){return this.ytPlayer?this.ytPlayer.getCurrentTime():0}setCurrentTime(t){this.lastState===YT.PlayerState.PAUSED&&(this.timeBeforeSeek=this.currentTime()),this.isSeeking||(this.wasPausedBeforeSeek=this.paused()),this.ytPlayer.seekTo(t,!0),this.trigger("timeupdate"),this.trigger("seeking"),this.isSeeking=!0,this.lastState===YT.PlayerState.PAUSED&&this.timeBeforeSeek!==t&&(clearInterval(this.checkSeekedInPauseInterval),this.checkSeekedInPauseInterval=setInterval(function(){this.lastState===YT.PlayerState.PAUSED&&this.isSeeking?this.currentTime()!==this.timeBeforeSeek&&(this.trigger("timeupdate"),this.onSeeked()):clearInterval(this.checkSeekedInPauseInterval)}.bind(this),250))}seeking(){return this.isSeeking}seekable(){return this.ytPlayer?t.time.createTimeRanges(0,this.ytPlayer.getDuration()):t.time.createTimeRanges()}onSeeked(){clearInterval(this.checkSeekedInPauseInterval),this.isSeeking=!1,this.wasPausedBeforeSeek&&this.pause(),this.trigger("seeked")}playbackRate(){try{return this.ytPlayer?this.ytPlayer.getPlaybackRate():1}catch(t){return 1}}setPlaybackRate(t){if(this.ytPlayer)try{this.ytPlayer.setPlaybackRate(t)}catch(t){this.ytPlayer.setPlaybackRate(1)}}duration(){try{return this.ytPlayer?this.ytPlayer.getDuration():0}catch(t){return 0}}currentSrc(){return this.source&&this.source.src}ended(){return!!this.ytPlayer&&this.lastState===YT.PlayerState.ENDED}volume(){return this.ytPlayer?this.ytPlayer.getVolume()/100:1}setVolume(t){this.ytPlayer&&this.ytPlayer.setVolume(100*t)}muted(){return!!this.ytPlayer&&this.ytPlayer.isMuted()}setMuted(t){this.ytPlayer&&(this.muted(!0),t?this.ytPlayer.mute():this.ytPlayer.unMute(),this.setTimeout((()=>{this.trigger("volumechange")}),50))}buffered(){if(!this.ytPlayer||!this.ytPlayer.getVideoLoadedFraction)return t.time.createTimeRanges();this.ytPlayer.getVideoLoadedFraction(),this.ytPlayer.getDuration();return t.time.createTimeRanges(0,this.ytPlayer.getDuration())}preload(){}load(){}reset(){}networkState(){if(!this.ytPlayer)return 0;switch(this.ytPlayer.getPlayerState()){case-1:return 0;case 3:return 2;default:return 1}}readyState(){if(!this.ytPlayer)return 0;switch(this.ytPlayer.getPlayerState()){case-1:return 0;case 5:return 1;case 3:return 2;default:return 4}}supportsFullScreen(){return document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled}checkHighResPoster(){var t="https://img.youtube.com/vi/"+this.url.videoId+"/maxresdefault.jpg";try{var e=new Image;e.onload=function(){if("naturalHeight"in e){if(e.naturalHeight<=90||e.naturalWidth<=120)return}else if(e.height<=90||e.width<=120)return;this.poster_=t,this.trigger("posterchange")}.bind(this),e.onerror=function(){},e.src=t}catch(t){}}}function o(){YT.ready((()=>{s.isApiReady=!0;for(var t=0;t<s.apiReadyQueue.length;++t)s.apiReadyQueue[t].initYTPlayer();Date.now()}))}s.isSupported=()=>!0,s.canPlaySource=t=>s.canPlayType(t.type),s.canPlayType=t=>"video/youtube"===t,s.parseUrl=t=>{var e={videoId:null},i=t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);i&&11===i[2].length&&(e.videoId=i[2]);return(i=t.match(/[?&]list=([^#\&\?]+)/))&&i[1]&&(e.listId=i[1]),e},s.apiReadyQueue=[];var a=setInterval((()=>{"block"===$("#content").css("display")&&(Date.now(),function(t,e){var i=!1,s=document.createElement("script"),o=document.getElementsByTagName("script")[0];o&&(o.parentNode.insertBefore(s,o),s.onload=()=>{i||(i=!0,e())},s.onreadystatechange=()=>{i||"complete"!==this.readyState&&"loaded"!==this.readyState||(i=!0,e())},s.src=t)}("//www.youtube.com/iframe_api",o),function(){const t="\n .vjs-youtube .vjs-iframe-blocker { display: none; }\n .vjs-youtube.vjs-user-inactive .vjs-iframe-blocker { display: block; }\n .vjs-youtube .vjs-poster { background-size: cover; }\n .vjs-youtube-mobile .vjs-big-play-button { display: none; }\n ";var e=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t)),e.appendChild(i)}(),clearInterval(a))}),10);void 0!==t.registerTech?t.registerTech("Youtube",s):console.error("\ninvalid version of videoJS detected: "+t.VERSION)}));
|
data/lib/j1/version.rb
CHANGED
data/lib/starter_web/README.md
CHANGED
@@ -379,7 +379,7 @@ This command creates a **initial** project in folder **my-starter**.
|
|
379
379
|
2023-02-28 18:12:12 - GENERATE: Resolving dependencies...
|
380
380
|
2023-02-28 18:12:12 - GENERATE: Using bundler 2.3.7
|
381
381
|
...
|
382
|
-
2023-02-28 18:12:12 - GENERATE: Using j1-template 2024.3.
|
382
|
+
2023-02-28 18:12:12 - GENERATE: Using j1-template 2024.3.29
|
383
383
|
2023-02-28 18:12:12 - GENERATE: Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
|
384
384
|
2023-02-28 18:12:12 - GENERATE: Bundled gems are installed into `../../.gem`
|
385
385
|
2023-02-28 18:12:12 - GENERATE: C:/Users/xxx/.gem/ruby/3.1.0;C:/DevTools/Ruby31-x64/lib/ruby/gems/3.1.0;
|
@@ -415,7 +415,7 @@ commands are available as well.
|
|
415
415
|
2023-02-28 18:17:48 - SETUP: Initialize the project ...
|
416
416
|
2023-02-28 18:17:48 - SETUP: Be patient, this will take a while ...
|
417
417
|
2023-02-28 18:17:49 - SETUP:
|
418
|
-
2023-02-28 18:17:49 - SETUP: > j1@2024.3.
|
418
|
+
2023-02-28 18:17:49 - SETUP: > j1@2024.3.29 setup C:\Users\xxx\j1-projects\my-starter
|
419
419
|
2023-02-28 18:17:49 - SETUP: > npm --silent run setup-start && npm --silent run setup-base && run-s -s setup:*
|
420
420
|
2023-02-28 18:17:49 - SETUP:
|
421
421
|
2023-02-28 18:17:50 - SETUP: Setup project for first use ..
|
@@ -460,7 +460,7 @@ browser. Let's start the journey ...
|
|
460
460
|
Check setup state of the J1 project ...
|
461
461
|
2023-02-28 18:26:18 - SITE: Starting up your site ...
|
462
462
|
2023-02-28 18:26:18 - SITE:
|
463
|
-
2023-02-28 18:26:18 - SITE: > j1@2024.3.
|
463
|
+
2023-02-28 18:26:18 - SITE: > j1@2024.3.29 j1-site C:\Users\jadams\j1-projects\my-starter
|
464
464
|
2023-02-28 18:26:18 - SITE: > run-p -s j1-site:*
|
465
465
|
2023-02-28 18:26:18 - SITE:
|
466
466
|
2023-02-28 18:26:20 - SITE: Startup UTILSRV ..
|
@@ -499,7 +499,7 @@ Check setup state of the J1 project ...
|
|
499
499
|
REBUILD: Rebuild the projects website ...
|
500
500
|
REBUILD: Be patient, this will take a while ...
|
501
501
|
2023-02-28 18:45:09 - REBUILD:
|
502
|
-
2023-02-28 18:45:09 - REBUILD: > j1@2024.3.
|
502
|
+
2023-02-28 18:45:09 - REBUILD: > j1@2024.3.29 rebuild C:\Users\xxx\j1-projects\my-starter
|
503
503
|
2023-02-28 18:45:09 - REBUILD: > run-s -s rebuild:* && run-s -s post-rebuild:*
|
504
504
|
2023-02-28 18:45:09 - REBUILD:
|
505
505
|
2023-02-28 18:45:10 - REBUILD: Rebuild site incremental ..
|
@@ -547,7 +547,7 @@ using Lerna for all packages:
|
|
547
547
|
2023-02-28 18:29:07 - RESET: Reset the project to factory state ...
|
548
548
|
2023-02-28 18:29:07 - RESET: Be patient, this will take a while ...
|
549
549
|
2023-02-28 18:29:08 - RESET:
|
550
|
-
2023-02-28 18:29:08 - RESET: > j1@2024.3.
|
550
|
+
2023-02-28 18:29:08 - RESET: > j1@2024.3.29 reset C:\Users\xxx\j1-projects\my-starter
|
551
551
|
2023-02-28 18:29:08 - RESET: > run-s -s reset:*
|
552
552
|
2023-02-28 18:29:08 - RESET:
|
553
553
|
2023-02-28 18:29:08 - RESET: Reset project to factory state ..
|
data/lib/starter_web/_config.yml
CHANGED
@@ -53,7 +53,7 @@ environment: development
|
|
53
53
|
# ------------------------------------------------------------------------------
|
54
54
|
# Sets the build version of the site
|
55
55
|
#
|
56
|
-
version: 2024.3.
|
56
|
+
version: 2024.3.29
|
57
57
|
|
58
58
|
# copyright
|
59
59
|
# ------------------------------------------------------------------------------
|
@@ -29,6 +29,11 @@ description:
|
|
29
29
|
#
|
30
30
|
settings:
|
31
31
|
|
32
|
+
filters:
|
33
|
+
grayscale: 0
|
34
|
+
contrast: 1
|
35
|
+
brightness: 1
|
36
|
+
|
32
37
|
# ----------------------------------------------------------------------------
|
33
38
|
# DIVIDER banner
|
34
39
|
#
|
@@ -104,30 +109,36 @@ settings:
|
|
104
109
|
width: 12
|
105
110
|
type: text
|
106
111
|
position: left # left | center
|
107
|
-
title: Jekyll
|
108
|
-
tagline: <b>
|
112
|
+
title: Jekyll and J1 Template
|
113
|
+
tagline: <b>Create fast, secure, and powerful modern websites</b>
|
109
114
|
translate_description: notranslate # translate|notranslate
|
110
115
|
description_properties: mt-3 mb-3
|
111
116
|
description: >
|
112
117
|
<p class="dropcap">
|
113
|
-
|
114
|
-
create
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
118
|
+
Jekyll is a <b>static website</b> generation engine that enables to
|
119
|
+
create websites and blogs from simple text files, eliminating the
|
120
|
+
need for a database or other complex server-side processing.
|
121
|
+
The content is written in <b>simple text</b> formats such as Markdown,
|
122
|
+
AsciiDoc, or native HTML and processed into static HTML pages using
|
123
|
+
content templates powered by the templating engine <b>Liquid</b>.
|
124
|
+
<br><br>
|
125
|
+
The static web can be delivered directly to any standard web server,
|
126
|
+
as they are already generated and ready to use. Jekyll is particularly
|
127
|
+
popular for personal websites, project pages, documentation, and blogs.
|
128
|
+
Thanks to its easy versioning and deployment, Jekyll is ideal for
|
129
|
+
<b>collaborative</b> web project development - via Github for example.
|
123
130
|
</p>
|
124
131
|
<p>
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
132
|
+
Jekyll One is a fully featured, free theme and template system for the
|
133
|
+
Jekyll site generator, specifically designed to create modern, dynamic,
|
134
|
+
and responsive websites.
|
135
|
+
It features a modern design with a focus on usability and accessibility.
|
136
|
+
Additionally, it comes with built-in support for search engine optimization
|
137
|
+
(SEO) and social media integration, making it easy to get your site off
|
138
|
+
the ground and running - <b>free to use</b> for both <b>personal</b> and
|
139
|
+
<b>business purposes</b>.
|
129
140
|
</p>
|
130
|
-
<p class="mt-4 fw-bold">
|
141
|
+
<p class="mt-4 fw-bold d-flex justify-content-center flex-wrap">The most featured Bootstrap V5 Theme for Jekyll on the market.</p>
|
131
142
|
buttons:
|
132
143
|
|
133
144
|
- name: Roundtrip
|
@@ -142,7 +153,7 @@ settings:
|
|
142
153
|
icon: briefcase-search-outline
|
143
154
|
icon_color:
|
144
155
|
icon_size: 3x
|
145
|
-
href: /pages/public/tour/
|
156
|
+
href: /pages/public/tour/image_data/
|
146
157
|
target:
|
147
158
|
|
148
159
|
- name: Rocketstart
|