j1-template 2024.3.23 → 2024.3.24

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.
Files changed (199) hide show
  1. checksums.yaml +4 -4
  2. data/assets/data/gallery_app.html +102 -14
  3. data/assets/theme/j1/adapter/js/gallery.js +13 -2
  4. data/assets/theme/j1/core/css/themes/unolight/bootstrap.css +29 -0
  5. data/assets/theme/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
  6. data/assets/theme/j1/core/css/vendor.css +1 -1
  7. data/assets/theme/j1/core/css/vendor.min.css +1 -1
  8. data/assets/theme/j1/modules/lightGallery/js/lightgallery.js +36 -17
  9. data/assets/theme/j1/modules/lightGallery/js/lightgallery.min.js +1 -8
  10. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.js +423 -297
  11. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.min.js +1 -8
  12. data/assets/theme/j1/modules/rtable/css/theme/uno/rtable.css +11 -1
  13. data/assets/theme/j1/modules/videojs/css/themes/uno.css +41 -29
  14. data/assets/theme/j1/modules/videojs/css/themes/uno.min.css +1 -1
  15. data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/!examples/index.html +4 -9
  16. data/assets/theme/j1/modules/videojs/plugins/controls/hotkeys/!examples/example.html +1 -1
  17. data/assets/theme/j1/modules/videojs/plugins/controls/persist-settings/!examples/index.html +3 -7
  18. data/assets/theme/j1/modules/videojs/plugins/controls/playbackrate-adjuster/!examples/index.html +3 -8
  19. data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/dailymotion-controls.html +4 -4
  20. data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/dailymotion-javascript.html +3 -3
  21. data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/dailymotion-playlist.html +3 -3
  22. data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/global-parameters.html +3 -3
  23. data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/simple.html +15 -4
  24. data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/switch.html +3 -3
  25. data/assets/theme/j1/modules/videojs/plugins/players/vm/!examples/index.html +3 -3
  26. data/assets/theme/j1/modules/videojs/plugins/players/vm/!examples/player/index.html +3 -3
  27. data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/global-parameters.html +5 -5
  28. data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/simple.html +5 -5
  29. data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/switch.html +5 -5
  30. data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/youtube-controls.html +5 -5
  31. data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/youtube-javascript.html +5 -5
  32. data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/youtube-list.html +5 -5
  33. data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/youtube-playlist.html +5 -5
  34. data/lib/j1/version.rb +1 -1
  35. data/lib/starter_web/README.md +5 -5
  36. data/lib/starter_web/_config.yml +1 -1
  37. data/lib/starter_web/_data/blocks/banner.yml +2 -2
  38. data/lib/starter_web/_data/modules/attics.yml +11 -0
  39. data/lib/starter_web/_data/modules/carousel.yml +1 -1
  40. data/lib/starter_web/_data/modules/defaults/masonry.yml +115 -22
  41. data/lib/starter_web/_data/modules/gallery.yml +163 -215
  42. data/lib/starter_web/_data/modules/masonry.yml +6 -0
  43. data/lib/starter_web/_data/templates/feed.xml +1 -1
  44. data/lib/starter_web/_includes/attributes.asciidoc +7 -0
  45. data/lib/starter_web/_plugins/index/lunr.rb +1 -1
  46. data/lib/starter_web/assets/image/module/attic/1920x1280/alexander-redl.jpg +0 -0
  47. data/lib/starter_web/assets/image/module/attic/1920x1280/alexander-shatov.jpg +0 -0
  48. data/lib/starter_web/assets/image/module/attic/1920x1280/alexey-ruban.jpg +0 -0
  49. data/lib/starter_web/assets/image/module/attic/1920x1280/andrea-badino.jpg +0 -0
  50. data/lib/starter_web/assets/image/module/attic/1920x1280/bootstrap-modal.jpg +0 -0
  51. data/lib/starter_web/assets/image/module/attic/1920x1280/bp-miller.jpg +0 -0
  52. data/lib/starter_web/assets/image/module/attic/1920x1280/brad-neathery.jpg +0 -0
  53. data/lib/starter_web/assets/image/module/attic/1920x1280/brigitta-schneiter.jpg +0 -0
  54. data/lib/starter_web/assets/image/module/attic/1920x1280/build-with-gemini.jpg +0 -0
  55. data/lib/starter_web/assets/image/module/attic/1920x1280/clem-onojeghuo.jpg +0 -0
  56. data/lib/starter_web/assets/image/module/attic/1920x1280/crawford-jolly.jpg +0 -0
  57. data/lib/starter_web/assets/image/module/attic/1920x1280/eleni-afiontzi.jpg +0 -0
  58. data/lib/starter_web/assets/image/module/attic/1920x1280/fly-d.jpg +0 -0
  59. data/lib/starter_web/assets/image/module/attic/1920x1280/guillaume-bolduc.jpg +0 -0
  60. data/lib/starter_web/assets/image/module/attic/1920x1280/ideas-start-here-1920x1280.jpg +0 -0
  61. data/lib/starter_web/assets/image/module/attic/1920x1280/isaac-davis.jpg +0 -0
  62. data/lib/starter_web/assets/image/module/attic/1920x1280/j1-content-mockup-2.jpg +0 -0
  63. data/lib/starter_web/assets/image/module/attic/1920x1280/j1-content-mockup-3.jpg +0 -0
  64. data/lib/starter_web/assets/image/module/attic/1920x1280/j1-starter-mockup-1.jpg +0 -0
  65. data/lib/starter_web/assets/image/module/attic/1920x1280/john-schnobrich-2.jpg +0 -0
  66. data/lib/starter_web/assets/image/module/attic/1920x1280/josep-martins.jpg +0 -0
  67. data/lib/starter_web/assets/image/module/attic/1920x1280/josh-liu.jpg +0 -0
  68. data/lib/starter_web/assets/image/module/attic/1920x1280/kelly-sikkemal.jpg +0 -0
  69. data/lib/starter_web/assets/image/module/attic/1920x1280/kira-auf-der-heide.jpg +0 -0
  70. data/lib/starter_web/assets/image/module/attic/1920x1280/kristopher-roller.jpg +0 -0
  71. data/lib/starter_web/assets/image/module/attic/1920x1280/markus-spiske.jpg +0 -0
  72. data/lib/starter_web/assets/image/module/attic/1920x1280/martin-sanchez.jpg +0 -0
  73. data/lib/starter_web/assets/image/module/attic/1920x1280/material_symbols.jpg +0 -0
  74. data/lib/starter_web/assets/image/module/attic/1920x1280/matthaeus.jpg +0 -0
  75. data/lib/starter_web/assets/image/module/attic/1920x1280/melanie-deziel.jpg +0 -0
  76. data/lib/starter_web/assets/image/module/attic/1920x1280/milad-fakurian.jpg +0 -0
  77. data/lib/starter_web/assets/image/module/attic/1920x1280/mohammad-rahmani.jpg +0 -0
  78. data/lib/starter_web/assets/image/module/attic/1920x1280/nasa.jpg +0 -0
  79. data/lib/starter_web/assets/image/module/attic/1920x1280/quino-al-2.jpg +0 -0
  80. data/lib/starter_web/assets/image/module/attic/1920x1280/stories-ink-tattoo-care.jpg +0 -0
  81. data/lib/starter_web/assets/image/module/attic/1920x1280/towfiqu-barbhuiya.jpg +0 -0
  82. data/lib/starter_web/assets/image/page/tour/bootswatch-themes.jpg +0 -0
  83. data/lib/starter_web/index.html +3 -2
  84. data/lib/starter_web/package.json +1 -1
  85. data/lib/starter_web/pages/public/panels/intro_panel/_includes/attributes.asciidoc +1 -1
  86. data/lib/starter_web/pages/public/tools/previewer/preview_bootstrap_theme.adoc +5 -5
  87. data/lib/starter_web/pages/public/tools/tester/app_tester_amplitudejs_yt.adoc +7 -3
  88. data/lib/starter_web/pages/public/tools/tester/app_tester_swiperjs.adoc +7 -3
  89. data/lib/starter_web/pages/public/tools/tester/videojs_macro_tester.adoc +18 -3
  90. data/lib/starter_web/pages/public/tour/_includes/attributes.asciidoc +1 -2
  91. data/lib/starter_web/pages/public/tour/_includes/documents/themes_bootstrap.asciidoc +1 -1
  92. data/lib/starter_web/pages/public/tour/asciidoc_extensions.adoc +7 -3
  93. data/lib/starter_web/pages/public/tour/bootstrap_themes.adoc +62 -7
  94. data/lib/starter_web/pages/public/tour/icon_fonts.adoc +4 -8
  95. data/lib/starter_web/pages/public/tour/modal_extentions.adoc +2 -2
  96. data/lib/starter_web/pages/public/tour/responsive_tables.adoc +21 -15
  97. data/lib/starter_web/pages/public/tour/typography.adoc +5 -5
  98. data/lib/starter_web/pages/public/tour/video_data.adoc +24 -5
  99. metadata +11 -102
  100. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/lg-transitions.css +0 -984
  101. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/lg-transitions.min.css +0 -26
  102. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/lightgallery-bundle.css +0 -1627
  103. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/lightgallery-bundle.min.css +0 -25
  104. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/animation-w.png +0 -0
  105. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/customize-w.png +0 -0
  106. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/dynamic-w.png +0 -0
  107. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/facebook-icon.svg +0 -10
  108. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/googleplus-icon.svg +0 -30
  109. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/html5-w.png +0 -0
  110. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/linked-in.png +0 -0
  111. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/module-w.png +0 -0
  112. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/play-button-hover.svg +0 -94
  113. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/play-button.png +0 -0
  114. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/play-button.svg +0 -93
  115. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/responsive-w.png +0 -0
  116. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/thumb-w.png +0 -0
  117. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/touch-w.png +0 -0
  118. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/twitter-icon.svg +0 -15
  119. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/twitter.png +0 -0
  120. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/video1-w.png +0 -0
  121. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/zoom-w.png +0 -0
  122. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/zoom.png +0 -0
  123. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/uno.css +0 -140
  124. data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/uno.min.css +0 -19
  125. data/assets/theme/j1/modules/lightGallery/!v2.7.2/fonts/lg.svg +0 -54
  126. data/assets/theme/j1/modules/lightGallery/!v2.7.2/fonts/lg.ttf +0 -0
  127. data/assets/theme/j1/modules/lightGallery/!v2.7.2/fonts/lg.woff +0 -0
  128. data/assets/theme/j1/modules/lightGallery/!v2.7.2/fonts/lg.woff2 +0 -0
  129. data/assets/theme/j1/modules/lightGallery/!v2.7.2/images/loading.gif +0 -0
  130. data/assets/theme/j1/modules/lightGallery/!v2.7.2/img/loading.gif +0 -0
  131. data/assets/theme/j1/modules/lightGallery/!v2.7.2/img/video-play.png +0 -0
  132. data/assets/theme/j1/modules/lightGallery/!v2.7.2/img/vimeo-play.png +0 -0
  133. data/assets/theme/j1/modules/lightGallery/!v2.7.2/img/youtube-play.png +0 -0
  134. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/lightgallery.js +0 -2782
  135. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/lightgallery.min.js +0 -26
  136. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/parser/webvtt/LICENSE.md +0 -44
  137. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/parser/webvtt/README.md +0 -37
  138. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/parser/webvtt/parser.js +0 -890
  139. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/parser/webvtt/parser.min.js +0 -8
  140. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/j1/j1-video.js +0 -402
  141. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/j1/j1-video.min.js +0 -7
  142. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/j1/lg-video.1.js +0 -585
  143. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-autoplay.js +0 -275
  144. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-autoplay.min.js +0 -26
  145. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-comment.js +0 -230
  146. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-comment.min.js +0 -26
  147. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-fullscreen.js +0 -160
  148. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-fullscreen.min.js +0 -26
  149. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-hash.js +0 -223
  150. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-hash.min.js +0 -27
  151. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-medium-zoom.js +0 -157
  152. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-medium-zoom.min.js +0 -26
  153. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-pager.js +0 -164
  154. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-pager.min.js +0 -26
  155. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-rotate.js +0 -299
  156. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-rotate.min.js +0 -26
  157. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-share.js +0 -244
  158. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-share.min.js +0 -27
  159. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-thumbnail.js +0 -509
  160. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-thumbnail.min.js +0 -26
  161. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-video.js +0 -909
  162. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-video.min.js +0 -26
  163. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-vimeo-thumbnail.js +0 -207
  164. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-vimeo-thumbnail.min.js +0 -26
  165. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-zoom.js +0 -999
  166. data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-zoom.min.js +0 -26
  167. data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-thumbnail.0.js +0 -495
  168. data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-thumbnail.1.js +0 -513
  169. data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-video.0.js +0 -553
  170. data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-video.1.js +0 -585
  171. data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-video.2.js +0 -914
  172. data/assets/theme/j1/modules/videojs/!v8.12.0/css/font/README.md +0 -151
  173. data/assets/theme/j1/modules/videojs/!v8.12.0/css/font/VideoJS.svg +0 -150
  174. data/assets/theme/j1/modules/videojs/!v8.12.0/css/font/video-js-cdn.css +0 -2012
  175. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/city.css +0 -147
  176. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/city.min.css +0 -5
  177. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/fantasy.css +0 -113
  178. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/fantasy.min.css +0 -5
  179. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/forest.css +0 -166
  180. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/forest.min.css +0 -5
  181. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/sea.css +0 -72
  182. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/sea.min.css +0 -5
  183. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/uno.css +0 -311
  184. data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/uno.min.css +0 -19
  185. data/assets/theme/j1/modules/videojs/!v8.12.0/css/videojs.css +0 -1686
  186. data/assets/theme/j1/modules/videojs/!v8.12.0/css/videojs.min.css +0 -13
  187. data/assets/theme/j1/modules/videojs/!v8.12.0/js/video.js +0 -65226
  188. data/assets/theme/j1/modules/videojs/!v8.12.0/js/video.min.js +0 -55
  189. data/lib/starter_web/_data/modules/gallery_app.yml +0 -1002
  190. data/lib/starter_web/_data/modules/gallery_playlists.yml +0 -534
  191. data/lib/starter_web/assets/image/module/attic/1920x1280/alina-grubnyak.jpg +0 -0
  192. data/lib/starter_web/assets/image/module/attic/1920x1280/bruno-figueiredo.jpg +0 -0
  193. data/lib/starter_web/assets/image/module/attic/1920x1280/harpal-singh.jpg +0 -0
  194. data/lib/starter_web/assets/image/module/attic/1920x1280/hayden-mills-2.jpg +0 -0
  195. data/lib/starter_web/assets/image/module/attic/1920x1280/j1-content-mockup-1.jpg +0 -0
  196. data/lib/starter_web/assets/image/module/attic/1920x1280/recha-oktaviani.jpg +0 -0
  197. data/lib/starter_web/assets/image/module/attic/1920x1280/tiny_desk.jpg +0 -0
  198. data/lib/starter_web/assets/image/module/attic/ideas-start-here-1920x1280-bw.jpg +0 -0
  199. data/lib/starter_web/assets/image/module/attic/ideas-start-here-1920x1280.jpg +0 -0
