j1-template 2024.3.27 → 2024.3.28

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 (66) hide show
  1. checksums.yaml +4 -4
  2. data/assets/data/banner.html +3 -1
  3. data/assets/theme/j1/adapter/js/masonry.js +6 -8
  4. data/assets/theme/j1/core/js/template.js +28 -1
  5. data/assets/theme/j1/core/js/template.min.js +4 -4
  6. data/assets/theme/j1/modules/lightGallery/js/lightgallery.js +4 -2
  7. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-autoplay.js +6 -3
  8. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-comment.js +6 -3
  9. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-fullscreen.js +6 -3
  10. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-hash.js +6 -3
  11. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-medium-zoom.js +6 -3
  12. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-pager.js +6 -3
  13. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-relative-caption.js +6 -3
  14. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-rotate.js +6 -4
  15. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-share.js +6 -3
  16. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-thumbnail.js +6 -3
  17. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.js +113 -76
  18. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.min.js +1 -2
  19. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-vimeo-thumbnail.js +6 -3
  20. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-zoom.js +6 -3
  21. data/assets/theme/j1/modules/videojs/plugins/players/yt/js/youtube.js +21 -6
  22. data/assets/theme/j1/modules/videojs/plugins/players/yt/js/youtube.min.js +1 -1
  23. data/lib/j1/version.rb +1 -1
  24. data/lib/starter_web/README.md +5 -5
  25. data/lib/starter_web/_config.yml +1 -1
  26. data/lib/starter_web/_data/blocks/banner.yml +29 -18
  27. data/lib/starter_web/_data/blocks/panel.yml +79 -124
  28. data/lib/starter_web/_data/modules/blog_navigator.yml +1 -1
  29. data/lib/starter_web/_data/modules/defaults/blog_navigator.yml +2 -2
  30. data/lib/starter_web/_data/modules/gallery.yml +145 -19
  31. data/lib/starter_web/_data/modules/masonry.yml +9 -10
  32. data/lib/starter_web/_data/templates/feed.xml +1 -1
  33. data/lib/starter_web/_includes/attributes.asciidoc +2 -1
  34. data/lib/starter_web/_plugins/index/lunr.rb +1 -1
  35. data/lib/starter_web/assets/image/module/attic/1920x1280/nick-fewings.jpg +0 -0
  36. data/lib/starter_web/assets/image/module/attic/1920x1280/no-revisions.jpg +0 -0
  37. data/lib/starter_web/assets/image/module/attic/1920x1280/wolfgang-weiser.jpg +0 -0
  38. data/lib/starter_web/assets/image/page/features/example-content-1280x800.jpg +0 -0
  39. data/lib/starter_web/assets/image/page/features/google-lighthouse-1080x300.jpg +0 -0
  40. data/lib/starter_web/assets/image/page/features/google-lighthouse-scores.jpg +0 -0
  41. data/lib/starter_web/assets/image/page/features/master-header-1280x600.jpg +0 -0
  42. data/lib/starter_web/assets/image/page/features/nav-module-1280x300.jpg +0 -0
  43. data/lib/starter_web/assets/image/page/features/teaser-banner-1280x600.jpg +0 -0
  44. data/lib/starter_web/assets/image/page/features/tts-1280x500.jpg +0 -0
  45. data/lib/starter_web/assets/video/tracks/html5/peck_pocketed/captions/video.vtt +2 -3
  46. data/lib/starter_web/assets/video/tracks/html5/peck_pocketed/chapters/video.vtt +4 -6
  47. data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1.adoc.erb +18 -20
  48. data/lib/starter_web/collections/posts/public/featured/_posts/2021-01-01-about-cookies.adoc +6 -7
  49. data/lib/starter_web/collections/posts/public/featured/_posts/{2023-10-18-url-types.adoc → 2022-10-18-url-types.adoc} +7 -4
  50. data/lib/starter_web/collections/posts/public/featured/_posts/{2021-02-01-static-site-generators.adoc → 2023-02-01-static-site-generators.adoc} +5 -6
  51. data/lib/starter_web/collections/posts/public/featured/_posts/{2022-02-01-about-j1.adoc → 2024-02-01-about-j1.adoc} +4 -5
  52. data/lib/starter_web/index.html +17 -73
  53. data/lib/starter_web/package.json +1 -1
  54. data/lib/starter_web/pages/public/features/{general.adoc → core-features.adoc} +92 -47
  55. data/lib/starter_web/pages/public/features/{template.adoc → theme-features.adoc} +313 -195
  56. data/lib/starter_web/pages/public/tools/tester/app_tester_swiperjs.adoc +10 -15
  57. data/lib/starter_web/pages/public/tools/tester/videojs_macro_tester.adoc +43 -2
  58. data/lib/starter_web/pages/public/tour/asciidoc_extensions.adoc +13 -21
  59. data/lib/starter_web/pages/public/tour/audio_data.adoc +2 -2
  60. data/lib/starter_web/pages/public/tour/icon_fonts.adoc +1 -1
  61. data/lib/starter_web/pages/public/tour/image_data.adoc +138 -234
  62. data/lib/starter_web/pages/public/tour/responsive_tables.adoc +1 -1
  63. data/lib/starter_web/pages/public/tour/video_data.adoc +74 -85
  64. metadata +12 -9
  65. data/lib/starter_web/assets/image/module/attic/cookies-1920x1200.jpg +0 -0
  66. data/lib/starter_web/pages/public/tour/modal_extentions.adoc +0 -126
