j1-template 2024.3.15 → 2024.3.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/assets/data/amplitude.html +7 -7
  3. data/assets/data/panel.html +4 -3
  4. data/assets/theme/j1/adapter/js/amplitude.js +100 -81
  5. data/assets/theme/j1/adapter/js/masonry.js +2 -2
  6. data/assets/theme/j1/adapter/js/videojs.js +212 -0
  7. data/assets/theme/j1/core/css/themes/unolight/bootstrap.css +7 -4
  8. data/assets/theme/j1/core/css/themes/unolight/bootstrap.css.map +1 -1
  9. data/assets/theme/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
  10. data/assets/theme/j1/core/css/themes/unolight/bootstrap.min.css.map +1 -1
  11. data/assets/theme/j1/core/js/template.js +4 -0
  12. data/assets/theme/j1/core/js/template.min.js +2 -2
  13. data/assets/theme/j1/core/js/template.min.js.map +1 -1
  14. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.css +81 -1
  15. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.min.css +1 -1
  16. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/compact.css +3 -2
  17. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/compact.min.css +1 -1
  18. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.css +19 -4
  19. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.min.css +1 -1
  20. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/artist.svg +78 -0
  21. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/mute.svg +52 -20
  22. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/next.svg +20 -39
  23. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/now-playing.svg +24 -38
  24. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist-hide.svg +85 -0
  25. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist-music.svg +85 -0
  26. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist-show.svg +85 -0
  27. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist.svg +85 -0
  28. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/previous.svg +18 -37
  29. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/skip-backward.svg +33 -30
  30. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/skip-forward.svg +33 -29
  31. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/small/next.svg +55 -14
  32. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/small/previous.svg +56 -14
  33. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/volume.svg +38 -21
  34. data/assets/theme/j1/modules/amplitudejs/js/amplitude.map +20 -20
  35. data/assets/theme/j1/modules/amplitudejs/js/tech/youtube_example.js +211 -0
  36. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.js +206 -122
  37. data/assets/theme/j1/modules/videojs/assets/icons/custom-icons/next.svg +82 -0
  38. data/assets/theme/j1/modules/videojs/css/font/README.md +151 -0
  39. data/assets/theme/j1/modules/videojs/css/font/VideoJS.svg +150 -0
  40. data/assets/theme/j1/modules/videojs/css/font/video-js-cdn.css +2012 -0
  41. data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.0.css +32 -0
  42. data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.1.css +31 -0
  43. data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.css +31 -0
  44. data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.min.css +21 -0
  45. data/assets/theme/j1/modules/videojs/css/themes/uno.css +14 -3
  46. data/assets/theme/j1/modules/videojs/css/themes/uno.min.css +1 -1
  47. data/assets/theme/j1/modules/videojs/css/videojs.css +1 -0
  48. data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/LICENSE +13 -0
  49. data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/README.md +75 -0
  50. data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/autocaption.js +149 -0
  51. data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/autocaption.min.js +21 -0
  52. data/assets/theme/j1/modules/videojs/js/plugins/controls/hotkeys/README.md +76 -30
  53. data/assets/theme/j1/modules/videojs/js/plugins/controls/hotkeys/hotkeys.js +64 -53
  54. data/assets/theme/j1/modules/videojs/js/plugins/controls/hotkeys/hotkeys.min.js +1 -1
  55. data/assets/theme/j1/modules/videojs/js/plugins/controls/skipbuttons/README.md +133 -0
  56. data/assets/theme/j1/modules/videojs/js/plugins/controls/skipbuttons/skipbuttons.js +137 -0
  57. data/assets/theme/j1/modules/videojs/js/plugins/controls/skipbuttons/skipbuttons.min.js +21 -0
  58. data/assets/theme/j1/modules/videojs/js/plugins/controls/zoom/zoom.js +15 -12
  59. data/assets/theme/j1/modules/videojs/js/plugins/players/yt/youtube.js +43 -16
  60. data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.3/fastfilereaderext.so +0 -0
  61. data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.3/rubyeventmachine.so +0 -0
  62. data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.4/fastfilereaderext.so +0 -0
  63. data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.4/rubyeventmachine.so +0 -0
  64. data/lib/j1/version.rb +1 -1
  65. data/lib/j1_app/j1_auth_manager/config.rb +0 -4
  66. data/lib/starter_web/Gemfile +45 -22
  67. data/lib/starter_web/README.md +5 -5
  68. data/lib/starter_web/_config.yml +4 -6
  69. data/lib/starter_web/_data/modules/amplitude.yml +9 -399
  70. data/lib/starter_web/_data/modules/defaults/gallery.yml +42 -0
  71. data/lib/starter_web/_data/modules/defaults/videojs.yml +107 -0
  72. data/lib/starter_web/_data/modules/gallery.yml +30 -14
  73. data/lib/starter_web/_data/modules/masonry.yml +15 -0
  74. data/lib/starter_web/_data/modules/videojs.yml +57 -0
  75. data/lib/starter_web/_data/resources.yml +9 -27
  76. data/lib/starter_web/_data/templates/feed.xml +1 -1
  77. data/lib/starter_web/_includes/tables/jekyll_variables.asciidoc +1 -0
  78. data/lib/starter_web/_plugins/asciidoctor/dailymotion-block.rb +4 -1
  79. data/lib/starter_web/_plugins/asciidoctor/videojs-block.rb +145 -24
  80. data/lib/starter_web/_plugins/asciidoctor/vimeo-block.rb +4 -1
  81. data/lib/starter_web/_plugins/asciidoctor/wistia-block.rb +313 -0
  82. data/lib/starter_web/_plugins/asciidoctor/youtube-block.rb +192 -17
  83. data/lib/starter_web/_plugins/index/lunr.rb +1 -1
  84. data/lib/starter_web/package.json +1 -1
  85. data/lib/starter_web/pages/public/amplitude_yt_tester.adoc +20 -7
  86. data/lib/starter_web/pages/public/manuals/integrations/amplitudejs/amplitudejs-api.adoc +1 -1
  87. data/lib/starter_web/pages/public/manuals/integrations/videojs/youtube-api.adoc +1638 -0
  88. data/lib/starter_web/pages/public/tools/previewer/preview_bootstrap_theme.adoc +5 -6
  89. data/lib/starter_web/pages/public/tools/previewer/preview_videojs.adoc +203 -0
  90. data/lib/starter_web/pages/{tour → public/tour}/play_audio.adoc +3 -10
  91. data/lib/starter_web/pages/{tour → public/tour}/play_video.adoc +49 -40
  92. metadata +61 -41
  93. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/_pause.svg +0 -19
  94. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/_play.svg +0 -18
  95. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/show-playlist.svg +0 -15
  96. data/assets/theme/j1/modules/jqueryScrollbar/LICENSE +0 -20
  97. data/assets/theme/j1/modules/jqueryScrollbar/README.md +0 -28
  98. data/assets/theme/j1/modules/jqueryScrollbar/css/scrollbar.css +0 -939
  99. data/assets/theme/j1/modules/jqueryScrollbar/css/scrollbar.min.css +0 -20
  100. data/assets/theme/j1/modules/jqueryScrollbar/js/scrollbar.js +0 -851
  101. data/assets/theme/j1/modules/jqueryScrollbar/js/scrollbar.min.js +0 -36
  102. data/assets/theme/j1/modules/jqueryScrollbar/sass/scrollbar.scss +0 -806
  103. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.0.js +0 -794
  104. /data/lib/starter_web/pages/{tour → public/tour}/_includes/attributes.asciidoc +0 -0
  105. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/100_gistblock.asciidoc +0 -0
  106. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_bottom_info.asciidoc +0 -0
  107. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_bottom_left_warning.asciidoc +0 -0
  108. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_bottom_right_danger.asciidoc +0 -0
  109. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_central_success.asciidoc +0 -0
  110. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_full_height_left_info.asciidoc +0 -0
  111. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_full_height_right_success.asciidoc +0 -0
  112. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_table_bs_modal_examples.asciidoc +0 -0
  113. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_top_info.asciidoc +0 -0
  114. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_top_left_info.asciidoc +0 -0
  115. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_top_right_success.asciidoc +0 -0
  116. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/419_advanced_modals_demo.asciidoc +0 -0
  117. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/tables/bs_modal_examples.asciidoc +0 -0
  118. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/themes_bootstrap.asciidoc +0 -0
  119. /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/themes_rouge.asciidoc +0 -0
  120. /data/lib/starter_web/pages/{tour → public/tour}/asciidoc_extensions.adoc +0 -0
  121. /data/lib/starter_web/pages/{tour → public/tour}/bootstrap_themes.adoc +0 -0
  122. /data/lib/starter_web/pages/{tour → public/tour}/highlghter_rouge.adoc +0 -0
  123. /data/lib/starter_web/pages/{tour → public/tour}/icon_fonts.adoc +0 -0
  124. /data/lib/starter_web/pages/{tour → public/tour}/modal_extentions.adoc +0 -0
  125. /data/lib/starter_web/pages/{tour → public/tour}/present_images.adoc +0 -0
  126. /data/lib/starter_web/pages/{tour → public/tour}/quicksearch.adoc +0 -0
  127. /data/lib/starter_web/pages/{tour → public/tour}/responsive_tables.adoc +0 -0
  128. /data/lib/starter_web/pages/{tour → public/tour}/typography.adoc +0 -0
