j1-template 2024.3.22 → 2024.3.23
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/{galeries.html → gallery_app.html} +4 -4
- data/assets/theme/bla +0 -0
- data/assets/theme/j1/adapter/js/amplitude.js +144 -52
- data/assets/theme/j1/adapter/js/gallery.js +1 -1
- data/assets/theme/j1/adapter/js/themes.js +41 -69
- data/assets/theme/j1/core/css/themes/unolight/bootstrap.css +19 -52
- data/assets/theme/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
- data/assets/theme/j1/modules/amplitudejs/js/tech/ytp.js +466 -396
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/lg-transitions.css +984 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/lg-transitions.min.css +26 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/lightgallery-bundle.css +1627 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/lightgallery-bundle.min.css +25 -0
- data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/uno.css +1 -1
- data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/uno.min.css +1 -1
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/fonts/lg.svg +54 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/fonts/lg.ttf +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/fonts/lg.woff +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/fonts/lg.woff2 +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/images/loading.gif +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/img/loading.gif +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/img/video-play.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/img/vimeo-play.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/img/youtube-play.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/lightgallery.js +2782 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/lightgallery.min.js +26 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/parser/webvtt/LICENSE.md +44 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/parser/webvtt/README.md +37 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/parser/webvtt/parser.js +890 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/parser/webvtt/parser.min.js +8 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/j1/lg-video.1.js +585 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-autoplay.js +275 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-autoplay.min.js +26 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-comment.js +230 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-comment.min.js +26 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-fullscreen.js +160 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-fullscreen.min.js +26 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-hash.js +223 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-hash.min.js +27 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-medium-zoom.js +157 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-medium-zoom.min.js +26 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-pager.js +164 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-pager.min.js +26 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-rotate.js +299 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-rotate.min.js +26 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-share.js +244 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-share.min.js +27 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-thumbnail.js +509 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-thumbnail.min.js +26 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-video.js +909 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-video.min.js +26 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-vimeo-thumbnail.js +207 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-vimeo-thumbnail.min.js +26 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-zoom.js +999 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-zoom.min.js +26 -0
- data/assets/theme/j1/modules/lightGallery/css/lg-transitions.css +3 -126
- data/assets/theme/j1/modules/lightGallery/css/lg-transitions.min.css +3 -10
- data/assets/theme/j1/modules/lightGallery/css/lightgallery-bundle.css +70 -237
- data/assets/theme/j1/modules/lightGallery/css/lightgallery-bundle.min.css +4 -10
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/animation-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/customize-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/dynamic-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/facebook-icon.svg +10 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/googleplus-icon.svg +30 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/html5-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/linked-in.png +0 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/module-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/play-button-hover.svg +94 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/play-button.png +0 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/play-button.svg +93 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/responsive-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/thumb-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/touch-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/twitter-icon.svg +15 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/twitter.png +0 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/video1-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/zoom-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/icons/zoom.png +0 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/uno.css +276 -0
- data/assets/theme/j1/modules/lightGallery/css/theme/uno/uno.min.css +17 -0
- data/assets/theme/j1/modules/lightGallery/js/lightgallery.js +163 -120
- data/assets/theme/j1/modules/lightGallery/js/lightgallery.min.js +6 -6
- data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-thumbnail.0.js +495 -0
- data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-thumbnail.1.js +513 -0
- data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-video.0.js +553 -0
- data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-video.1.js +1 -1
- data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-video.2.js +914 -0
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-autoplay.js +4 -4
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-autoplay.min.js +5 -5
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-comment.js +5 -5
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-comment.min.js +6 -6
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-fullscreen.js +4 -4
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-fullscreen.min.js +5 -5
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-hash.js +4 -4
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-hash.min.js +5 -6
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-medium-zoom.js +5 -5
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-medium-zoom.min.js +6 -6
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-pager.js +4 -4
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-pager.min.js +5 -5
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-relative-caption.js +179 -0
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-relative-caption.min.js +32 -0
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-rotate.js +4 -4
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-rotate.min.js +6 -6
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-share.js +4 -4
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-share.min.js +6 -7
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-thumbnail.js +27 -20
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-thumbnail.min.js +5 -5
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.js +77 -125
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.min.js +6 -6
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-vimeo-thumbnail.js +4 -4
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-vimeo-thumbnail.min.js +5 -5
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-zoom.js +11 -5
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-zoom.min.js +5 -5
- data/assets/theme/j1/modules/themeSwitcher/js/switcher.js +13 -12
- data/assets/theme/j1/modules/videoPlayer/tiktoc/README.md +1 -0
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/font/README.md +151 -0
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/font/VideoJS.svg +150 -0
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/city.css +147 -0
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/city.min.css +5 -0
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/fantasy.css +113 -0
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/fantasy.min.css +5 -0
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/forest.css +166 -0
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/forest.min.css +5 -0
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/sea.css +72 -0
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/sea.min.css +5 -0
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/uno.css +311 -0
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/uno.min.css +19 -0
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/videojs.css +1686 -0
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/videojs.min.css +13 -0
- data/assets/theme/j1/modules/videojs/!v8.12.0/js/video.js +65226 -0
- data/assets/theme/j1/modules/videojs/!v8.12.0/js/video.min.js +55 -0
- data/assets/theme/j1/modules/videojs/assets/README.md +1 -0
- data/assets/theme/j1/modules/videojs/assets/icons/speedometer-medium.svg +35 -0
- data/assets/theme/j1/modules/videojs/css/font/VideoJS.ttf +0 -0
- data/assets/theme/j1/modules/videojs/css/font/VideoJS.woff +0 -0
- data/assets/theme/j1/modules/videojs/css/themes/uno.css +157 -22
- data/assets/theme/j1/modules/videojs/css/themes/uno.min.css +1 -1
- data/assets/theme/j1/modules/videojs/css/videojs.css +674 -316
- data/assets/theme/j1/modules/videojs/css/videojs.min.css +4 -3
- data/assets/theme/j1/modules/videojs/js/video.js +15893 -12288
- data/assets/theme/j1/modules/videojs/js/video.min.js +22 -23
- data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/!examples/index.html +31 -0
- data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/LICENSE +19 -0
- data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/README.md +69 -0
- data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/css/aspect-ratio-panel.css +2 -0
- data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/css/aspect-ratio-panel.min.css +2 -0
- data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/js/aspect-ratio-panel.js +339 -0
- data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/js/aspect-ratio-panel.min.js +2 -0
- data/assets/theme/j1/modules/videojs/{js/plugins/controls/autocaption → plugins/controls/autocaption/js}/autocaption.js +0 -5
- data/assets/theme/j1/modules/videojs/plugins/controls/persist-settings/!examples/index.html +29 -0
- data/assets/theme/j1/modules/videojs/plugins/controls/persist-settings/LICENSE +19 -0
- data/assets/theme/j1/modules/videojs/plugins/controls/persist-settings/README.md +90 -0
- data/assets/theme/j1/modules/videojs/plugins/controls/persist-settings/js/videojs-persist.js +120 -0
- data/assets/theme/j1/modules/videojs/plugins/controls/persist-settings/js/videojs-persist.min.js +2 -0
- data/assets/theme/j1/modules/videojs/plugins/controls/playbackrate-adjuster/!examples/index.html +37 -0
- data/assets/theme/j1/modules/videojs/plugins/controls/playbackrate-adjuster/LICENSE +19 -0
- data/assets/theme/j1/modules/videojs/plugins/controls/playbackrate-adjuster/README.md +61 -0
- data/assets/theme/j1/modules/videojs/plugins/controls/playbackrate-adjuster/js/playbackrate-adjuster.js +94 -0
- data/assets/theme/j1/modules/videojs/plugins/controls/playbackrate-adjuster/js/playbackrate-adjuster.min.js +20 -0
- data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/skipbuttons/README.md +25 -11
- data/assets/theme/j1/modules/videojs/{css/plugins/controls → plugins/controls/zoom/css}/zoom.css +7 -6
- data/assets/theme/j1/modules/videojs/plugins/controls/zoom/css/zoom.min.css +22 -0
- data/assets/theme/j1/modules/videojs/{js/plugins/players/dm → plugins/players/dm/js}/dailymotion.js +1 -1
- data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.0.js +521 -0
- data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.1.js +605 -0
- data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.3.js +643 -0
- data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.4.js +583 -0
- data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.5.js +665 -0
- data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.6.js +642 -0
- data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.7.js +673 -0
- data/assets/theme/j1/modules/videojs/{js/plugins/players/vm/api → plugins/players/vm/api/js}/vimeo.js +1 -1
- data/assets/theme/j1/modules/videojs/{js/plugins/players/vm/api → plugins/players/vm/api/js}/vimeo.min.js +1 -1
- data/assets/theme/j1/modules/videojs/{js/plugins/players/vm → plugins/players/vm/js}/vimeo.js +4 -5
- data/assets/theme/j1/modules/videojs/plugins/players/vm/js/vimeo.min.js +28 -0
- data/assets/theme/j1/modules/videojs/plugins/players/wt/!unused/wistia.0.js +395 -0
- data/assets/theme/j1/modules/videojs/plugins/players/wt/!unused/wistia.1.js +401 -0
- 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/modules/amplitude_playlists.yml +16 -1
- data/lib/starter_web/_data/modules/defaults/gallery.yml +3 -3
- data/lib/starter_web/_data/modules/gallery.yml +83 -87
- data/lib/starter_web/_data/modules/navigator_menu.yml +3 -3
- data/lib/starter_web/_data/resources.yml +16 -12
- data/lib/starter_web/_data/templates/feed.xml +1 -1
- data/lib/starter_web/_plugins/asciidoctor/videojs-block.rb +50 -30
- data/lib/starter_web/_plugins/asciidoctor/youtube-block.rb +37 -23
- data/lib/starter_web/_plugins/index/lunr.rb +1 -1
- data/lib/starter_web/assets/video/poster/vimeo/fall_2011.jpg +0 -0
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/tools/tester/videojs_macro_tester.adoc +282 -0
- data/lib/starter_web/pages/public/tour/video_data.adoc +1 -0
- metadata +221 -106
- data/assets/data/swiper_app.2.html +0 -757
- data/assets/data/swiper_app.4.html +0 -769
- data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.0.css +0 -32
- data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.1.css +0 -31
- data/assets/theme/j1/modules/videojs/css/plugins/controls/zoom.min.css +0 -21
- data/assets/theme/j1/modules/videojs/js/plugins/players/vm/vimeo.min.js +0 -16
- data/assets/theme/j1/modules/videojs/js/plugins/players/wt/api/src/WistiaPlayer.ts +0 -1617
- data/lib/starter_web/assets/video/poster/vimeo/stay_colorful.jpg +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/animation-w.png +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/customize-w.png +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/dynamic-w.png +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/facebook-icon.svg +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/googleplus-icon.svg +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/html5-w.png +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/linked-in.png +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/module-w.png +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/play-button-hover.svg +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/play-button.png +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/play-button.svg +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/responsive-w.png +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/thumb-w.png +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/touch-w.png +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/twitter-icon.svg +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/twitter.png +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/video1-w.png +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/zoom-w.png +0 -0
- /data/assets/theme/j1/modules/lightGallery/{css → !v2.7.2/css}/themes/uno/icons/zoom.png +0 -0
- /data/assets/theme/j1/modules/lightGallery/{js → !v2.7.2/js}/plugins/j1/j1-video.js +0 -0
- /data/assets/theme/j1/modules/lightGallery/{js → !v2.7.2/js}/plugins/j1/j1-video.min.js +0 -0
- /data/assets/theme/j1/modules/videoPlayer/dailymotion/js/{!readme → README.md} +0 -0
- /data/assets/theme/j1/modules/videoPlayer/tiktoc/{js/player.min.js → player.min.js} +0 -0
- /data/assets/theme/j1/modules/videoPlayer/vimeo/js/{!readme → README.md} +0 -0
- /data/assets/theme/j1/modules/videoPlayer/wistia/js/{!readme → README.md} +0 -0
- /data/assets/theme/j1/modules/videojs/{css → !v8.12.0/css}/font/video-js-cdn.css +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/autocaption/LICENSE +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/autocaption/README.md +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/controls/autocaption → plugins/controls/autocaption/js}/autocaption.min.js +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/controls/hotkeys/examples → plugins/controls/hotkeys/!examples}/example.html +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/hotkeys/LICENSE.md +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/hotkeys/README.md +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/controls/hotkeys → plugins/controls/hotkeys/js}/hotkeys.js +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/controls/hotkeys → plugins/controls/hotkeys/js}/hotkeys.min.js +0 -0
- /data/assets/theme/j1/modules/videojs/{css/plugins/controls → plugins/controls/skipbuttons/css}/skipbuttons.css +0 -0
- /data/assets/theme/j1/modules/videojs/{css/plugins/controls → plugins/controls/skipbuttons/css}/skipbuttons.min.css +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/controls/skipbuttons → plugins/controls/skipbuttons/js}/skipbuttons.js +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/controls/skipbuttons → plugins/controls/skipbuttons/js}/skipbuttons.min.js +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/controls/zoom/examples → plugins/controls/zoom/!examples}/index.html +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/controls/zoom/examples → plugins/controls/zoom/!examples}/index.js +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/controls/zoom/examples → plugins/controls/zoom/!examples}/styles.css +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/zoom/LICENSE.md +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/zoom/README.md +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/controls/zoom → plugins/controls/zoom/js}/zoom.js +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/controls/zoom → plugins/controls/zoom/js}/zoom.min.js +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/examples → plugins/players/dm/!examples}/dailymotion-controls.html +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/examples → plugins/players/dm/!examples}/dailymotion-javascript.html +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/examples → plugins/players/dm/!examples}/dailymotion-playlist.html +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/examples → plugins/players/dm/!examples}/global-parameters.html +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/examples → plugins/players/dm/!examples}/simple.html +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/examples → plugins/players/dm/!examples}/switch.html +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/dm/LICENSE +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/doc → plugins/players/dm}/README.md +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/dm/api/LICENSE +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/api/doc → plugins/players/dm/api}/README.md +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/api → plugins/players/dm/api/js}/dailymotion.sdk.js +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/api → plugins/players/dm/api/js}/dailymotion.sdk.min.js +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/dm/icon/scalable/dailymotion.svg +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm → plugins/players/dm/js}/dailymotion.min.js +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/vm/examples → plugins/players/vm/!examples}/index.html +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/vm/examples → plugins/players/vm/!examples}/player/index.html +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/vm/LICENSE +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/vm/doc → plugins/players/vm}/README.md +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/vm/api/doc → plugins/players/vm/api}/README.md +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/vm/api/css/embed.player.css +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/vm/api/css/embed.player.uno.css +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/vm/api/css/player.css +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/wt/doc → plugins/players/wt}/README.md +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/wt/api/doc/Readme.txt → plugins/players/wt/api/README.md} +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/wt/api → plugins/players/wt/api/js}/wistia.min.js +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/wt → plugins/players/wt/js}/wistia.js +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/wt → plugins/players/wt/js}/wistia.min.js +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/global-parameters.html +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/simple.html +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/switch.html +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/youtube-controls.html +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/youtube-javascript.html +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/youtube-list.html +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/youtube-playlist.html +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/v3.0.0 → plugins/players/yt/!v3.0.0}/youtube.js +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/v3.0.0 → plugins/players/yt/!v3.0.0}/youtube.min.js +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/yt/LICENSE +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/doc → plugins/players/yt}/README.md +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/api → plugins/players/yt/api/js}/youtube.min.js +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt → plugins/players/yt/js}/youtube.js +0 -0
- /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt → plugins/players/yt/js}/youtube.min.js +0 -0
@@ -0,0 +1,914 @@
|
|
1
|
+
/*
|
2
|
+
# -----------------------------------------------------------------------------
|
3
|
+
# ~/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.js
|
4
|
+
# Provides lightGallery v2.8.3 JS code for the plugin lgVideo
|
5
|
+
#
|
6
|
+
# Product/Info:
|
7
|
+
# https://jekyll.one
|
8
|
+
#
|
9
|
+
# Copyright (C) 2025 Sachin Neravath
|
10
|
+
# Copyright (C) 2023-2025 Juergen Adams
|
11
|
+
#
|
12
|
+
# J1 Template is licensed under the MIT License.
|
13
|
+
# See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE
|
14
|
+
# lightGallery is licensed under the GPLv3 license
|
15
|
+
# See: https://github.com/sachinchoolur/lightGallery/blob/master/LICENSE
|
16
|
+
# -----------------------------------------------------------------------------
|
17
|
+
*/
|
18
|
+
|
19
|
+
/*!
|
20
|
+
* lightgallery | 2.8.3 | March 1st 2025
|
21
|
+
* http://www.lightgalleryjs.com/
|
22
|
+
* Copyright (c) 2020 Sachin Neravath;
|
23
|
+
* @license GPLv3
|
24
|
+
*/
|
25
|
+
|
26
|
+
(function (global, factory) {
|
27
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
28
|
+
typeof define === 'function' && define.amd ? define(factory) :
|
29
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgVideo = factory());
|
30
|
+
}(this, (function () { 'use strict';
|
31
|
+
|
32
|
+
/*! *****************************************************************************
|
33
|
+
Copyright (c) Microsoft Corporation.
|
34
|
+
|
35
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
36
|
+
purpose with or without fee is hereby granted.
|
37
|
+
|
38
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
39
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
40
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
41
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
42
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
43
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
44
|
+
PERFORMANCE OF THIS SOFTWARE.
|
45
|
+
***************************************************************************** */
|
46
|
+
|
47
|
+
var __assign = function() {
|
48
|
+
__assign = Object.assign || function __assign(t) {
|
49
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
50
|
+
s = arguments[i];
|
51
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
52
|
+
}
|
53
|
+
return t;
|
54
|
+
};
|
55
|
+
return __assign.apply(this, arguments);
|
56
|
+
};
|
57
|
+
|
58
|
+
// jadams
|
59
|
+
var videoSettings = {
|
60
|
+
autoplayFirstVideo: true,
|
61
|
+
htmlPlayerParams: false,
|
62
|
+
youTubePlayerParams: false,
|
63
|
+
vimeoPlayerParams: false,
|
64
|
+
dailymotionPlayerParams: false,
|
65
|
+
wistiaPlayerParams: false,
|
66
|
+
tiktokPlayerParams: false,
|
67
|
+
gotoNextSlideOnVideoEnd: true,
|
68
|
+
autoplayVideoOnSlide: false,
|
69
|
+
videojs: false,
|
70
|
+
videojsTheme: '',
|
71
|
+
videojsOptions: {},
|
72
|
+
};
|
73
|
+
|
74
|
+
/**
|
75
|
+
* List of lightGallery events
|
76
|
+
* All events should be documented here
|
77
|
+
* Below interfaces are used to build the website documentations
|
78
|
+
* */
|
79
|
+
var lGEvents = {
|
80
|
+
afterAppendSlide: 'lgAfterAppendSlide',
|
81
|
+
init: 'lgInit',
|
82
|
+
hasVideo: 'lgHasVideo',
|
83
|
+
containerResize: 'lgContainerResize',
|
84
|
+
updateSlides: 'lgUpdateSlides',
|
85
|
+
afterAppendSubHtml: 'lgAfterAppendSubHtml',
|
86
|
+
beforeOpen: 'lgBeforeOpen',
|
87
|
+
afterOpen: 'lgAfterOpen',
|
88
|
+
slideItemLoad: 'lgSlideItemLoad',
|
89
|
+
beforeSlide: 'lgBeforeSlide',
|
90
|
+
afterSlide: 'lgAfterSlide',
|
91
|
+
posterClick: 'lgPosterClick',
|
92
|
+
dragStart: 'lgDragStart',
|
93
|
+
dragMove: 'lgDragMove',
|
94
|
+
dragEnd: 'lgDragEnd',
|
95
|
+
beforeNextSlide: 'lgBeforeNextSlide',
|
96
|
+
beforePrevSlide: 'lgBeforePrevSlide',
|
97
|
+
beforeClose: 'lgBeforeClose',
|
98
|
+
afterClose: 'lgAfterClose',
|
99
|
+
rotateLeft: 'lgRotateLeft',
|
100
|
+
rotateRight: 'lgRotateRight',
|
101
|
+
flipHorizontal: 'lgFlipHorizontal',
|
102
|
+
flipVertical: 'lgFlipVertical',
|
103
|
+
autoplay: 'lgAutoplay',
|
104
|
+
autoplayStart: 'lgAutoplayStart',
|
105
|
+
autoplayStop: 'lgAutoplayStop',
|
106
|
+
};
|
107
|
+
|
108
|
+
var param = function (obj) {
|
109
|
+
return Object.keys(obj)
|
110
|
+
.map(function (k) {
|
111
|
+
return encodeURIComponent(k) + '=' + encodeURIComponent(obj[k]);
|
112
|
+
})
|
113
|
+
.join('&');
|
114
|
+
};
|
115
|
+
var paramsToObject = function (url) {
|
116
|
+
var paramas = url
|
117
|
+
.slice(1)
|
118
|
+
.split('&')
|
119
|
+
.map(function (p) { return p.split('='); })
|
120
|
+
.reduce(function (obj, pair) {
|
121
|
+
var _a = pair.map(decodeURIComponent), key = _a[0], value = _a[1];
|
122
|
+
obj[key] = value;
|
123
|
+
return obj;
|
124
|
+
}, {});
|
125
|
+
return paramas;
|
126
|
+
};
|
127
|
+
var getYouTubeParams = function (videoInfo, youTubePlayerParamsSettings) {
|
128
|
+
if (!videoInfo.youtube)
|
129
|
+
return '';
|
130
|
+
var slideUrlParams = videoInfo.youtube[2]
|
131
|
+
? paramsToObject(videoInfo.youtube[2])
|
132
|
+
: '';
|
133
|
+
// For youtube first params gets priority if duplicates found
|
134
|
+
var defaultYouTubePlayerParams = {
|
135
|
+
wmode: 'opaque',
|
136
|
+
autoplay: 0,
|
137
|
+
mute: 1,
|
138
|
+
enablejsapi: 1,
|
139
|
+
};
|
140
|
+
var playerParamsSettings = youTubePlayerParamsSettings || {};
|
141
|
+
var youTubePlayerParams = __assign(__assign(__assign({}, defaultYouTubePlayerParams), playerParamsSettings), slideUrlParams);
|
142
|
+
var youTubeParams = "?" + param(youTubePlayerParams);
|
143
|
+
return youTubeParams;
|
144
|
+
};
|
145
|
+
var isYouTubeNoCookie = function (url) {
|
146
|
+
return url.includes('youtube-nocookie.com');
|
147
|
+
};
|
148
|
+
var getVimeoURLParams = function (defaultParams, videoInfo) {
|
149
|
+
if (!videoInfo || !videoInfo.vimeo)
|
150
|
+
return '';
|
151
|
+
var urlParams = videoInfo.vimeo[2] || '';
|
152
|
+
var defaultVimeoPlayerParams = Object.assign({}, {
|
153
|
+
autoplay: 0,
|
154
|
+
muted: 1,
|
155
|
+
}, defaultParams);
|
156
|
+
var defaultPlayerParams = defaultVimeoPlayerParams &&
|
157
|
+
Object.keys(defaultVimeoPlayerParams).length !== 0
|
158
|
+
? param(defaultVimeoPlayerParams)
|
159
|
+
: '';
|
160
|
+
// Support private video
|
161
|
+
var urlWithHash = videoInfo.vimeo[0].split('/').pop() || '';
|
162
|
+
var urlWithHashWithParams = urlWithHash.split('?')[0] || '';
|
163
|
+
var hash = urlWithHashWithParams.split('#')[0];
|
164
|
+
var isPrivate = videoInfo.vimeo[1] !== hash;
|
165
|
+
if (isPrivate) {
|
166
|
+
urlParams = urlParams.replace("/" + hash, '');
|
167
|
+
}
|
168
|
+
urlParams =
|
169
|
+
urlParams[0] == '?' ? '&' + urlParams.slice(1) : urlParams || '';
|
170
|
+
var privateUrlParams = isPrivate ? "h=" + hash : '';
|
171
|
+
defaultPlayerParams = privateUrlParams
|
172
|
+
? "&" + defaultPlayerParams
|
173
|
+
: defaultPlayerParams;
|
174
|
+
var vimeoPlayerParams = "?" + privateUrlParams + defaultPlayerParams + urlParams;
|
175
|
+
return vimeoPlayerParams;
|
176
|
+
};
|
177
|
+
|
178
|
+
// jadams
|
179
|
+
var getTikTokURLParams = function (defaultParams, videoInfo) {
|
180
|
+
if (!videoInfo || !videoInfo.tiktok)
|
181
|
+
return '';
|
182
|
+
var urlParams = videoInfo.tiktok[2] || '';
|
183
|
+
var defaultPlayerParams = defaultParams && Object.keys(defaultParams).length !== 0
|
184
|
+
? '&' + param(defaultParams)
|
185
|
+
: '';
|
186
|
+
// Support private video
|
187
|
+
var urlWithHash = videoInfo.tiktok[0].split('/').pop() || '';
|
188
|
+
var urlWithHashWithParams = urlWithHash.split('?')[0] || '';
|
189
|
+
var hash = urlWithHashWithParams.split('#')[0];
|
190
|
+
var isPrivate = videoInfo.tiktok[1] !== hash;
|
191
|
+
if (isPrivate) {
|
192
|
+
urlParams = urlParams.replace("/" + hash, '');
|
193
|
+
}
|
194
|
+
urlParams =
|
195
|
+
urlParams[0] == '?' ? '&' + urlParams.slice(1) : urlParams || '';
|
196
|
+
// For vimeo last params gets priority if duplicates found
|
197
|
+
var tiktokPlayerParams = "?autoplay=0&muted=1" + defaultPlayerParams + urlParams;
|
198
|
+
return tiktokPlayerParams;
|
199
|
+
};
|
200
|
+
|
201
|
+
// jadams
|
202
|
+
// -------------------------------------------------------------------------
|
203
|
+
// loadVtt
|
204
|
+
// Loads a given WEBVTT file (from data path) and process loaded
|
205
|
+
// data in callback cb (function)
|
206
|
+
// -------------------------------------------------------------------------
|
207
|
+
var loadVtt = function (data_path, cb) {
|
208
|
+
var parser = new WebVTTParser();
|
209
|
+
|
210
|
+
$.ajax({
|
211
|
+
url: data_path,
|
212
|
+
type: 'GET',
|
213
|
+
success: cb,
|
214
|
+
error: function(data) {
|
215
|
+
var json_data = JSON.stringify(data, undefined, 2);
|
216
|
+
}
|
217
|
+
});
|
218
|
+
|
219
|
+
} // END loadVtt
|
220
|
+
|
221
|
+
/**
|
222
|
+
* Video module for lightGallery
|
223
|
+
* Supports HTML5, YouTube, Vimeo, Wistia, Dailymotion, TikToc
|
224
|
+
*
|
225
|
+
|
226
|
+
* @ref Youtube
|
227
|
+
* https://developers.google.com/youtube/player_parameters#enablejsapi
|
228
|
+
* https://developers.google.com/youtube/iframe_api_reference
|
229
|
+
* https://developer.chrome.com/blog/autoplay/#iframe-delegation
|
230
|
+
*
|
231
|
+
* @ref Vimeo
|
232
|
+
* https://stackoverflow.com/questions/10488943/easy-way-to-get-vimeo-id-from-a-vimeo-url
|
233
|
+
* https://vimeo.zendesk.com/hc/en-us/articles/360000121668-Starting-playback-at-a-specific-timecode
|
234
|
+
* https://vimeo.zendesk.com/hc/en-us/articles/360001494447-Using-Player-Parameters
|
235
|
+
*
|
236
|
+
* @ref Wistia
|
237
|
+
* https://wistia.com/support/integrations/wordpress(How to get url)
|
238
|
+
* https://wistia.com/support/developers/embed-options#using-embed-options
|
239
|
+
* https://wistia.com/support/developers/player-api
|
240
|
+
* https://wistia.com/support/developers/construct-an-embed-code
|
241
|
+
* http://jsfiddle.net/xvnm7xLm/
|
242
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video
|
243
|
+
* https://wistia.com/support/embed-and-share/sharing-videos
|
244
|
+
* https://private-sharing.wistia.com/medias/mwhrulrucj
|
245
|
+
*
|
246
|
+
*/
|
247
|
+
var Video = /** @class */ (function () {
|
248
|
+
function Video(instance) {
|
249
|
+
// get lightGallery core plugin instance
|
250
|
+
this.core = instance;
|
251
|
+
this.settings = __assign(__assign({}, videoSettings), this.core.settings);
|
252
|
+
return this;
|
253
|
+
}
|
254
|
+
Video.prototype.init = function () {
|
255
|
+
var _this = this;
|
256
|
+
/**
|
257
|
+
* Event triggered when video url found without poster
|
258
|
+
* Append video HTML
|
259
|
+
* Play if autoplayFirstVideo is true
|
260
|
+
*/
|
261
|
+
this.core.LGel.on(lGEvents.hasVideo + ".video", this.onHasVideo.bind(this));
|
262
|
+
this.core.LGel.on(lGEvents.posterClick + ".video", function () {
|
263
|
+
var $el = _this.core.getSlideItem(_this.core.index);
|
264
|
+
_this.loadVideoOnPosterClick($el);
|
265
|
+
});
|
266
|
+
this.core.LGel.on(lGEvents.slideItemLoad + ".video", this.onSlideItemLoad.bind(this));
|
267
|
+
// @desc fired immediately before each slide transition.
|
268
|
+
this.core.LGel.on(lGEvents.beforeSlide + ".video", this.onBeforeSlide.bind(this));
|
269
|
+
// @desc fired immediately after each slide transition.
|
270
|
+
this.core.LGel.on(lGEvents.afterSlide + ".video", this.onAfterSlide.bind(this));
|
271
|
+
};
|
272
|
+
/**
|
273
|
+
* @desc Event triggered when a slide is completely loaded
|
274
|
+
*
|
275
|
+
* @param {Event} event - lightGalley custom event
|
276
|
+
*/
|
277
|
+
Video.prototype.onSlideItemLoad = function (event) {
|
278
|
+
var _this = this;
|
279
|
+
var _a = event.detail, isFirstSlide = _a.isFirstSlide, index = _a.index;
|
280
|
+
// Should check the active slide as well as user may have moved to different slide before the first slide is loaded
|
281
|
+
if (this.settings.autoplayFirstVideo &&
|
282
|
+
isFirstSlide &&
|
283
|
+
index === this.core.index) {
|
284
|
+
// Delay is just for the transition effect on video load
|
285
|
+
setTimeout(function () {
|
286
|
+
_this.loadAndPlayVideo(index);
|
287
|
+
}, 200);
|
288
|
+
}
|
289
|
+
// Should not call on first slide. should check only if the slide is active
|
290
|
+
if (!isFirstSlide &&
|
291
|
+
this.settings.autoplayVideoOnSlide &&
|
292
|
+
index === this.core.index) {
|
293
|
+
this.loadAndPlayVideo(index);
|
294
|
+
}
|
295
|
+
};
|
296
|
+
/**
|
297
|
+
* @desc Event triggered when video url or poster found
|
298
|
+
* Append video HTML is poster is not given
|
299
|
+
* Play if autoplayFirstVideo is true
|
300
|
+
*
|
301
|
+
* @param {Event} event - Javascript Event object.
|
302
|
+
*/
|
303
|
+
Video.prototype.onHasVideo = function (event) {
|
304
|
+
var _a = event.detail, index = _a.index, src = _a.src, html5Video = _a.html5Video, hasPoster = _a.hasPoster;
|
305
|
+
if (!hasPoster) {
|
306
|
+
// All functions are called separately if poster exist in loadVideoOnPosterClick function
|
307
|
+
this.appendVideos(this.core.getSlideItem(index), {
|
308
|
+
src: src,
|
309
|
+
addClass: 'lg-object',
|
310
|
+
index: index,
|
311
|
+
html5Video: html5Video,
|
312
|
+
});
|
313
|
+
// Automatically navigate to next slide once video reaches the end.
|
314
|
+
this.gotoNextSlideOnVideoEnd(src, index);
|
315
|
+
}
|
316
|
+
};
|
317
|
+
/**
|
318
|
+
* @desc fired immediately before each slide transition.
|
319
|
+
* Pause the previous video
|
320
|
+
* Hide the download button if the slide contains YouTube, Vimeo, or Wistia videos.
|
321
|
+
*
|
322
|
+
* @param {Event} event - Javascript Event object.
|
323
|
+
* @param {number} prevIndex - Previous index of the slide.
|
324
|
+
* @param {number} index - Current index of the slide
|
325
|
+
*/
|
326
|
+
Video.prototype.onBeforeSlide = function (event) {
|
327
|
+
if (this.core.lGalleryOn) {
|
328
|
+
var prevIndex = event.detail.prevIndex;
|
329
|
+
this.pauseVideo(prevIndex);
|
330
|
+
}
|
331
|
+
};
|
332
|
+
/**
|
333
|
+
* @desc fired immediately after each slide transition.
|
334
|
+
* Play video if autoplayVideoOnSlide option is enabled.
|
335
|
+
*
|
336
|
+
* @param {Event} event - Javascript Event object.
|
337
|
+
* @param {number} prevIndex - Previous index of the slide.
|
338
|
+
* @param {number} index - Current index of the slide
|
339
|
+
* @todo should check on onSlideLoad as well if video is not loaded on after slide
|
340
|
+
*/
|
341
|
+
Video.prototype.onAfterSlide = function (event) {
|
342
|
+
var _this = this;
|
343
|
+
var _a = event.detail, index = _a.index, prevIndex = _a.prevIndex;
|
344
|
+
// Do not call on first slide
|
345
|
+
var $slide = this.core.getSlideItem(index);
|
346
|
+
if (this.settings.autoplayVideoOnSlide && index !== prevIndex) {
|
347
|
+
if ($slide.hasClass('lg-complete')) {
|
348
|
+
setTimeout(function () {
|
349
|
+
_this.loadAndPlayVideo(index);
|
350
|
+
}, 100);
|
351
|
+
}
|
352
|
+
}
|
353
|
+
};
|
354
|
+
Video.prototype.loadAndPlayVideo = function (index) {
|
355
|
+
var $slide = this.core.getSlideItem(index);
|
356
|
+
var currentGalleryItem = this.core.galleryItems[index];
|
357
|
+
if (currentGalleryItem.poster) {
|
358
|
+
this.loadVideoOnPosterClick($slide, true);
|
359
|
+
}
|
360
|
+
else {
|
361
|
+
this.playVideo(index);
|
362
|
+
}
|
363
|
+
};
|
364
|
+
/**
|
365
|
+
* Play HTML5, Youtube, Vimeo or Wistia videos in a particular slide.
|
366
|
+
* @param {number} index - Index of the slide
|
367
|
+
*/
|
368
|
+
Video.prototype.playVideo = function (index) {
|
369
|
+
this.controlVideo(index, 'play');
|
370
|
+
};
|
371
|
+
/**
|
372
|
+
* Pause HTML5, Youtube, Vimeo or Wistia videos in a particular slide.
|
373
|
+
* @param {number} index - Index of the slide
|
374
|
+
*/
|
375
|
+
Video.prototype.pauseVideo = function (index) {
|
376
|
+
this.controlVideo(index, 'pause');
|
377
|
+
};
|
378
|
+
|
379
|
+
// jadams
|
380
|
+
Video.prototype.getVideoHtml = function (src, addClass, index, html5Video) {
|
381
|
+
var video = '';
|
382
|
+
var videoInfo = this.core.galleryItems[index]
|
383
|
+
.__slideVideoInfo || {};
|
384
|
+
var currentGalleryItem = this.core.galleryItems[index];
|
385
|
+
var videoTitle = currentGalleryItem.title || currentGalleryItem.alt;
|
386
|
+
videoTitle = videoTitle ? 'title="' + videoTitle + '"' : '';
|
387
|
+
var commonIframeProps = "allowtransparency=\"true\"\n frameborder=\"0\"\n scrolling=\"no\"\n allowfullscreen\n mozallowfullscreen\n webkitallowfullscreen\n oallowfullscreen\n msallowfullscreen";
|
388
|
+
|
389
|
+
if (videoInfo.youtube) {
|
390
|
+
var videoId = 'lg-youtube' + index;
|
391
|
+
var youTubeParams = getYouTubeParams(videoInfo, this.settings.youTubePlayerParams);
|
392
|
+
var isYouTubeNoCookieURL = isYouTubeNoCookie(src);
|
393
|
+
var youtubeURL = isYouTubeNoCookieURL
|
394
|
+
? '//www.youtube-nocookie.com/'
|
395
|
+
: '//www.youtube.com/';
|
396
|
+
|
397
|
+
// var video = `
|
398
|
+
// <video
|
399
|
+
// id="${videoId}"
|
400
|
+
// class="lg-video-object lg-youtube vjs-theme-uno video-js">
|
401
|
+
// data-setup='{
|
402
|
+
// "fluid" : true,
|
403
|
+
// "techOrder": [
|
404
|
+
// "youtube", "html5"
|
405
|
+
// ],
|
406
|
+
// "sources": [{
|
407
|
+
// "type": "video/youtube",
|
408
|
+
// "src": "//youtube.com/watch?v=nV8UZJNBY6"
|
409
|
+
// }],
|
410
|
+
// "controlBar": {
|
411
|
+
// "pictureInPictureToggle": false,
|
412
|
+
// "volumePanel": {
|
413
|
+
// "inline": false
|
414
|
+
// }
|
415
|
+
// }
|
416
|
+
// }'>
|
417
|
+
// Your browser does not support HTML5 video
|
418
|
+
// </video>
|
419
|
+
// `;
|
420
|
+
|
421
|
+
var video_new = `
|
422
|
+
<iframe
|
423
|
+
id="${videoId}"
|
424
|
+
class="lg-video-object lg-youtube ${addClass}"
|
425
|
+
allow="autoplay"
|
426
|
+
title="${videoTitle}""
|
427
|
+
src="${youtubeURL}/embed${videoInfo.youtube[1]}${youTubeParams}"
|
428
|
+
${commonIframeProps}>
|
429
|
+
</iframe>
|
430
|
+
`;
|
431
|
+
|
432
|
+
video = "<iframe allow=\"autoplay\" id=" + videoId + " class=\"lg-video-object lg-youtube " + addClass + "\" " + videoTitle + " src=\"" + youtubeURL + "embed/" + (videoInfo.youtube[1] + youTubeParams) + "\" " + commonIframeProps + "></iframe>";
|
433
|
+
} else if (videoInfo.vimeo) {
|
434
|
+
var videoId = 'lg-vimeo' + index;
|
435
|
+
var playerParams = getVimeoURLParams(this.settings.vimeoPlayerParams, videoInfo);
|
436
|
+
|
437
|
+
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>";
|
438
|
+
} else if (videoInfo.wistia) {
|
439
|
+
var wistiaId = 'lg-wistia' + index;
|
440
|
+
var playerParams = param(this.settings.wistiaPlayerParams);
|
441
|
+
playerParams = playerParams ? '?' + playerParams : '';
|
442
|
+
|
443
|
+
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>";
|
444
|
+
} else if (videoInfo.dailymotion) {
|
445
|
+
var dailymotionId = 'lg-dailymotion' + index;
|
446
|
+
var playerParams = param(this.settings.dailymotionPlayerParams);
|
447
|
+
playerParams = playerParams ? '?' + playerParams : '';
|
448
|
+
|
449
|
+
video = `
|
450
|
+
<iframe
|
451
|
+
id="${dailymotionId}"
|
452
|
+
src="//dailymotion.com/embed/video/${videoInfo.dailymotion[1]}?api=1 ${playerParams}"
|
453
|
+
${videoTitle}
|
454
|
+
class="dailymotion_embed lg-video-object lg-dailymotiion ${addClass}"
|
455
|
+
name="dailymotion_embed"
|
456
|
+
${commonIframeProps}>
|
457
|
+
</iframe>
|
458
|
+
`;
|
459
|
+
|
460
|
+
} else if (videoInfo.html5) {
|
461
|
+
var html5VideoMarkup = '';
|
462
|
+
for (var i = 0; i < html5Video.source.length; i++) {
|
463
|
+
var type = html5Video.source[i].type;
|
464
|
+
var typeAttr = type ? "type=\"" + type + "\"" : '';
|
465
|
+
html5VideoMarkup += "<source src=\"" + html5Video.source[i].src + "\" " + typeAttr + ">";
|
466
|
+
}
|
467
|
+
if (html5Video.tracks) {
|
468
|
+
var _loop_1 = function (i) {
|
469
|
+
var trackAttributes = '';
|
470
|
+
var track = html5Video.tracks[i];
|
471
|
+
Object.keys(track || {}).forEach(function (key) {
|
472
|
+
trackAttributes += key + "=\"" + track[key] + "\" ";
|
473
|
+
});
|
474
|
+
html5VideoMarkup += "<track " + trackAttributes + ">";
|
475
|
+
};
|
476
|
+
for (var i = 0; i < html5Video.tracks.length; i++) {
|
477
|
+
_loop_1(i);
|
478
|
+
}
|
479
|
+
}
|
480
|
+
var html5VideoAttrs_1 = '';
|
481
|
+
var videoAttributes_1 = html5Video.attributes || {};
|
482
|
+
Object.keys(videoAttributes_1 || {}).forEach(function (key) {
|
483
|
+
html5VideoAttrs_1 += key + "=\"" + videoAttributes_1[key] + "\" ";
|
484
|
+
});
|
485
|
+
|
486
|
+
video = "<video class=\"lg-video-object lg-html5 " + (this.settings.videojs && this.settings.videojsTheme
|
487
|
+
? this.settings.videojsTheme + ' '
|
488
|
+
: '') + " " + (this.settings.videojs ? ' video-js' : '') + "\" " + html5VideoAttrs_1 + ">\n " + html5VideoMarkup + "\n Your browser does not support HTML5 video.\n </video>";
|
489
|
+
}
|
490
|
+
|
491
|
+
return video;
|
492
|
+
};
|
493
|
+
|
494
|
+
/**
|
495
|
+
* @desc - Append videos to the slide
|
496
|
+
*
|
497
|
+
* @param {HTMLElement} el - slide element
|
498
|
+
* @param {Object} videoParams - Video parameters, Contains src, class, index, htmlVideo
|
499
|
+
*/
|
500
|
+
Video.prototype.appendVideos = function (el, videoParams) {
|
501
|
+
var _a;
|
502
|
+
var videoHtml = this.getVideoHtml(videoParams.src, videoParams.addClass, videoParams.index, videoParams.html5Video);
|
503
|
+
el.find('.lg-video-cont').append(videoHtml);
|
504
|
+
var $videoElement = el.find('.lg-video-object').first();
|
505
|
+
if (videoParams.html5Video) {
|
506
|
+
$videoElement.on('mousedown.lg.video', function (e) {
|
507
|
+
e.stopPropagation();
|
508
|
+
});
|
509
|
+
}
|
510
|
+
if (this.settings.videojs && ((_a = this.core.galleryItems[videoParams.index].__slideVideoInfo) === null || _a === void 0 ? void 0 : _a.html5)) {
|
511
|
+
try {
|
512
|
+
return videojs($videoElement.get(), this.settings.videojsOptions);
|
513
|
+
}
|
514
|
+
catch (e) {
|
515
|
+
// jadams:
|
516
|
+
console.warn('lightGallery: Make sure you have included //github.com/vimeo/player.js');
|
517
|
+
}
|
518
|
+
}
|
519
|
+
};
|
520
|
+
|
521
|
+
// jadams
|
522
|
+
Video.prototype.gotoNextSlideOnVideoEnd = function (src, index) {
|
523
|
+
var _this = this;
|
524
|
+
var $videoElement = this.core
|
525
|
+
.getSlideItem(index)
|
526
|
+
.find('.lg-video-object')
|
527
|
+
.first();
|
528
|
+
var videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
|
529
|
+
if (this.settings.gotoNextSlideOnVideoEnd) {
|
530
|
+
if (videoInfo.html5) {
|
531
|
+
$videoElement.on('ended', function () {
|
532
|
+
_this.core.goToNextSlide();
|
533
|
+
});
|
534
|
+
}
|
535
|
+
else if (videoInfo.vimeo) {
|
536
|
+
try {
|
537
|
+
// https://github.com/vimeo/player.js/#ended
|
538
|
+
new Vimeo.Player($videoElement.get()).on('ended', function () {
|
539
|
+
_this.core.goToNextSlide();
|
540
|
+
});
|
541
|
+
}
|
542
|
+
catch (e) {
|
543
|
+
// jadams
|
544
|
+
console.error('lightGallery:- Make sure you have included //github.com/vimeo/player.js');
|
545
|
+
}
|
546
|
+
}
|
547
|
+
else if (videoInfo.wistia) {
|
548
|
+
try {
|
549
|
+
window._wq = window._wq || [];
|
550
|
+
// @todo Event is gettign triggered multiple times
|
551
|
+
window._wq.push({
|
552
|
+
id: $videoElement.attr('id'),
|
553
|
+
onReady: function (video) {
|
554
|
+
video.bind('end', function () {
|
555
|
+
_this.core.goToNextSlide();
|
556
|
+
});
|
557
|
+
},
|
558
|
+
});
|
559
|
+
}
|
560
|
+
catch (e) {
|
561
|
+
// jadams
|
562
|
+
console.error('lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js');
|
563
|
+
}
|
564
|
+
}
|
565
|
+
}
|
566
|
+
};
|
567
|
+
|
568
|
+
// jadams
|
569
|
+
Video.prototype.controlVideo = function (index, action) {
|
570
|
+
const vjsOptions = j1.modules.videojs.options;
|
571
|
+
var trackSrc,
|
572
|
+
$videoElement, videoInfo, videoStart, videoData, videoId,
|
573
|
+
videojsPlayer, playbackRates,
|
574
|
+
hotKeysPlugin, skipButtonsPlugin, zoomPlugin;
|
575
|
+
|
576
|
+
var playbackRatesDefaults = vjsOptions.playbackRates.values;
|
577
|
+
var chapterTracksEnabled = false;
|
578
|
+
|
579
|
+
var hotKeysPluginDefaults = {
|
580
|
+
volumeStep: vjsOptions.plugins.hotKeys.volumeStep,
|
581
|
+
seekStep: vjsOptions.plugins.hotKeys.seekStep,
|
582
|
+
enableMute: vjsOptions.plugins.hotKeys.enableMute,
|
583
|
+
enableVolumeScroll: vjsOptions.plugins.hotKeys.enableVolumeScroll,
|
584
|
+
enableHoverScroll: vjsOptions.plugins.hotKeys.enableHoverScroll,
|
585
|
+
enableFullscreen: vjsOptions.plugins.hotKeys.enableFullscreen,
|
586
|
+
enableNumbers: vjsOptions.plugins.hotKeys.enableNumbers,
|
587
|
+
enableJogStyle: vjsOptions.plugins.hotKeys.enableJogStyle,
|
588
|
+
alwaysCaptureHotkeys: vjsOptions.plugins.hotKeys.alwaysCaptureHotkeys,
|
589
|
+
captureDocumentHotkeys: vjsOptions.plugins.hotKeys.captureDocumentHotkeys,
|
590
|
+
enableModifiersForNumbers: vjsOptions.plugins.hotKeys.enableModifiersForNumbers,
|
591
|
+
enableInactiveFocus: vjsOptions.plugins.hotKeys.enableInactiveFocus,
|
592
|
+
skipInitialFocus: vjsOptions.plugins.hotKeys.skipInitialFocus
|
593
|
+
};
|
594
|
+
|
595
|
+
var skipButtonsPluginDefaults = {
|
596
|
+
backward: vjsOptions.plugins.skipButtons.backward,
|
597
|
+
forward: vjsOptions.plugins.skipButtons.forward,
|
598
|
+
backwardIndex: 0,
|
599
|
+
forwardIndex: 1
|
600
|
+
};
|
601
|
+
|
602
|
+
var zoomPluginDefaults = {
|
603
|
+
moveX: vjsOptions.plugins.zoomButtons.moveX,
|
604
|
+
moveY: vjsOptions.plugins.zoomButtons.moveY,
|
605
|
+
rotate: vjsOptions.plugins.zoomButtons.rotate,
|
606
|
+
zoom: vjsOptions.plugins.zoomButtons.zoom
|
607
|
+
};
|
608
|
+
|
609
|
+
videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
|
610
|
+
$videoElement = this.core
|
611
|
+
.getSlideItem(index)
|
612
|
+
.find('.lg-video-object')
|
613
|
+
.first()
|
614
|
+
|
615
|
+
// chapter tracks only available for VJS
|
616
|
+
//
|
617
|
+
if (this.core.galleryItems[this.core.index].video !== undefined && videoInfo.html5) {
|
618
|
+
videoData = JSON.parse(this.core.galleryItems[this.core.index].video);
|
619
|
+
|
620
|
+
if (videoData.tracks !== undefined && videoData.tracks.length > 0) {
|
621
|
+
for (var i=0; i<videoData.tracks.length; i++) {
|
622
|
+
if (videoData.tracks[i].kind == 'chapters') {
|
623
|
+
trackSrc = videoData.tracks[i].src;
|
624
|
+
chapterTracksEnabled = true;
|
625
|
+
}
|
626
|
+
}
|
627
|
+
} // END if videoData.tracks
|
628
|
+
|
629
|
+
if ($videoElement.selector !== undefined) {
|
630
|
+
videoId = $videoElement.selector.id;
|
631
|
+
videojsPlayer = videojs(videoId);
|
632
|
+
} else {
|
633
|
+
videojsPlayer = 'unknown';
|
634
|
+
}
|
635
|
+
|
636
|
+
if (videojsPlayer !== 'unknown') {
|
637
|
+
|
638
|
+
// added VJS Plugins hotKeys|skipButtons|zoom, playbackRates
|
639
|
+
// -------------------------------------------------------------
|
640
|
+
hotKeysPlugin = this.settings.videojsOptions.controlBar.hotKeysPlugin;
|
641
|
+
skipButtonsPlugin = this.settings.videojsOptions.controlBar.skipButtonsPlugin;
|
642
|
+
zoomPlugin = this.settings.videojsOptions.controlBar.zoomPlugin;
|
643
|
+
playbackRates = (this.settings.videojsOptions.controlBar.playbackRates !== undefined) ? this.settings.videojsOptions.controlBar.playbackRates : playbackRatesDefaults;
|
644
|
+
|
645
|
+
// jadams, 2024-01-22: added video start position
|
646
|
+
// -------------------------------------------------------------
|
647
|
+
if (this.settings.videojsOptions.videoStart !== undefined) {
|
648
|
+
videoStart = this.settings.videojsOptions.videoStart[index];
|
649
|
+
videojsPlayer.on("play", function() {
|
650
|
+
var startFromSecond = new Date('1970-01-01T' + videoStart + 'Z').getTime() / 1000;
|
651
|
+
videojsPlayer.currentTime(startFromSecond);
|
652
|
+
}); // END on event play
|
653
|
+
} // END if videoStart
|
654
|
+
|
655
|
+
// add playbackRates (only available for VJS)
|
656
|
+
if (videojsPlayer.playbackRates !== undefined) {
|
657
|
+
videojsPlayer.playbackRates(playbackRates);
|
658
|
+
}
|
659
|
+
|
660
|
+
// add hotkeys Plugin (only available for VJS)
|
661
|
+
if (hotKeysPlugin !== undefined && hotKeysPlugin.enabled && videojsPlayer.hotKeys !== undefined) {
|
662
|
+
|
663
|
+
// merge objects
|
664
|
+
hotKeysPlugin.options = __assign(__assign({}, hotKeysPluginDefaults), hotKeysPlugin.options);
|
665
|
+
|
666
|
+
// prevent multiple plugin instances
|
667
|
+
var hotKeysActive = false;
|
668
|
+
if (videojsPlayer.activePlugins_ !== undefined && videojsPlayer.activePlugins_.hotKeys !== undefined) {
|
669
|
+
hotKeysActive = videojsPlayer.activePlugins_.hotKeys;
|
670
|
+
}
|
671
|
+
|
672
|
+
if (!hotKeysActive) {
|
673
|
+
videojsPlayer.hotKeys({
|
674
|
+
volumeStep: hotKeysPlugin.options.volumeStep,
|
675
|
+
seekStep: hotKeysPlugin.options.seekStep,
|
676
|
+
enableMute: hotKeysPlugin.options.enableMute,
|
677
|
+
enableFullscreen: hotKeysPlugin.options.enableFullscreen,
|
678
|
+
enableNumbers: hotKeysPlugin.options.enableNumbers,
|
679
|
+
enableVolumeScroll: hotKeysPlugin.options.enableVolumeScroll,
|
680
|
+
enableHoverScroll: hotKeysPlugin.options.enableHoverScroll,
|
681
|
+
alwaysCaptureHotkeys: hotKeysPlugin.options.alwaysCaptureHotkeys,
|
682
|
+
captureDocumentHotkeys: hotKeysPlugin.options.captureDocumentHotkeys,
|
683
|
+
documentHotkeysFocusElementFilter: hotKeysPlugin.options.documentHotkeysFocusElementFilter,
|
684
|
+
|
685
|
+
// Mimic VLC seek behavior (default to: 15)
|
686
|
+
seekStep: function(e) {
|
687
|
+
if (e.ctrlKey && e.altKey) {
|
688
|
+
return 5*60;
|
689
|
+
} else if (e.ctrlKey) {
|
690
|
+
return 60;
|
691
|
+
} else if (e.altKey) {
|
692
|
+
return 10;
|
693
|
+
} else {
|
694
|
+
return 15;
|
695
|
+
}
|
696
|
+
}
|
697
|
+
|
698
|
+
});
|
699
|
+
} // END if hotKeysActive
|
700
|
+
|
701
|
+
} // END if hotKeysPlugin enabled
|
702
|
+
|
703
|
+
// add skipButtons Plugin (only available for VJS)
|
704
|
+
// -------------------------------------------------------------
|
705
|
+
if (skipButtonsPlugin !== undefined && skipButtonsPlugin.enabled && videojsPlayer.skipButtons !== undefined) {
|
706
|
+
// merge objects
|
707
|
+
skipButtonsPlugin.options = __assign(__assign({}, skipButtonsPluginDefaults), skipButtonsPlugin.options);
|
708
|
+
|
709
|
+
// prevent multiple plugin instances
|
710
|
+
var skipButtonsActive = false;
|
711
|
+
if (videojsPlayer.activePlugins_ !== undefined && videojsPlayer.activePlugins_.skipButtons !== undefined) {
|
712
|
+
skipButtonsActive = videojsPlayer.activePlugins_.skipButtons;
|
713
|
+
}
|
714
|
+
|
715
|
+
if (!skipButtonsActive) {
|
716
|
+
videojsPlayer.skipButtons({
|
717
|
+
backward: skipButtonsPlugin.options.backward,
|
718
|
+
forward: skipButtonsPlugin.options.forward,
|
719
|
+
backwardIndex: skipButtonsPlugin.options.backwardIndex,
|
720
|
+
forwardIndex: skipButtonsPlugin.options.forwardIndex
|
721
|
+
});
|
722
|
+
}
|
723
|
+
|
724
|
+
} // END if skipButtons Plugin enabled
|
725
|
+
|
726
|
+
// add zoom Plugin (only available for VJS)
|
727
|
+
// -----------------------------------------------------------------
|
728
|
+
if (zoomPlugin !== undefined && zoomPlugin.enabled && videojsPlayer.zoomButtons !== undefined) {
|
729
|
+
// merge objects
|
730
|
+
zoomPlugin.options = __assign(__assign({}, zoomPluginDefaults), zoomPlugin.options);
|
731
|
+
|
732
|
+
// prevent multiple plugin instances
|
733
|
+
var zoomButtonsActive = false;
|
734
|
+
if (videojsPlayer.activePlugins_ !== undefined && videojsPlayer.activePlugins_.zoomButtons !== undefined) {
|
735
|
+
zoomButtonsActive = videojsPlayer.activePlugins_.zoomButtons;
|
736
|
+
}
|
737
|
+
|
738
|
+
if (!zoomButtonsActive) {
|
739
|
+
videojsPlayer.zoomButtons({
|
740
|
+
moveX: zoomPlugin.options.moveX,
|
741
|
+
moveY: zoomPlugin.options.moveY,
|
742
|
+
rotate: zoomPlugin.options.rotate,
|
743
|
+
zoom: zoomPlugin.options.zoom
|
744
|
+
});
|
745
|
+
}
|
746
|
+
|
747
|
+
} // END if zoom Plugin enabled
|
748
|
+
|
749
|
+
// chapter track processing (only available for VJS)
|
750
|
+
// -----------------------------------------------------------------
|
751
|
+
if (chapterTracksEnabled) {
|
752
|
+
var parser = new WebVTTParser();
|
753
|
+
var markers = [];
|
754
|
+
|
755
|
+
function cb_load (data /* ,textStatus, jqXHR */ ) {
|
756
|
+
var tree = parser.parse(data, 'metadata');
|
757
|
+
var marker;
|
758
|
+
|
759
|
+
// add chapter tracks to markers array
|
760
|
+
for (var i=0; i<tree.cues.length; i++) {
|
761
|
+
marker = { time: tree.cues[i].startTime, label: tree.cues[i].text };
|
762
|
+
markers.push(marker);
|
763
|
+
}
|
764
|
+
}; // END function cb_load
|
765
|
+
|
766
|
+
// load chapter tracks
|
767
|
+
// -------------------------------------------------------------
|
768
|
+
loadVtt(trackSrc, cb_load);
|
769
|
+
|
770
|
+
// add chapter tracks on play
|
771
|
+
videojsPlayer.on("play", function() {
|
772
|
+
videojsPlayer.currentTime(videoStart);
|
773
|
+
|
774
|
+
var total = videojsPlayer.duration();
|
775
|
+
var timeline = $(videojsPlayer.controlBar.progressControl.children_[0].el_);
|
776
|
+
|
777
|
+
// add chapter tracks on timeline (delayed)
|
778
|
+
setTimeout (function() {
|
779
|
+
var markers_loaded = setInterval (function () {
|
780
|
+
if (markers.length) {
|
781
|
+
for (var i=0; i<markers.length; i++) {
|
782
|
+
var left = (markers[i].time / total * 100) + '%';
|
783
|
+
var time = markers[i].time;
|
784
|
+
var el = $('<div class="vjs-chapter-marker" style="left: ' +left+ '" data-time="' +time+ '"> <span>' +markers[i].label+ '</span></div>');
|
785
|
+
|
786
|
+
el.click(function() {
|
787
|
+
videojsPlayer.currentTime($(this).data('time'));
|
788
|
+
});
|
789
|
+
|
790
|
+
timeline.append(el);
|
791
|
+
}
|
792
|
+
clearInterval(markers_loaded);
|
793
|
+
}
|
794
|
+
}, 10); // END markers_loaded
|
795
|
+
}, 1000 ); // END setTimeout
|
796
|
+
|
797
|
+
}); // END on "play"
|
798
|
+
|
799
|
+
} // END if chapterTracksEnabled
|
800
|
+
|
801
|
+
} // END if videojsPlayer is defined
|
802
|
+
|
803
|
+
} // END if videoInfo.html5
|
804
|
+
|
805
|
+
if (!$videoElement.get())
|
806
|
+
return;
|
807
|
+
if (videoInfo.youtube) {
|
808
|
+
try {
|
809
|
+
$videoElement.get().contentWindow.postMessage("{\"event\":\"command\",\"func\":\"" + action + "Video\",\"args\":\"\"}", '*');
|
810
|
+
}
|
811
|
+
catch (e) {
|
812
|
+
console.error("lightGallery:- " + e);
|
813
|
+
}
|
814
|
+
}
|
815
|
+
else if (videoInfo.vimeo) {
|
816
|
+
try {
|
817
|
+
new Vimeo.Player($videoElement.get())[action]();
|
818
|
+
}
|
819
|
+
catch (e) {
|
820
|
+
console.warn('lightGallery: Make sure you have included //github.com/vimeo/player.js');
|
821
|
+
}
|
822
|
+
}
|
823
|
+
else if (videoInfo.html5) {
|
824
|
+
if (this.settings.videojs) {
|
825
|
+
try {
|
826
|
+
videojs($videoElement.get())[action]();
|
827
|
+
}
|
828
|
+
catch (e) {
|
829
|
+
console.warn('lightGallery: Make sure you have included videojs');
|
830
|
+
}
|
831
|
+
}
|
832
|
+
else {
|
833
|
+
$videoElement.get()[action]();
|
834
|
+
}
|
835
|
+
}
|
836
|
+
else if (videoInfo.wistia) {
|
837
|
+
try {
|
838
|
+
window._wq = window._wq || [];
|
839
|
+
// @todo Find a way to destroy wistia player instance
|
840
|
+
window._wq.push({
|
841
|
+
id: $videoElement.attr('id'),
|
842
|
+
onReady: function (video) {
|
843
|
+
video[action]();
|
844
|
+
},
|
845
|
+
});
|
846
|
+
}
|
847
|
+
catch (e) {
|
848
|
+
console.warn('lightGallery: Make sure you have included //fast.wistia.com/assets/external/E-v1.js');
|
849
|
+
}
|
850
|
+
}
|
851
|
+
|
852
|
+
}; // END controlVideo
|
853
|
+
|
854
|
+
Video.prototype.loadVideoOnPosterClick = function ($el, forcePlay) {
|
855
|
+
var _this = this;
|
856
|
+
// check slide has poster
|
857
|
+
if (!$el.hasClass('lg-video-loaded')) {
|
858
|
+
// check already video element present
|
859
|
+
if (!$el.hasClass('lg-has-video')) {
|
860
|
+
$el.addClass('lg-has-video');
|
861
|
+
var _html = void 0;
|
862
|
+
var _src = this.core.galleryItems[this.core.index].src;
|
863
|
+
var video = this.core.galleryItems[this.core.index].video;
|
864
|
+
if (video) {
|
865
|
+
_html =
|
866
|
+
typeof video === 'string' ? JSON.parse(video) : video;
|
867
|
+
}
|
868
|
+
var videoJsPlayer_1 = this.appendVideos($el, {
|
869
|
+
src: _src,
|
870
|
+
addClass: '',
|
871
|
+
index: this.core.index,
|
872
|
+
html5Video: _html,
|
873
|
+
});
|
874
|
+
this.gotoNextSlideOnVideoEnd(_src, this.core.index);
|
875
|
+
var $tempImg = $el.find('.lg-object').first().get();
|
876
|
+
// @todo make sure it is working
|
877
|
+
$el.find('.lg-video-cont').first().append($tempImg);
|
878
|
+
$el.addClass('lg-video-loading');
|
879
|
+
videoJsPlayer_1 &&
|
880
|
+
videoJsPlayer_1.ready(function () {
|
881
|
+
videoJsPlayer_1.on('loadedmetadata', function () {
|
882
|
+
_this.onVideoLoadAfterPosterClick($el, _this.core.index);
|
883
|
+
});
|
884
|
+
});
|
885
|
+
$el.find('.lg-video-object')
|
886
|
+
.first()
|
887
|
+
.on('load.lg error.lg loadedmetadata.lg', function () {
|
888
|
+
setTimeout(function () {
|
889
|
+
_this.onVideoLoadAfterPosterClick($el, _this.core.index);
|
890
|
+
}, 50);
|
891
|
+
});
|
892
|
+
}
|
893
|
+
else {
|
894
|
+
this.playVideo(this.core.index);
|
895
|
+
}
|
896
|
+
}
|
897
|
+
else if (forcePlay) {
|
898
|
+
this.playVideo(this.core.index);
|
899
|
+
}
|
900
|
+
};
|
901
|
+
Video.prototype.onVideoLoadAfterPosterClick = function ($el, index) {
|
902
|
+
$el.addClass('lg-video-loaded');
|
903
|
+
this.playVideo(index);
|
904
|
+
};
|
905
|
+
Video.prototype.destroy = function () {
|
906
|
+
this.core.LGel.off('.lg.video');
|
907
|
+
this.core.LGel.off('.video');
|
908
|
+
};
|
909
|
+
return Video;
|
910
|
+
}());
|
911
|
+
|
912
|
+
return Video;
|
913
|
+
|
914
|
+
})));
|