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.
- checksums.yaml +4 -4
- data/assets/data/amplitude.html +7 -7
- data/assets/data/panel.html +4 -3
- data/assets/theme/j1/adapter/js/amplitude.js +100 -81
- data/assets/theme/j1/adapter/js/masonry.js +2 -2
- data/assets/theme/j1/adapter/js/videojs.js +212 -0
- data/assets/theme/j1/core/css/themes/unolight/bootstrap.css +7 -4
- data/assets/theme/j1/core/css/themes/unolight/bootstrap.css.map +1 -1
- data/assets/theme/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
- data/assets/theme/j1/core/css/themes/unolight/bootstrap.min.css.map +1 -1
- data/assets/theme/j1/core/js/template.js +4 -0
- data/assets/theme/j1/core/js/template.min.js +2 -2
- data/assets/theme/j1/core/js/template.min.js.map +1 -1
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.css +81 -1
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.min.css +1 -1
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/compact.css +3 -2
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/compact.min.css +1 -1
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.css +19 -4
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.min.css +1 -1
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/artist.svg +78 -0
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/mute.svg +52 -20
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/next.svg +20 -39
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/now-playing.svg +24 -38
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist-hide.svg +85 -0
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist-music.svg +85 -0
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist-show.svg +85 -0
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist.svg +85 -0
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/previous.svg +18 -37
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/skip-backward.svg +33 -30
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/skip-forward.svg +33 -29
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/small/next.svg +55 -14
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/small/previous.svg +56 -14
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/volume.svg +38 -21
- data/assets/theme/j1/modules/amplitudejs/js/amplitude.map +20 -20
- data/assets/theme/j1/modules/amplitudejs/js/tech/youtube_example.js +211 -0
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.js +206 -122
- data/assets/theme/j1/modules/videojs/assets/icons/custom-icons/next.svg +82 -0
- data/assets/theme/j1/modules/videojs/css/font/README.md +151 -0
- data/assets/theme/j1/modules/videojs/css/font/VideoJS.svg +150 -0
- data/assets/theme/j1/modules/videojs/css/font/video-js-cdn.css +2012 -0
- data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.0.css +32 -0
- data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.1.css +31 -0
- data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.css +31 -0
- data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.min.css +21 -0
- data/assets/theme/j1/modules/videojs/css/themes/uno.css +14 -3
- data/assets/theme/j1/modules/videojs/css/themes/uno.min.css +1 -1
- data/assets/theme/j1/modules/videojs/css/videojs.css +1 -0
- data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/LICENSE +13 -0
- data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/README.md +75 -0
- data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/autocaption.js +149 -0
- data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/autocaption.min.js +21 -0
- data/assets/theme/j1/modules/videojs/js/plugins/controls/hotkeys/README.md +76 -30
- data/assets/theme/j1/modules/videojs/js/plugins/controls/hotkeys/hotkeys.js +64 -53
- data/assets/theme/j1/modules/videojs/js/plugins/controls/hotkeys/hotkeys.min.js +1 -1
- data/assets/theme/j1/modules/videojs/js/plugins/controls/skipbuttons/README.md +133 -0
- data/assets/theme/j1/modules/videojs/js/plugins/controls/skipbuttons/skipbuttons.js +137 -0
- data/assets/theme/j1/modules/videojs/js/plugins/controls/skipbuttons/skipbuttons.min.js +21 -0
- data/assets/theme/j1/modules/videojs/js/plugins/controls/zoom/zoom.js +15 -12
- data/assets/theme/j1/modules/videojs/js/plugins/players/yt/youtube.js +43 -16
- data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.3/fastfilereaderext.so +0 -0
- data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.3/rubyeventmachine.so +0 -0
- data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.4/fastfilereaderext.so +0 -0
- data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.4/rubyeventmachine.so +0 -0
- data/lib/j1/version.rb +1 -1
- data/lib/j1_app/j1_auth_manager/config.rb +0 -4
- data/lib/starter_web/Gemfile +45 -22
- data/lib/starter_web/README.md +5 -5
- data/lib/starter_web/_config.yml +4 -6
- data/lib/starter_web/_data/modules/amplitude.yml +9 -399
- data/lib/starter_web/_data/modules/defaults/gallery.yml +42 -0
- data/lib/starter_web/_data/modules/defaults/videojs.yml +107 -0
- data/lib/starter_web/_data/modules/gallery.yml +30 -14
- data/lib/starter_web/_data/modules/masonry.yml +15 -0
- data/lib/starter_web/_data/modules/videojs.yml +57 -0
- data/lib/starter_web/_data/resources.yml +9 -27
- data/lib/starter_web/_data/templates/feed.xml +1 -1
- data/lib/starter_web/_includes/tables/jekyll_variables.asciidoc +1 -0
- data/lib/starter_web/_plugins/asciidoctor/dailymotion-block.rb +4 -1
- data/lib/starter_web/_plugins/asciidoctor/videojs-block.rb +145 -24
- data/lib/starter_web/_plugins/asciidoctor/vimeo-block.rb +4 -1
- data/lib/starter_web/_plugins/asciidoctor/wistia-block.rb +313 -0
- data/lib/starter_web/_plugins/asciidoctor/youtube-block.rb +192 -17
- data/lib/starter_web/_plugins/index/lunr.rb +1 -1
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/amplitude_yt_tester.adoc +20 -7
- data/lib/starter_web/pages/public/manuals/integrations/amplitudejs/amplitudejs-api.adoc +1 -1
- data/lib/starter_web/pages/public/manuals/integrations/videojs/youtube-api.adoc +1638 -0
- data/lib/starter_web/pages/public/tools/previewer/preview_bootstrap_theme.adoc +5 -6
- data/lib/starter_web/pages/public/tools/previewer/preview_videojs.adoc +203 -0
- data/lib/starter_web/pages/{tour → public/tour}/play_audio.adoc +3 -10
- data/lib/starter_web/pages/{tour → public/tour}/play_video.adoc +49 -40
- metadata +61 -41
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/_pause.svg +0 -19
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/_play.svg +0 -18
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/show-playlist.svg +0 -15
- data/assets/theme/j1/modules/jqueryScrollbar/LICENSE +0 -20
- data/assets/theme/j1/modules/jqueryScrollbar/README.md +0 -28
- data/assets/theme/j1/modules/jqueryScrollbar/css/scrollbar.css +0 -939
- data/assets/theme/j1/modules/jqueryScrollbar/css/scrollbar.min.css +0 -20
- data/assets/theme/j1/modules/jqueryScrollbar/js/scrollbar.js +0 -851
- data/assets/theme/j1/modules/jqueryScrollbar/js/scrollbar.min.js +0 -36
- data/assets/theme/j1/modules/jqueryScrollbar/sass/scrollbar.scss +0 -806
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.0.js +0 -794
- /data/lib/starter_web/pages/{tour → public/tour}/_includes/attributes.asciidoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/100_gistblock.asciidoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_bottom_info.asciidoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_bottom_left_warning.asciidoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_bottom_right_danger.asciidoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_central_success.asciidoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_full_height_left_info.asciidoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_full_height_right_success.asciidoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_table_bs_modal_examples.asciidoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_top_info.asciidoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_top_left_info.asciidoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/410_top_right_success.asciidoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/419_advanced_modals_demo.asciidoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/tables/bs_modal_examples.asciidoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/themes_bootstrap.asciidoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/_includes/documents/themes_rouge.asciidoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/asciidoc_extensions.adoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/bootstrap_themes.adoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/highlghter_rouge.adoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/icon_fonts.adoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/modal_extentions.adoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/present_images.adoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/quicksearch.adoc +0 -0
- /data/lib/starter_web/pages/{tour → public/tour}/responsive_tables.adoc +0 -0
- /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,
|
619
|
-
|
620
|
-
|
621
|
-
var
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
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
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
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
|
-
|
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
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
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
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
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
|
-
|
731
|
-
|
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
|
-
|
734
|
-
videojsPlayer.on("play", function() {
|
735
|
-
videojsPlayer.currentTime(videoStart);
|
747
|
+
} // END if hotKeysPlugin enabled
|
736
748
|
|
737
|
-
|
738
|
-
|
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
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
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
|
-
|
750
|
-
|
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
|
-
|
754
|
-
|
755
|
-
|
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
|
-
|
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
|
-
|
816
|
+
// add chapter tracks on play
|
817
|
+
videojsPlayer.on("play", function() {
|
818
|
+
videojsPlayer.currentTime(videoStart);
|
763
819
|
|
764
|
-
|
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>
|