j1-template 2024.3.23 → 2024.3.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/assets/data/gallery_app.html +102 -14
- data/assets/theme/j1/adapter/js/gallery.js +13 -2
- data/assets/theme/j1/core/css/themes/unolight/bootstrap.css +29 -0
- data/assets/theme/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
- data/assets/theme/j1/core/css/vendor.css +1 -1
- data/assets/theme/j1/core/css/vendor.min.css +1 -1
- data/assets/theme/j1/modules/lightGallery/js/lightgallery.js +36 -17
- data/assets/theme/j1/modules/lightGallery/js/lightgallery.min.js +1 -8
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.js +423 -297
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.min.js +1 -8
- data/assets/theme/j1/modules/rtable/css/theme/uno/rtable.css +11 -1
- data/assets/theme/j1/modules/videojs/css/themes/uno.css +41 -29
- data/assets/theme/j1/modules/videojs/css/themes/uno.min.css +1 -1
- data/assets/theme/j1/modules/videojs/plugins/controls/aspect-ratio-panel/!examples/index.html +4 -9
- data/assets/theme/j1/modules/videojs/plugins/controls/hotkeys/!examples/example.html +1 -1
- data/assets/theme/j1/modules/videojs/plugins/controls/persist-settings/!examples/index.html +3 -7
- data/assets/theme/j1/modules/videojs/plugins/controls/playbackrate-adjuster/!examples/index.html +3 -8
- data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/dailymotion-controls.html +4 -4
- data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/dailymotion-javascript.html +3 -3
- data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/dailymotion-playlist.html +3 -3
- data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/global-parameters.html +3 -3
- data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/simple.html +15 -4
- data/assets/theme/j1/modules/videojs/plugins/players/dm/!examples/switch.html +3 -3
- data/assets/theme/j1/modules/videojs/plugins/players/vm/!examples/index.html +3 -3
- data/assets/theme/j1/modules/videojs/plugins/players/vm/!examples/player/index.html +3 -3
- data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/global-parameters.html +5 -5
- data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/simple.html +5 -5
- data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/switch.html +5 -5
- data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/youtube-controls.html +5 -5
- data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/youtube-javascript.html +5 -5
- data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/youtube-list.html +5 -5
- data/assets/theme/j1/modules/videojs/plugins/players/yt/!examples/youtube-playlist.html +5 -5
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/README.md +5 -5
- data/lib/starter_web/_config.yml +1 -1
- data/lib/starter_web/_data/blocks/banner.yml +2 -2
- data/lib/starter_web/_data/modules/attics.yml +11 -0
- data/lib/starter_web/_data/modules/carousel.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/masonry.yml +115 -22
- data/lib/starter_web/_data/modules/gallery.yml +163 -215
- data/lib/starter_web/_data/modules/masonry.yml +6 -0
- data/lib/starter_web/_data/templates/feed.xml +1 -1
- data/lib/starter_web/_includes/attributes.asciidoc +7 -0
- data/lib/starter_web/_plugins/index/lunr.rb +1 -1
- data/lib/starter_web/assets/image/module/attic/1920x1280/alexander-redl.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/alexander-shatov.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/alexey-ruban.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/andrea-badino.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/bootstrap-modal.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/bp-miller.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/brad-neathery.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/brigitta-schneiter.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/build-with-gemini.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/clem-onojeghuo.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/crawford-jolly.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/eleni-afiontzi.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/fly-d.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/guillaume-bolduc.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/ideas-start-here-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/isaac-davis.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/j1-content-mockup-2.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/j1-content-mockup-3.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/j1-starter-mockup-1.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/john-schnobrich-2.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/josep-martins.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/josh-liu.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/kelly-sikkemal.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/kira-auf-der-heide.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/kristopher-roller.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/markus-spiske.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/martin-sanchez.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/material_symbols.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/matthaeus.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/melanie-deziel.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/milad-fakurian.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/mohammad-rahmani.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/nasa.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/quino-al-2.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/stories-ink-tattoo-care.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/towfiqu-barbhuiya.jpg +0 -0
- data/lib/starter_web/assets/image/page/tour/bootswatch-themes.jpg +0 -0
- data/lib/starter_web/index.html +3 -2
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/panels/intro_panel/_includes/attributes.asciidoc +1 -1
- data/lib/starter_web/pages/public/tools/previewer/preview_bootstrap_theme.adoc +5 -5
- data/lib/starter_web/pages/public/tools/tester/app_tester_amplitudejs_yt.adoc +7 -3
- data/lib/starter_web/pages/public/tools/tester/app_tester_swiperjs.adoc +7 -3
- data/lib/starter_web/pages/public/tools/tester/videojs_macro_tester.adoc +18 -3
- data/lib/starter_web/pages/public/tour/_includes/attributes.asciidoc +1 -2
- data/lib/starter_web/pages/public/tour/_includes/documents/themes_bootstrap.asciidoc +1 -1
- data/lib/starter_web/pages/public/tour/asciidoc_extensions.adoc +7 -3
- data/lib/starter_web/pages/public/tour/bootstrap_themes.adoc +62 -7
- data/lib/starter_web/pages/public/tour/icon_fonts.adoc +4 -8
- data/lib/starter_web/pages/public/tour/modal_extentions.adoc +2 -2
- data/lib/starter_web/pages/public/tour/responsive_tables.adoc +21 -15
- data/lib/starter_web/pages/public/tour/typography.adoc +5 -5
- data/lib/starter_web/pages/public/tour/video_data.adoc +24 -5
- metadata +11 -102
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/lg-transitions.css +0 -984
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/lg-transitions.min.css +0 -26
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/lightgallery-bundle.css +0 -1627
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/lightgallery-bundle.min.css +0 -25
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/animation-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/customize-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/dynamic-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/facebook-icon.svg +0 -10
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/googleplus-icon.svg +0 -30
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/html5-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/linked-in.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/module-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/play-button-hover.svg +0 -94
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/play-button.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/play-button.svg +0 -93
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/responsive-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/thumb-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/touch-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/twitter-icon.svg +0 -15
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/twitter.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/video1-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/zoom-w.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/icons/zoom.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/uno.css +0 -140
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/css/themes/uno/uno.min.css +0 -19
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/fonts/lg.svg +0 -54
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/fonts/lg.ttf +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/fonts/lg.woff +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/fonts/lg.woff2 +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/images/loading.gif +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/img/loading.gif +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/img/video-play.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/img/vimeo-play.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/img/youtube-play.png +0 -0
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/lightgallery.js +0 -2782
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/lightgallery.min.js +0 -26
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/parser/webvtt/LICENSE.md +0 -44
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/parser/webvtt/README.md +0 -37
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/parser/webvtt/parser.js +0 -890
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/parser/webvtt/parser.min.js +0 -8
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/j1/j1-video.js +0 -402
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/j1/j1-video.min.js +0 -7
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/j1/lg-video.1.js +0 -585
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-autoplay.js +0 -275
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-autoplay.min.js +0 -26
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-comment.js +0 -230
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-comment.min.js +0 -26
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-fullscreen.js +0 -160
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-fullscreen.min.js +0 -26
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-hash.js +0 -223
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-hash.min.js +0 -27
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-medium-zoom.js +0 -157
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-medium-zoom.min.js +0 -26
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-pager.js +0 -164
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-pager.min.js +0 -26
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-rotate.js +0 -299
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-rotate.min.js +0 -26
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-share.js +0 -244
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-share.min.js +0 -27
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-thumbnail.js +0 -509
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-thumbnail.min.js +0 -26
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-video.js +0 -909
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-video.min.js +0 -26
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-vimeo-thumbnail.js +0 -207
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-vimeo-thumbnail.min.js +0 -26
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-zoom.js +0 -999
- data/assets/theme/j1/modules/lightGallery/!v2.7.2/js/plugins/lg-zoom.min.js +0 -26
- data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-thumbnail.0.js +0 -495
- data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-thumbnail.1.js +0 -513
- data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-video.0.js +0 -553
- data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-video.1.js +0 -585
- data/assets/theme/j1/modules/lightGallery/js/plugins/j1/lg-video.2.js +0 -914
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/font/README.md +0 -151
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/font/VideoJS.svg +0 -150
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/font/video-js-cdn.css +0 -2012
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/city.css +0 -147
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/city.min.css +0 -5
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/fantasy.css +0 -113
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/fantasy.min.css +0 -5
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/forest.css +0 -166
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/forest.min.css +0 -5
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/sea.css +0 -72
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/sea.min.css +0 -5
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/uno.css +0 -311
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/themes/uno.min.css +0 -19
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/videojs.css +0 -1686
- data/assets/theme/j1/modules/videojs/!v8.12.0/css/videojs.min.css +0 -13
- data/assets/theme/j1/modules/videojs/!v8.12.0/js/video.js +0 -65226
- data/assets/theme/j1/modules/videojs/!v8.12.0/js/video.min.js +0 -55
- data/lib/starter_web/_data/modules/gallery_app.yml +0 -1002
- data/lib/starter_web/_data/modules/gallery_playlists.yml +0 -534
- data/lib/starter_web/assets/image/module/attic/1920x1280/alina-grubnyak.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/bruno-figueiredo.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/harpal-singh.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/hayden-mills-2.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/j1-content-mockup-1.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/recha-oktaviani.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/1920x1280/tiny_desk.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/ideas-start-here-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/image/module/attic/ideas-start-here-1920x1280.jpg +0 -0
@@ -216,7 +216,272 @@
|
|
216
216
|
}
|
217
217
|
});
|
218
218
|
|
219
|
-
} // END loadVtt
|
219
|
+
}; // END loadVtt
|
220
|
+
|
221
|
+
|
222
|
+
// jadams
|
223
|
+
// -------------------------------------------------------------------------
|
224
|
+
// vjsProcessExtendedButtonsAndPlugins
|
225
|
+
// Loads a given WEBVTT file (from data path) and process loaded
|
226
|
+
// data in callback cb (function)
|
227
|
+
// -------------------------------------------------------------------------
|
228
|
+
var vjsProcessExtendedButtonsAndPlugins = function (vjsObject, videojsPlayer, videoInfo) {
|
229
|
+
const vjsOptions = j1.modules.videojs.options;
|
230
|
+
var videoInfo, videoStart, videojsPlayer,
|
231
|
+
playbackRates, hotKeysPlugin, skipButtonsPlugin, zoomPlugin;
|
232
|
+
|
233
|
+
var videoData = {
|
234
|
+
tracks: false
|
235
|
+
};
|
236
|
+
|
237
|
+
var playbackRatesDefaults = vjsOptions.playbackRates.values;
|
238
|
+
var chapterTracksEnabled = false;
|
239
|
+
|
240
|
+
var hotKeysPluginDefaults = {
|
241
|
+
volumeStep: vjsOptions.plugins.hotKeys.volumeStep,
|
242
|
+
seekStep: vjsOptions.plugins.hotKeys.seekStep,
|
243
|
+
enableMute: vjsOptions.plugins.hotKeys.enableMute,
|
244
|
+
enableVolumeScroll: vjsOptions.plugins.hotKeys.enableVolumeScroll,
|
245
|
+
enableHoverScroll: vjsOptions.plugins.hotKeys.enableHoverScroll,
|
246
|
+
enableFullscreen: vjsOptions.plugins.hotKeys.enableFullscreen,
|
247
|
+
enableNumbers: vjsOptions.plugins.hotKeys.enableNumbers,
|
248
|
+
enableJogStyle: vjsOptions.plugins.hotKeys.enableJogStyle,
|
249
|
+
alwaysCaptureHotkeys: vjsOptions.plugins.hotKeys.alwaysCaptureHotkeys,
|
250
|
+
captureDocumentHotkeys: vjsOptions.plugins.hotKeys.captureDocumentHotkeys,
|
251
|
+
enableModifiersForNumbers: vjsOptions.plugins.hotKeys.enableModifiersForNumbers,
|
252
|
+
enableInactiveFocus: vjsOptions.plugins.hotKeys.enableInactiveFocus,
|
253
|
+
skipInitialFocus: vjsOptions.plugins.hotKeys.skipInitialFocus
|
254
|
+
};
|
255
|
+
|
256
|
+
var skipButtonsPluginDefaults = {
|
257
|
+
backward: vjsOptions.plugins.skipButtons.backward,
|
258
|
+
forward: vjsOptions.plugins.skipButtons.forward,
|
259
|
+
backwardIndex: 0,
|
260
|
+
forwardIndex: 1
|
261
|
+
};
|
262
|
+
|
263
|
+
var zoomPluginDefaults = {
|
264
|
+
moveX: vjsOptions.plugins.zoomButtons.moveX,
|
265
|
+
moveY: vjsOptions.plugins.zoomButtons.moveY,
|
266
|
+
rotate: vjsOptions.plugins.zoomButtons.rotate,
|
267
|
+
zoom: vjsOptions.plugins.zoomButtons.zoom
|
268
|
+
};
|
269
|
+
|
270
|
+
// jadams, 2025-06-11: added customControlContainer
|
271
|
+
// ---------------------------------------------------------------------
|
272
|
+
var vjsPlayerControlBar = videojsPlayer.controlBar;
|
273
|
+
|
274
|
+
// create customControlContainer for progressControlSilder|time (display) elements
|
275
|
+
const customProgressContainer = vjsPlayerControlBar.addChild('Component', {
|
276
|
+
el: videojs.dom.createEl('div', {
|
277
|
+
className: 'vjs-theme-uno custom-progressbar-container'
|
278
|
+
})
|
279
|
+
});
|
280
|
+
|
281
|
+
// move progressControlSlider into customControlContainer
|
282
|
+
const progressControlSlider = vjsPlayerControlBar.progressControl;
|
283
|
+
if (progressControlSlider) {
|
284
|
+
customProgressContainer.el().appendChild(progressControlSlider.el());
|
285
|
+
}
|
286
|
+
|
287
|
+
// move currentTimeDisplay BEFORE the progressControlSilder
|
288
|
+
const currentTimeDisplay = vjsPlayerControlBar.currentTimeDisplay;
|
289
|
+
if (currentTimeDisplay) {
|
290
|
+
customProgressContainer.el().insertBefore(currentTimeDisplay.el(), progressControlSlider.el());
|
291
|
+
}
|
292
|
+
|
293
|
+
// move the durationDisplay AFTER the progressControlSilder
|
294
|
+
const durationDisplay = vjsPlayerControlBar.durationDisplay;
|
295
|
+
if (durationDisplay) {
|
296
|
+
customProgressContainer.el().appendChild(durationDisplay.el());
|
297
|
+
}
|
298
|
+
|
299
|
+
// configure VideoJS (extended) Plugins
|
300
|
+
// ---------------------------------------------------------------------
|
301
|
+
hotKeysPlugin = (vjsObject.settings.videojsOptions.hotKeysPlugin !== undefined) ? vjsObject.settings.videojsOptions.hotKeysPlugin : hotKeysPluginDefaults;
|
302
|
+
skipButtonsPlugin = (vjsObject.settings.videojsOptions.controlBar.skipButtonsPlugin !== undefined) ? vjsObject.settings.videojsOptions.controlBar.skipButtonsPlugin : skipButtonsPluginDefaults;
|
303
|
+
zoomPlugin = (vjsObject.settings.videojsOptions.controlBar.zoomPlugin !== undefined) ? vjsObject.settings.videojsOptions.controlBar.zoomPlugin : false;
|
304
|
+
playbackRates = (vjsObject.settings.videojsOptions.controlBar.playbackRates !== undefined) ? vjsObject.settings.videojsOptions.controlBar.playbackRates : playbackRatesDefaults;
|
305
|
+
|
306
|
+
// jadams, 2024-01-22: added video start position
|
307
|
+
// ---------------------------------------------------------------------
|
308
|
+
if (vjsObject.settings.videojsOptions.videoStart !== undefined) {
|
309
|
+
videoStart = vjsObject.settings.videojsOptions.videoStart[index];
|
310
|
+
videojsPlayer.on("play", function() {
|
311
|
+
var startFromSecond = new Date('1970-01-01T' + videoStart + 'Z').getTime() / 1000;
|
312
|
+
videojsPlayer.currentTime(startFromSecond);
|
313
|
+
}); // END on event play
|
314
|
+
} // END if videoStart
|
315
|
+
|
316
|
+
// add playbackRates, only available for VideoJS
|
317
|
+
// ---------------------------------------------------------------------
|
318
|
+
if (videojsPlayer.playbackRates !== undefined) {
|
319
|
+
videojsPlayer.playbackRates(playbackRates);
|
320
|
+
}
|
321
|
+
|
322
|
+
// add hotkeys Plugin, only available for VideoJS
|
323
|
+
// ---------------------------------------------------------------------
|
324
|
+
if (hotKeysPlugin !== undefined && hotKeysPlugin.enabled && videojsPlayer.hotKeys !== undefined) {
|
325
|
+
|
326
|
+
// merge objects
|
327
|
+
hotKeysPlugin.options = __assign(__assign({}, hotKeysPluginDefaults), hotKeysPlugin.options);
|
328
|
+
|
329
|
+
// prevent multiple plugin instances
|
330
|
+
var hotKeysActive = false;
|
331
|
+
if (videojsPlayer.activePlugins_ !== undefined && videojsPlayer.activePlugins_.hotKeys !== undefined) {
|
332
|
+
hotKeysActive = videojsPlayer.activePlugins_.hotKeys;
|
333
|
+
}
|
334
|
+
|
335
|
+
if (!hotKeysActive) {
|
336
|
+
videojsPlayer.hotKeys({
|
337
|
+
volumeStep: hotKeysPlugin.options.volumeStep,
|
338
|
+
seekStep: hotKeysPlugin.options.seekStep,
|
339
|
+
enableMute: hotKeysPlugin.options.enableMute,
|
340
|
+
enableFullscreen: hotKeysPlugin.options.enableFullscreen,
|
341
|
+
enableNumbers: hotKeysPlugin.options.enableNumbers,
|
342
|
+
enableVolumeScroll: hotKeysPlugin.options.enableVolumeScroll,
|
343
|
+
enableHoverScroll: hotKeysPlugin.options.enableHoverScroll,
|
344
|
+
alwaysCaptureHotkeys: hotKeysPlugin.options.alwaysCaptureHotkeys,
|
345
|
+
captureDocumentHotkeys: hotKeysPlugin.options.captureDocumentHotkeys,
|
346
|
+
documentHotkeysFocusElementFilter: hotKeysPlugin.options.documentHotkeysFocusElementFilter,
|
347
|
+
|
348
|
+
// Mimic VLC seek behavior (default to: 15)
|
349
|
+
seekStep: function(e) {
|
350
|
+
if (e.ctrlKey && e.altKey) {
|
351
|
+
return 5*60;
|
352
|
+
} else if (e.ctrlKey) {
|
353
|
+
return 60;
|
354
|
+
} else if (e.altKey) {
|
355
|
+
return 10;
|
356
|
+
} else {
|
357
|
+
return 15;
|
358
|
+
}
|
359
|
+
}
|
360
|
+
|
361
|
+
});
|
362
|
+
} // END if hotKeysActive
|
363
|
+
|
364
|
+
} // END if hotKeysPlugin enabled
|
365
|
+
|
366
|
+
// add skipButtons Plugin, only available for VideoJS
|
367
|
+
// ---------------------------------------------------------------------
|
368
|
+
if (skipButtonsPlugin !== undefined && skipButtonsPlugin.enabled && videojsPlayer.skipButtons !== undefined) {
|
369
|
+
// merge objects
|
370
|
+
skipButtonsPlugin.options = __assign(__assign({}, skipButtonsPluginDefaults), skipButtonsPlugin.options);
|
371
|
+
|
372
|
+
// prevent multiple plugin instances
|
373
|
+
var skipButtonsActive = false;
|
374
|
+
if (videojsPlayer.activePlugins_ !== undefined && videojsPlayer.activePlugins_.skipButtons !== undefined) {
|
375
|
+
skipButtonsActive = videojsPlayer.activePlugins_.skipButtons;
|
376
|
+
}
|
377
|
+
|
378
|
+
if (!skipButtonsActive) {
|
379
|
+
videojsPlayer.skipButtons({
|
380
|
+
backward: skipButtonsPlugin.options.backward,
|
381
|
+
forward: skipButtonsPlugin.options.forward,
|
382
|
+
backwardIndex: skipButtonsPlugin.options.backwardIndex,
|
383
|
+
forwardIndex: skipButtonsPlugin.options.forwardIndex
|
384
|
+
});
|
385
|
+
}
|
386
|
+
|
387
|
+
} // END if skipButtons Plugin enabled
|
388
|
+
|
389
|
+
// add zoom Plugin (only available for VJS|local video/mp4)
|
390
|
+
// ---------------------------------------------------------------------
|
391
|
+
if (videoInfo.youtube) {
|
392
|
+
// zoom pluging NOT supported for YouTube
|
393
|
+
zoomPlugin.enabled = false;
|
394
|
+
}
|
395
|
+
|
396
|
+
if (zoomPlugin !== undefined && zoomPlugin.enabled && videojsPlayer.zoomButtons !== undefined) {
|
397
|
+
// merge objects
|
398
|
+
zoomPlugin.options = __assign(__assign({}, zoomPluginDefaults), zoomPlugin.options);
|
399
|
+
|
400
|
+
// prevent multiple plugin instances
|
401
|
+
var zoomButtonsActive = false;
|
402
|
+
if (videojsPlayer.activePlugins_ !== undefined && videojsPlayer.activePlugins_.zoomButtons !== undefined) {
|
403
|
+
zoomButtonsActive = videojsPlayer.activePlugins_.zoomButtons;
|
404
|
+
}
|
405
|
+
|
406
|
+
if (!zoomButtonsActive) {
|
407
|
+
videojsPlayer.zoomButtons({
|
408
|
+
moveX: zoomPlugin.options.moveX,
|
409
|
+
moveY: zoomPlugin.options.moveY,
|
410
|
+
rotate: zoomPlugin.options.rotate,
|
411
|
+
zoom: zoomPlugin.options.zoom
|
412
|
+
});
|
413
|
+
}
|
414
|
+
|
415
|
+
} // END if zoom Plugin enabled
|
416
|
+
|
417
|
+
// chapter track processing, only available for VideoJS
|
418
|
+
// ---------------------------------------------------------------------
|
419
|
+
if (vjsObject.core.galleryItems[vjsObject.core.index].video !== undefined) {
|
420
|
+
videoData = JSON.parse(vjsObject.core.galleryItems[vjsObject.core.index].video);
|
421
|
+
}
|
422
|
+
|
423
|
+
// chapter tracks only available for VideoJS (local video/mp4)
|
424
|
+
// ---------------------------------------------------------------------
|
425
|
+
if (videoData.tracks && videoData.tracks.length > 0) {
|
426
|
+
for (var i=0; i<videoData.tracks.length; i++) {
|
427
|
+
if (videoData.tracks[i].kind == 'chapters') {
|
428
|
+
trackSrc = videoData.tracks[i].src;
|
429
|
+
chapterTracksEnabled = true;
|
430
|
+
}
|
431
|
+
}
|
432
|
+
} // END if videoData tracks
|
433
|
+
|
434
|
+
if (chapterTracksEnabled) {
|
435
|
+
var parser = new WebVTTParser();
|
436
|
+
var markers = [];
|
437
|
+
|
438
|
+
function cb_load (data /* ,textStatus, jqXHR */ ) {
|
439
|
+
var tree = parser.parse(data, 'metadata');
|
440
|
+
var marker;
|
441
|
+
|
442
|
+
// add chapter tracks to markers array
|
443
|
+
for (var i=0; i<tree.cues.length; i++) {
|
444
|
+
marker = { time: tree.cues[i].startTime, label: tree.cues[i].text };
|
445
|
+
markers.push(marker);
|
446
|
+
}
|
447
|
+
}; // END function cb_load
|
448
|
+
|
449
|
+
// load chapter tracks
|
450
|
+
// -----------------------------------------------------------------
|
451
|
+
loadVtt(trackSrc, cb_load);
|
452
|
+
|
453
|
+
// add chapter tracks on play
|
454
|
+
videojsPlayer.on("play", function() {
|
455
|
+
videojsPlayer.currentTime(videoStart);
|
456
|
+
|
457
|
+
var total = videojsPlayer.duration();
|
458
|
+
var timeline = $(videojsPlayer.controlBar.progressControl.children_[0].el_);
|
459
|
+
|
460
|
+
// add chapter tracks on timeline (delayed)
|
461
|
+
setTimeout (function() {
|
462
|
+
var markers_loaded = setInterval (function () {
|
463
|
+
if (markers.length) {
|
464
|
+
for (var i=0; i<markers.length; i++) {
|
465
|
+
var left = (markers[i].time / total * 100) + '%';
|
466
|
+
var time = markers[i].time;
|
467
|
+
var el = $('<div class="vjs-chapter-marker" style="left: ' +left+ '" data-time="' +time+ '"> <span>' +markers[i].label+ '</span></div>');
|
468
|
+
|
469
|
+
el.click(function() {
|
470
|
+
videojsPlayer.currentTime($(this).data('time'));
|
471
|
+
});
|
472
|
+
|
473
|
+
timeline.append(el);
|
474
|
+
}
|
475
|
+
clearInterval(markers_loaded);
|
476
|
+
}
|
477
|
+
}, 10); // END markers_loaded
|
478
|
+
}, 1000 ); // END setTimeout
|
479
|
+
|
480
|
+
}); // END on "play"
|
481
|
+
|
482
|
+
} // END if chapterTracksEnabled
|
483
|
+
|
484
|
+
}; // END vjsProcessExtendedButtonsAndPlugins
|
220
485
|
|
221
486
|
/**
|
222
487
|
* Video module for lightGallery
|
@@ -304,7 +569,7 @@
|
|
304
569
|
var _a = event.detail, index = _a.index, src = _a.src, html5Video = _a.html5Video, hasPoster = _a.hasPoster;
|
305
570
|
if (!hasPoster) {
|
306
571
|
// All functions are called separately if poster exist in loadVideoOnPosterClick function
|
307
|
-
this.
|
572
|
+
this.appendVideo(this.core.getSlideItem(index), {
|
308
573
|
src: src,
|
309
574
|
addClass: 'lg-object',
|
310
575
|
index: index,
|
@@ -378,58 +643,56 @@
|
|
378
643
|
|
379
644
|
// jadams
|
380
645
|
Video.prototype.getVideoHtml = function (src, addClass, index, html5Video) {
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
646
|
+
var currentGalleryHtml, currentGalleryItem, videoInfo,
|
647
|
+
videoTitle, video, video_api, commonIframeProps;
|
648
|
+
|
649
|
+
videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
|
650
|
+
currentGalleryItem = this.core.galleryItems[index];
|
651
|
+
|
652
|
+
if (currentGalleryItem.subHtml.includes('<h2>')) {
|
653
|
+
currentGalleryHtml = currentGalleryItem.subHtml.split("</h2>");
|
654
|
+
videoTitle = currentGalleryHtml[0].replace('<h2>','');
|
655
|
+
} else if (currentGalleryItem.subHtml.includes('<h5>')) {
|
656
|
+
// for backward compatibility reasons
|
657
|
+
currentGalleryHtml = currentGalleryItem.subHtml.split("</h5>");
|
658
|
+
videoTitle = currentGalleryHtml[0].replace('<h5>','');
|
659
|
+
}
|
660
|
+
|
661
|
+
videoTitle = videoTitle ? 'title="' + videoTitle + '"' : '';
|
662
|
+
commonIframeProps = "allowtransparency=\"true\"\n frameborder=\"0\"\n scrolling=\"no\"\n allowfullscreen\n mozallowfullscreen\n webkitallowfullscreen\n oallowfullscreen\n msallowfullscreen";
|
663
|
+
|
389
664
|
if (videoInfo.youtube) {
|
390
|
-
var videoId
|
391
|
-
var youTubeParams
|
665
|
+
var videoId = 'lg-youtube' + index;
|
666
|
+
var youTubeParams = getYouTubeParams(videoInfo, this.settings.youTubePlayerParams);
|
392
667
|
var isYouTubeNoCookieURL = isYouTubeNoCookie(src);
|
393
|
-
var youtubeURL
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
// var video = `
|
398
|
-
// <video
|
399
|
-
// id="${videoId}"
|
400
|
-
// class="lg-video-object lg-youtube vjs-theme-uno video-js">
|
401
|
-
// data-setup='{
|
402
|
-
// "fluid" : true,
|
403
|
-
// "techOrder": [
|
404
|
-
// "youtube", "html5"
|
405
|
-
// ],
|
406
|
-
// "sources": [{
|
407
|
-
// "type": "video/youtube",
|
408
|
-
// "src": "//youtube.com/watch?v=nV8UZJNBY6"
|
409
|
-
// }],
|
410
|
-
// "controlBar": {
|
411
|
-
// "pictureInPictureToggle": false,
|
412
|
-
// "volumePanel": {
|
413
|
-
// "inline": false
|
414
|
-
// }
|
415
|
-
// }
|
416
|
-
// }'>
|
417
|
-
// Your browser does not support HTML5 video
|
418
|
-
// </video>
|
419
|
-
// `;
|
420
|
-
|
421
|
-
var video_new = `
|
668
|
+
var youtubeURL = isYouTubeNoCookieURL ? '//youtube-nocookie.com/' : '//youtube.com/';
|
669
|
+
var ytVideoID = videoInfo.youtube[1];
|
670
|
+
|
671
|
+
var video_iframe = `
|
422
672
|
<iframe
|
423
673
|
id="${videoId}"
|
424
674
|
class="lg-video-object lg-youtube ${addClass}"
|
425
|
-
|
426
|
-
title="${videoTitle}""
|
427
|
-
src="${youtubeURL}/embed${videoInfo.youtube[1]}${youTubeParams}"
|
675
|
+
src="${youtubeURL}/embed/${ytVideoID}${youTubeParams}"
|
428
676
|
${commonIframeProps}>
|
429
677
|
</iframe>
|
430
678
|
`;
|
431
679
|
|
432
|
-
|
680
|
+
var video_vjs = `
|
681
|
+
<video
|
682
|
+
id="${videoId}"
|
683
|
+
class="video-js lg-video-object lg-youtube vjs-theme-uno">
|
684
|
+
<source
|
685
|
+
type="video/youtube",
|
686
|
+
src="//youtube.com/watch?v=${ytVideoID}"
|
687
|
+
>
|
688
|
+
|
689
|
+
Your browser does not support HTML5 video.
|
690
|
+
</video>
|
691
|
+
`;
|
692
|
+
|
693
|
+
video_api = 'youtube';
|
694
|
+
video = (video_api === 'iframe') ? video_iframe : video_vjs;
|
695
|
+
// END videoInfo youtube
|
433
696
|
} else if (videoInfo.vimeo) {
|
434
697
|
var videoId = 'lg-vimeo' + index;
|
435
698
|
var playerParams = getVimeoURLParams(this.settings.vimeoPlayerParams, videoInfo);
|
@@ -497,26 +760,67 @@
|
|
497
760
|
* @param {HTMLElement} el - slide element
|
498
761
|
* @param {Object} videoParams - Video parameters, Contains src, class, index, htmlVideo
|
499
762
|
*/
|
500
|
-
Video.prototype.
|
501
|
-
var
|
502
|
-
var
|
763
|
+
Video.prototype.appendVideo = function (el, videoParams) {
|
764
|
+
var vjsPlayer;
|
765
|
+
var _a = {};
|
766
|
+
var videojsEnabled = false;
|
767
|
+
var videoHtml = this.getVideoHtml(videoParams.src, videoParams.addClass, videoParams.index, videoParams.html5Video);
|
768
|
+
|
503
769
|
el.find('.lg-video-cont').append(videoHtml);
|
504
770
|
var $videoElement = el.find('.lg-video-object').first();
|
771
|
+
|
772
|
+
// check the HTML Element for the active player (failsafe)
|
773
|
+
// if NOT available, something went totally wrong
|
774
|
+
if (!$videoElement.get()) {
|
775
|
+
return;
|
776
|
+
}
|
777
|
+
|
505
778
|
if (videoParams.html5Video) {
|
506
779
|
$videoElement.on('mousedown.lg.video', function (e) {
|
507
780
|
e.stopPropagation();
|
508
781
|
});
|
509
782
|
}
|
510
|
-
|
783
|
+
|
784
|
+
_a = this.core.galleryItems[videoParams.index].__slideVideoInfo;
|
785
|
+
_a.videojs = { enabled: false };
|
786
|
+
videojsEnabled = videoHtml.includes('iframe');
|
787
|
+
_a.videojs.enabled = (videojsEnabled) ? false : true;
|
788
|
+
|
789
|
+
// jadams, 2025-06-13: process html5
|
790
|
+
if (this.settings.videojs && (_a === null || _a === void 0 ? void 0 : _a.html5)) {
|
511
791
|
try {
|
512
|
-
|
792
|
+
if (_a.videojs.enabled) {
|
793
|
+
vjsPlayer = videojs($videoElement.get(), this.settings.videojsOptions);
|
794
|
+
this.settings.vjsPlayer = vjsPlayer;
|
795
|
+
_a.videojs.player = vjsPlayer;
|
796
|
+
|
797
|
+
return vjsPlayer;
|
798
|
+
}
|
513
799
|
}
|
514
800
|
catch (e) {
|
515
801
|
// jadams:
|
516
802
|
console.warn('lightGallery: Make sure you have included //github.com/vimeo/player.js');
|
517
803
|
}
|
518
804
|
}
|
519
|
-
|
805
|
+
|
806
|
+
// jadams, 2025-06-13: process youtube
|
807
|
+
if (this.settings.videojs && (_a === null || _a === void 0 ? void 0 : _a.youtube)) {
|
808
|
+
try {
|
809
|
+
if (_a.videojs.enabled) {
|
810
|
+
vjsPlayer = videojs($videoElement.get(), this.settings.videojsOptions);
|
811
|
+
this.settings.vjsPlayer = vjsPlayer;
|
812
|
+
_a.videojs.player = vjsPlayer;
|
813
|
+
|
814
|
+
return vjsPlayer;
|
815
|
+
}
|
816
|
+
}
|
817
|
+
catch (e) {
|
818
|
+
// jadams:
|
819
|
+
console.warn('lightGallery: Make sure you have included //github.com/vimeo/player.js');
|
820
|
+
}
|
821
|
+
}
|
822
|
+
|
823
|
+
}; // END appendVideo
|
520
824
|
|
521
825
|
// jadams
|
522
826
|
Video.prototype.gotoNextSlideOnVideoEnd = function (src, index) {
|
@@ -525,6 +829,13 @@
|
|
525
829
|
.getSlideItem(index)
|
526
830
|
.find('.lg-video-object')
|
527
831
|
.first();
|
832
|
+
|
833
|
+
// try to get HTML Element for the active player (failsafe)
|
834
|
+
// if NOT available, something went totally wrong
|
835
|
+
if (!$videoElement.get()) {
|
836
|
+
return;
|
837
|
+
}
|
838
|
+
|
528
839
|
var videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
|
529
840
|
if (this.settings.gotoNextSlideOnVideoEnd) {
|
530
841
|
if (videoInfo.html5) {
|
@@ -565,263 +876,53 @@
|
|
565
876
|
}
|
566
877
|
};
|
567
878
|
|
568
|
-
// jadams
|
879
|
+
// jadams: 2025-06-11: Add (extended) VideoJS control elements
|
880
|
+
// for HTML5 video over VJS (to be extended for e.g.YouTube)
|
881
|
+
// ---------------------------------------------------------------------
|
569
882
|
Video.prototype.controlVideo = function (index, action) {
|
570
|
-
|
571
|
-
var
|
572
|
-
|
573
|
-
|
574
|
-
hotKeysPlugin, skipButtonsPlugin, zoomPlugin;
|
575
|
-
|
576
|
-
var playbackRatesDefaults = vjsOptions.playbackRates.values;
|
577
|
-
var chapterTracksEnabled = false;
|
578
|
-
|
579
|
-
var hotKeysPluginDefaults = {
|
580
|
-
volumeStep: vjsOptions.plugins.hotKeys.volumeStep,
|
581
|
-
seekStep: vjsOptions.plugins.hotKeys.seekStep,
|
582
|
-
enableMute: vjsOptions.plugins.hotKeys.enableMute,
|
583
|
-
enableVolumeScroll: vjsOptions.plugins.hotKeys.enableVolumeScroll,
|
584
|
-
enableHoverScroll: vjsOptions.plugins.hotKeys.enableHoverScroll,
|
585
|
-
enableFullscreen: vjsOptions.plugins.hotKeys.enableFullscreen,
|
586
|
-
enableNumbers: vjsOptions.plugins.hotKeys.enableNumbers,
|
587
|
-
enableJogStyle: vjsOptions.plugins.hotKeys.enableJogStyle,
|
588
|
-
alwaysCaptureHotkeys: vjsOptions.plugins.hotKeys.alwaysCaptureHotkeys,
|
589
|
-
captureDocumentHotkeys: vjsOptions.plugins.hotKeys.captureDocumentHotkeys,
|
590
|
-
enableModifiersForNumbers: vjsOptions.plugins.hotKeys.enableModifiersForNumbers,
|
591
|
-
enableInactiveFocus: vjsOptions.plugins.hotKeys.enableInactiveFocus,
|
592
|
-
skipInitialFocus: vjsOptions.plugins.hotKeys.skipInitialFocus
|
593
|
-
};
|
594
|
-
|
595
|
-
var skipButtonsPluginDefaults = {
|
596
|
-
backward: vjsOptions.plugins.skipButtons.backward,
|
597
|
-
forward: vjsOptions.plugins.skipButtons.forward,
|
598
|
-
backwardIndex: 0,
|
599
|
-
forwardIndex: 1
|
600
|
-
};
|
601
|
-
|
602
|
-
var zoomPluginDefaults = {
|
603
|
-
moveX: vjsOptions.plugins.zoomButtons.moveX,
|
604
|
-
moveY: vjsOptions.plugins.zoomButtons.moveY,
|
605
|
-
rotate: vjsOptions.plugins.zoomButtons.rotate,
|
606
|
-
zoom: vjsOptions.plugins.zoomButtons.zoom
|
607
|
-
};
|
608
|
-
|
609
|
-
videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
|
883
|
+
var $videoElement, videoInfo, videoId;
|
884
|
+
var videojsPlayer = 'not_set';
|
885
|
+
|
886
|
+
// load the lgQuery element for the active player
|
610
887
|
$videoElement = this.core
|
611
888
|
.getSlideItem(index)
|
612
889
|
.find('.lg-video-object')
|
613
890
|
.first()
|
614
891
|
|
615
|
-
//
|
616
|
-
//
|
617
|
-
if (
|
618
|
-
|
619
|
-
|
620
|
-
if (videoData.tracks !== undefined && videoData.tracks.length > 0) {
|
621
|
-
for (var i=0; i<videoData.tracks.length; i++) {
|
622
|
-
if (videoData.tracks[i].kind == 'chapters') {
|
623
|
-
trackSrc = videoData.tracks[i].src;
|
624
|
-
chapterTracksEnabled = true;
|
625
|
-
}
|
626
|
-
}
|
627
|
-
} // END if videoData.tracks
|
628
|
-
|
629
|
-
if ($videoElement.selector !== undefined) {
|
630
|
-
videoId = $videoElement.selector.id;
|
631
|
-
videojsPlayer = videojs(videoId);
|
632
|
-
} else {
|
633
|
-
videojsPlayer = 'unknown';
|
634
|
-
}
|
635
|
-
|
636
|
-
if (videojsPlayer !== 'unknown') {
|
637
|
-
|
638
|
-
// added VJS Plugins hotKeys|skipButtons|zoom, playbackRates
|
639
|
-
// -------------------------------------------------------------
|
640
|
-
hotKeysPlugin = this.settings.videojsOptions.controlBar.hotKeysPlugin;
|
641
|
-
skipButtonsPlugin = this.settings.videojsOptions.controlBar.skipButtonsPlugin;
|
642
|
-
zoomPlugin = this.settings.videojsOptions.controlBar.zoomPlugin;
|
643
|
-
playbackRates = (this.settings.videojsOptions.controlBar.playbackRates !== undefined) ? this.settings.videojsOptions.controlBar.playbackRates : playbackRatesDefaults;
|
644
|
-
|
645
|
-
// jadams, 2024-01-22: added video start position
|
646
|
-
// -------------------------------------------------------------
|
647
|
-
if (this.settings.videojsOptions.videoStart !== undefined) {
|
648
|
-
videoStart = this.settings.videojsOptions.videoStart[index];
|
649
|
-
videojsPlayer.on("play", function() {
|
650
|
-
var startFromSecond = new Date('1970-01-01T' + videoStart + 'Z').getTime() / 1000;
|
651
|
-
videojsPlayer.currentTime(startFromSecond);
|
652
|
-
}); // END on event play
|
653
|
-
} // END if videoStart
|
654
|
-
|
655
|
-
// add playbackRates (only available for VJS)
|
656
|
-
if (videojsPlayer.playbackRates !== undefined) {
|
657
|
-
videojsPlayer.playbackRates(playbackRates);
|
658
|
-
}
|
659
|
-
|
660
|
-
// add hotkeys Plugin (only available for VJS)
|
661
|
-
if (hotKeysPlugin !== undefined && hotKeysPlugin.enabled && videojsPlayer.hotKeys !== undefined) {
|
662
|
-
|
663
|
-
// merge objects
|
664
|
-
hotKeysPlugin.options = __assign(__assign({}, hotKeysPluginDefaults), hotKeysPlugin.options);
|
665
|
-
|
666
|
-
// prevent multiple plugin instances
|
667
|
-
var hotKeysActive = false;
|
668
|
-
if (videojsPlayer.activePlugins_ !== undefined && videojsPlayer.activePlugins_.hotKeys !== undefined) {
|
669
|
-
hotKeysActive = videojsPlayer.activePlugins_.hotKeys;
|
670
|
-
}
|
671
|
-
|
672
|
-
if (!hotKeysActive) {
|
673
|
-
videojsPlayer.hotKeys({
|
674
|
-
volumeStep: hotKeysPlugin.options.volumeStep,
|
675
|
-
seekStep: hotKeysPlugin.options.seekStep,
|
676
|
-
enableMute: hotKeysPlugin.options.enableMute,
|
677
|
-
enableFullscreen: hotKeysPlugin.options.enableFullscreen,
|
678
|
-
enableNumbers: hotKeysPlugin.options.enableNumbers,
|
679
|
-
enableVolumeScroll: hotKeysPlugin.options.enableVolumeScroll,
|
680
|
-
enableHoverScroll: hotKeysPlugin.options.enableHoverScroll,
|
681
|
-
alwaysCaptureHotkeys: hotKeysPlugin.options.alwaysCaptureHotkeys,
|
682
|
-
captureDocumentHotkeys: hotKeysPlugin.options.captureDocumentHotkeys,
|
683
|
-
documentHotkeysFocusElementFilter: hotKeysPlugin.options.documentHotkeysFocusElementFilter,
|
684
|
-
|
685
|
-
// Mimic VLC seek behavior (default to: 15)
|
686
|
-
seekStep: function(e) {
|
687
|
-
if (e.ctrlKey && e.altKey) {
|
688
|
-
return 5*60;
|
689
|
-
} else if (e.ctrlKey) {
|
690
|
-
return 60;
|
691
|
-
} else if (e.altKey) {
|
692
|
-
return 10;
|
693
|
-
} else {
|
694
|
-
return 15;
|
695
|
-
}
|
696
|
-
}
|
697
|
-
|
698
|
-
});
|
699
|
-
} // END if hotKeysActive
|
700
|
-
|
701
|
-
} // END if hotKeysPlugin enabled
|
702
|
-
|
703
|
-
// add skipButtons Plugin (only available for VJS)
|
704
|
-
// -------------------------------------------------------------
|
705
|
-
if (skipButtonsPlugin !== undefined && skipButtonsPlugin.enabled && videojsPlayer.skipButtons !== undefined) {
|
706
|
-
// merge objects
|
707
|
-
skipButtonsPlugin.options = __assign(__assign({}, skipButtonsPluginDefaults), skipButtonsPlugin.options);
|
708
|
-
|
709
|
-
// prevent multiple plugin instances
|
710
|
-
var skipButtonsActive = false;
|
711
|
-
if (videojsPlayer.activePlugins_ !== undefined && videojsPlayer.activePlugins_.skipButtons !== undefined) {
|
712
|
-
skipButtonsActive = videojsPlayer.activePlugins_.skipButtons;
|
713
|
-
}
|
714
|
-
|
715
|
-
if (!skipButtonsActive) {
|
716
|
-
videojsPlayer.skipButtons({
|
717
|
-
backward: skipButtonsPlugin.options.backward,
|
718
|
-
forward: skipButtonsPlugin.options.forward,
|
719
|
-
backwardIndex: skipButtonsPlugin.options.backwardIndex,
|
720
|
-
forwardIndex: skipButtonsPlugin.options.forwardIndex
|
721
|
-
});
|
722
|
-
}
|
723
|
-
|
724
|
-
} // END if skipButtons Plugin enabled
|
725
|
-
|
726
|
-
// add zoom Plugin (only available for VJS)
|
727
|
-
// -----------------------------------------------------------------
|
728
|
-
if (zoomPlugin !== undefined && zoomPlugin.enabled && videojsPlayer.zoomButtons !== undefined) {
|
729
|
-
// merge objects
|
730
|
-
zoomPlugin.options = __assign(__assign({}, zoomPluginDefaults), zoomPlugin.options);
|
731
|
-
|
732
|
-
// prevent multiple plugin instances
|
733
|
-
var zoomButtonsActive = false;
|
734
|
-
if (videojsPlayer.activePlugins_ !== undefined && videojsPlayer.activePlugins_.zoomButtons !== undefined) {
|
735
|
-
zoomButtonsActive = videojsPlayer.activePlugins_.zoomButtons;
|
736
|
-
}
|
737
|
-
|
738
|
-
if (!zoomButtonsActive) {
|
739
|
-
videojsPlayer.zoomButtons({
|
740
|
-
moveX: zoomPlugin.options.moveX,
|
741
|
-
moveY: zoomPlugin.options.moveY,
|
742
|
-
rotate: zoomPlugin.options.rotate,
|
743
|
-
zoom: zoomPlugin.options.zoom
|
744
|
-
});
|
745
|
-
}
|
746
|
-
|
747
|
-
} // END if zoom Plugin enabled
|
748
|
-
|
749
|
-
// chapter track processing (only available for VJS)
|
750
|
-
// -----------------------------------------------------------------
|
751
|
-
if (chapterTracksEnabled) {
|
752
|
-
var parser = new WebVTTParser();
|
753
|
-
var markers = [];
|
754
|
-
|
755
|
-
function cb_load (data /* ,textStatus, jqXHR */ ) {
|
756
|
-
var tree = parser.parse(data, 'metadata');
|
757
|
-
var marker;
|
758
|
-
|
759
|
-
// add chapter tracks to markers array
|
760
|
-
for (var i=0; i<tree.cues.length; i++) {
|
761
|
-
marker = { time: tree.cues[i].startTime, label: tree.cues[i].text };
|
762
|
-
markers.push(marker);
|
763
|
-
}
|
764
|
-
}; // END function cb_load
|
765
|
-
|
766
|
-
// load chapter tracks
|
767
|
-
// -------------------------------------------------------------
|
768
|
-
loadVtt(trackSrc, cb_load);
|
769
|
-
|
770
|
-
// add chapter tracks on play
|
771
|
-
videojsPlayer.on("play", function() {
|
772
|
-
videojsPlayer.currentTime(videoStart);
|
773
|
-
|
774
|
-
var total = videojsPlayer.duration();
|
775
|
-
var timeline = $(videojsPlayer.controlBar.progressControl.children_[0].el_);
|
776
|
-
|
777
|
-
// add chapter tracks on timeline (delayed)
|
778
|
-
setTimeout (function() {
|
779
|
-
var markers_loaded = setInterval (function () {
|
780
|
-
if (markers.length) {
|
781
|
-
for (var i=0; i<markers.length; i++) {
|
782
|
-
var left = (markers[i].time / total * 100) + '%';
|
783
|
-
var time = markers[i].time;
|
784
|
-
var el = $('<div class="vjs-chapter-marker" style="left: ' +left+ '" data-time="' +time+ '"> <span>' +markers[i].label+ '</span></div>');
|
892
|
+
// try to get HTML Element for the active player (failsafe)
|
893
|
+
// if NOT available, something went totally wrong
|
894
|
+
if (!$videoElement.get()) {
|
895
|
+
return;
|
896
|
+
}
|
785
897
|
|
786
|
-
|
787
|
-
|
788
|
-
});
|
898
|
+
// load the INFO object for the active player
|
899
|
+
videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
|
789
900
|
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
}, 10); // END markers_loaded
|
795
|
-
}, 1000 ); // END setTimeout
|
901
|
+
// process video of type 'html5' for extended VJS settings
|
902
|
+
// -----------------------------------------------------------------
|
903
|
+
// if (this.core.galleryItems[this.core.index].video !== undefined && (videoInfo.html5 || videoInfo.youtube)) {
|
904
|
+
if (videoInfo.html5 || videoInfo.youtube) {
|
796
905
|
|
797
|
-
|
906
|
+
// if ($videoElement.selector.id !== undefined) {
|
907
|
+
// videoId = $videoElement.selector.id;
|
908
|
+
// videojsPlayer = videojs(videoId);
|
909
|
+
// }
|
798
910
|
|
799
|
-
|
911
|
+
if ($videoElement.selector.player !== undefined) {
|
912
|
+
videojsPlayer = $videoElement.selector.player;
|
913
|
+
}
|
800
914
|
|
915
|
+
if (videojsPlayer !== 'not_set') {
|
916
|
+
vjsProcessExtendedButtonsAndPlugins(this, videojsPlayer, videoInfo);
|
801
917
|
} // END if videojsPlayer is defined
|
802
918
|
|
803
919
|
} // END if videoInfo.html5
|
804
920
|
|
805
|
-
|
806
|
-
|
807
|
-
if (videoInfo.
|
808
|
-
try {
|
809
|
-
$videoElement.get().contentWindow.postMessage("{\"event\":\"command\",\"func\":\"" + action + "Video\",\"args\":\"\"}", '*');
|
810
|
-
}
|
811
|
-
catch (e) {
|
812
|
-
console.error("lightGallery:- " + e);
|
813
|
-
}
|
814
|
-
}
|
815
|
-
else if (videoInfo.vimeo) {
|
816
|
-
try {
|
817
|
-
new Vimeo.Player($videoElement.get())[action]();
|
818
|
-
}
|
819
|
-
catch (e) {
|
820
|
-
console.warn('lightGallery: Make sure you have included //github.com/vimeo/player.js');
|
821
|
-
}
|
822
|
-
}
|
823
|
-
else if (videoInfo.html5) {
|
921
|
+
// check responses of the (active) player loaded
|
922
|
+
// -----------------------------------------------------------------
|
923
|
+
if (videoInfo.html5) {
|
824
924
|
if (this.settings.videojs) {
|
925
|
+
// VideoJS API detected
|
825
926
|
try {
|
826
927
|
videojs($videoElement.get())[action]();
|
827
928
|
}
|
@@ -830,10 +931,35 @@
|
|
830
931
|
}
|
831
932
|
}
|
832
933
|
else {
|
934
|
+
// iFrame API detected (??? supported ???)
|
833
935
|
$videoElement.get()[action]();
|
936
|
+
} // END html5
|
937
|
+
} else if (videoInfo.youtube) {
|
938
|
+
if (this.settings.videojs) {
|
939
|
+
// VideoJS API detected
|
940
|
+
try {
|
941
|
+
videojs($videoElement.get())[action]();
|
942
|
+
}
|
943
|
+
catch (e) {
|
944
|
+
console.warn('lightGallery: Make sure you have included videojs');
|
945
|
+
}
|
946
|
+
} else {
|
947
|
+
// iFrame API detected
|
948
|
+
try {
|
949
|
+
$videoElement.get().contentWindow.postMessage("{\"event\":\"command\",\"func\":\"" + action + "Video\",\"args\":\"\"}", '*');
|
950
|
+
}
|
951
|
+
catch (e) {
|
952
|
+
console.error("lightGallery:- " + e);
|
953
|
+
}
|
954
|
+
} // END youtube
|
955
|
+
} else if (videoInfo.vimeo) {
|
956
|
+
try {
|
957
|
+
new Vimeo.Player($videoElement.get())[action]();
|
834
958
|
}
|
835
|
-
|
836
|
-
|
959
|
+
catch (e) {
|
960
|
+
console.warn('lightGallery: Make sure you have included //github.com/vimeo/player.js');
|
961
|
+
} // END vimeo
|
962
|
+
} else if (videoInfo.wistia) {
|
837
963
|
try {
|
838
964
|
window._wq = window._wq || [];
|
839
965
|
// @todo Find a way to destroy wistia player instance
|
@@ -846,8 +972,8 @@
|
|
846
972
|
}
|
847
973
|
catch (e) {
|
848
974
|
console.warn('lightGallery: Make sure you have included //fast.wistia.com/assets/external/E-v1.js');
|
849
|
-
}
|
850
|
-
}
|
975
|
+
} // END wistia
|
976
|
+
} // END if videoInfo
|
851
977
|
|
852
978
|
}; // END controlVideo
|
853
979
|
|
@@ -865,7 +991,7 @@
|
|
865
991
|
_html =
|
866
992
|
typeof video === 'string' ? JSON.parse(video) : video;
|
867
993
|
}
|
868
|
-
var videoJsPlayer_1 = this.
|
994
|
+
var videoJsPlayer_1 = this.appendVideo($el, {
|
869
995
|
src: _src,
|
870
996
|
addClass: '',
|
871
997
|
index: this.core.index,
|