@@ -30,7 +30,8 @@
30
30
  }(this, (function () {
31
31
  'use strict';
32
32
 
33
- /*! *****************************************************************************
33
+ /*!
34
+ ****************************************************************************
34
35
  Copyright (c) Microsoft Corporation.
35
36
 
36
37
  Permission to use, copy, modify, and/or distribute this software for any
@@ -43,7 +44,8 @@
43
44
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
44
45
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
45
46
  PERFORMANCE OF THIS SOFTWARE.
46
- ***************************************************************************** */
47
+ ****************************************************************************
48
+ */
47
49
 
48
50
  var __assign = function() {
49
51
  __assign = Object.assign || function __assign(t) {
@@ -27,9 +27,11 @@
27
27
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
28
28
  typeof define === 'function' && define.amd ? define(factory) :
29
29
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgAutoplay = factory());
30
- }(this, (function () { 'use strict';
30
+ }(this, (function () {
31
+ 'use strict';
31
32
 
32
- /*! *****************************************************************************
33
+ /*!
34
+ ****************************************************************************
33
35
  Copyright (c) Microsoft Corporation.
34
36
 
35
37
  Permission to use, copy, modify, and/or distribute this software for any
@@ -42,7 +44,8 @@
42
44
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
45
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
46
  PERFORMANCE OF THIS SOFTWARE.
45
- ***************************************************************************** */
47
+ ****************************************************************************
48
+ */
46
49
 
47
50
  var __assign = function() {
48
51
  __assign = Object.assign || function __assign(t) {
@@ -27,9 +27,11 @@
27
27
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
28
28
  typeof define === 'function' && define.amd ? define(factory) :
29
29
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgComment = factory());
30
- }(this, (function () { 'use strict';
30
+ }(this, (function () {
31
+ 'use strict';
31
32
 
32
- /*! *****************************************************************************
33
+ /*!
34
+ ****************************************************************************
33
35
  Copyright (c) Microsoft Corporation.
34
36
 
35
37
  Permission to use, copy, modify, and/or distribute this software for any
@@ -42,7 +44,8 @@
42
44
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
45
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
46
  PERFORMANCE OF THIS SOFTWARE.
45
- ***************************************************************************** */
47
+ ****************************************************************************
48
+ */
46
49
 
47
50
  var __assign = function() {
48
51
  __assign = Object.assign || function __assign(t) {
@@ -27,9 +27,11 @@
27
27
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
28
28
  typeof define === 'function' && define.amd ? define(factory) :
29
29
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgFullscreen = factory());
30
- }(this, (function () { 'use strict';
30
+ }(this, (function () {
31
+ 'use strict';
31
32
 
32
- /*! *****************************************************************************
33
+ /*!
34
+ ****************************************************************************
33
35
  Copyright (c) Microsoft Corporation.
34
36
 
35
37
  Permission to use, copy, modify, and/or distribute this software for any
@@ -42,7 +44,8 @@
42
44
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
45
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
46
  PERFORMANCE OF THIS SOFTWARE.
45
- ***************************************************************************** */
47
+ ****************************************************************************
48
+ */
46
49
 
47
50
  var __assign = function() {
48
51
  __assign = Object.assign || function __assign(t) {
@@ -27,9 +27,11 @@
27
27
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
28
28
  typeof define === 'function' && define.amd ? define(factory) :
29
29
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgHash = factory());
30
- }(this, (function () { 'use strict';
30
+ }(this, (function () {
31
+ 'use strict';
31
32
 
32
- /*! *****************************************************************************
33
+ /*!
34
+ ****************************************************************************
33
35
  Copyright (c) Microsoft Corporation.
34
36
 
35
37
  Permission to use, copy, modify, and/or distribute this software for any
@@ -42,7 +44,8 @@
42
44
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
45
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
46
  PERFORMANCE OF THIS SOFTWARE.
45
- ***************************************************************************** */
47
+ ****************************************************************************
48
+ */
46
49
 
47
50
  var __assign = function() {
48
51
  __assign = Object.assign || function __assign(t) {
@@ -27,9 +27,11 @@
27
27
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
28
28
  typeof define === 'function' && define.amd ? define(factory) :
29
29
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgMediumZoom = factory());
30
- }(this, (function () { 'use strict';
30
+ }(this, (function () {
31
+ 'use strict';
31
32
 
32
- /*! *****************************************************************************
33
+ /*!
34
+ ****************************************************************************
33
35
  Copyright (c) Microsoft Corporation.
34
36
 
35
37
  Permission to use, copy, modify, and/or distribute this software for any
@@ -42,7 +44,8 @@
42
44
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
45
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
46
  PERFORMANCE OF THIS SOFTWARE.
45
- ***************************************************************************** */
47
+ ****************************************************************************
48
+ */
46
49
 
47
50
  var __assign = function() {
48
51
  __assign = Object.assign || function __assign(t) {
@@ -27,9 +27,11 @@
27
27
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
28
28
  typeof define === 'function' && define.amd ? define(factory) :
29
29
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgPager = factory());
30
- }(this, (function () { 'use strict';
30
+ }(this, (function () {
31
+ 'use strict';
31
32
 
32
- /*! *****************************************************************************
33
+ /*!
34
+ ****************************************************************************
33
35
  Copyright (c) Microsoft Corporation.
34
36
 
35
37
  Permission to use, copy, modify, and/or distribute this software for any
@@ -42,7 +44,8 @@
42
44
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
45
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
46
  PERFORMANCE OF THIS SOFTWARE.
45
- ***************************************************************************** */
47
+ ****************************************************************************
48
+ */
46
49
 
47
50
  var __assign = function() {
48
51
  __assign = Object.assign || function __assign(t) {
@@ -27,9 +27,11 @@
27
27
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
28
28
  typeof define === 'function' && define.amd ? define(factory) :
29
29
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgRelativeCaption = factory());
30
- }(this, (function () { 'use strict';
30
+ }(this, (function () {
31
+ 'use strict';
31
32
 
32
- /*! *****************************************************************************
33
+ /*!
34
+ ****************************************************************************
33
35
  Copyright (c) Microsoft Corporation.
34
36
 
35
37
  Permission to use, copy, modify, and/or distribute this software for any
@@ -42,7 +44,8 @@
42
44
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
45
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
46
  PERFORMANCE OF THIS SOFTWARE.
45
- ***************************************************************************** */
47
+ ****************************************************************************
48
+ */
46
49
 
47
50
  var __assign = function() {
48
51
  __assign = Object.assign || function __assign(t) {
@@ -27,9 +27,10 @@
27
27
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
28
28
  typeof define === 'function' && define.amd ? define(factory) :
29
29
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgRotate = factory());
30
- }(this, (function () { 'use strict';
31
-
32
- /*! *****************************************************************************
30
+ }(this, (function () {
31
+ 'use strict';
32
+ /*!
33
+ ****************************************************************************
33
34
  Copyright (c) Microsoft Corporation.
34
35
 
35
36
  Permission to use, copy, modify, and/or distribute this software for any
@@ -42,7 +43,8 @@
42
43
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
44
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
45
  PERFORMANCE OF THIS SOFTWARE.
45
- ***************************************************************************** */
46
+ ****************************************************************************
47
+ */
46
48
 
47
49
  var __assign = function() {
48
50
  __assign = Object.assign || function __assign(t) {
@@ -27,9 +27,11 @@
27
27
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
28
28
  typeof define === 'function' && define.amd ? define(factory) :
29
29
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgShare = factory());
30
- }(this, (function () { 'use strict';
30
+ }(this, (function () {
31
+ 'use strict';
31
32
 
32
- /*! *****************************************************************************
33
+ /*!
34
+ ****************************************************************************
33
35
  Copyright (c) Microsoft Corporation.
34
36
 
35
37
  Permission to use, copy, modify, and/or distribute this software for any
@@ -42,7 +44,8 @@
42
44
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
45
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
46
  PERFORMANCE OF THIS SOFTWARE.
45
- ***************************************************************************** */
47
+ ****************************************************************************
48
+ */
46
49
 
47
50
  var __assign = function() {
48
51
  __assign = Object.assign || function __assign(t) {
@@ -27,9 +27,11 @@
27
27
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
28
28
  typeof define === 'function' && define.amd ? define(factory) :
29
29
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgThumbnail = factory());
30
- }(this, (function () { 'use strict';
30
+ }(this, (function () {
31
+ 'use strict';
31
32
 
32
- /*! *****************************************************************************
33
+ /*!
34
+ ****************************************************************************
33
35
  Copyright (c) Microsoft Corporation.
34
36
 
35
37
  Permission to use, copy, modify, and/or distribute this software for any
@@ -42,7 +44,8 @@
42
44
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
45
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
46
  PERFORMANCE OF THIS SOFTWARE.
45
- ***************************************************************************** */
47
+ ****************************************************************************
48
+ */
46
49
 
47
50
  var __assign = function() {
48
51
  __assign = Object.assign || function __assign(t) {
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  # -----------------------------------------------------------------------------
3
- # ~/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.js
3
+ # ~/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.js (5)
4
4
  # Provides lightGallery v2.8.3 JS code for the plugin lgVideo
5
5
  #
6
6
  # Product/Info:
@@ -30,7 +30,8 @@
30
30
  }(this, (function () {
31
31
  'use strict';
32
32
 
33
- /*! *****************************************************************************
33
+ /*!
34
+ ****************************************************************************
34
35
  Copyright (c) Microsoft Corporation.
35
36
 
36
37
  Permission to use, copy, modify, and/or distribute this software for any
@@ -43,7 +44,8 @@
43
44
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
44
45
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
45
46
  PERFORMANCE OF THIS SOFTWARE.
46
- ***************************************************************************** */
47
+ ****************************************************************************
48
+ */
47
49
 
48
50
  var __assign = function() {
49
51
  __assign = Object.assign || function __assign(t) {
@@ -291,7 +293,7 @@
291
293
  loadVtt(videojsPlayer.chapterTracksSource, cb_load);
292
294
 
293
295
  // failsafe: remove already existing markers for current player
294
- removeChapterMarkers(timeline, playerID);
296
+ // removeChapterMarkers(timeline, playerID);
295
297
 
296
298
  // if tracks available, add (chapter) tracks on timeline
297
299
  // -----------------------------------------------------------------
@@ -329,8 +331,9 @@
329
331
  clearInterval(markers_loaded);
330
332
  } // END if markers.length
331
333
  }, 10); // END interval markers_loaded
332
- }, 100 ); // END timeout
334
+ }, 100); // END timeout
333
335
  } // END if chapterTracks enabled
336
+
334
337
  } // END addChapterMarkers
335
338
 
336
339
 
@@ -338,21 +341,30 @@
338
341
  // main
339
342
  // =====================================================================
340
343
  dependency_met_module_ready = setInterval (() => {
341
- var playerId, videoData, timeline;
342
- var isModuleInitialised = (j1.adapter.gallery.getState() === 'finished') ? true : false;
343
- var isVideojsOptions = (isEmpty(vjsObject.settings.videojsOptions)) ? false : true;
344
+ var playerId, videoData, timeline,
345
+ textTracks, isModuleInitialised, isVideojsOptions,
346
+ hasChapters, hasSubtitles;
347
+
348
+ textTracks = videojsPlayer.textTracks();
349
+ isModuleInitialised = (j1.adapter.gallery.getState() === 'finished') ? true : false;
350
+ isVideojsOptions = (isEmpty(vjsObject.settings.videojsOptions)) ? false : true;
351
+
352
+ // check on chapters
353
+ hasChapters = Array.from(textTracks).some(track =>
354
+ track.kind === 'chapters' && track.cues && track.cues.length > 0
355
+ );
356
+
357
+ // check on subtitles||captions
358
+ hasSubtitles = Array.from(textTracks).some(track =>
359
+ (track.kind === 'subtitles' || track.kind === 'captions') &&
360
+ track.cues && track.cues.length > 0
361
+ );
344
362
 
345
363
  if (isModuleInitialised && isVideojsOptions) {
346
364
  playerId = videojsPlayer.id();
347
365
  videoData = { tracks: [] };
348
366
  playerState = getPlayerStatus(videojsPlayer);
349
367
 
350
- // set (initial) videoData tracks.chapters to empty array
351
- videoData.tracks.chapters = [];
352
-
353
- // ENABLE chapter tracks by default (to enable very first checks)
354
- // videojsPlayer.chapterTracksEnabled = true;
355
-
356
368
  var hotKeysPluginDefaults = {
357
369
  volumeStep: vjsOptions.plugins.hotKeys.volumeStep,
358
370
  seekStep: vjsOptions.plugins.hotKeys.seekStep,
@@ -383,7 +395,7 @@
383
395
  zoom: vjsOptions.plugins.zoomButtons.zoom
384
396
  };
385
397
 
386
- // jadams, 2025-06-11: added customControlContainer
398
+ // add customControlContainer
387
399
  // -------------------------------------------------------------
388
400
  var vjsPlayerControlBar = videojsPlayer.controlBar;
389
401
 
@@ -421,7 +433,7 @@
421
433
  zoomPlugin = vjsObject.settings.videojsOptions.controlBar.zoomPlugin;
422
434
  playbackRates = vjsObject.settings.videojsOptions.controlBar.playbackRates;
423
435
 
424
- // jadams, 2024-01-22: added video start position
436
+ // add video start position
425
437
  // ---------------------------------------------------------
426
438
  if (vjsObject.settings.videojsOptions.videoStart !== undefined) {
427
439
  videoStart = vjsObject.settings.videojsOptions.videoStart[index];
@@ -431,11 +443,11 @@
431
443
  }); // END on event play
432
444
  } // END if videoStart
433
445
 
434
- // add playbackRates, only available for VideoJS
446
+ // add playbackRates
435
447
  // ---------------------------------------------------------
436
448
  videojsPlayer.playbackRates(playbackRates);
437
449
 
438
- // add hotkeys Plugin, only available for VideoJS
450
+ // add hotkeys Plugin
439
451
  // ---------------------------------------------------------
440
452
  if (hotKeysPlugin !== undefined && hotKeysPlugin.enabled && videojsPlayer.hotKeys !== undefined) {
441
453
 
@@ -479,7 +491,7 @@
479
491
 
480
492
  } // END if hotKeysPlugin enabled
481
493
 
482
- // add skipButtons Plugin, only available for VideoJS
494
+ // add skipButtons Plugin
483
495
  // ---------------------------------------------------------
484
496
  if (skipButtonsPlugin !== undefined && skipButtonsPlugin.enabled && videojsPlayer.skipButtons !== undefined) {
485
497
  // merge objects
@@ -502,7 +514,7 @@
502
514
 
503
515
  } // END if skipButtons Plugin enabled
504
516
 
505
- // add zoom Plugin (only available for VJS|local video/mp4)
517
+ // add zoom Plugin (only available for video/mp4
506
518
  // ---------------------------------------------------------
507
519
  if (videoInfo.youtube) {
508
520
  // zoom pluging NOT supported for YouTube
@@ -530,10 +542,10 @@
530
542
 
531
543
  } // END if zoom Plugin enabled
532
544
 
533
-
534
- // chapter track processing, only available for VideoJS
545
+ // chapter track processing
535
546
  // ---------------------------------------------------------
536
- if (vjsObject.core.galleryItems[vjsObject.core.index].video !== undefined) {
547
+ var tracksEnabled = vjsObject.settings.videojsOptions.tracks;
548
+ if (tracksEnabled && vjsObject.core.galleryItems[vjsObject.core.index].video !== undefined) {
537
549
  videoData = JSON.parse(vjsObject.core.galleryItems[vjsObject.core.index].video);
538
550
  videojsPlayer.videoData = videoData;
539
551
 
@@ -548,65 +560,89 @@
548
560
  j1.modules.videojs.data.players[playerId]['videoData'] = {};
549
561
  j1.modules.videojs.data.players[playerId].videoData['tracks'] = videoData.tracks || [];
550
562
  }
551
- }
552
-
553
- // load source file for chapter tracks
554
- // ---------------------------------------------------------
555
- var chapterTracksSrc;
556
- for (var i=0; i<videojsPlayer.videoData.tracks.length; i++) {
557
- if (videojsPlayer.videoData.tracks[i].kind == 'chapters') {
558
- chapterTracksSrc = videojsPlayer.videoData.tracks[i].src;
559
- videojsPlayer.chapterTracksSource = chapterTracksSrc;
560
- }
561
- }
562
-
563
- // process chapter tracks
564
- if (j1.modules.videojs.data.players[playerId].videoData.tracks.length) {
565
- playerId = videojsPlayer.id();
566
- timeline = $(videojsPlayer.controlBar.progressControl.children_[0].el_);
567
-
568
- removeChapterMarkers(timeline, playerId);
569
-
570
- // add chapter tracks when playing alreay (e.g. autoplay)
571
- // -----------------------------------------------------
572
- if (isPlaying(videojsPlayer)) {
573
- addChapterMarkers(videojsPlayer)
574
- } // END if VideoJS player isPlaying
575
563
 
576
- // jadams, 2025-06-22: prepare settting start position
577
- // TODO: coding is to be continued
564
+ // load source file for chapter tracks
578
565
  // -----------------------------------------------------
579
- // videojsPlayer.currentTime(videoStart);
580
-
581
- // remove chapter tracks on event 'pause'
582
- // -----------------------------------------------------
583
- videojsPlayer.on("pause", function() {
584
- var timeline = $(videojsPlayer.controlBar.progressControl.children_[0].el_);
585
-
586
- removeChapterMarkers(timeline, videojsPlayer.id());
587
- }); // END on event 'pause'
566
+ var chapterTracksSrc;
567
+ for (var i=0; i<videojsPlayer.videoData.tracks.length; i++) {
568
+ if (videojsPlayer.videoData.tracks[i].kind == 'captions') {
569
+ videojsPlayer.captionTracks = videojsPlayer.videoData.tracks[i];
570
+ }
571
+ if (videojsPlayer.videoData.tracks[i].kind == 'chapters') {
572
+ chapterTracksSrc = videojsPlayer.videoData.tracks[i].src;
573
+ videojsPlayer.chapterTracks = videojsPlayer.videoData.tracks[i];
574
+ videojsPlayer.chapterTracksSource = chapterTracksSrc;
575
+ }
576
+ }
588
577
 
589
- // add chapter tracks on event 'play'
578
+ // process chapter tracks
590
579
  // -----------------------------------------------------
591
- videojsPlayer.on("play", function() {
592
- addChapterMarkers(videojsPlayer)
593
- }); // END on event 'play'
580
+ if (j1.modules.videojs.data.players[playerId].videoData.tracks.length) {
581
+
582
+ playerId = videojsPlayer.id();
583
+ timeline = $(videojsPlayer.controlBar.progressControl.children_[0].el_);
584
+ removeChapterMarkers(timeline, playerId);
585
+
586
+ // add chapter markers when playing (e.g. autoplay)
587
+ // -------------------------------------------------
588
+ if (isPlaying(videojsPlayer)) {
589
+ addChapterMarkers(videojsPlayer);
590
+ } // END if VideoJS player isPlaying
591
+
592
+ // jadams, 2025-06-22: prepare processing start position
593
+ // TODO: coding is to be continued
594
+ // -------------------------------------------------
595
+ // videojsPlayer.currentTime(videoStart);
596
+
597
+ // remove chapter markers on event 'pause'
598
+ // TODO: should be confifurable
599
+ // -------------------------------------------------
600
+ // videojsPlayer.on("pause", function() {
601
+ // var timeline = $(videojsPlayer.controlBar.progressControl.children_[0].el_);
602
+ // removeChapterMarkers(timeline, videojsPlayer.id());
603
+ // }); // END on event 'pause'
604
+
605
+ // add chapter tracks on event 'play'
606
+ // TODO: should be configurable
607
+ // -------------------------------------------------
608
+ videojsPlayer.on("play", function() {
609
+ addChapterMarkers(videojsPlayer)
610
+ }); // END on event 'play'
611
+
612
+ // failsafe: remove chapter markers on player destroyed
613
+ // TODO: should be configurable
614
+ // -------------------------------------------------
615
+ // videojsPlayer.on("dispose", function() {
616
+ // var timeline = $(videojsPlayer.controlBar.progressControl.children_[0].el_);
617
+ // removeChapterMarkers(timeline, videojsPlayer.id());
618
+ // });
619
+
620
+ // add tracks and buttons
621
+ // -------------------------------------------------
622
+ videojsPlayer.addRemoteTextTrack(videojsPlayer.captionTracks);
623
+ videojsPlayer.addRemoteTextTrack(videojsPlayer.chapterTracks);
624
+
625
+ // enable 'english' caption tracks
626
+ // -------------------------------------------------
627
+ textTracks = videojsPlayer.textTracks();
628
+ for (var i = 0; i < textTracks.length; i++) {
629
+ var track = textTracks[i];
630
+ if (track.kind === 'captions' && track.language === 'en') {
631
+ track.mode = 'showing'; // enable
632
+ } else {
633
+ track.mode = 'disabled'; // disable other
634
+ }
635
+ }
594
636
 
595
- // failsafe: remove chapter markers on the player removed||destroyed
596
- videojsPlayer.on("dispose", function() {
637
+ } else {
638
+ // remove existing chapter markers if NO tracks enabled
639
+ // -------------------------------------------------
640
+ var playerId = videojsPlayer.id();
597
641
  var timeline = $(videojsPlayer.controlBar.progressControl.children_[0].el_);
642
+ removeChapterMarkers(timeline, playerId);
643
+ } // END if chapterTracks enabled
598
644
 
599
- // remove already existing markers for the player destroyed
600
- removeChapterMarkers(timeline, videojsPlayer.id());
601
- });
602
-
603
- } else {
604
- // remove existing chapter markers if NO tracks enabled
605
- var timeline = $(videojsPlayer.controlBar.progressControl.children_[0].el_);
606
- var playerId = videojsPlayer.id();
607
-
608
- removeChapterMarkers(timeline, playerId);
609
- } // END if chapterTracks enabled
645
+ } // END if tracksEnabled
610
646
 
611
647
  } // END if videojsOptions
612
648
 
@@ -818,7 +854,8 @@
818
854
  <source
819
855
  type="video/youtube",
820
856
  src="//youtube.com/watch?v=${ytVideoID}"
821
- >
857
+ >,
858
+ <tracks>
822
859
 
823
860
  Your browser does not support HTML5 video.
824
861
  </video>