@@ -0,0 +1,211 @@
1
+ /*
2
+ # -----------------------------------------------------------------------------
3
+ # ~/assets/theme/j1/modules/amplitudejs/js/plugins/tech/youtube.js
4
+ # AmplitudeJS V5 Plugin|Tech for J1 Template
5
+ #
6
+ # Product/Info:
7
+ # https://jekyll.one
8
+ #
9
+ # Copyright (C) 2023, 2024 Juergen Adams
10
+ #
11
+ # J1 Template is licensed under the MIT License.
12
+ # See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE
13
+ # -----------------------------------------------------------------------------
14
+ */
15
+ "use strict";
16
+ function ytAudio() {
17
+ }
18
+
19
+ // 2. This code loads the IFrame Player API code asynchronously.
20
+ var player1, player2, player3, player4;
21
+ var firstScriptTag;
22
+
23
+ var tag = document.createElement('script');
24
+ tag.src = "https://www.youtube.com/iframe_api";
25
+ firstScriptTag = document.getElementsByTagName('script')[0];
26
+ firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
27
+
28
+ // 3. This function creates an <iframe> (and YouTube player)
29
+ // after the API code downloads.
30
+ function onYouTubeIframeAPIReady() {
31
+
32
+ var ctrlq1 = document.getElementById("youtube-audio1");
33
+ ctrlq1.innerHTML = '<img id="youtube-icon1" src=""/><div id="youtube-player1"></div>';
34
+ ctrlq1.style.cssText = 'width:150px;margin:2em auto;cursor:pointer;cursor:hand;display:none';
35
+ ctrlq1.onclick = toggleAudio1;
36
+
37
+ player1 = new YT.Player('youtube-player1', {
38
+ height: '0',
39
+ width: '0',
40
+ videoId: ctrlq1.dataset.video,
41
+ playerVars: {
42
+ autoplay: ctrlq1.dataset.autoplay,
43
+ loop: ctrlq1.dataset.loop,
44
+ },
45
+ events: {
46
+ 'onReady': onPlayerReady1,
47
+ 'onStateChange': onPlayerStateChange1
48
+ }
49
+ });
50
+
51
+ var ctrlq2 = document.getElementById("youtube-audio2");
52
+ ctrlq2.innerHTML = '<img id="youtube-icon2" src=""/><div id="youtube-player2"></div>';
53
+ ctrlq2.style.cssText = 'width:150px;margin:2em auto;cursor:pointer;cursor:hand;display:none';
54
+ ctrlq2.onclick = toggleAudio2;
55
+
56
+ player2 = new YT.Player('youtube-player2', {
57
+ height: '0',
58
+ width: '0',
59
+ videoId: ctrlq2.dataset.video,
60
+ playerVars: {
61
+ autoplay: ctrlq2.dataset.autoplay,
62
+ loop: ctrlq2.dataset.loop,
63
+ },
64
+ events: {
65
+ 'onReady': onPlayerReady2,
66
+ 'onStateChange': onPlayerStateChange2
67
+ }
68
+ });
69
+
70
+ var ctrlq3 = document.getElementById("youtube-audio3");
71
+ ctrlq3.innerHTML = '<img id="youtube-icon3" src=""/><div id="youtube-player3"></div>';
72
+ ctrlq3.style.cssText = 'width:150px;margin:2em auto;cursor:pointer;cursor:hand;display:none';
73
+ ctrlq3.onclick = toggleAudio3;
74
+
75
+ player3 = new YT.Player('youtube-player3', {
76
+ height: '0',
77
+ width: '0',
78
+ videoId: ctrlq3.dataset.video,
79
+ playerVars: {
80
+ autoplay: ctrlq3.dataset.autoplay,
81
+ loop: ctrlq3.dataset.loop,
82
+ },
83
+ events: {
84
+ 'onReady': onPlayerReady3,
85
+ 'onStateChange': onPlayerStateChange3
86
+ }
87
+ });
88
+
89
+ var ctrlq4 = document.getElementById("youtube-audio4");
90
+ ctrlq4.innerHTML = '<img id="youtube-icon4" src=""/><div id="youtube-player4"></div>';
91
+ ctrlq4.style.cssText = 'width:150px;margin:2em auto;cursor:pointer;cursor:hand;display:none';
92
+ ctrlq4.onclick = toggleAudio4;
93
+
94
+ player4 = new YT.Player('youtube-player4', {
95
+ height: '0',
96
+ width: '0',
97
+ videoId: ctrlq4.dataset.video,
98
+ playerVars: {
99
+ autoplay: ctrlq4.dataset.autoplay,
100
+ loop: ctrlq4.dataset.loop,
101
+ },
102
+ events: {
103
+ 'onReady': onPlayerReady4,
104
+ 'onStateChange': onPlayerStateChange4
105
+ }
106
+ });
107
+ }
108
+
109
+ function togglePlayButton1(play) {
110
+ document.getElementById("youtube-icon1").src = play ? "/assets/theme/j1/modules/amplitudejs/icons/player/blue/play.png" : "/assets/theme/j1/modules/amplitudejs/icons/player/blue/pause.png";
111
+ }
112
+
113
+ function toggleAudio1() {
114
+ if ( player1.getPlayerState() == 1 || player1.getPlayerState() == 3 ) {
115
+ player1.pauseVideo();
116
+ togglePlayButton1(false);
117
+ } else {
118
+ player1.playVideo();
119
+ togglePlayButton1(true);
120
+ }
121
+ }
122
+
123
+ function togglePlayButton2(play) {
124
+ document.getElementById("youtube-icon2").src = play ? "/assets/theme/j1/modules/amplitudejs/icons/player/blue/play.png" : "/assets/theme/j1/modules/amplitudejs/icons/player/blue/pause.png";
125
+ }
126
+
127
+ function toggleAudio2() {
128
+ if ( player2.getPlayerState() == 1 || player2.getPlayerState() == 3 ) {
129
+ player2.pauseVideo();
130
+ togglePlayButton2(false);
131
+ } else {
132
+ player2.playVideo();
133
+ togglePlayButton2(true);
134
+ }
135
+ }
136
+
137
+ function togglePlayButton3(play) {
138
+ document.getElementById("youtube-icon3").src = play ? "/assets/theme/j1/modules/amplitudejs/icons/player/blue/play.png" : "/assets/theme/j1/modules/amplitudejs/icons/player/blue/pause.png";
139
+ }
140
+
141
+ function toggleAudio3() {
142
+ if ( player3.getPlayerState() == 1 || player3.getPlayerState() == 3 ) {
143
+ player3.pauseVideo();
144
+ togglePlayButton3(false);
145
+ } else {
146
+ player3.playVideo();
147
+ togglePlayButton3(true);
148
+ }
149
+ }
150
+
151
+ function togglePlayButton4(play) {
152
+ document.getElementById("youtube-icon4").src = play ? "/assets/theme/j1/modules/amplitudejs/icons/player/blue/play.png" : "/assets/theme/j1/modules/amplitudejs/icons/player/blue/pause.png";
153
+ }
154
+
155
+ function toggleAudio4() {
156
+ if ( player4.getPlayerState() == 1 || player4.getPlayerState() == 3 ) {
157
+ player4.pauseVideo();
158
+ togglePlayButton4(false);
159
+ } else {
160
+ player4.playVideo();
161
+ togglePlayButton4(true);
162
+ }
163
+ }
164
+
165
+ function onPlayerReady1(event) {
166
+ player1.setPlaybackQuality("small");
167
+ document.getElementById("youtube-audio1").style.display = "block";
168
+ togglePlayButton1(player1.getPlayerState() !== 5);
169
+ }
170
+
171
+ function onPlayerStateChange1(event) {
172
+ if (event.data === 0) {
173
+ togglePlayButton1(false);
174
+ }
175
+ }
176
+
177
+ function onPlayerReady2(event) {
178
+ player2.setPlaybackQuality("small");
179
+ document.getElementById("youtube-audio2").style.display = "block";
180
+ togglePlayButton2(player2.getPlayerState() !== 5);
181
+ }
182
+
183
+ function onPlayerStateChange2(event) {
184
+ if (event.data === 0) {
185
+ togglePlayButton2(false);
186
+ }
187
+ }
188
+
189
+ function onPlayerReady3(event) {
190
+ player3.setPlaybackQuality("small");
191
+ document.getElementById("youtube-audio3").style.display = "block";
192
+ togglePlayButton3(player3.getPlayerState() !== 5);
193
+ }
194
+
195
+ function onPlayerStateChange3(event) {
196
+ if (event.data === 0) {
197
+ togglePlayButton3(false);
198
+ }
199
+ }
200
+
201
+ function onPlayerReady4(event) {
202
+ player4.setPlaybackQuality("small");
203
+ document.getElementById("youtube-audio4").style.display = "block";
204
+ togglePlayButton4(player4.getPlayerState() !== 5);
205
+ }
206
+
207
+ function onPlayerStateChange4(event) {
208
+ if (event.data === 0) {
209
+ togglePlayButton4(false);
210
+ }
211
+ }
@@ -613,34 +613,43 @@
613
613
  };
