j1-template 2024.3.22 → 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 (275) hide show
  1. checksums.yaml +4 -4
  2. data/assets/data/{galeries.html → gallery_app.html} +106 -18
  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 +14 -3
  6. data/assets/theme/j1/adapter/js/themes.js +41 -69
  7. data/assets/theme/j1/core/css/themes/unolight/bootstrap.css +48 -52
  8. data/assets/theme/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
  9. data/assets/theme/j1/core/css/vendor.css +1 -1
  10. data/assets/theme/j1/core/css/vendor.min.css +1 -1
  11. data/assets/theme/j1/modules/amplitudejs/js/tech/ytp.js +466 -396
  12. data/assets/theme/j1/modules/lightGallery/css/lg-transitions.css +3 -126
  13. data/assets/theme/j1/modules/lightGallery/css/lg-transitions.min.css +3 -10
  14. data/assets/theme/j1/modules/lightGallery/css/lightgallery-bundle.css +70 -237
  15. data/assets/theme/j1/modules/lightGallery/css/lightgallery-bundle.min.css +4 -10
  16. data/assets/theme/j1/modules/lightGallery/css/theme/uno/uno.css +276 -0
  17. data/assets/theme/j1/modules/lightGallery/css/theme/uno/uno.min.css +17 -0
  18. data/assets/theme/j1/modules/lightGallery/js/lightgallery.js +196 -134
  19. data/assets/theme/j1/modules/lightGallery/js/lightgallery.min.js +3 -10
  20. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-autoplay.js +4 -4
  21. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-autoplay.min.js +5 -5
  22. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-comment.js +5 -5
  23. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-comment.min.js +6 -6
  24. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-fullscreen.js +4 -4
  25. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-fullscreen.min.js +5 -5
  26. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-hash.js +4 -4
  27. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-hash.min.js +5 -6
  28. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-medium-zoom.js +5 -5
  29. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-medium-zoom.min.js +6 -6
  30. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-pager.js +4 -4
  31. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-pager.min.js +5 -5
  32. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-relative-caption.js +179 -0
  33. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-relative-caption.min.js +32 -0
  34. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-rotate.js +4 -4
  35. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-rotate.min.js +6 -6
  36. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-share.js +4 -4
  37. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-share.min.js +6 -7
  38. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-thumbnail.js +27 -20
  39. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-thumbnail.min.js +5 -5
  40. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.js +489 -411
  41. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.min.js +3 -10
  42. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-vimeo-thumbnail.js +4 -4
  43. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-vimeo-thumbnail.min.js +5 -5
  44. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-zoom.js +11 -5
  45. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-zoom.min.js +5 -5
  46. data/assets/theme/j1/modules/rtable/css/theme/uno/rtable.css +11 -1
  47. data/assets/theme/j1/modules/themeSwitcher/js/switcher.js +13 -12
  48. data/assets/theme/j1/modules/videoPlayer/tiktoc/README.md +1 -0
  49. data/assets/theme/j1/modules/videojs/assets/README.md +1 -0
  50. data/assets/theme/j1/modules/videojs/assets/icons/speedometer-medium.svg +35 -0
  51. data/assets/theme/j1/modules/videojs/css/font/VideoJS.ttf +0 -0
  52. data/assets/theme/j1/modules/videojs/css/font/VideoJS.woff +0 -0
  53. data/assets/theme/j1/modules/videojs/css/themes/uno.css +189 -42
  54. data/assets/theme/j1/modules/videojs/css/themes/uno.min.css +1 -1
  55. data/assets/theme/j1/modules/videojs/css/videojs.css +674 -316
  56. data/assets/theme/j1/modules/videojs/css/videojs.min.css +4 -3
  57. data/assets/theme/j1/modules/videojs/js/video.js +15893 -12288
  58. data/assets/theme/j1/modules/videojs/js/video.min.js +22 -23
  59. data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/!examples/index.html +26 -0
  60. data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/LICENSE +19 -0
  61. data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/README.md +69 -0
  62. data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/css/aspect-ratio-panel.css +2 -0
  63. data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/css/aspect-ratio-panel.min.css +2 -0
  64. data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/js/aspect-ratio-panel.js +339 -0
  65. data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/js/aspect-ratio-panel.min.js +2 -0
  66. data/assets/theme/j1/modules/videojs/{js/plugins/controls/autocaption → plugins/controls/autocaption/js}/autocaption.js +0 -5
  67. data/assets/theme/j1/modules/videojs/{js/plugins/controls/hotkeys/examples → plugins/controls/hotkeys/!examples}/example.html +1 -1
  68. data/assets/theme/j1/modules/videojs/plugins/controls/persist-settings/!examples/index.html +25 -0
  69. data/assets/theme/j1/modules/videojs/plugins/controls/persist-settings/LICENSE +19 -0
  70. data/assets/theme/j1/modules/videojs/plugins/controls/persist-settings/README.md +90 -0
  71. data/assets/theme/j1/modules/videojs/plugins/controls/persist-settings/js/videojs-persist.js +120 -0
  72. data/assets/theme/j1/modules/videojs/plugins/controls/persist-settings/js/videojs-persist.min.js +2 -0
  73. data/assets/theme/j1/modules/videojs/plugins/controls/playbackrate-adjuster/!examples/index.html +32 -0
  74. data/assets/theme/j1/modules/videojs/plugins/controls/playbackrate-adjuster/LICENSE +19 -0
  75. data/assets/theme/j1/modules/videojs/plugins/controls/playbackrate-adjuster/README.md +61 -0
  76. data/assets/theme/j1/modules/videojs/plugins/controls/playbackrate-adjuster/js/playbackrate-adjuster.js +94 -0
  77. data/assets/theme/j1/modules/videojs/plugins/controls/playbackrate-adjuster/js/playbackrate-adjuster.min.js +20 -0
  78. data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/skipbuttons/README.md +25 -11
  79. data/assets/theme/j1/modules/videojs/{css/plugins/controls → plugins/controls/zoom/css}/zoom.css +7 -6
  80. data/assets/theme/j1/modules/videojs/plugins/controls/zoom/css/zoom.min.css +22 -0
  81. data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/examples → plugins/players/dm/!examples}/dailymotion-controls.html +4 -4
  82. data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/examples → plugins/players/dm/!examples}/dailymotion-javascript.html +3 -3
  83. data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/examples → plugins/players/dm/!examples}/dailymotion-playlist.html +3 -3
  84. data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/examples → plugins/players/dm/!examples}/global-parameters.html +3 -3
  85. data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/simple.html +31 -0
  86. data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/examples → plugins/players/dm/!examples}/switch.html +3 -3
  87. data/assets/theme/j1/modules/videojs/{js/plugins/players/dm → plugins/players/dm/js}/dailymotion.js +1 -1
  88. data/assets/theme/j1/modules/videojs/{js/plugins/players/vm/examples → plugins/players/vm/!examples}/index.html +3 -3
  89. data/assets/theme/j1/modules/videojs/{js/plugins/players/vm/examples → plugins/players/vm/!examples}/player/index.html +3 -3
  90. data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.0.js +521 -0
  91. data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.1.js +605 -0
  92. data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.3.js +643 -0
  93. data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.4.js +583 -0
  94. data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.5.js +665 -0
  95. data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.6.js +642 -0
  96. data/assets/theme/j1/modules/videojs/plugins/players/vm/!unused/vimeo.7.js +673 -0
  97. data/assets/theme/j1/modules/videojs/{js/plugins/players/vm/api → plugins/players/vm/api/js}/vimeo.js +1 -1
  98. data/assets/theme/j1/modules/videojs/{js/plugins/players/vm/api → plugins/players/vm/api/js}/vimeo.min.js +1 -1
  99. data/assets/theme/j1/modules/videojs/{js/plugins/players/vm → plugins/players/vm/js}/vimeo.js +4 -5
  100. data/assets/theme/j1/modules/videojs/plugins/players/vm/js/vimeo.min.js +28 -0
  101. data/assets/theme/j1/modules/videojs/plugins/players/wt/!unused/wistia.0.js +395 -0
  102. data/assets/theme/j1/modules/videojs/plugins/players/wt/!unused/wistia.1.js +401 -0
  103. data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/global-parameters.html +5 -5
  104. data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/simple.html +5 -5
  105. data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/switch.html +5 -5
  106. data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/youtube-controls.html +5 -5
  107. data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/youtube-javascript.html +5 -5
  108. data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/youtube-list.html +5 -5
  109. data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/examples → plugins/players/yt/!examples}/youtube-playlist.html +5 -5
  110. data/lib/j1/version.rb +1 -1
  111. data/lib/starter_web/README.md +5 -5
  112. data/lib/starter_web/_config.yml +1 -1
  113. data/lib/starter_web/_data/blocks/banner.yml +2 -2
  114. data/lib/starter_web/_data/modules/amplitude_playlists.yml +16 -1
  115. data/lib/starter_web/_data/modules/attics.yml +11 -0
  116. data/lib/starter_web/_data/modules/carousel.yml +1 -1
  117. data/lib/starter_web/_data/modules/defaults/gallery.yml +3 -3
  118. data/lib/starter_web/_data/modules/defaults/masonry.yml +115 -22
  119. data/lib/starter_web/_data/modules/gallery.yml +225 -281
  120. data/lib/starter_web/_data/modules/masonry.yml +6 -0
  121. data/lib/starter_web/_data/modules/navigator_menu.yml +3 -3
  122. data/lib/starter_web/_data/resources.yml +16 -12
  123. data/lib/starter_web/_data/templates/feed.xml +1 -1
  124. data/lib/starter_web/_includes/attributes.asciidoc +7 -0
  125. data/lib/starter_web/_plugins/asciidoctor/videojs-block.rb +50 -30
  126. data/lib/starter_web/_plugins/asciidoctor/youtube-block.rb +37 -23
  127. data/lib/starter_web/_plugins/index/lunr.rb +1 -1
  128. data/lib/starter_web/assets/image/module/attic/1920x1280/alexander-redl.jpg +0 -0
  129. data/lib/starter_web/assets/image/module/attic/1920x1280/alexander-shatov.jpg +0 -0
  130. data/lib/starter_web/assets/image/module/attic/1920x1280/alexey-ruban.jpg +0 -0
  131. data/lib/starter_web/assets/image/module/attic/1920x1280/andrea-badino.jpg +0 -0
  132. data/lib/starter_web/assets/image/module/attic/1920x1280/bootstrap-modal.jpg +0 -0
  133. data/lib/starter_web/assets/image/module/attic/1920x1280/bp-miller.jpg +0 -0
  134. data/lib/starter_web/assets/image/module/attic/1920x1280/brad-neathery.jpg +0 -0
  135. data/lib/starter_web/assets/image/module/attic/1920x1280/brigitta-schneiter.jpg +0 -0
  136. data/lib/starter_web/assets/image/module/attic/1920x1280/build-with-gemini.jpg +0 -0
  137. data/lib/starter_web/assets/image/module/attic/1920x1280/clem-onojeghuo.jpg +0 -0
  138. data/lib/starter_web/assets/image/module/attic/1920x1280/crawford-jolly.jpg +0 -0
  139. data/lib/starter_web/assets/image/module/attic/1920x1280/eleni-afiontzi.jpg +0 -0
  140. data/lib/starter_web/assets/image/module/attic/1920x1280/fly-d.jpg +0 -0
  141. data/lib/starter_web/assets/image/module/attic/1920x1280/guillaume-bolduc.jpg +0 -0
  142. data/lib/starter_web/assets/image/module/attic/1920x1280/ideas-start-here-1920x1280.jpg +0 -0
  143. data/lib/starter_web/assets/image/module/attic/1920x1280/isaac-davis.jpg +0 -0
  144. data/lib/starter_web/assets/image/module/attic/1920x1280/j1-content-mockup-2.jpg +0 -0
  145. data/lib/starter_web/assets/image/module/attic/1920x1280/j1-content-mockup-3.jpg +0 -0
  146. data/lib/starter_web/assets/image/module/attic/1920x1280/j1-starter-mockup-1.jpg +0 -0
  147. data/lib/starter_web/assets/image/module/attic/1920x1280/john-schnobrich-2.jpg +0 -0
  148. data/lib/starter_web/assets/image/module/attic/1920x1280/josep-martins.jpg +0 -0
  149. data/lib/starter_web/assets/image/module/attic/1920x1280/josh-liu.jpg +0 -0
  150. data/lib/starter_web/assets/image/module/attic/1920x1280/kelly-sikkemal.jpg +0 -0
  151. data/lib/starter_web/assets/image/module/attic/1920x1280/kira-auf-der-heide.jpg +0 -0
  152. data/lib/starter_web/assets/image/module/attic/1920x1280/kristopher-roller.jpg +0 -0
  153. data/lib/starter_web/assets/image/module/attic/1920x1280/markus-spiske.jpg +0 -0
  154. data/lib/starter_web/assets/image/module/attic/1920x1280/martin-sanchez.jpg +0 -0
  155. data/lib/starter_web/assets/image/module/attic/1920x1280/material_symbols.jpg +0 -0
  156. data/lib/starter_web/assets/image/module/attic/1920x1280/matthaeus.jpg +0 -0
  157. data/lib/starter_web/assets/image/module/attic/1920x1280/melanie-deziel.jpg +0 -0
  158. data/lib/starter_web/assets/image/module/attic/1920x1280/milad-fakurian.jpg +0 -0
  159. data/lib/starter_web/assets/image/module/attic/1920x1280/mohammad-rahmani.jpg +0 -0
  160. data/lib/starter_web/assets/image/module/attic/1920x1280/nasa.jpg +0 -0
  161. data/lib/starter_web/assets/image/module/attic/1920x1280/quino-al-2.jpg +0 -0
  162. data/lib/starter_web/assets/image/module/attic/1920x1280/stories-ink-tattoo-care.jpg +0 -0
  163. data/lib/starter_web/assets/image/module/attic/1920x1280/towfiqu-barbhuiya.jpg +0 -0
  164. data/lib/starter_web/assets/image/page/tour/bootswatch-themes.jpg +0 -0
  165. data/lib/starter_web/assets/video/poster/vimeo/fall_2011.jpg +0 -0
  166. data/lib/starter_web/index.html +3 -2
  167. data/lib/starter_web/package.json +1 -1
  168. data/lib/starter_web/pages/public/panels/intro_panel/_includes/attributes.asciidoc +1 -1
  169. data/lib/starter_web/pages/public/tools/previewer/preview_bootstrap_theme.adoc +5 -5
  170. data/lib/starter_web/pages/public/tools/tester/app_tester_amplitudejs_yt.adoc +7 -3
  171. data/lib/starter_web/pages/public/tools/tester/app_tester_swiperjs.adoc +7 -3
  172. data/lib/starter_web/pages/public/tools/tester/videojs_macro_tester.adoc +297 -0
  173. data/lib/starter_web/pages/public/tour/_includes/attributes.asciidoc +1 -2
  174. data/lib/starter_web/pages/public/tour/_includes/documents/themes_bootstrap.asciidoc +1 -1
  175. data/lib/starter_web/pages/public/tour/asciidoc_extensions.adoc +7 -3
  176. data/lib/starter_web/pages/public/tour/bootstrap_themes.adoc +62 -7
  177. data/lib/starter_web/pages/public/tour/icon_fonts.adoc +4 -8
  178. data/lib/starter_web/pages/public/tour/modal_extentions.adoc +2 -2
  179. data/lib/starter_web/pages/public/tour/responsive_tables.adoc +21 -15
  180. data/lib/starter_web/pages/public/tour/typography.adoc +5 -5
  181. data/lib/starter_web/pages/public/tour/video_data.adoc +25 -5
  182. metadata +142 -118
  183. data/assets/data/swiper_app.2.html +0 -757
  184. data/assets/data/swiper_app.4.html +0 -769
  185. data/assets/theme/j1/modules/lightGallery/css/themes/uno/uno.css +0 -140
  186. data/assets/theme/j1/modules/lightGallery/css/themes/uno/uno.min.css +0 -19
  187. data/assets/theme/j1/modules/lightGallery/js/plugins/j1/j1-video.js +0 -402
  188. data/assets/theme/j1/modules/lightGallery/js/plugins/j1/j1-video.min.js +0 -7
  189. data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-video.1.js +0 -585
  190. data/assets/theme/j1/modules/videojs/css/font/video-js-cdn.css +0 -2012
  191. data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.0.css +0 -32
  192. data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.1.css +0 -31
  193. data/assets/theme/j1/modules/videojs/css/plugins/controls/zoom.min.css +0 -21
  194. data/assets/theme/j1/modules/videojs/js/plugins/players/dm/examples/simple.html +0 -20
  195. data/assets/theme/j1/modules/videojs/js/plugins/players/vm/vimeo.min.js +0 -16
  196. data/assets/theme/j1/modules/videojs/js/plugins/players/wt/api/src/WistiaPlayer.ts +0 -1617
  197. data/lib/starter_web/_data/modules/gallery_app.yml +0 -1002
  198. data/lib/starter_web/_data/modules/gallery_playlists.yml +0 -534
  199. data/lib/starter_web/assets/image/module/attic/1920x1280/alina-grubnyak.jpg +0 -0
  200. data/lib/starter_web/assets/image/module/attic/1920x1280/bruno-figueiredo.jpg +0 -0
  201. data/lib/starter_web/assets/image/module/attic/1920x1280/harpal-singh.jpg +0 -0
  202. data/lib/starter_web/assets/image/module/attic/1920x1280/hayden-mills-2.jpg +0 -0
  203. data/lib/starter_web/assets/image/module/attic/1920x1280/j1-content-mockup-1.jpg +0 -0
  204. data/lib/starter_web/assets/image/module/attic/1920x1280/recha-oktaviani.jpg +0 -0
  205. data/lib/starter_web/assets/image/module/attic/1920x1280/tiny_desk.jpg +0 -0
  206. data/lib/starter_web/assets/image/module/attic/ideas-start-here-1920x1280-bw.jpg +0 -0
  207. data/lib/starter_web/assets/image/module/attic/ideas-start-here-1920x1280.jpg +0 -0
  208. data/lib/starter_web/assets/video/poster/vimeo/stay_colorful.jpg +0 -0
  209. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/animation-w.png +0 -0
  210. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/customize-w.png +0 -0
  211. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/dynamic-w.png +0 -0
  212. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/facebook-icon.svg +0 -0
  213. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/googleplus-icon.svg +0 -0
  214. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/html5-w.png +0 -0
  215. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/linked-in.png +0 -0
  216. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/module-w.png +0 -0
  217. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/play-button-hover.svg +0 -0
  218. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/play-button.png +0 -0
  219. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/play-button.svg +0 -0
  220. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/responsive-w.png +0 -0
  221. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/thumb-w.png +0 -0
  222. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/touch-w.png +0 -0
  223. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/twitter-icon.svg +0 -0
  224. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/twitter.png +0 -0
  225. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/video1-w.png +0 -0
  226. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/zoom-w.png +0 -0
  227. /data/assets/theme/j1/modules/lightGallery/css/{themes → theme}/uno/icons/zoom.png +0 -0
  228. /data/assets/theme/j1/modules/videoPlayer/dailymotion/js/{!readme → README.md} +0 -0
  229. /data/assets/theme/j1/modules/videoPlayer/tiktoc/{js/player.min.js → player.min.js} +0 -0
  230. /data/assets/theme/j1/modules/videoPlayer/vimeo/js/{!readme → README.md} +0 -0
  231. /data/assets/theme/j1/modules/videoPlayer/wistia/js/{!readme → README.md} +0 -0
  232. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/autocaption/LICENSE +0 -0
  233. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/autocaption/README.md +0 -0
  234. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/autocaption → plugins/controls/autocaption/js}/autocaption.min.js +0 -0
  235. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/hotkeys/LICENSE.md +0 -0
  236. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/hotkeys/README.md +0 -0
  237. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/hotkeys → plugins/controls/hotkeys/js}/hotkeys.js +0 -0
  238. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/hotkeys → plugins/controls/hotkeys/js}/hotkeys.min.js +0 -0
  239. /data/assets/theme/j1/modules/videojs/{css/plugins/controls → plugins/controls/skipbuttons/css}/skipbuttons.css +0 -0
  240. /data/assets/theme/j1/modules/videojs/{css/plugins/controls → plugins/controls/skipbuttons/css}/skipbuttons.min.css +0 -0
  241. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/skipbuttons → plugins/controls/skipbuttons/js}/skipbuttons.js +0 -0
  242. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/skipbuttons → plugins/controls/skipbuttons/js}/skipbuttons.min.js +0 -0
  243. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/zoom/examples → plugins/controls/zoom/!examples}/index.html +0 -0
  244. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/zoom/examples → plugins/controls/zoom/!examples}/index.js +0 -0
  245. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/zoom/examples → plugins/controls/zoom/!examples}/styles.css +0 -0
  246. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/zoom/LICENSE.md +0 -0
  247. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/controls/zoom/README.md +0 -0
  248. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/zoom → plugins/controls/zoom/js}/zoom.js +0 -0
  249. /data/assets/theme/j1/modules/videojs/{js/plugins/controls/zoom → plugins/controls/zoom/js}/zoom.min.js +0 -0
  250. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/dm/LICENSE +0 -0
  251. /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/doc → plugins/players/dm}/README.md +0 -0
  252. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/dm/api/LICENSE +0 -0
  253. /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/api/doc → plugins/players/dm/api}/README.md +0 -0
  254. /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/api → plugins/players/dm/api/js}/dailymotion.sdk.js +0 -0
  255. /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm/api → plugins/players/dm/api/js}/dailymotion.sdk.min.js +0 -0
  256. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/dm/icon/scalable/dailymotion.svg +0 -0
  257. /data/assets/theme/j1/modules/videojs/{js/plugins/players/dm → plugins/players/dm/js}/dailymotion.min.js +0 -0
  258. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/vm/LICENSE +0 -0
  259. /data/assets/theme/j1/modules/videojs/{js/plugins/players/vm/doc → plugins/players/vm}/README.md +0 -0
  260. /data/assets/theme/j1/modules/videojs/{js/plugins/players/vm/api/doc → plugins/players/vm/api}/README.md +0 -0
  261. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/vm/api/css/embed.player.css +0 -0
  262. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/vm/api/css/embed.player.uno.css +0 -0
  263. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/vm/api/css/player.css +0 -0
  264. /data/assets/theme/j1/modules/videojs/{js/plugins/players/wt/doc → plugins/players/wt}/README.md +0 -0
  265. /data/assets/theme/j1/modules/videojs/{js/plugins/players/wt/api/doc/Readme.txt → plugins/players/wt/api/README.md} +0 -0
  266. /data/assets/theme/j1/modules/videojs/{js/plugins/players/wt/api → plugins/players/wt/api/js}/wistia.min.js +0 -0
  267. /data/assets/theme/j1/modules/videojs/{js/plugins/players/wt → plugins/players/wt/js}/wistia.js +0 -0
  268. /data/assets/theme/j1/modules/videojs/{js/plugins/players/wt → plugins/players/wt/js}/wistia.min.js +0 -0
  269. /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/v3.0.0 → plugins/players/yt/!v3.0.0}/youtube.js +0 -0
  270. /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/v3.0.0 → plugins/players/yt/!v3.0.0}/youtube.min.js +0 -0
  271. /data/assets/theme/j1/modules/videojs/{js/plugins → plugins}/players/yt/LICENSE +0 -0
  272. /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/doc → plugins/players/yt}/README.md +0 -0
  273. /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt/api → plugins/players/yt/api/js}/youtube.min.js +0 -0
  274. /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt → plugins/players/yt/js}/youtube.js +0 -0
  275. /data/assets/theme/j1/modules/videojs/{js/plugins/players/yt → plugins/players/yt/js}/youtube.min.js +0 -0