@@ -1,585 +0,0 @@
1
- /*
2
- # -----------------------------------------------------------------------------
3
- # ~/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.js
4
- # Provides lightGallery 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.7.2 | September 20th 2023
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
- var videoSettings = {
59
- autoplayFirstVideo: true,
60
- youTubePlayerParams: false,
61
- vimeoPlayerParams: false,
62
- wistiaPlayerParams: false,
63
- dailymotionPlayerParams: false,
64
- vkPlayerParams: false,
65
- gotoNextSlideOnVideoEnd: true,
66
- autoplayVideoOnSlide: false,
67
- videojs: false,
68
- videojsTheme: '',
69
- videojsOptions: {},
70
- };
71
-
72
- /**
73
- * List of lightGallery events
74
- * All events should be documented here
75
- * Below interfaces are used to build the website documentations
76
- * */
77
- var lGEvents = {
78
- afterAppendSlide: 'lgAfterAppendSlide',
79
- init: 'lgInit',
80
- hasVideo: 'lgHasVideo',
81
- containerResize: 'lgContainerResize',
82
- updateSlides: 'lgUpdateSlides',
83
- afterAppendSubHtml: 'lgAfterAppendSubHtml',
84
- beforeOpen: 'lgBeforeOpen',
85
- afterOpen: 'lgAfterOpen',
86
- slideItemLoad: 'lgSlideItemLoad',
87
- beforeSlide: 'lgBeforeSlide',
88
- afterSlide: 'lgAfterSlide',
89
- posterClick: 'lgPosterClick',
90
- dragStart: 'lgDragStart',
91
- dragMove: 'lgDragMove',
92
- dragEnd: 'lgDragEnd',
93
- beforeNextSlide: 'lgBeforeNextSlide',
94
- beforePrevSlide: 'lgBeforePrevSlide',
95
- beforeClose: 'lgBeforeClose',
96
- afterClose: 'lgAfterClose',
97
- rotateLeft: 'lgRotateLeft',
98
- rotateRight: 'lgRotateRight',
99
- flipHorizontal: 'lgFlipHorizontal',
100
- flipVertical: 'lgFlipVertical',
101
- autoplay: 'lgAutoplay',
102
- autoplayStart: 'lgAutoplayStart',
103
- autoplayStop: 'lgAutoplayStop',
104
- };
105
-
106
- var param = function (obj) {
107
- return Object.keys(obj)
108
- .map(function (k) {
109
- return encodeURIComponent(k) + '=' + encodeURIComponent(obj[k]);
110
- })
111
- .join('&');
112
- };
113
- var paramsToObject = function (url) {
114
- var paramas = url
115
- .slice(1)
116
- .split('&')
117
- .map(function (p) { return p.split('='); })
118
- .reduce(function (obj, pair) {
119
- var _a = pair.map(decodeURIComponent), key = _a[0], value = _a[1];
120
- obj[key] = value;
121
- return obj;
122
- }, {});
123
- return paramas;
124
- };
125
- var getYouTubeParams = function (videoInfo, youTubePlayerParamsSettings) {
126
- if (!videoInfo.youtube)
127
- return '';
128
- var slideUrlParams = videoInfo.youtube[2]
129
- ? paramsToObject(videoInfo.youtube[2])
130
- : '';
131
- // For youtube first params gets priority if duplicates found
132
- var defaultYouTubePlayerParams = {
133
- wmode: 'opaque',
134
- autoplay: 1,
135
- mute: 0,
136
- enablejsapi: 1,
137
- };
138
- var playerParamsSettings = youTubePlayerParamsSettings || {};
139
- var youTubePlayerParams = __assign(__assign(__assign({}, defaultYouTubePlayerParams), playerParamsSettings), slideUrlParams);
140
- var youTubeParams = "?" + param(youTubePlayerParams);
141
- return youTubeParams;
142
- };
143
- var isYouTubeNoCookie = function (url) {
144
- return url.includes('youtube-nocookie.com');
145
- };
146
- var getVimeoURLParams = function (defaultParams, videoInfo) {
147
- if (!videoInfo || !videoInfo.vimeo)
148
- return '';
149
- var urlParams = videoInfo.vimeo[2] || '';
150
- var defaultPlayerParams = defaultParams && Object.keys(defaultParams).length !== 0
151
- ? '&' + param(defaultParams)
152
- : '';
153
- // Support private video
154
- var urlWithHash = videoInfo.vimeo[0].split('/').pop() || '';
155
- var urlWithHashWithParams = urlWithHash.split('?')[0] || '';
156
- var hash = urlWithHashWithParams.split('#')[0];
157
- var isPrivate = videoInfo.vimeo[1] !== hash;
158
- if (isPrivate) {
159
- urlParams = urlParams.replace("/" + hash, '');
160
- }
161
- urlParams =
162
- urlParams[0] == '?' ? '&' + urlParams.slice(1) : urlParams || '';
163
- // For vimeo last params gets priority if duplicates found
164
- var vimeoPlayerParams = "?autoplay=0&muted=0" + (isPrivate ? "&h=" + hash : '') + defaultPlayerParams + urlParams;
165
- return vimeoPlayerParams;
166
- };
167
-
168
- /**
169
- * Video module for lightGallery
170
- * Supports HTML5, YouTube, Vimeo, wistia videos
171
- *
172
- *
173
- * @ref Wistia
174
- * https://wistia.com/support/integrations/wordpress(How to get url)
175
- * https://wistia.com/support/developers/embed-options#using-embed-options
176
- * https://wistia.com/support/developers/player-api
177
- * https://wistia.com/support/developers/construct-an-embed-code
178
- * http://jsfiddle.net/xvnm7xLm/
179
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video
180
- * https://wistia.com/support/embed-and-share/sharing-videos
181
- * https://private-sharing.wistia.com/medias/mwhrulrucj
182
- *
183
- * @ref Youtube
184
- * https://developers.google.com/youtube/player_parameters#enablejsapi
185
- * https://developers.google.com/youtube/iframe_api_reference
186
- * https://developer.chrome.com/blog/autoplay/#iframe-delegation
187
- *
188
- * @ref Vimeo
189
- * https://stackoverflow.com/questions/10488943/easy-way-to-get-vimeo-id-from-a-vimeo-url
190
- * https://vimeo.zendesk.com/hc/en-us/articles/360000121668-Starting-playback-at-a-specific-timecode
191
- * https://vimeo.zendesk.com/hc/en-us/articles/360001494447-Using-Player-Parameters
192
- */
193
- var Video = /** @class */ (function () {
194
- function Video(instance) {
195
- // get lightGallery core plugin instance
196
- this.core = instance;
197
- this.settings = __assign(__assign({}, videoSettings), this.core.settings);
198
- return this;
199
- }
200
-
201
- Video.prototype.init = function () {
202
- var _this = this;
203
- /**
204
- * Event triggered when video url found without poster
205
- * Append video HTML
206
- * Play if autoplayFirstVideo is true
207
- */
208
- this.core.LGel.on(lGEvents.hasVideo + ".video", this.onHasVideo.bind(this));
209
- this.core.LGel.on(lGEvents.posterClick + ".video", function () {
210
- var $el = _this.core.getSlideItem(_this.core.index);
211
- _this.loadVideoOnPosterClick($el);
212
- });
213
- this.core.LGel.on(lGEvents.slideItemLoad + ".video", this.onSlideItemLoad.bind(this));
214
- // @desc fired immediately before each slide transition.
215
- this.core.LGel.on(lGEvents.beforeSlide + ".video", this.onBeforeSlide.bind(this));
216
- // @desc fired immediately after each slide transition.
217
- this.core.LGel.on(lGEvents.afterSlide + ".video", this.onAfterSlide.bind(this));
218
- };
219
-
220
- /**
221
- * @desc Event triggered when a slide is completely loaded
222
- *
223
- * @param {Event} event - lightGalley custom event
224
- */
225
- Video.prototype.onSlideItemLoad = function (event) {
226
- var _this = this;
227
- var _a = event.detail, isFirstSlide = _a.isFirstSlide, index = _a.index;
228
- // Should check the active slide as well as user may have moved to different slide before the first slide is loaded
229
- if (this.settings.autoplayFirstVideo &&
230
- isFirstSlide &&
231
- index === this.core.index) {
232
- // Delay is just for the transition effect on video load
233
- setTimeout(function () {
234
- _this.loadAndPlayVideo(index);
235
- }, 200);
236
- }
237
- // Should not call on first slide. should check only if the slide is active
238
- if (!isFirstSlide &&
239
- this.settings.autoplayVideoOnSlide &&
240
- index === this.core.index) {
241
- this.loadAndPlayVideo(index);
242
- }
243
- };
244
-
245
- /**
246
- * @desc Event triggered when video url or poster found
247
- * Append video HTML is poster is not given
248
- * Play if autoplayFirstVideo is true
249
- *
250
- * @param {Event} event - Javascript Event object.
251
- */
252
- Video.prototype.onHasVideo = function (event) {
253
- var _a = event.detail, index = _a.index, src = _a.src, html5Video = _a.html5Video, hasPoster = _a.hasPoster;
254
- if (!hasPoster) {
255
- // All functions are called separately if poster exist in loadVideoOnPosterClick function
256
- this.appendVideos(this.core.getSlideItem(index), {
257
- src: src,
258
- addClass: 'lg-object',
259
- index: index,
260
- html5Video: html5Video,
261
- });
262
- // Automatically navigate to next slide once video reaches the end.
263
- this.gotoNextSlideOnVideoEnd(src, index);
264
- }
265
- };
266
-
267
- /**
268
- * @desc fired immediately before each slide transition.
269
- * Pause the previous video
270
- * Hide the download button if the slide contains YouTube, Vimeo, or Wistia videos.
271
- *
272
- * @param {Event} event - Javascript Event object.
273
- * @param {number} prevIndex - Previous index of the slide.
274
- * @param {number} index - Current index of the slide
275
- */
276
- Video.prototype.onBeforeSlide = function (event) {
277
- if (this.core.lGalleryOn) {
278
- var prevIndex = event.detail.prevIndex;
279
- this.pauseVideo(prevIndex);
280
- }
281
- };
282
-
283
- /**
284
- * @desc fired immediately after each slide transition.
285
- * Play video if autoplayVideoOnSlide option is enabled.
286
- *
287
- * @param {Event} event - Javascript Event object.
288
- * @param {number} prevIndex - Previous index of the slide.
289
- * @param {number} index - Current index of the slide
290
- * @todo should check on onSlideLoad as well if video is not loaded on after slide
291
- */
292
- Video.prototype.onAfterSlide = function (event) {
293
- var _this = this;
294
- var _a = event.detail, index = _a.index, prevIndex = _a.prevIndex;
295
- // Do not call on first slide
296
- var $slide = this.core.getSlideItem(index);
297
- if (this.settings.autoplayVideoOnSlide && index !== prevIndex) {
298
- if ($slide.hasClass('lg-complete')) {
299
- setTimeout(function () {
300
- _this.loadAndPlayVideo(index);
301
- }, 100);
302
- }
303
- }
304
- };
305
-
306
- Video.prototype.loadAndPlayVideo = function (index) {
307
- var $slide = this.core.getSlideItem(index);
308
- var currentGalleryItem = this.core.galleryItems[index];
309
- if (currentGalleryItem.poster) {
310
- this.loadVideoOnPosterClick($slide, true);
311
- }
312
- else {
313
- this.playVideo(index);
314
- }
315
- };
316
- /**
317
- * Play HTML5, Youtube, Vimeo or Wistia videos in a particular slide.
318
- * @param {number} index - Index of the slide
319
- */
320
- Video.prototype.playVideo = function (index) {
321
- this.controlVideo(index, 'play');
322
- };
323
-
324
- /**
325
- * Pause HTML5, Youtube, Vimeo or Wistia videos in a particular slide.
326
- * @param {number} index - Index of the slide
327
- */
328
- Video.prototype.pauseVideo = function (index) {
329
- this.controlVideo(index, 'pause');
330
- };
331
-
332
- Video.prototype.getVideoHtml = function (src, addClass, index, html5Video) {
333
- var video = '';
334
- var videoInfo = this.core.galleryItems[index]
335
- .__slideVideoInfo || {};
336
- var currentGalleryItem = this.core.galleryItems[index];
337
- var videoTitle = currentGalleryItem.title || currentGalleryItem.alt;
338
- videoTitle = videoTitle ? 'title="' + videoTitle + '"' : '';
339
- var commonIframeProps = "allowtransparency=\"true\"\n frameborder=\"0\"\n scrolling=\"no\"\n allowfullscreen\n mozallowfullscreen\n webkitallowfullscreen\n oallowfullscreen\n msallowfullscreen";
340
- if (videoInfo.youtube) {
341
- var videoId = 'lg-youtube' + index;
342
- var youTubeParams = getYouTubeParams(videoInfo, this.settings.youTubePlayerParams);
343
- var isYouTubeNoCookieURL = isYouTubeNoCookie(src);
344
- var youtubeURL = isYouTubeNoCookieURL
345
- ? '//www.youtube-nocookie.com/'
346
- : '//www.youtube.com/';
347
- video = "<iframe allow=\"autoplay\" id=" + videoId + " class=\"lg-video-object lg-youtube " + addClass + "\" " + videoTitle + " src=\"" + youtubeURL + "embed/" + (videoInfo.youtube[1] + youTubeParams) + "\" " + commonIframeProps + "></iframe>";
348
- }
349
- else if (videoInfo.vimeo) {
350
- var videoId = 'lg-vimeo' + index;
351
- var playerParams = getVimeoURLParams(this.settings.vimeoPlayerParams, videoInfo);
352
- 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>";
353
- }
354
- else if (videoInfo.wistia) {
355
- var wistiaId = 'lg-wistia' + index;
356
- var playerParams = param(this.settings.wistiaPlayerParams);
357
- playerParams = playerParams ? '?' + playerParams : '';
358
- 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>";
359
- }
360
- // jadams: added Dailymotion Player
361
- else if (videoInfo.dailymotion) {
362
- var dailymotionId = 'lg-dailymotion' + index;
363
- var playerParams = param(this.settings.dailymotionPlayerParams);
364
- playerParams = playerParams ? '?' + playerParams : '';
365
- video = "<iframe allow=\"autoplay\" id=\"" + dailymotionId + "\" src=\"//www.dailymotion.com/embed/video/" + (videoInfo.dailymotion[1] + playerParams) + "\" " + videoTitle + " class=\"dailymotion_embed lg-video-object lg-dailymotion " + addClass + "\" name=\"dailymotion_embed\" " + commonIframeProps + "></iframe>"
366
- }
367
- else if (videoInfo.html5) {
368
- var html5VideoMarkup = '';
369
- for (var i = 0; i < html5Video.source.length; i++) {
370
- html5VideoMarkup += "<source src=\"" + html5Video.source[i].src + "\" type=\"" + html5Video.source[i].type + "\">";
371
- }
372
- if (html5Video.tracks) {
373
- var _loop_1 = function (i) {
374
- var trackAttributes = '';
375
- var track = html5Video.tracks[i];
376
- Object.keys(track || {}).forEach(function (key) {
377
- trackAttributes += key + "=\"" + track[key] + "\" ";
378
- });
379
- html5VideoMarkup += "<track " + trackAttributes + ">";
380
- };
381
- for (var i = 0; i < html5Video.tracks.length; i++) {
382
- _loop_1(i);
383
- }
384
- }
385
- var html5VideoAttrs_1 = '';
386
- var videoAttributes_1 = html5Video.attributes || {};
387
- Object.keys(videoAttributes_1 || {}).forEach(function (key) {
388
- html5VideoAttrs_1 += key + "=\"" + videoAttributes_1[key] + "\" ";
389
- });
390
- video = "<video class=\"lg-video-object lg-html5 " + (this.settings.videojs && this.settings.videojsTheme
391
- ? this.settings.videojsTheme + ' '
392
- : '') + " " + (this.settings.videojs ? ' video-js' : '') + "\" " + html5VideoAttrs_1 + ">\n " + html5VideoMarkup + "\n Your browser does not support HTML5 video.\n </video>";
393
- }
394
- return video;
395
- };
396
-
397
- /**
398
- * @desc - Append videos to the slide
399
- *
400
- * @param {HTMLElement} el - slide element
401
- * @param {Object} videoParams - Video parameters, Contains src, class, index, htmlVideo
402
- */
403
- Video.prototype.appendVideos = function (el, videoParams) {
404
- var _a;
405
- var videoHtml = this.getVideoHtml(videoParams.src, videoParams.addClass, videoParams.index, videoParams.html5Video);
406
- el.find('.lg-video-cont').append(videoHtml);
407
- var $videoElement = el.find('.lg-video-object').first();
408
- if (videoParams.html5Video) {
409
- $videoElement.on('mousedown.lg.video', function (e) {
410
- e.stopPropagation();
411
- });
412
- }
413
- if (this.settings.videojs && ((_a = this.core.galleryItems[videoParams.index].__slideVideoInfo) === null || _a === void 0 ? void 0 : _a.html5)) {
414
- try {
415
- return videojs($videoElement.get(), this.settings.videojsOptions);
416
- }
417
- catch (e) {
418
- console.warn('lightGallery: Make sure you have included videojs');
419
- }
420
- }
421
- };
422
-
423
- Video.prototype.gotoNextSlideOnVideoEnd = function (src, index) {
424
- var _this = this;
425
- var $videoElement = this.core
426
- .getSlideItem(index)
427
- .find('.lg-video-object')
428
- .first();
429
- var videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
430
- if (this.settings.gotoNextSlideOnVideoEnd) {
431
- if (videoInfo.html5) {
432
- $videoElement.on('ended', function () {
433
- _this.core.goToNextSlide();
434
- });
435
- }
436
- else if (videoInfo.vimeo) {
437
- try {
438
- // https://github.com/vimeo/player.js/#ended
439
- new Vimeo.Player($videoElement.get()).on('ended', function () {
440
- _this.core.goToNextSlide();
441
- });
442
- }
443
- catch (e) {
444
- // jadams:
445
- console.warn('lightGallery: Make sure you have included //github.com/vimeo/player.js');
446
- }
447
- }
448
- else if (videoInfo.wistia) {
449
- try {
450
- window._wq = window._wq || [];
451
- // @todo Event is gettign triggered multiple times
452
- window._wq.push({
453
- id: $videoElement.attr('id'),
454
- onReady: function (video) {
455
- video.bind('end', function () {
456
- _this.core.goToNextSlide();
457
- });
458
- },
459
- });
460
- }
461
- catch (e) {
462
- // jadams:
463
- console.warn('lightGallery: Make sure you have included //fast.wistia.com/assets/external/E-v1.js');
464
- }
465
- }
466
- }
467
- };
468
-
469
- Video.prototype.controlVideo = function (index, action) {
470
- var $videoElement = this.core
471
- .getSlideItem(index)
472
- .find('.lg-video-object')
473
- .first();
474
- var videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
475
- if (!$videoElement.get())
476
- return;
477
- if (videoInfo.youtube) {
478
- try {
479
- $videoElement.get().contentWindow.postMessage("{\"event\":\"command\",\"func\":\"" + action + "Video\",\"args\":\"\"}", '*');
480
- }
481
- catch (e) {
482
- console.error("lightGallery:- " + e);
483
- }
484
- }
485
- else if (videoInfo.vimeo) {
486
- try {
487
- new Vimeo.Player($videoElement.get())[action]();
488
- }
489
- catch (e) {
490
- console.warn('lightGallery: Make sure you have included //github.com/vimeo/player.js');
491
- }
492
- }
493
- else if (videoInfo.html5) {
494
- if (this.settings.videojs) {
495
- try {
496
- videojs($videoElement.get())[action]();
497
- }
498
- catch (e) {
499
- console.warn('lightGallery: Make sure you have included videojs');
500
- }
501
- }
502
- else {
503
- $videoElement.get()[action]();
504
- }
505
- }
506
- else if (videoInfo.wistia) {
507
- try {
508
- window._wq = window._wq || [];
509
- // @todo Find a way to destroy wistia player instance
510
- window._wq.push({
511
- id: $videoElement.attr('id'),
512
- onReady: function (video) {
513
- video[action]();
514
- },
515
- });
516
- }
517
- catch (e) {
518
- console.warn('lightGallery: Make sure you have included //fast.wistia.com/assets/external/E-v1.js');
519
- }
520
- }
521
- };
522
-
523
- Video.prototype.loadVideoOnPosterClick = function ($el, forcePlay) {
524
- var _this = this;
525
- // check slide has poster
526
- if (!$el.hasClass('lg-video-loaded')) {
527
- // check already video element present
528
- if (!$el.hasClass('lg-has-video')) {
529
- $el.addClass('lg-has-video');
530
- var _html = void 0;
531
- var _src = this.core.galleryItems[this.core.index].src;
532
- var video = this.core.galleryItems[this.core.index].video;
533
- if (video) {
534
- _html =
535
- typeof video === 'string' ? JSON.parse(video) : video;
536
- }
537
- var videoJsPlayer_1 = this.appendVideos($el, {
538
- src: _src,
539
- addClass: '',
540
- index: this.core.index,
541
- html5Video: _html,
542
- });
543
- this.gotoNextSlideOnVideoEnd(_src, this.core.index);
544
- var $tempImg = $el.find('.lg-object').first().get();
545
- // @todo make sure it is working
546
- $el.find('.lg-video-cont').first().append($tempImg);
547
- $el.addClass('lg-video-loading');
548
- videoJsPlayer_1 &&
549
- videoJsPlayer_1.ready(function () {
550
- videoJsPlayer_1.on('loadedmetadata', function () {
551
- _this.onVideoLoadAfterPosterClick($el, _this.core.index);
552
- });
553
- });
554
- $el.find('.lg-video-object')
555
- .first()
556
- .on('load.lg error.lg loadedmetadata.lg', function () {
557
- setTimeout(function () {
558
- _this.onVideoLoadAfterPosterClick($el, _this.core.index);
559
- }, 50);
560
- });
561
- }
562
- else {
563
- this.playVideo(this.core.index);
564
- }
565
- }
566
- else if (forcePlay) {
567
- this.playVideo(this.core.index);
568
- }
569
- };
570
-
571
- Video.prototype.onVideoLoadAfterPosterClick = function ($el, index) {
572
- $el.addClass('lg-video-loaded');
573
- this.playVideo(index);
574
- };
575
-
576
- Video.prototype.destroy = function () {
577
- this.core.LGel.off('.lg.video');
578
- this.core.LGel.off('.video');
579
- };
580
- return Video;
581
- }());
582
-
583
- return Video;
584
-
585
- })));