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