@@ -0,0 +1,26 @@
1
+ <!doctype html>
2
+ <html>
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <title>videojs-aspect-ratio-panel Demo</title>
7
+ <link href="../../../../css/videojs.css" rel="stylesheet">
8
+ <link href="../css/aspect-ratio-panel.css" rel="stylesheet">
9
+ </head>
10
+
11
+ <body>
12
+ <video id="videojs-aspect-ratio-panel-player" class="video-js vjs-default-skin" controls width="800" height="450">
13
+ <source src="//vjs.zencdn.net/v/oceans.mp4" type='video/mp4'>
14
+ <source src="//vjs.zencdn.net/v/oceans.webm" type='video/webm'>
15
+ </video>
16
+ <script src="../../../../js/video.js"></script>
17
+ <script src="../js/aspect-ratio-panel.js"></script>
18
+ <script>
19
+ (function (window, videojs) {
20
+ var examplePlayer = window.examplePlayer = videojs('videojs-aspect-ratio-panel-player');
21
+ var aspectRatioPanel = window.aspectRatioPanel = examplePlayer.aspectRatioPanel();
22
+ }(window, window.videojs));
23
+ </script>
24
+ </body>
25
+
26
+ </html>
@@ -0,0 +1,19 @@
1
+ Copyright (c) Yang Bin <yangkghjh@gmail.com>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
@@ -0,0 +1,69 @@
1
+ # videojs-aspect-ratio-panel
2
+
3
+ Video aspect ratio management for video.js.
4
+
5
+ ![](screenshot.png)
6
+
7
+ ## Table of Contents
8
+
9
+ <!-- START doctoc -->
10
+ <!-- END doctoc -->
11
+ ## Installation
12
+
13
+ ```sh
14
+ npm install --save @yangkghjh/videojs-aspect-ratio-panel
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ To include videojs-aspect-ratio-panel on your website or web application, use any of the following methods.
20
+
21
+ ### `<script>` Tag
22
+
23
+ This is the simplest case. Get the script in whatever way you prefer and include the plugin _after_ you include [video.js][videojs], so that the `videojs` global is available.
24
+
25
+ ```html
26
+ <script src="//path/to/video.min.js"></script>
27
+ <script src="//path/to/videojs-aspect-ratio-panel.min.js"></script>
28
+ <script>
29
+ var player = videojs('my-video');
30
+
31
+ player.aspectRatioPanel();
32
+ </script>
33
+ ```
34
+
35
+ ### Browserify/CommonJS
36
+
37
+ When using with Browserify, install videojs-aspect-ratio-panel via npm and `require` the plugin as you would any other module.
38
+
39
+ ```js
40
+ var videojs = require('video.js');
41
+
42
+ // The actual plugin function is exported by this module, but it is also
43
+ // attached to the `Player.prototype`; so, there is no need to assign it
44
+ // to a variable.
45
+ require('@yangkghjh/videojs-aspect-ratio-panel');
46
+
47
+ var player = videojs('my-video');
48
+
49
+ player.aspectRatioPanel();
50
+ ```
51
+
52
+ ### RequireJS/AMD
53
+
54
+ When using with RequireJS (or another AMD library), get the script in whatever way you prefer and `require` the plugin as you normally would:
55
+
56
+ ```js
57
+ require(['video.js', '@yangkghjh/videojs-aspect-ratio-panel'], function(videojs) {
58
+ var player = videojs('my-video');
59
+
60
+ player.aspectRatioPanel();
61
+ });
62
+ ```
63
+
64
+ ## License
65
+
66
+ MIT. Copyright (c) Yang Bin &lt;yangkghjh@gmail.com&gt;
67
+
68
+
69
+ [videojs]: http://videojs.com/
@@ -0,0 +1,2 @@
1
+ /*! @name @yangkghjh/videojs-aspect-ratio-panel @version 0.0.1 @license MIT */
2
+ .vjs-resizer-modal{position:relative;z-index:1;left:0;top:0;width:100%;height:100%;overflow:hidden;background-color:transparent}.vjs-resizer-modal-content{background-color:rgba(43,51,63,.7);margin:10% auto;width:460px;height:300px}.vjs-resizer-modal-close{position:relative;color:#fff;float:right;font-size:28px;font-weight:lighter;right:4px}.vjs-resizer-modal-close:focus,.vjs-resizer-modal-close:hover{color:#000;text-decoration:none;cursor:pointer}.vjs-resizer-wrap{font-size:16px;line-height:200%;position:relative;width:350px;height:100%;margin:15% auto;z-index:1}.vjs-resizer-modal-title{text-align:center;padding:12px;font-size:18px}.vjs-resizer-size .size-scroll{color:#fff;width:255px;height:5px;background:#ccc;position:relative;display:inline-block}.vjs-resizer-size .size-scroll-bar{width:15px;height:15px;background:#369;position:absolute;top:-5px;left:255px;cursor:pointer;border-radius:100%}.vjs-resizer-size .size-scroll-mask{position:absolute;left:0;top:0;background:#369;width:255px;height:5px}.vjs-resizer-size .size-title{display:inline-block;cursor:initial;margin-right:12px}.vjs-resizer-wrap ul{margin-top:20px;padding:0}.vjs-resizer-wrap li{list-style:none;text-align:center;cursor:pointer;background-color:#555}.vjs-resizer-wrap li:hover{background-color:#465555}
@@ -0,0 +1,2 @@
1
+ /*! @name @yangkghjh/videojs-aspect-ratio-panel @version 0.0.1 @license MIT */
2
+ .vjs-resizer-modal{position:relative;z-index:1;left:0;top:0;width:100%;height:100%;overflow:hidden;background-color:transparent}.vjs-resizer-modal-content{background-color:rgba(43,51,63,.7);margin:10% auto;width:460px;height:300px}.vjs-resizer-modal-close{position:relative;color:#fff;float:right;font-size:28px;font-weight:lighter;right:4px}.vjs-resizer-modal-close:focus,.vjs-resizer-modal-close:hover{color:#000;text-decoration:none;cursor:pointer}.vjs-resizer-wrap{font-size:16px;line-height:200%;position:relative;width:350px;height:100%;margin:15% auto;z-index:1}.vjs-resizer-modal-title{text-align:center;padding:12px;font-size:18px}.vjs-resizer-size .size-scroll{color:#fff;width:255px;height:5px;background:#ccc;position:relative;display:inline-block}.vjs-resizer-size .size-scroll-bar{width:15px;height:15px;background:#369;position:absolute;top:-5px;left:255px;cursor:pointer;border-radius:100%}.vjs-resizer-size .size-scroll-mask{position:absolute;left:0;top:0;background:#369;width:255px;height:5px}.vjs-resizer-size .size-title{display:inline-block;cursor:initial;margin-right:12px}.vjs-resizer-wrap ul{margin-top:20px;padding:0}.vjs-resizer-wrap li{list-style:none;text-align:center;cursor:pointer;background-color:#555}.vjs-resizer-wrap li:hover{background-color:#465555}
@@ -0,0 +1,339 @@
1
+ /* TODO: needs to be updated for VJS V8
2
+ -------------------------------------------------------------------------------- */
3
+
4
+ (function (global, factory) {
5
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('video.js')) :
6
+ typeof define === 'function' && define.amd ? define(['video.js'], factory) :
7
+ (global = global || self, global.videojsAspectRatioPanel = factory(global.videojs));
8
+ }(this, (function (videojs) { 'use strict';
9
+
10
+ videojs = videojs && Object.prototype.hasOwnProperty.call(videojs, 'default') ? videojs['default'] : videojs;
11
+
12
+ function _inheritsLoose(subClass, superClass) {
13
+ subClass.prototype = Object.create(superClass.prototype);
14
+ subClass.prototype.constructor = subClass;
15
+ subClass.__proto__ = superClass;
16
+ }
17
+
18
+ function _assertThisInitialized(self) {
19
+ if (self === void 0) {
20
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
21
+ }
22
+
23
+ return self;
24
+ }
25
+
26
+ var version = "0.0.1";
27
+
28
+ var MenuButton = videojs.getComponent("MenuButton");
29
+
30
+ var ResizerButton = /*#__PURE__*/function (_MenuButton) {
31
+ _inheritsLoose(ResizerButton, _MenuButton);
32
+
33
+ function ResizerButton(player, options) {
34
+ var _this;
35
+
36
+ _this = _MenuButton.call(this, player, {
37
+ name: "ResizerButton"
38
+ }) || this;
39
+ MenuButton.apply(_assertThisInitialized(_this), arguments);
40
+
41
+ _this.controlText(player.localize("Aspect Ratio"));
42
+
43
+ return _this;
44
+ }
45
+
46
+ var _proto = ResizerButton.prototype;
47
+
48
+ _proto.createEl = function createEl() {
49
+ return videojs.dom.createEl("div", {
50
+ className: "vjs-menu-button vjs-menu-button-popup vjs-control vjs-button"
51
+ });
52
+ };
53
+
54
+ _proto.buildCSSClass = function buildCSSClass() {
55
+ return MenuButton.prototype.buildCSSClass.call(this) + " vjs-icon-cog";
56
+ };
57
+
58
+ _proto.update = function update() {
59
+ return MenuButton.prototype.update.call(this);
60
+ };
61
+
62
+ _proto.handleClick = function handleClick() {
63
+ this.player().getChild("ResizerPanel").toggleClass("vjs-hidden");
64
+ };
65
+
66
+ return ResizerButton;
67
+ }(MenuButton);
68
+
69
+ var Component = videojs.getComponent("Component");
70
+
71
+ var ResizerPanel = /*#__PURE__*/function (_Component) {
72
+ _inheritsLoose(ResizerPanel, _Component);
73
+
74
+ function ResizerPanel(player, options) {
75
+ var _this;
76
+
77
+ _this = _Component.call(this, player, options) || this;
78
+ Component.apply(_assertThisInitialized(_this), arguments);
79
+ _this.aspectRadio = "origin"; // origin, 4:3, 16:9, fill
80
+
81
+ _this.percent = 100;
82
+ _this.radioWidth = 1;
83
+ _this.radioHeight = 1;
84
+ _this.currentHeight = _this.player().currentHeight();
85
+ _this.currentWidth = _this.player().currentWidth();
86
+
87
+ var el = _this.el(); // 关闭
88
+
89
+
90
+ el.childNodes[1].childNodes[1].onclick = function () {
91
+ _this.toggleClass("vjs-hidden");
92
+ }; // 窗口大小改变
93
+
94
+
95
+ window.addEventListener("resize", function () {
96
+ if (_this.currentHeight != _this.player().currentHeight() || _this.currentWidth != _this.player().currentWidth()) {
97
+ _this.currentHeight = _this.player().currentHeight();
98
+ _this.currentWidth = _this.player().currentWidth();
99
+
100
+ _this.resize();
101
+ }
102
+ }); // 滑动条
103
+
104
+ el.onmouseup = function () {
105
+ el.onmousemove = null;
106
+ };
107
+
108
+ var scroll = el.childNodes[1].childNodes[5].childNodes[1].childNodes[3];
109
+
110
+ _this.setScrollFunc(el, scroll, function (data) {
111
+ _this.setPercent(data);
112
+ }); // 播放下个视频时,应用参数
113
+
114
+
115
+ _this.player().on("play", function () {
116
+ _this.resize();
117
+ }); // 比例选择
118
+
119
+
120
+ var radiosDiv = el.childNodes[1].childNodes[5].childNodes[3].childNodes;
121
+ var radios = [radiosDiv[1], radiosDiv[5], radiosDiv[9], radiosDiv[13]];
122
+ var prev = "origin";
123
+
124
+ for (var i = 0; i < radios.length; i++) {
125
+ radios[i].onchange = function (event) {
126
+ if (event.target.value !== prev) {
127
+ prev = event.target.value;
128
+
129
+ _this.setAspectRadio(event.target.value);
130
+ }
131
+ };
132
+ } // 恢复默认
133
+
134
+
135
+ var resetDiv = el.childNodes[1].childNodes[5].childNodes[5].childNodes[1];
136
+
137
+ resetDiv.onclick = function (event) {
138
+ radios[0].checked = true;
139
+
140
+ _this.reset();
141
+ };
142
+
143
+ return _this;
144
+ }
145
+
146
+ var _proto = ResizerPanel.prototype;
147
+
148
+ _proto.setAspectRadio = function setAspectRadio(radio) {
149
+ switch (radio) {
150
+ case "origin":
151
+ this.aspectRadio = "origin";
152
+ break;
153
+
154
+ case "fill":
155
+ this.aspectRadio = "fill";
156
+ break;
157
+
158
+ case "16:9":
159
+ this.aspectRadio = "16:9";
160
+ this.radioWidth = 16;
161
+ this.radioHeight = 9;
162
+ break;
163
+
164
+ case "4:3":
165
+ this.aspectRadio = "4:3";
166
+ this.radioWidth = 4;
167
+ this.radioHeight = 3;
168
+ break;
169
+ }
170
+
171
+ this.resize();
172
+ };
173
+
174
+ _proto.setPercent = function setPercent(percent) {
175
+ this.percent = percent;
176
+ this.resize();
177
+ };
178
+
179
+ _proto.reset = function reset() {
180
+ this.player().tech_.el().style.objectFit = "contain";
181
+ this.aspectRadio = "origin";
182
+ this.percent = 100;
183
+ var scroll = this.el().childNodes[1].childNodes[5].childNodes[1].childNodes[3];
184
+ scroll.childNodes[1].style.left = "255px";
185
+ scroll.childNodes[3].style.width = "255px";
186
+ this.resize();
187
+ };
188
+
189
+ _proto.resize = function resize() {
190
+ if (this.aspectRadio != "origin") {
191
+ this.player().tech_.el().style.objectFit = "fill";
192
+ } else {
193
+ this.player().tech_.el().style.objectFit = "contain";
194
+ }
195
+
196
+ if (this.aspectRadio == "origin" || this.aspectRadio == "fill") {
197
+ var _w = this.currentWidth * (100 - this.percent) / 100 / 2;
198
+
199
+ var _h = this.currentHeight * (100 - this.percent) / 100 / 2;
200
+
201
+ this.setPadding(_w, _h);
202
+ return;
203
+ } // 计算播放器画面比例,如果小于目标,使用宽度作为计算标准,大于则使用高度
204
+ // 4:3=1.333
205
+ // 16:9=1.778
206
+
207
+
208
+ var playerRadio = this.currentWidth / this.currentHeight; // 需要的高宽度
209
+
210
+ var width = this.currentWidth;
211
+ var height = width * this.radioHeight / this.radioWidth;
212
+
213
+ if (playerRadio > this.radioWidth / this.radioHeight) {
214
+ height = this.currentHeight;
215
+ width = height * this.radioWidth / this.radioHeight;
216
+ }
217
+
218
+ var w = (this.currentWidth - width * this.percent / 100) / 2;
219
+ var h = (this.currentHeight - height * this.percent / 100) / 2;
220
+ this.setPadding(w, h); // console.log(playerRadio, this.radioWidth / this.radioHeight, width, height, w, h);
221
+ };
222
+
223
+ _proto.setPadding = function setPadding(w, h) {
224
+ if (w < 0) {
225
+ w = 0;
226
+ }
227
+
228
+ this.player().tech_.el().style.paddingLeft = w + "px";
229
+ this.player().tech_.el().style.paddingRight = w + "px";
230
+
231
+ if (h < 0) {
232
+ h = 0;
233
+ }
234
+
235
+ this.player().tech_.el().style.paddingTop = h + "px";
236
+ this.player().tech_.el().style.paddingBottom = h + "px";
237
+ };
238
+
239
+ _proto.setScrollFunc = function setScrollFunc(scrollDiv, scrollDom, callback) {
240
+ var bar = scrollDom.childNodes[1];
241
+ var mask = scrollDom.childNodes[3];
242
+ var barleft = 0;
243
+
244
+ bar.onmousedown = function (e) {
245
+ var event = e || window.event;
246
+ var leftVal = event.clientX - this.offsetLeft;
247
+ var that = this;
248
+
249
+ scrollDiv.onmousemove = function (e) {
250
+ var event = e || window.event;
251
+ barleft = event.clientX - leftVal;
252
+ if (barleft < 0) barleft = 0;else if (barleft > 255) barleft = 255;
253
+ mask.style.width = barleft + "px";
254
+ that.style.left = barleft + "px";
255
+ callback(parseInt(barleft / 255 * 100)); //防止选择内容--当拖动鼠标过快时候,弹起鼠标,bar也会移动,修复bug
256
+
257
+ window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
258
+ };
259
+ };
260
+ };
261
+
262
+ _proto.createEl = function createEl() {
263
+ return videojs.dom.createEl("div", {
264
+ className: "vjs-resizer-modal vjs-hidden",
265
+ innerHTML: "\n <div class=\"vjs-resizer-modal-content\">\n <span class=\"vjs-resizer-modal-close\">&times;</span>\n <div class=\"vjs-resizer-modal-title\">Aspect Ratio</div>\n <div class=\"vjs-resizer-wrap\">\n <div class=\"vjs-resizer-size\">\n <span class=\"size-title\">Size</span>\n <div class=\"size-scroll\" id=\"size-scroll\">\n <div class=\"size-scroll-bar\"></div>\n <div class=\"size-scroll-mask\"></div>\n </div>\n </div>\n <div class=\"radios\">\n Ratio\n <input type=\"radio\" name=\"radio\" id=\"origin\" value=\"origin\" checked >\n <label for=\"origin\">Default</label>\n <input type=\"radio\" name=\"radio\" id=\"4:3\" value=\"4:3\">\n <label for=\"4:3\">4:3</label>\n <input type=\"radio\" name=\"radio\" id=\"16:9\" value=\"16:9\">\n <label for=\"16:9\">16:9</label>\n <input type=\"radio\" name=\"radio\" id=\"fill\" value=\"fill\">\n <label for=\"fill\">Full</label>\n </div>\n <ul style=\"clear:both\">\n <li id=\"vjs-resizer-reset\">Reset</li>\n </ul>\n </div>\n </div>\n "
266
+ });
267
+ };
268
+
269
+ return ResizerPanel;
270
+ }(Component);
271
+
272
+ var Plugin = videojs.getPlugin("plugin"); // Default options for the plugin.
273
+
274
+ var defaults = {};
275
+ /**
276
+ * An advanced Video.js plugin. For more information on the API
277
+ *
278
+ * See: https://blog.videojs.com/feature-spotlight-advanced-plugins/
279
+ */
280
+
281
+ var AspectRatioPanel = /*#__PURE__*/function (_Plugin) {
282
+ _inheritsLoose(AspectRatioPanel, _Plugin);
283
+
284
+ /**
285
+ * Create a AspectRatioPanel plugin instance.
286
+ *
287
+ * @param {Player} player
288
+ * A Video.js Player instance.
289
+ *
290
+ * @param {Object} [options]
291
+ * An optional options object.
292
+ *
293
+ * While not a core part of the Video.js plugin architecture, a
294
+ * second argument of options is a convenient way to accept inputs
295
+ * from your plugin's caller.
296
+ */
297
+ function AspectRatioPanel(player, options) {
298
+ var _this;
299
+
300
+ // the parent class will add player under this.player
301
+ _this = _Plugin.call(this, player) || this;
302
+ _this.options = videojs.mergeOptions(defaults, options);
303
+
304
+ _this.player.ready(function () {
305
+ _this.player.addClass("vjs-aspect-ratio-panel");
306
+
307
+ if (player.techName_ != "Html5") {
308
+ return false;
309
+ }
310
+
311
+ player.on(["loadedmetadata"], function (e) {
312
+ if (player.aspect_ratio_initialized == "undefined" || player.aspect_ratio_initialized == true) ; else {
313
+ player.aspect_ratio_initialized = true;
314
+ var controlBar = player.controlBar;
315
+ var fullscreenToggle = controlBar.getChild("fullscreenToggle").el();
316
+ controlBar.el().insertBefore(controlBar.addChild("ResizerButton").el(), fullscreenToggle);
317
+ player.addChild("ResizerPanel");
318
+ }
319
+ });
320
+ });
321
+
322
+ videojs.registerComponent("ResizerButton", ResizerButton);
323
+ videojs.registerComponent("ResizerPanel", ResizerPanel);
324
+ return _this;
325
+ }
326
+
327
+ return AspectRatioPanel;
328
+ }(Plugin); // Define default values for the plugin's `state` object here.
329
+
330
+
331
+ AspectRatioPanel.defaultState = {}; // Include the version number.
332
+
333
+ AspectRatioPanel.VERSION = version; // Register the plugin with video.js.
334
+
335
+ videojs.registerPlugin("aspectRatioPanel", AspectRatioPanel);
336
+
337
+ return AspectRatioPanel;
338
+
339
+ })));
@@ -0,0 +1,2 @@
1
+ /*! @name @yangkghjh/videojs-aspect-ratio-panel @version 0.0.1 @license MIT */
2
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],t):(e=e||self).videojsAspectRatioPanel=t(e.videojs)}(this,function(e){"use strict";function t(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var n=(e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e).getComponent("MenuButton"),s=function(s){function r(e,t){var r;return r=s.call(this,e,{name:"ResizerButton"})||this,n.apply(i(r),arguments),r.controlText(e.localize("Aspect Ratio")),r}t(r,s);var o=r.prototype;return o.createEl=function(){return e.dom.createEl("div",{className:"vjs-menu-button vjs-menu-button-popup vjs-control vjs-button"})},o.buildCSSClass=function(){return n.prototype.buildCSSClass.call(this)+" vjs-icon-cog"},o.update=function(){return n.prototype.update.call(this)},o.handleClick=function(){this.player().getChild("ResizerPanel").toggleClass("vjs-hidden")},r}(n),r=e.getComponent("Component"),o=function(n){function s(e,t){var s;s=n.call(this,e,t)||this,r.apply(i(s),arguments),s.aspectRadio="origin",s.percent=100,s.radioWidth=1,s.radioHeight=1,s.currentHeight=s.player().currentHeight(),s.currentWidth=s.player().currentWidth();var o=s.el();o.childNodes[1].childNodes[1].onclick=function(){s.toggleClass("vjs-hidden")},window.addEventListener("resize",function(){s.currentHeight==s.player().currentHeight()&&s.currentWidth==s.player().currentWidth()||(s.currentHeight=s.player().currentHeight(),s.currentWidth=s.player().currentWidth(),s.resize())}),o.onmouseup=function(){o.onmousemove=null};var l=o.childNodes[1].childNodes[5].childNodes[1].childNodes[3];s.setScrollFunc(o,l,function(e){s.setPercent(e)}),s.player().on("play",function(){s.resize()});for(var a=o.childNodes[1].childNodes[5].childNodes[3].childNodes,d=[a[1],a[5],a[9],a[13]],c="origin",h=0;h<d.length;h++)d[h].onchange=function(e){e.target.value!==c&&(c=e.target.value,s.setAspectRadio(e.target.value))};return o.childNodes[1].childNodes[5].childNodes[5].childNodes[1].onclick=function(e){d[0].checked=!0,s.reset()},s}t(s,n);var o=s.prototype;return o.setAspectRadio=function(e){switch(e){case"origin":this.aspectRadio="origin";break;case"fill":this.aspectRadio="fill";break;case"16:9":this.aspectRadio="16:9",this.radioWidth=16,this.radioHeight=9;break;case"4:3":this.aspectRadio="4:3",this.radioWidth=4,this.radioHeight=3}this.resize()},o.setPercent=function(e){this.percent=e,this.resize()},o.reset=function(){this.player().tech_.el().style.objectFit="contain",this.aspectRadio="origin",this.percent=100;var e=this.el().childNodes[1].childNodes[5].childNodes[1].childNodes[3];e.childNodes[1].style.left="255px",e.childNodes[3].style.width="255px",this.resize()},o.resize=function(){if("origin"!=this.aspectRadio?this.player().tech_.el().style.objectFit="fill":this.player().tech_.el().style.objectFit="contain","origin"!=this.aspectRadio&&"fill"!=this.aspectRadio){var e=this.currentWidth/this.currentHeight,t=this.currentWidth,i=t*this.radioHeight/this.radioWidth;e>this.radioWidth/this.radioHeight&&(t=(i=this.currentHeight)*this.radioWidth/this.radioHeight);var n=(this.currentWidth-t*this.percent/100)/2,s=(this.currentHeight-i*this.percent/100)/2;this.setPadding(n,s)}else{var r=this.currentWidth*(100-this.percent)/100/2,o=this.currentHeight*(100-this.percent)/100/2;this.setPadding(r,o)}},o.setPadding=function(e,t){e<0&&(e=0),this.player().tech_.el().style.paddingLeft=e+"px",this.player().tech_.el().style.paddingRight=e+"px",t<0&&(t=0),this.player().tech_.el().style.paddingTop=t+"px",this.player().tech_.el().style.paddingBottom=t+"px"},o.setScrollFunc=function(e,t,i){var n=t.childNodes[1],s=t.childNodes[3],r=0;n.onmousedown=function(t){var n=(t||window.event).clientX-this.offsetLeft,o=this;e.onmousemove=function(e){var t=e||window.event;(r=t.clientX-n)<0?r=0:r>255&&(r=255),s.style.width=r+"px",o.style.left=r+"px",i(parseInt(r/255*100)),window.getSelection?window.getSelection().removeAllRanges():document.selection.empty()}}},o.createEl=function(){return e.dom.createEl("div",{className:"vjs-resizer-modal vjs-hidden",innerHTML:'\n <div class="vjs-resizer-modal-content">\n <span class="vjs-resizer-modal-close">&times;</span>\n <div class="vjs-resizer-modal-title">Aspect Ratio</div>\n <div class="vjs-resizer-wrap">\n <div class="vjs-resizer-size">\n <span class="size-title">Size</span>\n <div class="size-scroll" id="size-scroll">\n <div class="size-scroll-bar"></div>\n <div class="size-scroll-mask"></div>\n </div>\n </div>\n <div class="radios">\n Ratio\n <input type="radio" name="radio" id="origin" value="origin" checked >\n <label for="origin">Default</label>\n <input type="radio" name="radio" id="4:3" value="4:3">\n <label for="4:3">4:3</label>\n <input type="radio" name="radio" id="16:9" value="16:9">\n <label for="16:9">16:9</label>\n <input type="radio" name="radio" id="fill" value="fill">\n <label for="fill">Full</label>\n </div>\n <ul style="clear:both">\n <li id="vjs-resizer-reset">Reset</li>\n </ul>\n </div>\n </div>\n '})},s}(r),l=e.getPlugin("plugin"),a={},d=function(i){function n(t,n){var r;return(r=i.call(this,t)||this).options=e.mergeOptions(a,n),r.player.ready(function(){if(r.player.addClass("vjs-aspect-ratio-panel"),"Html5"!=t.techName_)return!1;t.on(["loadedmetadata"],function(e){if("undefined"==t.aspect_ratio_initialized||1==t.aspect_ratio_initialized);else{t.aspect_ratio_initialized=!0;var i=t.controlBar,n=i.getChild("fullscreenToggle").el();i.el().insertBefore(i.addChild("ResizerButton").el(),n),t.addChild("ResizerPanel")}})}),e.registerComponent("ResizerButton",s),e.registerComponent("ResizerPanel",o),r}return t(n,i),n}(l);return d.defaultState={},d.VERSION="0.0.1",e.registerPlugin("aspectRatioPanel",d),d});
@@ -28,11 +28,6 @@
28
28
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
29
29
 
30
30
  var videojs__default = /*#__PURE__*/_interopDefaultLegacy(videojs);
31
-
32
- // if (typeof window !== 'undefined') {
33
- // window['videojs_autocaption'] = { version: "4.0.2" };
34
- // }
35
-
36
31
  var version = "4.0.2";
37
32
 
38
33
  // Default options for the button.
@@ -30,7 +30,7 @@
30
30
  <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
31
31
  </video>
32
32
 
33
- <script src="../hotkeys.js"></script>
33
+ <script src="../js/hotkeys.js"></script>
34
34
  <script>
35
35
  // initialize the plugin
36
36
  videojs('video1').ready(function() {
@@ -0,0 +1,25 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>videojs-persist Demo</title>
6
+ <link href="../../../../css/videojs.css" rel="stylesheet">
7
+
8
+ </head>
9
+ <body>
10
+ <video id="videojs-persist-player" class="video-js vjs-default-skin" controls>
11
+ <source src="//vjs.zencdn.net/v/oceans.mp4" type='video/mp4'>
12
+ <source src="//vjs.zencdn.net/v/oceans.webm" type='video/webm'>
13
+ </video>
14
+ <script src="../../../../js/video.js"></script>
15
+ <script src="../js/videojs-persist.js"></script>
16
+ <script>
17
+ (function(window, videojs) {
18
+ var examplePlayer = window.examplePlayer = videojs('videojs-persist-player', {
19
+ playbackRates: [1, 2]
20
+ });
21
+ var persist = window.persist = examplePlayer.persist({muted: false});
22
+ }(window, window.videojs));
23
+ </script>
24
+ </body>
25
+ </html>
@@ -0,0 +1,19 @@
1
+ Copyright (c) mister-ben <git@misterben.me>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
@@ -0,0 +1,90 @@
1
+ # videojs-persist
2
+
3
+ Stores volume, muted and playback rate to local storage to be restored in the next session.
4
+
5
+ ## Table of Contents
6
+
7
+ <!-- START doctoc generated TOC please keep comment here to allow auto update -->
8
+ <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
9
+
10
+
11
+ - [Installation](#installation)
12
+ - [Usage](#usage)
13
+ - [`<script>` Tag](#script-tag)
14
+ - [Browserify/CommonJS](#browserifycommonjs)
15
+ - [RequireJS/AMD](#requirejsamd)
16
+ - [Options](#options)
17
+ - [License](#license)
18
+
19
+ <!-- END doctoc generated TOC please keep comment here to allow auto update -->
20
+ ## Installation
21
+
22
+ ```sh
23
+ npm install --save videojs-persist
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ To include videojs-persist on your website or web application, use any of the following methods.
29
+
30
+ ### `<script>` Tag
31
+
32
+ This is the simplest case. Get the script in whatever way you prefer and include the plugin _after_ you include [video.js][videojs], so that the `videojs` global is available.
33
+
34
+ ```html
35
+ <script src="//path/to/video.min.js"></script>
36
+ <script src="//path/to/videojs-persist.min.js"></script>
37
+ <script>
38
+ var player = videojs('my-video');
39
+
40
+ player.persist();
41
+ </script>
42
+ ```
43
+
44
+ Alternatively get the files from a CDN e.g. https://unpkg.com/videojs-persist/dist/videojs-persist.min.js
45
+
46
+ ### Browserify/CommonJS
47
+
48
+ When using with Browserify, install videojs-persist via npm and `require` the plugin as you would any other module.
49
+
50
+ ```js
51
+ var videojs = require('video.js');
52
+
53
+ // The actual plugin function is exported by this module, but it is also
54
+ // attached to the `Player.prototype`; so, there is no need to assign it
55
+ // to a variable.
56
+ require('videojs-persist');
57
+
58
+ var player = videojs('my-video');
59
+
60
+ player.persist();
61
+ ```
62
+
63
+ ### RequireJS/AMD
64
+
65
+ When using with RequireJS (or another AMD library), get the script in whatever way you prefer and `require` the plugin as you normally would:
66
+
67
+ ```js
68
+ require(['video.js', 'videojs-persist'], function(videojs) {
69
+ var player = videojs('my-video');
70
+
71
+ player.persist();
72
+ });
73
+ ```
74
+
75
+ ## Options
76
+
77
+ * `muted` persist muted. default `true`
78
+ * `volume` persist muted. default `true`
79
+ * `playbackRate` persist muted. default `true`
80
+ * `restoreUnsupportedRate` restore playback when not in current rates option. default `false`
81
+ * `key` localstorage key to use. default `videojs-persist`
82
+
83
+ By default, playbackRate will not be restored on a player that does not have that rate in its options. This is to avoid having a player playing an unexpected rate, without the control to change it. Setting `restoreUnsupportedRate` to `true` will set it regardless.
84
+
85
+ ## License
86
+
87
+ MIT. Copyright (c) mister-ben &lt;git@misterben.me&gt;
88
+
89
+
90
+ [videojs]: http://videojs.com/