614
614
 
615
615
  Video.prototype.controlVideo = function (index, action) {
616
+ const vjsOptions = j1.modules.videojs.options;
616
617
  var trackSrc,
617
618
  $videoElement, videoInfo, videoStart, videoData, videoId,
618
- videojsPlayer, zoomPlugin;
619
-
620
- var playbackRatesDefaults = '[0.25, 0.5, 1, 1.5, 2]';
621
- var chapterTracksEnabled = false;
622
-
623
- var hotkeysPluginDefaults = {
624
- volumeStep: 0.1,
625
- seekStep: 5,
626
- enableMute: true,
627
- enableVolumeScroll: true,
628
- enableHoverScroll: false,
629
- enableFullscreen: true,
630
- enableNumbers: true,
631
- enableJogStyle: false,
632
- alwaysCaptureHotkeys: false,
633
- captureDocumentHotkeys: false,
634
- enableModifiersForNumbers: false,
635
- enableInactiveFocus: true,
636
- skipInitialFocus: false
619
+ videojsPlayer, playbackRates,
620
+ hotKeysPlugin, skipButtonsPlugin, zoomPlugin;
621
+
622
+ var playbackRatesDefaults = vjsOptions.playbackRates.values;
623
+ var chapterTracksEnabled = false;
624
+
625
+ var hotKeysPluginDefaults = {
626
+ volumeStep: vjsOptions.plugins.hotKeys.volumeStep,
627
+ seekStep: vjsOptions.plugins.hotKeys.seekStep,
628
+ enableMute: vjsOptions.plugins.hotKeys.enableMute,
629
+ enableVolumeScroll: vjsOptions.plugins.hotKeys.enableVolumeScroll,
630
+ enableHoverScroll: vjsOptions.plugins.hotKeys.enableHoverScroll,
631
+ enableFullscreen: vjsOptions.plugins.hotKeys.enableFullscreen,
632
+ enableNumbers: vjsOptions.plugins.hotKeys.enableNumbers,
633
+ enableJogStyle: vjsOptions.plugins.hotKeys.enableJogStyle,
634
+ alwaysCaptureHotkeys: vjsOptions.plugins.hotKeys.alwaysCaptureHotkeys,
635
+ captureDocumentHotkeys: vjsOptions.plugins.hotKeys.captureDocumentHotkeys,
636
+ enableModifiersForNumbers: vjsOptions.plugins.hotKeys.enableModifiersForNumbers,
637
+ enableInactiveFocus: vjsOptions.plugins.hotKeys.enableInactiveFocus,
638
+ skipInitialFocus: vjsOptions.plugins.hotKeys.skipInitialFocus
637
639
  };
638
640
 
639
- var zoomPluginDefaults = {
640
- moveX: 0,
641
- moveY: 0,
642
- rotate: 0,
643
- zoom: 1
641
+ var skipButtonsPluginDefaults = {
642
+ backward: vjsOptions.plugins.skipButtons.backward,
643
+ forward: vjsOptions.plugins.skipButtons.forward,
644
+ backwardIndex: 0,
645
+ forwardIndex: 1
646
+ };
647
+
648
+ var zoomPluginDefaults = {
649
+ moveX: vjsOptions.plugins.zoomButtons.moveX,
650
+ moveY: vjsOptions.plugins.zoomButtons.moveY,
651
+ rotate: vjsOptions.plugins.zoomButtons.rotate,
652
+ zoom: vjsOptions.plugins.zoomButtons.zoom
644
653
  };
645
654
 
646
655
  videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
@@ -652,116 +661,190 @@
652
661
  // chapter tracks only available for VJS
653
662
  //
654
663
  if (this.core.galleryItems[this.core.index].video !== undefined && videoInfo.html5) {
655
- videoData = JSON.parse(this.core.galleryItems[this.core.index].video);
656
- if (videoData.tracks !== undefined && videoData.tracks.length > 0) {
657
- for (var i=0; i<videoData.tracks.length; i++) {
658
- if (videoData.tracks[i].kind == 'chapters') {
659
- trackSrc = videoData.tracks[i].src;
660
- chapterTracksEnabled = true;
661
- }
662
- }
663
- } // END if videoData.tracks
664
+ videoData = JSON.parse(this.core.galleryItems[this.core.index].video);
664
665
 
665
- if ($videoElement.selector !== undefined) {
666
- videoId = $videoElement.selector.id;
667
- videojsPlayer = videojs(videoId);
668
- } else {
669
- videojsPlayer = 'unknown';
670
- }
666
+ if (videoData.tracks !== undefined && videoData.tracks.length > 0) {
667
+ for (var i=0; i<videoData.tracks.length; i++) {
668
+ if (videoData.tracks[i].kind == 'chapters') {
669
+ trackSrc = videoData.tracks[i].src;
670
+ chapterTracksEnabled = true;
671
+ }
672
+ }
673
+ } // END if videoData.tracks
671
674
 
672
- if (videojsPlayer !== 'unknown') {
673
-
674
- // jadams, 2024-06-16: added VJS Plugins hotkeys|zoom, playbackRates
675
- // ---------------------------------------------------------------
676
- var hotkeysPlugin = this.settings.videojsOptions.controlBar.hotkeysPlugin;
677
- var zoomPlugin = this.settings.videojsOptions.controlBar.zoomPlugin;
678
- var playbackRates = (this.settings.videojsOptions.controlBar.playbackRates !== undefined) ? this.settings.videojsOptions.controlBar.playbackRates : playbackRatesDefaults;
679
-
680
- // jadams, 2024-01-22: added video start position
681
- // ---------------------------------------------------------------
682
- if (this.settings.videojsOptions.videoStart !== undefined) {
683
- videoStart = this.settings.videojsOptions.videoStart[index];
684
- videojsPlayer.on("play", function() {
685
- var startFromSecond = new Date('1970-01-01T' + videoStart + 'Z').getTime() / 1000;
686
- videojsPlayer.currentTime(startFromSecond);
687
-
688
- }); // END on "play"
689
- } // END if videoStart
690
-
691
- // add playbackRates (only available for VJS)
692
- videojsPlayer.playbackRates(playbackRates);
693
-
694
- // add hotkeysPlugin (only available for VJS)
695
- if (hotkeysPlugin !== undefined && hotkeysPlugin.enabled) {
696
- hotkeysPlugin.options = __assign(__assign({}, hotkeysPluginDefaults), hotkeysPlugin.options);
697
- videojsPlayer.hotkeys({
698
- enableModifiersForNumbers: hotkeysPlugin.options.enableModifiersForNumbers
699
- });
700
- } // END if hotkeysPlugin enabled
701
-
702
- // add zoomPlugin (only available for VJS)
703
- if (zoomPlugin !== undefined && zoomPlugin.enabled) {
704
- zoomPlugin.options = __assign(__assign({}, zoomPluginDefaults), zoomPlugin.options);
705
- videojsPlayer.zoomPlugin({
706
- moveX: zoomPlugin.options.moveX,
707
- moveY: zoomPlugin.options.moveY,
708
- rotate: zoomPlugin.options.rotate,
709
- zoom: zoomPlugin.options.zoom
710
- });
711
- } // END if zoomPlugin enabled
712
-
713
- // jadams, 2023-12-11: added chapter track processing (only available for VJS)
714
- // -----------------------------------------------------------------
715
- if (chapterTracksEnabled) {
716
- var parser = new WebVTTParser();
717
- var markers = [];
718
-
719
- function cb_load (data /* ,textStatus, jqXHR */ ) {
720
- var tree = parser.parse(data, 'metadata');
721
- var marker;
722
-
723
- // add chapter tracks to markers array
724
- for (var i=0; i<tree.cues.length; i++) {
725
- marker = { time: tree.cues[i].startTime, label: tree.cues[i].text };
726
- markers.push(marker);
675
+ if ($videoElement.selector !== undefined) {
676
+ videoId = $videoElement.selector.id;
677
+ videojsPlayer = videojs(videoId);
678
+ } else {
679
+ videojsPlayer = 'unknown';
680
+ }
681
+
682
+ if (videojsPlayer !== 'unknown') {
683
+
684
+ // added VJS Plugins hotKeys|skipButtons|zoom, playbackRates
685
+ // -------------------------------------------------------------
686
+ hotKeysPlugin = this.settings.videojsOptions.controlBar.hotKeysPlugin;
687
+ skipButtonsPlugin = this.settings.videojsOptions.controlBar.skipButtonsPlugin;
688
+ zoomPlugin = this.settings.videojsOptions.controlBar.zoomPlugin;
689
+ playbackRates = (this.settings.videojsOptions.controlBar.playbackRates !== undefined) ? this.settings.videojsOptions.controlBar.playbackRates : playbackRatesDefaults;
690
+
691
+ // jadams, 2024-01-22: added video start position
692
+ // -------------------------------------------------------------
693
+ if (this.settings.videojsOptions.videoStart !== undefined) {
694
+ videoStart = this.settings.videojsOptions.videoStart[index];
695
+ videojsPlayer.on("play", function() {
696
+ var startFromSecond = new Date('1970-01-01T' + videoStart + 'Z').getTime() / 1000;
697
+ videojsPlayer.currentTime(startFromSecond);
698
+ }); // END on event play
699
+ } // END if videoStart
700
+
701
+ // add playbackRates (only available for VJS)
702
+ if (videojsPlayer.playbackRates !== undefined) {
703
+ videojsPlayer.playbackRates(playbackRates);
727
704
  }
728
- }; // END callback
729
705
 
730
- // load chapter tracks
731
- loadVtt(trackSrc, cb_load);
706
+ // add hotkeys Plugin (only available for VJS)
707
+ if (hotKeysPlugin !== undefined && hotKeysPlugin.enabled && videojsPlayer.hotKeys !== undefined) {
708
+
709
+ // merge objects
710
+ hotKeysPlugin.options = __assign(__assign({}, hotKeysPluginDefaults), hotKeysPlugin.options);
711
+
712
+ // prevent multiple plugin instances
713
+ var hotKeysActive = false;
714
+ if (videojsPlayer.activePlugins_ !== undefined && videojsPlayer.activePlugins_.hotKeys !== undefined) {
715
+ hotKeysActive = videojsPlayer.activePlugins_.hotKeys;
716
+ }
717
+
718
+ if (!hotKeysActive) {
719
+ videojsPlayer.hotKeys({
720
+ volumeStep: hotKeysPlugin.options.volumeStep,
721
+ seekStep: hotKeysPlugin.options.seekStep,
722
+ enableMute: hotKeysPlugin.options.enableMute,
723
+ enableFullscreen: hotKeysPlugin.options.enableFullscreen,
724
+ enableNumbers: hotKeysPlugin.options.enableNumbers,
725
+ enableVolumeScroll: hotKeysPlugin.options.enableVolumeScroll,
726
+ enableHoverScroll: hotKeysPlugin.options.enableHoverScroll,
727
+ alwaysCaptureHotkeys: hotKeysPlugin.options.alwaysCaptureHotkeys,
728
+ captureDocumentHotkeys: hotKeysPlugin.options.captureDocumentHotkeys,
729
+ documentHotkeysFocusElementFilter: hotKeysPlugin.options.documentHotkeysFocusElementFilter,
730
+
731
+ // Mimic VLC seek behavior (default to: 15)
732
+ seekStep: function(e) {
733
+ if (e.ctrlKey && e.altKey) {
734
+ return 5*60;
735
+ } else if (e.ctrlKey) {
736
+ return 60;
737
+ } else if (e.altKey) {
738
+ return 10;
739
+ } else {
740
+ return 15;
741
+ }
742
+ }
743
+
744
+ });
745
+ } // END if hotKeysActive
732
746
 
733
- // add chapter tracks on play
734
- videojsPlayer.on("play", function() {
735
- videojsPlayer.currentTime(videoStart);
747
+ } // END if hotKeysPlugin enabled
736
748
 
737
- var total = videojsPlayer.duration();
738
- var timeline = $(videojsPlayer.controlBar.progressControl.children_[0].el_);
749
+ // add skipButtons Plugin (only available for VJS)
750
+ // -------------------------------------------------------------
751
+ if (skipButtonsPlugin !== undefined && skipButtonsPlugin.enabled && videojsPlayer.skipButtons !== undefined) {
752
+ // merge objects
753
+ skipButtonsPlugin.options = __assign(__assign({}, skipButtonsPluginDefaults), skipButtonsPlugin.options);
739
754
 
740
- // add chapter tracks on timeline (delayed)
741
- setTimeout (function() {
742
- var markers_loaded = setInterval (function () {
743
- if (markers.length) {
744
- for (var i=0; i<markers.length; i++) {
745
- var left = (markers[i].time / total * 100) + '%';
746
- var time = markers[i].time;
747
- var el = $('<div class="vjs-chapter-marker" style="left: ' +left+ '" data-time="' +time+ '"> <span>' +markers[i].label+ '</span></div>');
755
+ // prevent multiple plugin instances
756
+ var skipButtonsActive = false;
757
+ if (videojsPlayer.activePlugins_ !== undefined && videojsPlayer.activePlugins_.skipButtons !== undefined) {
758
+ skipButtonsActive = videojsPlayer.activePlugins_.skipButtons;
759
+ }
748
760
 
749
- el.click(function() {
750
- videojsPlayer.currentTime($(this).data('time'));
761
+ if (!skipButtonsActive) {
762
+ videojsPlayer.skipButtons({
763
+ backward: skipButtonsPlugin.options.backward,
764
+ forward: skipButtonsPlugin.options.forward,
765
+ backwardIndex: skipButtonsPlugin.options.backwardIndex,
766
+ forwardIndex: skipButtonsPlugin.options.forwardIndex
751
767
  });
768
+ }
769
+
770
+ } // END if skipButtons Plugin enabled
771
+
772
+ // add zoom Plugin (only available for VJS)
773
+ // -----------------------------------------------------------------
774
+ if (zoomPlugin !== undefined && zoomPlugin.enabled && videojsPlayer.zoomButtons !== undefined) {
775
+ // merge objects
776
+ zoomPlugin.options = __assign(__assign({}, zoomPluginDefaults), zoomPlugin.options);
752
777
 
753
- timeline.append(el);
754
- }
755
- clearInterval(markers_loaded);
778
+ // prevent multiple plugin instances
779
+ var zoomButtonsActive = false;
780
+ if (videojsPlayer.activePlugins_ !== undefined && videojsPlayer.activePlugins_.zoomButtons !== undefined) {
781
+ zoomButtonsActive = videojsPlayer.activePlugins_.zoomButtons;
782
+ }
783
+
784
+ if (!zoomButtonsActive) {
785
+ videojsPlayer.zoomButtons({
786
+ moveX: zoomPlugin.options.moveX,
787
+ moveY: zoomPlugin.options.moveY,
788
+ rotate: zoomPlugin.options.rotate,
789
+ zoom: zoomPlugin.options.zoom
790
+ });
756
791
  }
757
- }, 10);
758
- }, 1000 );
759
792
 
760
- }); // END on "play"
793
+ } // END if zoom Plugin enabled
794
+
795
+ // chapter track processing (only available for VJS)
796
+ // -----------------------------------------------------------------
797
+ if (chapterTracksEnabled) {
798
+ var parser = new WebVTTParser();
799
+ var markers = [];
800
+
801
+ function cb_load (data /* ,textStatus, jqXHR */ ) {
802
+ var tree = parser.parse(data, 'metadata');
803
+ var marker;
804
+
805
+ // add chapter tracks to markers array
806
+ for (var i=0; i<tree.cues.length; i++) {
807
+ marker = { time: tree.cues[i].startTime, label: tree.cues[i].text };
808
+ markers.push(marker);
809
+ }
810
+ }; // END function cb_load
811
+
812
+ // load chapter tracks
813
+ // -------------------------------------------------------------
814
+ loadVtt(trackSrc, cb_load);
761
815
 
762
- } // END if chapterTracksEnabled
816
+ // add chapter tracks on play
817
+ videojsPlayer.on("play", function() {
818
+ videojsPlayer.currentTime(videoStart);
763
819
 
764
- } // END if videojsPlayer is defined
820
+ var total = videojsPlayer.duration();
821
+ var timeline = $(videojsPlayer.controlBar.progressControl.children_[0].el_);
822
+
823
+ // add chapter tracks on timeline (delayed)
824
+ setTimeout (function() {
825
+ var markers_loaded = setInterval (function () {
826
+ if (markers.length) {
827
+ for (var i=0; i<markers.length; i++) {
828
+ var left = (markers[i].time / total * 100) + '%';
829
+ var time = markers[i].time;
830
+ var el = $('<div class="vjs-chapter-marker" style="left: ' +left+ '" data-time="' +time+ '"> <span>' +markers[i].label+ '</span></div>');
831
+
832
+ el.click(function() {
833
+ videojsPlayer.currentTime($(this).data('time'));
834
+ });
835
+
836
+ timeline.append(el);
837
+ }
838
+ clearInterval(markers_loaded);
839
+ }
840
+ }, 10); // END markers_loaded
841
+ }, 1000 ); // END setTimeout
842
+
843
+ }); // END on "play"
844
+
845
+ } // END if chapterTracksEnabled
846
+
847
+ } // END if videojsPlayer is defined
765
848
 
766
849
  } // END if videoInfo.html5
767
850
 
@@ -811,7 +894,8 @@
811
894
  console.warn('lightGallery: Make sure you have included //fast.wistia.com/assets/external/E-v1.js');
812
895
  }
813
896
  }
814
- };
897
+
898
+ }; // END controlVideo
815
899
 
816
900
  Video.prototype.loadVideoOnPosterClick = function ($el, forcePlay) {
817
901
  var _this = this;
@@ -875,4 +959,4 @@
875
959
 
876
960
  return Video;
877
961
 
878
- })));
962
+ })));
@@ -0,0 +1,82 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+ xmlns:cc="http://creativecommons.org/ns#"
5
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
+ xmlns:svg="http://www.w3.org/2000/svg"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10
+ width="24px"
11
+ height="24px"
12
+ viewBox="0 0 24 24"
13
+ version="1.1"
14
+ id="svg13"
15
+ sodipodi:docname="next-hover.svg"
16
+ inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
17
+ <metadata
18
+ id="metadata17">
19
+ <rdf:RDF>
20
+ <cc:Work
21
+ rdf:about="">
22
+ <dc:format>image/svg+xml</dc:format>
23
+ <dc:type
24
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
25
+ <dc:title>Shape</dc:title>
26
+ </cc:Work>
27
+ </rdf:RDF>
28
+ </metadata>
29
+ <sodipodi:namedview
30
+ pagecolor="#ffffff"
31
+ bordercolor="#666666"
32
+ borderopacity="1"
33
+ objecttolerance="10"
34
+ gridtolerance="10"
35
+ guidetolerance="10"
36
+ inkscape:pageopacity="0"
37
+ inkscape:pageshadow="2"
38
+ inkscape:window-width="1661"
39
+ inkscape:window-height="1135"
40
+ id="namedview15"
41
+ showgrid="false"
42
+ inkscape:pagecheckerboard="true"
43
+ inkscape:showpageshadow="false"
44
+ inkscape:zoom="30.625"
45
+ inkscape:cx="12"
46
+ inkscape:cy="12"
47
+ inkscape:window-x="0"
48
+ inkscape:window-y="0"
49
+ inkscape:window-maximized="0"
50
+ inkscape:current-layer="svg13" />
51
+ <!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
52
+ <title
53
+ id="title2">Shape</title>
54
+ <desc
55
+ id="desc4">Created with Sketch.</desc>
56
+ <defs
57
+ id="defs6" />
58
+ <g
59
+ id="Screens"
60
+ stroke="none"
61
+ stroke-width="1"
62
+ fill="none"
63
+ fill-rule="evenodd"
64
+ transform="matrix(0.98334356,0,0,0.98498249,0.23649025,0.16326531)">
65
+ <g
66
+ id="Player"
67
+ transform="translate(-263,-528)"
68
+ fill="#ffffff">
69
+ <g
70
+ id="Controls"
71
+ transform="translate(24,504)">
72
+ <g
73
+ id="Skip-Next"
74
+ transform="translate(227,12)">
75
+ <path
76
+ d="M 12,36 29,24 12,12 Z M 32,12 v 24 h 4 V 12 Z"
77
+ id="Shape" />
78
+ </g>
79
+ </g>
80
+ </g>
81
+ </g>
82
+ </svg>