j1-template 2023.10.1 → 2023.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/assets/themes/j1/adapter/js/gallery.js +56 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/j1/lg-video.1.js +585 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-video.js +14 -5
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-video.min.js +1 -2
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/README.md +5 -5
- data/lib/starter_web/_config.yml +1 -1
- data/lib/starter_web/_data/modules/gallery.yml +80 -13
- data/lib/starter_web/_data/templates/feed.xml +1 -1
- data/lib/starter_web/_plugins/index/lunr.rb +1 -1
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e2e3a1f57f7350be094b38562a4929160b671bce020f20d0614e2df8d13e6f8
|
4
|
+
data.tar.gz: 7530223f266fcf8e670dd2f943ee4f0fea6b8de7c1c5930a179a9c222b6d9715
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3d37529cbb204e1da5a3e25db2efa6777550713955cfc2f6830c546fb6c16a38a9f22644280e61bd81e4d776e79f61d1f09e97e775f8c9e05c4d770d54e1d8f
|
7
|
+
data.tar.gz: f64552caa5148edfc516f3d4e9e21ac8d56c6b44e9910ff7c612059124b15bf878bb49dc6ad38e963153dbca36d65ec6a6cad5f6b4191db317471047cceb72d8
|
@@ -89,6 +89,8 @@ j1.adapter.gallery = (function (j1, window) {
|
|
89
89
|
var environment = '{{environment}}';
|
90
90
|
var state = 'not_started';
|
91
91
|
var play_button = '/assets/themes/j1/modules/lightGallery/css/themes/uno/icons/play-button.png';
|
92
|
+
var url;
|
93
|
+
var origin;
|
92
94
|
var galleryDefaults;
|
93
95
|
var gallerySettings;
|
94
96
|
var galleryOptions;
|
@@ -111,6 +113,9 @@ j1.adapter.gallery = (function (j1, window) {
|
|
111
113
|
// -------------------------------------------------------------------------
|
112
114
|
init: function (options) {
|
113
115
|
|
116
|
+
url = new URL(window.location.href);
|
117
|
+
origin = url.origin;
|
118
|
+
|
114
119
|
// -----------------------------------------------------------------------
|
115
120
|
// Default module settings
|
116
121
|
// -----------------------------------------------------------------------
|
@@ -218,11 +223,62 @@ j1.adapter.gallery = (function (j1, window) {
|
|
218
223
|
{% endfor %}
|
219
224
|
"galleryId": "{{gallery_id}}",
|
220
225
|
"selector": ".lg-item",
|
226
|
+
{% if gallery.video == 'html5' and gallery.lightGallery.videojsOptions.enabled %}
|
221
227
|
"videojsOptions": {
|
222
228
|
{% for option in gallery.lightGallery.videojsOptions %}
|
229
|
+
{% if option[0] contains "enabled" %}
|
230
|
+
{% continue %}
|
231
|
+
{% endif %}
|
232
|
+
{{option[0] | json}}: {{option[1] | json}},
|
233
|
+
{% endfor %}
|
234
|
+
}
|
235
|
+
{% endif %}
|
236
|
+
|
237
|
+
{% if gallery.video == 'youtube' and gallery.lightGallery.playerParams.enabled %}
|
238
|
+
"youTubePlayerParams": {
|
239
|
+
{% for option in gallery.lightGallery.playerParams %}
|
240
|
+
{% if option[0] contains "enabled" %}
|
241
|
+
{% continue %}
|
242
|
+
{% endif %}
|
243
|
+
{{option[0] | json}}: {{option[1] | json}},
|
244
|
+
{% endfor %}
|
245
|
+
"origin": "origin"
|
246
|
+
}
|
247
|
+
{% endif %}
|
248
|
+
|
249
|
+
{% if gallery.video == 'vimeo' and gallery.lightGallery.playerParams.enabled %}
|
250
|
+
"vimeoPlayerParams": {
|
251
|
+
{% for option in gallery.lightGallery.playerParams %}
|
252
|
+
{% if option[0] contains "enabled" %}
|
253
|
+
{% continue %}
|
254
|
+
{% endif %}
|
223
255
|
{{option[0] | json}}: {{option[1] | json}},
|
224
256
|
{% endfor %}
|
225
257
|
}
|
258
|
+
{% endif %}
|
259
|
+
|
260
|
+
{% if gallery.video == 'dailymotion' and gallery.lightGallery.playerParams.enabled %}
|
261
|
+
"dailymotionPlayerParams": {
|
262
|
+
{% for option in gallery.lightGallery.playerParams %}
|
263
|
+
{% if option[0] contains "enabled" %}
|
264
|
+
{% continue %}
|
265
|
+
{% endif %}
|
266
|
+
{{option[0] | json}}: {{option[1] | json}},
|
267
|
+
{% endfor %}
|
268
|
+
}
|
269
|
+
{% endif %}
|
270
|
+
|
271
|
+
{% if gallery.video == 'wistia' and gallery.lightGallery.playerParams.enabled %}
|
272
|
+
"wistiaPlayerParams": {
|
273
|
+
{% for option in gallery.lightGallery.playerParams %}
|
274
|
+
{% if option[0] contains "enabled" %}
|
275
|
+
{% continue %}
|
276
|
+
{% endif %}
|
277
|
+
{{option[0] | json}}: {{option[1] | json}},
|
278
|
+
{% endfor %}
|
279
|
+
}
|
280
|
+
{% endif %}
|
281
|
+
|
226
282
|
}); // END lightGallery
|
227
283
|
|
228
284
|
}); // END justifiedGallery on('jg.complete)
|
@@ -0,0 +1,585 @@
|
|
1
|
+
/*
|
2
|
+
# -----------------------------------------------------------------------------
|
3
|
+
# ~/assets/themes/j1/modules/lightGallery/js/plugins/lg-video.js
|
4
|
+
# Provides lightGallery JS code for the plugin lgVideo
|
5
|
+
#
|
6
|
+
# Product/Info:
|
7
|
+
# https://jekyll.one
|
8
|
+
#
|
9
|
+
# Copyright (C) 2023 Sachin Neravath
|
10
|
+
# Copyright (C) 2023 Juergen Adams
|
11
|
+
#
|
12
|
+
# J1 Template is licensed under the MIT License.
|
13
|
+
# See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE.md
|
14
|
+
# lightGallery is licensed under the GPLv3 license
|
15
|
+
# See: https://github.com/sachinchoolur/lightGallery/blob/master/LICENSE
|
16
|
+
# -----------------------------------------------------------------------------
|
17
|
+
*/
|
18
|
+
|
19
|
+
/*!
|
20
|
+
* lightgallery | 2.7.2 | September 20th 2023
|
21
|
+
* http://www.lightgalleryjs.com/
|
22
|
+
* Copyright (c) 2020 Sachin Neravath;
|
23
|
+
* @license GPLv3
|
24
|
+
*/
|
25
|
+
|
26
|
+
(function (global, factory) {
|
27
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
28
|
+
typeof define === 'function' && define.amd ? define(factory) :
|
29
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgVideo = factory());
|
30
|
+
}(this, (function () { 'use strict';
|
31
|
+
|
32
|
+
/*! *****************************************************************************
|
33
|
+
Copyright (c) Microsoft Corporation.
|
34
|
+
|
35
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
36
|
+
purpose with or without fee is hereby granted.
|
37
|
+
|
38
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
39
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
40
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
41
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
42
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
43
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
44
|
+
PERFORMANCE OF THIS SOFTWARE.
|
45
|
+
***************************************************************************** */
|
46
|
+
|
47
|
+
var __assign = function() {
|
48
|
+
__assign = Object.assign || function __assign(t) {
|
49
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
50
|
+
s = arguments[i];
|
51
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
52
|
+
}
|
53
|
+
return t;
|
54
|
+
};
|
55
|
+
return __assign.apply(this, arguments);
|
56
|
+
};
|
57
|
+
|
58
|
+
var videoSettings = {
|
59
|
+
autoplayFirstVideo: true,
|
60
|
+
youTubePlayerParams: false,
|
61
|
+
vimeoPlayerParams: false,
|
62
|
+
wistiaPlayerParams: false,
|
63
|
+
dailymotionPlayerParams: false,
|
64
|
+
vkPlayerParams: false,
|
65
|
+
gotoNextSlideOnVideoEnd: true,
|
66
|
+
autoplayVideoOnSlide: false,
|
67
|
+
videojs: false,
|
68
|
+
videojsTheme: '',
|
69
|
+
videojsOptions: {},
|
70
|
+
};
|
71
|
+
|
72
|
+
/**
|
73
|
+
* List of lightGallery events
|
74
|
+
* All events should be documented here
|
75
|
+
* Below interfaces are used to build the website documentations
|
76
|
+
* */
|
77
|
+
var lGEvents = {
|
78
|
+
afterAppendSlide: 'lgAfterAppendSlide',
|
79
|
+
init: 'lgInit',
|
80
|
+
hasVideo: 'lgHasVideo',
|
81
|
+
containerResize: 'lgContainerResize',
|
82
|
+
updateSlides: 'lgUpdateSlides',
|
83
|
+
afterAppendSubHtml: 'lgAfterAppendSubHtml',
|
84
|
+
beforeOpen: 'lgBeforeOpen',
|
85
|
+
afterOpen: 'lgAfterOpen',
|
86
|
+
slideItemLoad: 'lgSlideItemLoad',
|
87
|
+
beforeSlide: 'lgBeforeSlide',
|
88
|
+
afterSlide: 'lgAfterSlide',
|
89
|
+
posterClick: 'lgPosterClick',
|
90
|
+
dragStart: 'lgDragStart',
|
91
|
+
dragMove: 'lgDragMove',
|
92
|
+
dragEnd: 'lgDragEnd',
|
93
|
+
beforeNextSlide: 'lgBeforeNextSlide',
|
94
|
+
beforePrevSlide: 'lgBeforePrevSlide',
|
95
|
+
beforeClose: 'lgBeforeClose',
|
96
|
+
afterClose: 'lgAfterClose',
|
97
|
+
rotateLeft: 'lgRotateLeft',
|
98
|
+
rotateRight: 'lgRotateRight',
|
99
|
+
flipHorizontal: 'lgFlipHorizontal',
|
100
|
+
flipVertical: 'lgFlipVertical',
|
101
|
+
autoplay: 'lgAutoplay',
|
102
|
+
autoplayStart: 'lgAutoplayStart',
|
103
|
+
autoplayStop: 'lgAutoplayStop',
|
104
|
+
};
|
105
|
+
|
106
|
+
var param = function (obj) {
|
107
|
+
return Object.keys(obj)
|
108
|
+
.map(function (k) {
|
109
|
+
return encodeURIComponent(k) + '=' + encodeURIComponent(obj[k]);
|
110
|
+
})
|
111
|
+
.join('&');
|
112
|
+
};
|
113
|
+
var paramsToObject = function (url) {
|
114
|
+
var paramas = url
|
115
|
+
.slice(1)
|
116
|
+
.split('&')
|
117
|
+
.map(function (p) { return p.split('='); })
|
118
|
+
.reduce(function (obj, pair) {
|
119
|
+
var _a = pair.map(decodeURIComponent), key = _a[0], value = _a[1];
|
120
|
+
obj[key] = value;
|
121
|
+
return obj;
|
122
|
+
}, {});
|
123
|
+
return paramas;
|
124
|
+
};
|
125
|
+
var getYouTubeParams = function (videoInfo, youTubePlayerParamsSettings) {
|
126
|
+
if (!videoInfo.youtube)
|
127
|
+
return '';
|
128
|
+
var slideUrlParams = videoInfo.youtube[2]
|
129
|
+
? paramsToObject(videoInfo.youtube[2])
|
130
|
+
: '';
|
131
|
+
// For youtube first params gets priority if duplicates found
|
132
|
+
var defaultYouTubePlayerParams = {
|
133
|
+
wmode: 'opaque',
|
134
|
+
autoplay: 1,
|
135
|
+
mute: 0,
|
136
|
+
enablejsapi: 1,
|
137
|
+
};
|
138
|
+
var playerParamsSettings = youTubePlayerParamsSettings || {};
|
139
|
+
var youTubePlayerParams = __assign(__assign(__assign({}, defaultYouTubePlayerParams), playerParamsSettings), slideUrlParams);
|
140
|
+
var youTubeParams = "?" + param(youTubePlayerParams);
|
141
|
+
return youTubeParams;
|
142
|
+
};
|
143
|
+
var isYouTubeNoCookie = function (url) {
|
144
|
+
return url.includes('youtube-nocookie.com');
|
145
|
+
};
|
146
|
+
var getVimeoURLParams = function (defaultParams, videoInfo) {
|
147
|
+
if (!videoInfo || !videoInfo.vimeo)
|
148
|
+
return '';
|
149
|
+
var urlParams = videoInfo.vimeo[2] || '';
|
150
|
+
var defaultPlayerParams = defaultParams && Object.keys(defaultParams).length !== 0
|
151
|
+
? '&' + param(defaultParams)
|
152
|
+
: '';
|
153
|
+
// Support private video
|
154
|
+
var urlWithHash = videoInfo.vimeo[0].split('/').pop() || '';
|
155
|
+
var urlWithHashWithParams = urlWithHash.split('?')[0] || '';
|
156
|
+
var hash = urlWithHashWithParams.split('#')[0];
|
157
|
+
var isPrivate = videoInfo.vimeo[1] !== hash;
|
158
|
+
if (isPrivate) {
|
159
|
+
urlParams = urlParams.replace("/" + hash, '');
|
160
|
+
}
|
161
|
+
urlParams =
|
162
|
+
urlParams[0] == '?' ? '&' + urlParams.slice(1) : urlParams || '';
|
163
|
+
// For vimeo last params gets priority if duplicates found
|
164
|
+
var vimeoPlayerParams = "?autoplay=0&muted=0" + (isPrivate ? "&h=" + hash : '') + defaultPlayerParams + urlParams;
|
165
|
+
return vimeoPlayerParams;
|
166
|
+
};
|
167
|
+
|
168
|
+
/**
|
169
|
+
* Video module for lightGallery
|
170
|
+
* Supports HTML5, YouTube, Vimeo, wistia videos
|
171
|
+
*
|
172
|
+
*
|
173
|
+
* @ref Wistia
|
174
|
+
* https://wistia.com/support/integrations/wordpress(How to get url)
|
175
|
+
* https://wistia.com/support/developers/embed-options#using-embed-options
|
176
|
+
* https://wistia.com/support/developers/player-api
|
177
|
+
* https://wistia.com/support/developers/construct-an-embed-code
|
178
|
+
* http://jsfiddle.net/xvnm7xLm/
|
179
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video
|
180
|
+
* https://wistia.com/support/embed-and-share/sharing-videos
|
181
|
+
* https://private-sharing.wistia.com/medias/mwhrulrucj
|
182
|
+
*
|
183
|
+
* @ref Youtube
|
184
|
+
* https://developers.google.com/youtube/player_parameters#enablejsapi
|
185
|
+
* https://developers.google.com/youtube/iframe_api_reference
|
186
|
+
* https://developer.chrome.com/blog/autoplay/#iframe-delegation
|
187
|
+
*
|
188
|
+
* @ref Vimeo
|
189
|
+
* https://stackoverflow.com/questions/10488943/easy-way-to-get-vimeo-id-from-a-vimeo-url
|
190
|
+
* https://vimeo.zendesk.com/hc/en-us/articles/360000121668-Starting-playback-at-a-specific-timecode
|
191
|
+
* https://vimeo.zendesk.com/hc/en-us/articles/360001494447-Using-Player-Parameters
|
192
|
+
*/
|
193
|
+
var Video = /** @class */ (function () {
|
194
|
+
function Video(instance) {
|
195
|
+
// get lightGallery core plugin instance
|
196
|
+
this.core = instance;
|
197
|
+
this.settings = __assign(__assign({}, videoSettings), this.core.settings);
|
198
|
+
return this;
|
199
|
+
}
|
200
|
+
|
201
|
+
Video.prototype.init = function () {
|
202
|
+
var _this = this;
|
203
|
+
/**
|
204
|
+
* Event triggered when video url found without poster
|
205
|
+
* Append video HTML
|
206
|
+
* Play if autoplayFirstVideo is true
|
207
|
+
*/
|
208
|
+
this.core.LGel.on(lGEvents.hasVideo + ".video", this.onHasVideo.bind(this));
|
209
|
+
this.core.LGel.on(lGEvents.posterClick + ".video", function () {
|
210
|
+
var $el = _this.core.getSlideItem(_this.core.index);
|
211
|
+
_this.loadVideoOnPosterClick($el);
|
212
|
+
});
|
213
|
+
this.core.LGel.on(lGEvents.slideItemLoad + ".video", this.onSlideItemLoad.bind(this));
|
214
|
+
// @desc fired immediately before each slide transition.
|
215
|
+
this.core.LGel.on(lGEvents.beforeSlide + ".video", this.onBeforeSlide.bind(this));
|
216
|
+
// @desc fired immediately after each slide transition.
|
217
|
+
this.core.LGel.on(lGEvents.afterSlide + ".video", this.onAfterSlide.bind(this));
|
218
|
+
};
|
219
|
+
|
220
|
+
/**
|
221
|
+
* @desc Event triggered when a slide is completely loaded
|
222
|
+
*
|
223
|
+
* @param {Event} event - lightGalley custom event
|
224
|
+
*/
|
225
|
+
Video.prototype.onSlideItemLoad = function (event) {
|
226
|
+
var _this = this;
|
227
|
+
var _a = event.detail, isFirstSlide = _a.isFirstSlide, index = _a.index;
|
228
|
+
// Should check the active slide as well as user may have moved to different slide before the first slide is loaded
|
229
|
+
if (this.settings.autoplayFirstVideo &&
|
230
|
+
isFirstSlide &&
|
231
|
+
index === this.core.index) {
|
232
|
+
// Delay is just for the transition effect on video load
|
233
|
+
setTimeout(function () {
|
234
|
+
_this.loadAndPlayVideo(index);
|
235
|
+
}, 200);
|
236
|
+
}
|
237
|
+
// Should not call on first slide. should check only if the slide is active
|
238
|
+
if (!isFirstSlide &&
|
239
|
+
this.settings.autoplayVideoOnSlide &&
|
240
|
+
index === this.core.index) {
|
241
|
+
this.loadAndPlayVideo(index);
|
242
|
+
}
|
243
|
+
};
|
244
|
+
|
245
|
+
/**
|
246
|
+
* @desc Event triggered when video url or poster found
|
247
|
+
* Append video HTML is poster is not given
|
248
|
+
* Play if autoplayFirstVideo is true
|
249
|
+
*
|
250
|
+
* @param {Event} event - Javascript Event object.
|
251
|
+
*/
|
252
|
+
Video.prototype.onHasVideo = function (event) {
|
253
|
+
var _a = event.detail, index = _a.index, src = _a.src, html5Video = _a.html5Video, hasPoster = _a.hasPoster;
|
254
|
+
if (!hasPoster) {
|
255
|
+
// All functions are called separately if poster exist in loadVideoOnPosterClick function
|
256
|
+
this.appendVideos(this.core.getSlideItem(index), {
|
257
|
+
src: src,
|
258
|
+
addClass: 'lg-object',
|
259
|
+
index: index,
|
260
|
+
html5Video: html5Video,
|
261
|
+
});
|
262
|
+
// Automatically navigate to next slide once video reaches the end.
|
263
|
+
this.gotoNextSlideOnVideoEnd(src, index);
|
264
|
+
}
|
265
|
+
};
|
266
|
+
|
267
|
+
/**
|
268
|
+
* @desc fired immediately before each slide transition.
|
269
|
+
* Pause the previous video
|
270
|
+
* Hide the download button if the slide contains YouTube, Vimeo, or Wistia videos.
|
271
|
+
*
|
272
|
+
* @param {Event} event - Javascript Event object.
|
273
|
+
* @param {number} prevIndex - Previous index of the slide.
|
274
|
+
* @param {number} index - Current index of the slide
|
275
|
+
*/
|
276
|
+
Video.prototype.onBeforeSlide = function (event) {
|
277
|
+
if (this.core.lGalleryOn) {
|
278
|
+
var prevIndex = event.detail.prevIndex;
|
279
|
+
this.pauseVideo(prevIndex);
|
280
|
+
}
|
281
|
+
};
|
282
|
+
|
283
|
+
/**
|
284
|
+
* @desc fired immediately after each slide transition.
|
285
|
+
* Play video if autoplayVideoOnSlide option is enabled.
|
286
|
+
*
|
287
|
+
* @param {Event} event - Javascript Event object.
|
288
|
+
* @param {number} prevIndex - Previous index of the slide.
|
289
|
+
* @param {number} index - Current index of the slide
|
290
|
+
* @todo should check on onSlideLoad as well if video is not loaded on after slide
|
291
|
+
*/
|
292
|
+
Video.prototype.onAfterSlide = function (event) {
|
293
|
+
var _this = this;
|
294
|
+
var _a = event.detail, index = _a.index, prevIndex = _a.prevIndex;
|
295
|
+
// Do not call on first slide
|
296
|
+
var $slide = this.core.getSlideItem(index);
|
297
|
+
if (this.settings.autoplayVideoOnSlide && index !== prevIndex) {
|
298
|
+
if ($slide.hasClass('lg-complete')) {
|
299
|
+
setTimeout(function () {
|
300
|
+
_this.loadAndPlayVideo(index);
|
301
|
+
}, 100);
|
302
|
+
}
|
303
|
+
}
|
304
|
+
};
|
305
|
+
|
306
|
+
Video.prototype.loadAndPlayVideo = function (index) {
|
307
|
+
var $slide = this.core.getSlideItem(index);
|
308
|
+
var currentGalleryItem = this.core.galleryItems[index];
|
309
|
+
if (currentGalleryItem.poster) {
|
310
|
+
this.loadVideoOnPosterClick($slide, true);
|
311
|
+
}
|
312
|
+
else {
|
313
|
+
this.playVideo(index);
|
314
|
+
}
|
315
|
+
};
|
316
|
+
/**
|
317
|
+
* Play HTML5, Youtube, Vimeo or Wistia videos in a particular slide.
|
318
|
+
* @param {number} index - Index of the slide
|
319
|
+
*/
|
320
|
+
Video.prototype.playVideo = function (index) {
|
321
|
+
this.controlVideo(index, 'play');
|
322
|
+
};
|
323
|
+
|
324
|
+
/**
|
325
|
+
* Pause HTML5, Youtube, Vimeo or Wistia videos in a particular slide.
|
326
|
+
* @param {number} index - Index of the slide
|
327
|
+
*/
|
328
|
+
Video.prototype.pauseVideo = function (index) {
|
329
|
+
this.controlVideo(index, 'pause');
|
330
|
+
};
|
331
|
+
|
332
|
+
Video.prototype.getVideoHtml = function (src, addClass, index, html5Video) {
|
333
|
+
var video = '';
|
334
|
+
var videoInfo = this.core.galleryItems[index]
|
335
|
+
.__slideVideoInfo || {};
|
336
|
+
var currentGalleryItem = this.core.galleryItems[index];
|
337
|
+
var videoTitle = currentGalleryItem.title || currentGalleryItem.alt;
|
338
|
+
videoTitle = videoTitle ? 'title="' + videoTitle + '"' : '';
|
339
|
+
var commonIframeProps = "allowtransparency=\"true\"\n frameborder=\"0\"\n scrolling=\"no\"\n allowfullscreen\n mozallowfullscreen\n webkitallowfullscreen\n oallowfullscreen\n msallowfullscreen";
|
340
|
+
if (videoInfo.youtube) {
|
341
|
+
var videoId = 'lg-youtube' + index;
|
342
|
+
var youTubeParams = getYouTubeParams(videoInfo, this.settings.youTubePlayerParams);
|
343
|
+
var isYouTubeNoCookieURL = isYouTubeNoCookie(src);
|
344
|
+
var youtubeURL = isYouTubeNoCookieURL
|
345
|
+
? '//www.youtube-nocookie.com/'
|
346
|
+
: '//www.youtube.com/';
|
347
|
+
video = "<iframe allow=\"autoplay\" id=" + videoId + " class=\"lg-video-object lg-youtube " + addClass + "\" " + videoTitle + " src=\"" + youtubeURL + "embed/" + (videoInfo.youtube[1] + youTubeParams) + "\" " + commonIframeProps + "></iframe>";
|
348
|
+
}
|
349
|
+
else if (videoInfo.vimeo) {
|
350
|
+
var videoId = 'lg-vimeo' + index;
|
351
|
+
var playerParams = getVimeoURLParams(this.settings.vimeoPlayerParams, videoInfo);
|
352
|
+
video = "<iframe allow=\"autoplay\" id=" + videoId + " class=\"lg-video-object lg-vimeo " + addClass + "\" " + videoTitle + " src=\"//player.vimeo.com/video/" + (videoInfo.vimeo[1] + playerParams) + "\" " + commonIframeProps + "></iframe>";
|
353
|
+
}
|
354
|
+
else if (videoInfo.wistia) {
|
355
|
+
var wistiaId = 'lg-wistia' + index;
|
356
|
+
var playerParams = param(this.settings.wistiaPlayerParams);
|
357
|
+
playerParams = playerParams ? '?' + playerParams : '';
|
358
|
+
video = "<iframe allow=\"autoplay\" id=\"" + wistiaId + "\" src=\"//fast.wistia.net/embed/iframe/" + (videoInfo.wistia[4] + playerParams) + "\" " + videoTitle + " class=\"wistia_embed lg-video-object lg-wistia " + addClass + "\" name=\"wistia_embed\" " + commonIframeProps + "></iframe>";
|
359
|
+
}
|
360
|
+
// jadams: added Dailymotion Player
|
361
|
+
else if (videoInfo.dailymotion) {
|
362
|
+
var dailymotionId = 'lg-dailymotion' + index;
|
363
|
+
var playerParams = param(this.settings.dailymotionPlayerParams);
|
364
|
+
playerParams = playerParams ? '?' + playerParams : '';
|
365
|
+
video = "<iframe allow=\"autoplay\" id=\"" + dailymotionId + "\" src=\"//www.dailymotion.com/embed/video/" + (videoInfo.dailymotion[1] + playerParams) + "\" " + videoTitle + " class=\"dailymotion_embed lg-video-object lg-dailymotion " + addClass + "\" name=\"dailymotion_embed\" " + commonIframeProps + "></iframe>"
|
366
|
+
}
|
367
|
+
else if (videoInfo.html5) {
|
368
|
+
var html5VideoMarkup = '';
|
369
|
+
for (var i = 0; i < html5Video.source.length; i++) {
|
370
|
+
html5VideoMarkup += "<source src=\"" + html5Video.source[i].src + "\" type=\"" + html5Video.source[i].type + "\">";
|
371
|
+
}
|
372
|
+
if (html5Video.tracks) {
|
373
|
+
var _loop_1 = function (i) {
|
374
|
+
var trackAttributes = '';
|
375
|
+
var track = html5Video.tracks[i];
|
376
|
+
Object.keys(track || {}).forEach(function (key) {
|
377
|
+
trackAttributes += key + "=\"" + track[key] + "\" ";
|
378
|
+
});
|
379
|
+
html5VideoMarkup += "<track " + trackAttributes + ">";
|
380
|
+
};
|
381
|
+
for (var i = 0; i < html5Video.tracks.length; i++) {
|
382
|
+
_loop_1(i);
|
383
|
+
}
|
384
|
+
}
|
385
|
+
var html5VideoAttrs_1 = '';
|
386
|
+
var videoAttributes_1 = html5Video.attributes || {};
|
387
|
+
Object.keys(videoAttributes_1 || {}).forEach(function (key) {
|
388
|
+
html5VideoAttrs_1 += key + "=\"" + videoAttributes_1[key] + "\" ";
|
389
|
+
});
|
390
|
+
video = "<video class=\"lg-video-object lg-html5 " + (this.settings.videojs && this.settings.videojsTheme
|
391
|
+
? this.settings.videojsTheme + ' '
|
392
|
+
: '') + " " + (this.settings.videojs ? ' video-js' : '') + "\" " + html5VideoAttrs_1 + ">\n " + html5VideoMarkup + "\n Your browser does not support HTML5 video.\n </video>";
|
393
|
+
}
|
394
|
+
return video;
|
395
|
+
};
|
396
|
+
|
397
|
+
/**
|
398
|
+
* @desc - Append videos to the slide
|
399
|
+
*
|
400
|
+
* @param {HTMLElement} el - slide element
|
401
|
+
* @param {Object} videoParams - Video parameters, Contains src, class, index, htmlVideo
|
402
|
+
*/
|
403
|
+
Video.prototype.appendVideos = function (el, videoParams) {
|
404
|
+
var _a;
|
405
|
+
var videoHtml = this.getVideoHtml(videoParams.src, videoParams.addClass, videoParams.index, videoParams.html5Video);
|
406
|
+
el.find('.lg-video-cont').append(videoHtml);
|
407
|
+
var $videoElement = el.find('.lg-video-object').first();
|
408
|
+
if (videoParams.html5Video) {
|
409
|
+
$videoElement.on('mousedown.lg.video', function (e) {
|
410
|
+
e.stopPropagation();
|
411
|
+
});
|
412
|
+
}
|
413
|
+
if (this.settings.videojs && ((_a = this.core.galleryItems[videoParams.index].__slideVideoInfo) === null || _a === void 0 ? void 0 : _a.html5)) {
|
414
|
+
try {
|
415
|
+
return videojs($videoElement.get(), this.settings.videojsOptions);
|
416
|
+
}
|
417
|
+
catch (e) {
|
418
|
+
console.warn('lightGallery: Make sure you have included videojs');
|
419
|
+
}
|
420
|
+
}
|
421
|
+
};
|
422
|
+
|
423
|
+
Video.prototype.gotoNextSlideOnVideoEnd = function (src, index) {
|
424
|
+
var _this = this;
|
425
|
+
var $videoElement = this.core
|
426
|
+
.getSlideItem(index)
|
427
|
+
.find('.lg-video-object')
|
428
|
+
.first();
|
429
|
+
var videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
|
430
|
+
if (this.settings.gotoNextSlideOnVideoEnd) {
|
431
|
+
if (videoInfo.html5) {
|
432
|
+
$videoElement.on('ended', function () {
|
433
|
+
_this.core.goToNextSlide();
|
434
|
+
});
|
435
|
+
}
|
436
|
+
else if (videoInfo.vimeo) {
|
437
|
+
try {
|
438
|
+
// https://github.com/vimeo/player.js/#ended
|
439
|
+
new Vimeo.Player($videoElement.get()).on('ended', function () {
|
440
|
+
_this.core.goToNextSlide();
|
441
|
+
});
|
442
|
+
}
|
443
|
+
catch (e) {
|
444
|
+
// jadams:
|
445
|
+
console.warn('lightGallery: Make sure you have included //github.com/vimeo/player.js');
|
446
|
+
}
|
447
|
+
}
|
448
|
+
else if (videoInfo.wistia) {
|
449
|
+
try {
|
450
|
+
window._wq = window._wq || [];
|
451
|
+
// @todo Event is gettign triggered multiple times
|
452
|
+
window._wq.push({
|
453
|
+
id: $videoElement.attr('id'),
|
454
|
+
onReady: function (video) {
|
455
|
+
video.bind('end', function () {
|
456
|
+
_this.core.goToNextSlide();
|
457
|
+
});
|
458
|
+
},
|
459
|
+
});
|
460
|
+
}
|
461
|
+
catch (e) {
|
462
|
+
// jadams:
|
463
|
+
console.warn('lightGallery: Make sure you have included //fast.wistia.com/assets/external/E-v1.js');
|
464
|
+
}
|
465
|
+
}
|
466
|
+
}
|
467
|
+
};
|
468
|
+
|
469
|
+
Video.prototype.controlVideo = function (index, action) {
|
470
|
+
var $videoElement = this.core
|
471
|
+
.getSlideItem(index)
|
472
|
+
.find('.lg-video-object')
|
473
|
+
.first();
|
474
|
+
var videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
|
475
|
+
if (!$videoElement.get())
|
476
|
+
return;
|
477
|
+
if (videoInfo.youtube) {
|
478
|
+
try {
|
479
|
+
$videoElement.get().contentWindow.postMessage("{\"event\":\"command\",\"func\":\"" + action + "Video\",\"args\":\"\"}", '*');
|
480
|
+
}
|
481
|
+
catch (e) {
|
482
|
+
console.error("lightGallery:- " + e);
|
483
|
+
}
|
484
|
+
}
|
485
|
+
else if (videoInfo.vimeo) {
|
486
|
+
try {
|
487
|
+
new Vimeo.Player($videoElement.get())[action]();
|
488
|
+
}
|
489
|
+
catch (e) {
|
490
|
+
console.warn('lightGallery: Make sure you have included //github.com/vimeo/player.js');
|
491
|
+
}
|
492
|
+
}
|
493
|
+
else if (videoInfo.html5) {
|
494
|
+
if (this.settings.videojs) {
|
495
|
+
try {
|
496
|
+
videojs($videoElement.get())[action]();
|
497
|
+
}
|
498
|
+
catch (e) {
|
499
|
+
console.warn('lightGallery: Make sure you have included videojs');
|
500
|
+
}
|
501
|
+
}
|
502
|
+
else {
|
503
|
+
$videoElement.get()[action]();
|
504
|
+
}
|
505
|
+
}
|
506
|
+
else if (videoInfo.wistia) {
|
507
|
+
try {
|
508
|
+
window._wq = window._wq || [];
|
509
|
+
// @todo Find a way to destroy wistia player instance
|
510
|
+
window._wq.push({
|
511
|
+
id: $videoElement.attr('id'),
|
512
|
+
onReady: function (video) {
|
513
|
+
video[action]();
|
514
|
+
},
|
515
|
+
});
|
516
|
+
}
|
517
|
+
catch (e) {
|
518
|
+
console.warn('lightGallery: Make sure you have included //fast.wistia.com/assets/external/E-v1.js');
|
519
|
+
}
|
520
|
+
}
|
521
|
+
};
|
522
|
+
|
523
|
+
Video.prototype.loadVideoOnPosterClick = function ($el, forcePlay) {
|
524
|
+
var _this = this;
|
525
|
+
// check slide has poster
|
526
|
+
if (!$el.hasClass('lg-video-loaded')) {
|
527
|
+
// check already video element present
|
528
|
+
if (!$el.hasClass('lg-has-video')) {
|
529
|
+
$el.addClass('lg-has-video');
|
530
|
+
var _html = void 0;
|
531
|
+
var _src = this.core.galleryItems[this.core.index].src;
|
532
|
+
var video = this.core.galleryItems[this.core.index].video;
|
533
|
+
if (video) {
|
534
|
+
_html =
|
535
|
+
typeof video === 'string' ? JSON.parse(video) : video;
|
536
|
+
}
|
537
|
+
var videoJsPlayer_1 = this.appendVideos($el, {
|
538
|
+
src: _src,
|
539
|
+
addClass: '',
|
540
|
+
index: this.core.index,
|
541
|
+
html5Video: _html,
|
542
|
+
});
|
543
|
+
this.gotoNextSlideOnVideoEnd(_src, this.core.index);
|
544
|
+
var $tempImg = $el.find('.lg-object').first().get();
|
545
|
+
// @todo make sure it is working
|
546
|
+
$el.find('.lg-video-cont').first().append($tempImg);
|
547
|
+
$el.addClass('lg-video-loading');
|
548
|
+
videoJsPlayer_1 &&
|
549
|
+
videoJsPlayer_1.ready(function () {
|
550
|
+
videoJsPlayer_1.on('loadedmetadata', function () {
|
551
|
+
_this.onVideoLoadAfterPosterClick($el, _this.core.index);
|
552
|
+
});
|
553
|
+
});
|
554
|
+
$el.find('.lg-video-object')
|
555
|
+
.first()
|
556
|
+
.on('load.lg error.lg loadedmetadata.lg', function () {
|
557
|
+
setTimeout(function () {
|
558
|
+
_this.onVideoLoadAfterPosterClick($el, _this.core.index);
|
559
|
+
}, 50);
|
560
|
+
});
|
561
|
+
}
|
562
|
+
else {
|
563
|
+
this.playVideo(this.core.index);
|
564
|
+
}
|
565
|
+
}
|
566
|
+
else if (forcePlay) {
|
567
|
+
this.playVideo(this.core.index);
|
568
|
+
}
|
569
|
+
};
|
570
|
+
|
571
|
+
Video.prototype.onVideoLoadAfterPosterClick = function ($el, index) {
|
572
|
+
$el.addClass('lg-video-loaded');
|
573
|
+
this.playVideo(index);
|
574
|
+
};
|
575
|
+
|
576
|
+
Video.prototype.destroy = function () {
|
577
|
+
this.core.LGel.off('.lg.video');
|
578
|
+
this.core.LGel.off('.video');
|
579
|
+
};
|
580
|
+
return Video;
|
581
|
+
}());
|
582
|
+
|
583
|
+
return Video;
|
584
|
+
|
585
|
+
})));
|
@@ -44,6 +44,9 @@
|
|
44
44
|
PERFORMANCE OF THIS SOFTWARE.
|
45
45
|
***************************************************************************** */
|
46
46
|
|
47
|
+
var url = new URL(window.location.href);
|
48
|
+
var origin = url.origin;
|
49
|
+
|
47
50
|
var __assign = function() {
|
48
51
|
__assign = Object.assign || function __assign(t) {
|
49
52
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
@@ -61,7 +64,6 @@
|
|
61
64
|
vimeoPlayerParams: false,
|
62
65
|
wistiaPlayerParams: false,
|
63
66
|
dailymotionPlayerParams: false,
|
64
|
-
vkPlayerParams: false,
|
65
67
|
gotoNextSlideOnVideoEnd: true,
|
66
68
|
autoplayVideoOnSlide: false,
|
67
69
|
videojs: false,
|
@@ -128,13 +130,20 @@
|
|
128
130
|
var slideUrlParams = videoInfo.youtube[2]
|
129
131
|
? paramsToObject(videoInfo.youtube[2])
|
130
132
|
: '';
|
131
|
-
|
133
|
+
|
134
|
+
// For YouTube first params gets priority if duplicates found
|
135
|
+
// See: https://stackoverflow.com/questions/40685142/youtube-autoplay-does-not-work-with-iframe
|
132
136
|
var defaultYouTubePlayerParams = {
|
133
|
-
wmode: 'opaque',
|
134
137
|
autoplay: 0,
|
135
|
-
|
138
|
+
controls: 1,
|
136
139
|
enablejsapi: 1,
|
140
|
+
hl: 'en',
|
141
|
+
loop: 0,
|
142
|
+
mute: 1,
|
143
|
+
wmode: 'opaque',
|
144
|
+
origin: origin,
|
137
145
|
};
|
146
|
+
|
138
147
|
var playerParamsSettings = youTubePlayerParamsSettings || {};
|
139
148
|
var youTubePlayerParams = __assign(__assign(__assign({}, defaultYouTubePlayerParams), playerParamsSettings), slideUrlParams);
|
140
149
|
var youTubeParams = "?" + param(youTubePlayerParams);
|
@@ -336,7 +345,7 @@
|
|
336
345
|
var currentGalleryItem = this.core.galleryItems[index];
|
337
346
|
var videoTitle = currentGalleryItem.title || currentGalleryItem.alt;
|
338
347
|
videoTitle = videoTitle ? 'title="' + videoTitle + '"' : '';
|
339
|
-
var commonIframeProps = "allowtransparency=\"true\"\n frameborder=\"0\"\n scrolling=\"no\"\n allowfullscreen\n mozallowfullscreen\n webkitallowfullscreen\n
|
348
|
+
var commonIframeProps = "allowtransparency=\"true\"\n frameborder=\"0\"\n scrolling=\"no\"\n allowfullscreen\n mozallowfullscreen\n webkitallowfullscreen\n msallowfullscreen";
|
340
349
|
if (videoInfo.youtube) {
|
341
350
|
var videoId = 'lg-youtube' + index;
|
342
351
|
var youTubeParams = getYouTubeParams(videoInfo, this.settings.youTubePlayerParams);
|
@@ -23,5 +23,4 @@
|
|
23
23
|
* @license GPLv3
|
24
24
|
*/
|
25
25
|
|
26
|
-
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).lgVideo=o()}(this,function(){"use strict";
|
27
|
-
var e=function(){return(e=Object.assign||function(e){for(var o,i=1,t=arguments.length;i<t;i++)for(var s in o=arguments[i])Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s]);return e}).apply(this,arguments)},o={autoplayFirstVideo:!0,youTubePlayerParams:!1,vimeoPlayerParams:!1,wistiaPlayerParams:!1,gotoNextSlideOnVideoEnd:!0,autoplayVideoOnSlide:!1,videojs:!1,videojsTheme:"",videojsOptions:{}},i="lgHasVideo",t="lgSlideItemLoad",s="lgBeforeSlide",n="lgAfterSlide",l="lgPosterClick",d=function(e){return Object.keys(e).map(function(o){return encodeURIComponent(o)+"="+encodeURIComponent(e[o])}).join("&")},r=function(o,i){if(!o.youtube)return"";var t=o.youtube[2]?o.youtube[2].slice(1).split("&").map(function(e){return e.split("=")}).reduce(function(e,o){var i=o.map(decodeURIComponent),t=i[0],s=i[1];return e[t]=s,e},{}):"",s=i||{},n=e(e(e({},{wmode:"opaque",autoplay:0,mute:1,enablejsapi:1}),s),t);return"?"+d(n)};return function(){function a(i){return this.core=i,this.settings=e(e({},o),this.core.settings),this}return a.prototype.init=function(){var e=this;this.core.LGel.on(i+".video",this.onHasVideo.bind(this)),this.core.LGel.on(l+".video",function(){var o=e.core.getSlideItem(e.core.index);e.loadVideoOnPosterClick(o)}),this.core.LGel.on(t+".video",this.onSlideItemLoad.bind(this)),this.core.LGel.on(s+".video",this.onBeforeSlide.bind(this)),this.core.LGel.on(n+".video",this.onAfterSlide.bind(this))},a.prototype.onSlideItemLoad=function(e){var o=this,i=e.detail,t=i.isFirstSlide,s=i.index;this.settings.autoplayFirstVideo&&t&&s===this.core.index&&setTimeout(function(){o.loadAndPlayVideo(s)},200),!t&&this.settings.autoplayVideoOnSlide&&s===this.core.index&&this.loadAndPlayVideo(s)},a.prototype.onHasVideo=function(e){var o=e.detail,i=o.index,t=o.src,s=o.html5Video;o.hasPoster||(this.appendVideos(this.core.getSlideItem(i),{src:t,addClass:"lg-object",index:i,html5Video:s}),this.gotoNextSlideOnVideoEnd(t,i))},a.prototype.onBeforeSlide=function(e){if(this.core.lGalleryOn){var o=e.detail.prevIndex;this.pauseVideo(o)}},a.prototype.onAfterSlide=function(e){var o=this,i=e.detail,t=i.index,s=i.prevIndex,n=this.core.getSlideItem(t);this.settings.autoplayVideoOnSlide&&t!==s&&n.hasClass("lg-complete")&&setTimeout(function(){o.loadAndPlayVideo(t)},100)},a.prototype.loadAndPlayVideo=function(e){var o=this.core.getSlideItem(e);this.core.galleryItems[e].poster?this.loadVideoOnPosterClick(o,!0):this.playVideo(e)},a.prototype.playVideo=function(e){this.controlVideo(e,"play")},a.prototype.pauseVideo=function(e){this.controlVideo(e,"pause")},a.prototype.getVideoHtml=function(e,o,i,t){var s="",n=this.core.galleryItems[i].__slideVideoInfo||{},l=this.core.galleryItems[i],a=l.title||l.alt;a=a?'title="'+a+'"':"";var c='allowtransparency="true"\n frameborder="0"\n scrolling="no"\n allowfullscreen\n mozallowfullscreen\n webkitallowfullscreen\n oallowfullscreen\n msallowfullscreen';if(n.youtube){var u="lg-youtube"+i,f=r(n,this.settings.youTubePlayerParams);s='<iframe allow="autoplay" id='+u+' class="lg-video-object lg-youtube '+o+'" '+a+' src="'+(e.includes("youtube-nocookie.com")?"//www.youtube-nocookie.com/":"//www.youtube.com/")+"embed/"+(n.youtube[1]+f)+'" '+c+"></iframe>"}else if(n.vimeo){u="lg-vimeo"+i;var h=function(e,o){if(!o||!o.vimeo)return"";var i=o.vimeo[2]||"",t=e&&0!==Object.keys(e).length?"&"+d(e):"",s=((o.vimeo[0].split("/").pop()||"").split("?")[0]||"").split("#")[0],n=o.vimeo[1]!==s;return n&&(i=i.replace("/"+s,"")),"?autoplay=0&muted=1"+(n?"&h="+s:"")+t+(i="?"==i[0]?"&"+i.slice(1):i||"")}(this.settings.vimeoPlayerParams,n);s='<iframe allow="autoplay" id='+u+' class="lg-video-object lg-vimeo '+o+'" '+a+' src="//player.vimeo.com/video/'+(n.vimeo[1]+h)+'" '+c+"></iframe>"}else if(n.wistia){var p="lg-wistia"+i;h=(h=d(this.settings.wistiaPlayerParams))?"?"+h:"",s='<iframe allow="autoplay" id="'+p+'" src="//fast.wistia.net/embed/iframe/'+(n.wistia[4]+h)+'" '+a+' class="wistia_embed lg-video-object lg-wistia '+o+'" name="wistia_embed" '+c+"></iframe>"}else if(n.html5){for(var y="",g=0;g<t.source.length;g++)y+='<source src="'+t.source[g].src+'" type="'+t.source[g].type+'">';if(t.tracks){var v=function(e){var o="",i=t.tracks[e];Object.keys(i||{}).forEach(function(e){o+=e+'="'+i[e]+'" '}),y+="<track "+o+">"};for(g=0;g<t.tracks.length;g++)v(g)}var m="",w=t.attributes||{};Object.keys(w||{}).forEach(function(e){m+=e+'="'+w[e]+'" '}),s='<video class="lg-video-object lg-html5 '+(this.settings.videojs&&this.settings.videojsTheme?this.settings.videojsTheme+" ":"")+" "+(this.settings.videojs?" video-js":"")+'" '+m+">\n "+y+"\n Your browser does not support HTML5 video.\n </video>"}return s},a.prototype.appendVideos=function(e,o){var i,t=this.getVideoHtml(o.src,o.addClass,o.index,o.html5Video);e.find(".lg-video-cont").append(t);var s=e.find(".lg-video-object").first();if(o.html5Video&&s.on("mousedown.lg.video",function(e){e.stopPropagation()}),this.settings.videojs&&(null===(i=this.core.galleryItems[o.index].__slideVideoInfo)||void 0===i?void 0:i.html5))try{return videojs(s.get(),this.settings.videojsOptions)}catch(e){console.warn("lightGallery: Make sure you have included videojs")}},a.prototype.gotoNextSlideOnVideoEnd=function(e,o){var i=this,t=this.core.getSlideItem(o).find(".lg-video-object").first(),s=this.core.galleryItems[o].__slideVideoInfo||{};if(this.settings.gotoNextSlideOnVideoEnd)if(s.html5)t.on("ended",function(){i.core.goToNextSlide()});else if(s.vimeo)try{new Vimeo.Player(t.get()).on("ended",function(){i.core.goToNextSlide()})}catch(e){console.warn("lightGallery: Make sure you have included //github.com/vimeo/player.js")}else if(s.wistia)try{window._wq=window._wq||[],window._wq.push({id:t.attr("id"),onReady:function(e){e.bind("end",function(){i.core.goToNextSlide()})}})}catch(e){console.warn("lightGallery: Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},a.prototype.controlVideo=function(e,o){var i=this.core.getSlideItem(e).find(".lg-video-object").first(),t=this.core.galleryItems[e].__slideVideoInfo||{};if(i.get())if(t.youtube)try{i.get().contentWindow.postMessage('{"event":"command","func":"'+o+'Video","args":""}',"*")}catch(e){console.error("lightGallery:- "+e)}else if(t.vimeo)try{new Vimeo.Player(i.get())[o]()}catch(e){console.warn("lightGallery: Make sure you have included //github.com/vimeo/player.js")}else if(t.html5)if(this.settings.videojs)try{videojs(i.get())[o]()}catch(e){console.warn("lightGallery: Make sure you have included videojs")}else i.get()[o]();else if(t.wistia)try{window._wq=window._wq||[],window._wq.push({id:i.attr("id"),onReady:function(e){e[o]()}})}catch(e){console.warn("lightGallery: Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},a.prototype.loadVideoOnPosterClick=function(e,o){var i=this;if(e.hasClass("lg-video-loaded"))o&&this.playVideo(this.core.index);else if(e.hasClass("lg-has-video"))this.playVideo(this.core.index);else{e.addClass("lg-has-video");var t=void 0,s=this.core.galleryItems[this.core.index].src,n=this.core.galleryItems[this.core.index].video;n&&(t="string"==typeof n?JSON.parse(n):n);var l=this.appendVideos(e,{src:s,addClass:"",index:this.core.index,html5Video:t});this.gotoNextSlideOnVideoEnd(s,this.core.index);var d=e.find(".lg-object").first().get();e.find(".lg-video-cont").first().append(d),e.addClass("lg-video-loading"),l&&l.ready(function(){l.on("loadedmetadata",function(){i.onVideoLoadAfterPosterClick(e,i.core.index)})}),e.find(".lg-video-object").first().on("load.lg error.lg loadedmetadata.lg",function(){setTimeout(function(){i.onVideoLoadAfterPosterClick(e,i.core.index)},50)})}},a.prototype.onVideoLoadAfterPosterClick=function(e,o){e.addClass("lg-video-loaded"),this.playVideo(o)},a.prototype.destroy=function(){this.core.LGel.off(".lg.video"),this.core.LGel.off(".video")},a}()});
|
26
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).lgVideo=o()}(this,function(){"use strict";var e=new URL(window.location.href).origin,o=function(){return(o=Object.assign||function(e){for(var o,i=1,t=arguments.length;i<t;i++)for(var s in o=arguments[i])Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s]);return e}).apply(this,arguments)},i={autoplayFirstVideo:!0,youTubePlayerParams:!1,vimeoPlayerParams:!1,wistiaPlayerParams:!1,dailymotionPlayerParams:!1,gotoNextSlideOnVideoEnd:!0,autoplayVideoOnSlide:!1,videojs:!1,videojsTheme:"",videojsOptions:{}},t="lgHasVideo",s="lgSlideItemLoad",n="lgBeforeSlide",l="lgAfterSlide",d="lgPosterClick",a=function(e){return Object.keys(e).map(function(o){return encodeURIComponent(o)+"="+encodeURIComponent(e[o])}).join("&")},r=function(i,t){if(!i.youtube)return"";var s=i.youtube[2]?i.youtube[2].slice(1).split("&").map(function(e){return e.split("=")}).reduce(function(e,o){var i=o.map(decodeURIComponent),t=i[0],s=i[1];return e[t]=s,e},{}):"",n=t||{},l=o(o(o({},{autoplay:0,controls:1,enablejsapi:1,hl:"en",loop:0,mute:1,wmode:"opaque",origin:e}),n),s);return"?"+a(l)};return function(){function e(e){return this.core=e,this.settings=o(o({},i),this.core.settings),this}return e.prototype.init=function(){var e=this;this.core.LGel.on(t+".video",this.onHasVideo.bind(this)),this.core.LGel.on(d+".video",function(){var o=e.core.getSlideItem(e.core.index);e.loadVideoOnPosterClick(o)}),this.core.LGel.on(s+".video",this.onSlideItemLoad.bind(this)),this.core.LGel.on(n+".video",this.onBeforeSlide.bind(this)),this.core.LGel.on(l+".video",this.onAfterSlide.bind(this))},e.prototype.onSlideItemLoad=function(e){var o=this,i=e.detail,t=i.isFirstSlide,s=i.index;this.settings.autoplayFirstVideo&&t&&s===this.core.index&&setTimeout(function(){o.loadAndPlayVideo(s)},200),!t&&this.settings.autoplayVideoOnSlide&&s===this.core.index&&this.loadAndPlayVideo(s)},e.prototype.onHasVideo=function(e){var o=e.detail,i=o.index,t=o.src,s=o.html5Video;o.hasPoster||(this.appendVideos(this.core.getSlideItem(i),{src:t,addClass:"lg-object",index:i,html5Video:s}),this.gotoNextSlideOnVideoEnd(t,i))},e.prototype.onBeforeSlide=function(e){if(this.core.lGalleryOn){var o=e.detail.prevIndex;this.pauseVideo(o)}},e.prototype.onAfterSlide=function(e){var o=this,i=e.detail,t=i.index,s=i.prevIndex,n=this.core.getSlideItem(t);this.settings.autoplayVideoOnSlide&&t!==s&&n.hasClass("lg-complete")&&setTimeout(function(){o.loadAndPlayVideo(t)},100)},e.prototype.loadAndPlayVideo=function(e){var o=this.core.getSlideItem(e);this.core.galleryItems[e].poster?this.loadVideoOnPosterClick(o,!0):this.playVideo(e)},e.prototype.playVideo=function(e){this.controlVideo(e,"play")},e.prototype.pauseVideo=function(e){this.controlVideo(e,"pause")},e.prototype.getVideoHtml=function(e,o,i,t){var s="",n=this.core.galleryItems[i].__slideVideoInfo||{},l=this.core.galleryItems[i],d=l.title||l.alt;d=d?'title="'+d+'"':"";var c='allowtransparency="true"\n frameborder="0"\n scrolling="no"\n allowfullscreen\n mozallowfullscreen\n webkitallowfullscreen\n msallowfullscreen';if(n.youtube){var u="lg-youtube"+i,f=r(n,this.settings.youTubePlayerParams);s='<iframe allow="autoplay" id='+u+' class="lg-video-object lg-youtube '+o+'" '+d+' src="'+(e.includes("youtube-nocookie.com")?"//www.youtube-nocookie.com/":"//www.youtube.com/")+"embed/"+(n.youtube[1]+f)+'" '+c+"></iframe>"}else if(n.vimeo){u="lg-vimeo"+i;var h=function(e,o){if(!o||!o.vimeo)return"";var i=o.vimeo[2]||"",t=e&&0!==Object.keys(e).length?"&"+a(e):"",s=((o.vimeo[0].split("/").pop()||"").split("?")[0]||"").split("#")[0],n=o.vimeo[1]!==s;return n&&(i=i.replace("/"+s,"")),"?autoplay=0&muted=1"+(n?"&h="+s:"")+t+(i="?"==i[0]?"&"+i.slice(1):i||"")}(this.settings.vimeoPlayerParams,n);s='<iframe allow="autoplay" id='+u+' class="lg-video-object lg-vimeo '+o+'" '+d+' src="//player.vimeo.com/video/'+(n.vimeo[1]+h)+'" '+c+"></iframe>"}else if(n.wistia){var y="lg-wistia"+i;h=(h=a(this.settings.wistiaPlayerParams))?"?"+h:"",s='<iframe allow="autoplay" id="'+y+'" src="//fast.wistia.net/embed/iframe/'+(n.wistia[4]+h)+'" '+d+' class="wistia_embed lg-video-object lg-wistia '+o+'" name="wistia_embed" '+c+"></iframe>"}else if(n.dailymotion){var m="lg-dailymotion"+i;h=(h=a(this.settings.dailymotionPlayerParams))?"?"+h:"",s='<iframe allow="autoplay" id="'+m+'" src="//www.dailymotion.com/embed/video/'+(n.dailymotion[1]+h)+'" '+d+' class="dailymotion_embed lg-video-object lg-dailymotion '+o+'" name="dailymotion_embed" '+c+"></iframe>"}else if(n.html5){for(var g="",p=0;p<t.source.length;p++)g+='<source src="'+t.source[p].src+'" type="'+t.source[p].type+'">';if(t.tracks){var v=function(e){var o="",i=t.tracks[e];Object.keys(i||{}).forEach(function(e){o+=e+'="'+i[e]+'" '}),g+="<track "+o+">"};for(p=0;p<t.tracks.length;p++)v(p)}var w="",b=t.attributes||{};Object.keys(b||{}).forEach(function(e){w+=e+'="'+b[e]+'" '}),s='<video class="lg-video-object lg-html5 '+(this.settings.videojs&&this.settings.videojsTheme?this.settings.videojsTheme+" ":"")+" "+(this.settings.videojs?" video-js":"")+'" '+w+">\n "+g+"\n Your browser does not support HTML5 video.\n </video>"}return s},e.prototype.appendVideos=function(e,o){var i,t=this.getVideoHtml(o.src,o.addClass,o.index,o.html5Video);e.find(".lg-video-cont").append(t);var s=e.find(".lg-video-object").first();if(o.html5Video&&s.on("mousedown.lg.video",function(e){e.stopPropagation()}),this.settings.videojs&&(null===(i=this.core.galleryItems[o.index].__slideVideoInfo)||void 0===i?void 0:i.html5))try{return videojs(s.get(),this.settings.videojsOptions)}catch(e){console.warn("lightGallery: Make sure you have included videojs")}},e.prototype.gotoNextSlideOnVideoEnd=function(e,o){var i=this,t=this.core.getSlideItem(o).find(".lg-video-object").first(),s=this.core.galleryItems[o].__slideVideoInfo||{};if(this.settings.gotoNextSlideOnVideoEnd)if(s.html5)t.on("ended",function(){i.core.goToNextSlide()});else if(s.vimeo)try{new Vimeo.Player(t.get()).on("ended",function(){i.core.goToNextSlide()})}catch(e){console.warn("lightGallery: Make sure you have included //github.com/vimeo/player.js")}else if(s.wistia)try{window._wq=window._wq||[],window._wq.push({id:t.attr("id"),onReady:function(e){e.bind("end",function(){i.core.goToNextSlide()})}})}catch(e){console.warn("lightGallery: Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},e.prototype.controlVideo=function(e,o){var i=this.core.getSlideItem(e).find(".lg-video-object").first(),t=this.core.galleryItems[e].__slideVideoInfo||{};if(i.get())if(t.youtube)try{i.get().contentWindow.postMessage('{"event":"command","func":"'+o+'Video","args":""}',"*")}catch(e){console.error("lightGallery:- "+e)}else if(t.vimeo)try{new Vimeo.Player(i.get())[o]()}catch(e){console.warn("lightGallery: Make sure you have included //github.com/vimeo/player.js")}else if(t.html5)if(this.settings.videojs)try{videojs(i.get())[o]()}catch(e){console.warn("lightGallery: Make sure you have included videojs")}else i.get()[o]();else if(t.wistia)try{window._wq=window._wq||[],window._wq.push({id:i.attr("id"),onReady:function(e){e[o]()}})}catch(e){console.warn("lightGallery: Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},e.prototype.loadVideoOnPosterClick=function(e,o){var i=this;if(e.hasClass("lg-video-loaded"))o&&this.playVideo(this.core.index);else if(e.hasClass("lg-has-video"))this.playVideo(this.core.index);else{e.addClass("lg-has-video");var t=void 0,s=this.core.galleryItems[this.core.index].src,n=this.core.galleryItems[this.core.index].video;n&&(t="string"==typeof n?JSON.parse(n):n);var l=this.appendVideos(e,{src:s,addClass:"",index:this.core.index,html5Video:t});this.gotoNextSlideOnVideoEnd(s,this.core.index);var d=e.find(".lg-object").first().get();e.find(".lg-video-cont").first().append(d),e.addClass("lg-video-loading"),l&&l.ready(function(){l.on("loadedmetadata",function(){i.onVideoLoadAfterPosterClick(e,i.core.index)})}),e.find(".lg-video-object").first().on("load.lg error.lg loadedmetadata.lg",function(){setTimeout(function(){i.onVideoLoadAfterPosterClick(e,i.core.index)},50)})}},e.prototype.onVideoLoadAfterPosterClick=function(e,o){e.addClass("lg-video-loaded"),this.playVideo(o)},e.prototype.destroy=function(){this.core.LGel.off(".lg.video"),this.core.LGel.off(".video")},e}()});
|
data/lib/j1/version.rb
CHANGED
data/lib/starter_web/README.md
CHANGED
@@ -379,7 +379,7 @@ This command creates a **initial** project in folder **my-starter**.
|
|
379
379
|
2023-02-28 18:12:12 - GENERATE: Resolving dependencies...
|
380
380
|
2023-02-28 18:12:12 - GENERATE: Using bundler 2.3.7
|
381
381
|
...
|
382
|
-
2023-02-28 18:12:12 - GENERATE: Using j1-template 2023.10.
|
382
|
+
2023-02-28 18:12:12 - GENERATE: Using j1-template 2023.10.2
|
383
383
|
2023-02-28 18:12:12 - GENERATE: Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
|
384
384
|
2023-02-28 18:12:12 - GENERATE: Bundled gems are installed into `../../.gem`
|
385
385
|
2023-02-28 18:12:12 - GENERATE: C:/Users/xxx/.gem/ruby/3.1.0;C:/DevTools/Ruby31-x64/lib/ruby/gems/3.1.0;
|
@@ -415,7 +415,7 @@ commands are available as well.
|
|
415
415
|
2023-02-28 18:17:48 - SETUP: Initialize the project ...
|
416
416
|
2023-02-28 18:17:48 - SETUP: Be patient, this will take a while ...
|
417
417
|
2023-02-28 18:17:49 - SETUP:
|
418
|
-
2023-02-28 18:17:49 - SETUP: > j1@2023.10.
|
418
|
+
2023-02-28 18:17:49 - SETUP: > j1@2023.10.2 setup C:\Users\xxx\j1-projects\my-starter
|
419
419
|
2023-02-28 18:17:49 - SETUP: > npm --silent run setup-start && npm --silent run setup-base && run-s -s setup:*
|
420
420
|
2023-02-28 18:17:49 - SETUP:
|
421
421
|
2023-02-28 18:17:50 - SETUP: Setup project for first use ..
|
@@ -460,7 +460,7 @@ browser. Let's start the journey ...
|
|
460
460
|
Check setup state of the J1 project ...
|
461
461
|
2023-02-28 18:26:18 - SITE: Starting up your site ...
|
462
462
|
2023-02-28 18:26:18 - SITE:
|
463
|
-
2023-02-28 18:26:18 - SITE: > j1@2023.10.
|
463
|
+
2023-02-28 18:26:18 - SITE: > j1@2023.10.2 j1-site C:\Users\jadams\j1-projects\my-starter
|
464
464
|
2023-02-28 18:26:18 - SITE: > run-p -s j1-site:*
|
465
465
|
2023-02-28 18:26:18 - SITE:
|
466
466
|
2023-02-28 18:26:20 - SITE: Startup UTILSRV ..
|
@@ -499,7 +499,7 @@ Check setup state of the J1 project ...
|
|
499
499
|
REBUILD: Rebuild the projects website ...
|
500
500
|
REBUILD: Be patient, this will take a while ...
|
501
501
|
2023-02-28 18:45:09 - REBUILD:
|
502
|
-
2023-02-28 18:45:09 - REBUILD: > j1@2023.10.
|
502
|
+
2023-02-28 18:45:09 - REBUILD: > j1@2023.10.2 rebuild C:\Users\xxx\j1-projects\my-starter
|
503
503
|
2023-02-28 18:45:09 - REBUILD: > run-s -s rebuild:* && run-s -s post-rebuild:*
|
504
504
|
2023-02-28 18:45:09 - REBUILD:
|
505
505
|
2023-02-28 18:45:10 - REBUILD: Rebuild site incremental ..
|
@@ -547,7 +547,7 @@ using Lerna for all packages:
|
|
547
547
|
2023-02-28 18:29:07 - RESET: Reset the project to factory state ...
|
548
548
|
2023-02-28 18:29:07 - RESET: Be patient, this will take a while ...
|
549
549
|
2023-02-28 18:29:08 - RESET:
|
550
|
-
2023-02-28 18:29:08 - RESET: > j1@2023.10.
|
550
|
+
2023-02-28 18:29:08 - RESET: > j1@2023.10.2 reset C:\Users\xxx\j1-projects\my-starter
|
551
551
|
2023-02-28 18:29:08 - RESET: > run-s -s reset:*
|
552
552
|
2023-02-28 18:29:08 - RESET:
|
553
553
|
2023-02-28 18:29:08 - RESET: Reset project to factory state ..
|
data/lib/starter_web/_config.yml
CHANGED
@@ -53,7 +53,7 @@ environment: development
|
|
53
53
|
# ------------------------------------------------------------------------------
|
54
54
|
# Sets the build version of the site
|
55
55
|
#
|
56
|
-
version: 2023.10.
|
56
|
+
version: 2023.10.2
|
57
57
|
|
58
58
|
# copyright
|
59
59
|
# ------------------------------------------------------------------------------
|
@@ -203,6 +203,7 @@ settings:
|
|
203
203
|
file: oskars-sylwan_b.jpg
|
204
204
|
caption: New York City, United States
|
205
205
|
|
206
|
+
|
206
207
|
# ==========================================================================
|
207
208
|
# Video Galleries
|
208
209
|
# ==========================================================================
|
@@ -215,6 +216,7 @@ settings:
|
|
215
216
|
|
216
217
|
id: jg_video_html5
|
217
218
|
type: video
|
219
|
+
video: html5
|
218
220
|
video_base_path: /assets/videos/gallery/html5
|
219
221
|
image_base_path: /assets/videos/gallery
|
220
222
|
thumb_base_path: /assets/videos/gallery
|
@@ -245,9 +247,10 @@ settings:
|
|
245
247
|
animateThumb: true
|
246
248
|
autoplayFirstVideo: true
|
247
249
|
videojs: true
|
248
|
-
videojsTheme:
|
250
|
+
videojsTheme: vjs-theme-uno
|
249
251
|
|
250
252
|
videojsOptions:
|
253
|
+
enabled: true
|
251
254
|
controls: true
|
252
255
|
muted: false
|
253
256
|
preload: true
|
@@ -321,6 +324,7 @@ settings:
|
|
321
324
|
|
322
325
|
id: jg_video_online_youtube
|
323
326
|
type: video
|
327
|
+
video: youtube
|
324
328
|
image_base_path: /assets/videos/gallery
|
325
329
|
thumb_base_path: /assets/videos/gallery
|
326
330
|
|
@@ -351,7 +355,19 @@ settings:
|
|
351
355
|
autoplayFirstVideo: true
|
352
356
|
videojs: false
|
353
357
|
|
354
|
-
videojsOptions:
|
358
|
+
videojsOptions:
|
359
|
+
enabled: false
|
360
|
+
|
361
|
+
playerParams:
|
362
|
+
enabled: true
|
363
|
+
autoplay: 0
|
364
|
+
controls: 0
|
365
|
+
enablejsapi: 1
|
366
|
+
hl: en
|
367
|
+
loop: 0
|
368
|
+
mute: 0
|
369
|
+
playsinline: 1
|
370
|
+
wmode: opaque
|
355
371
|
|
356
372
|
# ------------------------------------------------------------------------
|
357
373
|
# CSS filter options
|
@@ -374,7 +390,7 @@ settings:
|
|
374
390
|
name: Carpool Karaoke Lady Gaga
|
375
391
|
type: youtube
|
376
392
|
size: "1280-720"
|
377
|
-
source: "
|
393
|
+
source: "//youtube.com/watch?v=X5Cfi7U4eL4"
|
378
394
|
pinterest_prefix: Pin video
|
379
395
|
tweet_prefix: Try video
|
380
396
|
description: >
|
@@ -388,6 +404,9 @@ settings:
|
|
388
404
|
caption:
|
389
405
|
text: "YouTube · Carpool Karaoke Lady Gaga"
|
390
406
|
|
407
|
+
playerParams:
|
408
|
+
enabled: false
|
409
|
+
|
391
410
|
- video: # video 2
|
392
411
|
enabled: true
|
393
412
|
|
@@ -409,13 +428,16 @@ settings:
|
|
409
428
|
caption:
|
410
429
|
text: "YouTube · Carpool Karaoke Adele"
|
411
430
|
|
431
|
+
playerParams:
|
432
|
+
enabled: false
|
433
|
+
|
412
434
|
- video: # video 3
|
413
435
|
enabled: true
|
414
436
|
|
415
437
|
name: Carpool Karaoke Gwen Stefani
|
416
438
|
type: youtube
|
417
439
|
size: "1280-720"
|
418
|
-
source: "
|
440
|
+
source: "//youtube.com/watch?v=F2SXmzk8ve4"
|
419
441
|
pinterest_prefix: Pin video
|
420
442
|
tweet_prefix: Try video
|
421
443
|
description: >
|
@@ -429,6 +451,8 @@ settings:
|
|
429
451
|
caption:
|
430
452
|
text: "YouTube · Carpool Karaoke Gwen Stefani"
|
431
453
|
|
454
|
+
playerParams: false
|
455
|
+
|
432
456
|
- video: # video 4
|
433
457
|
enabled: true
|
434
458
|
|
@@ -450,6 +474,8 @@ settings:
|
|
450
474
|
caption:
|
451
475
|
text: "YouTube · Carpool Karaoke Michelle Obama"
|
452
476
|
|
477
|
+
playerParams:
|
478
|
+
enabled: false
|
453
479
|
|
454
480
|
# --------------------------------------------------------------------------
|
455
481
|
# Online VIDEO (YouTube)
|
@@ -459,6 +485,7 @@ settings:
|
|
459
485
|
|
460
486
|
id: jg_video_online_youtube_james_and_adele
|
461
487
|
type: video
|
488
|
+
video: youtube
|
462
489
|
image_base_path: /assets/videos/gallery
|
463
490
|
thumb_base_path: /assets/videos/gallery
|
464
491
|
|
@@ -489,7 +516,20 @@ settings:
|
|
489
516
|
autoplayFirstVideo: true
|
490
517
|
videojs: false
|
491
518
|
|
492
|
-
videojsOptions:
|
519
|
+
videojsOptions:
|
520
|
+
enabled: false
|
521
|
+
|
522
|
+
# See: https://stackoverflow.com/questions/40685142/youtube-autoplay-does-not-work-with-iframe
|
523
|
+
playerParams:
|
524
|
+
enabled: true
|
525
|
+
autoplay: 1 # autoplay = 1 only available for YouTube when muted.
|
526
|
+
# controls: 1 # default = 0
|
527
|
+
# enablejsapi: 1 # default = 1
|
528
|
+
# hl: en # default = en
|
529
|
+
# loop: 0 # default = 0
|
530
|
+
mute: 0 # default = 1
|
531
|
+
# playsinline: 1 # for mobile|iOS only
|
532
|
+
# wmode: opaque # default = opaque
|
493
533
|
|
494
534
|
# ------------------------------------------------------------------------
|
495
535
|
# CSS filter options
|
@@ -547,8 +587,6 @@ settings:
|
|
547
587
|
caption:
|
548
588
|
text: "YouTube · Last Carpool Karaoke"
|
549
589
|
|
550
|
-
|
551
|
-
|
552
590
|
# --------------------------------------------------------------------------
|
553
591
|
# Online VIDEO 2 (YouTube)
|
554
592
|
#
|
@@ -557,6 +595,7 @@ settings:
|
|
557
595
|
|
558
596
|
id: jg_video_online_youtube_voice_kids
|
559
597
|
type: video
|
598
|
+
video: youtube
|
560
599
|
image_base_path: /assets/videos/gallery/voice_kids_de_2021
|
561
600
|
thumb_base_path: /assets/videos/gallery/voice_kids_de_2021
|
562
601
|
|
@@ -587,7 +626,20 @@ settings:
|
|
587
626
|
autoplayFirstVideo: true
|
588
627
|
videojs: false
|
589
628
|
|
590
|
-
videojsOptions:
|
629
|
+
videojsOptions:
|
630
|
+
enabled: false
|
631
|
+
|
632
|
+
# See: https://stackoverflow.com/questions/40685142/youtube-autoplay-does-not-work-with-iframe
|
633
|
+
playerParams:
|
634
|
+
enabled: true
|
635
|
+
autoplay: 1 # autoplay = 1 only available for YouTube when muted.
|
636
|
+
# controls: 1 # default = 0
|
637
|
+
# enablejsapi: 1 # default = 1
|
638
|
+
# hl: en # default = en
|
639
|
+
# loop: 0 # default = 0
|
640
|
+
mute: 0 # default = 1
|
641
|
+
# playsinline: 1 # for mobile|iOS only
|
642
|
+
# wmode: opaque # default = opaque
|
591
643
|
|
592
644
|
# ------------------------------------------------------------------------
|
593
645
|
# CSS filter options
|
@@ -651,7 +703,7 @@ settings:
|
|
651
703
|
name: Voice Kids - Ben
|
652
704
|
type: youtube
|
653
705
|
size: "1280-720"
|
654
|
-
source: "
|
706
|
+
source: "//youtube.com/watch?v=GuiOYCv9NTI"
|
655
707
|
pinterest_prefix: Pin video
|
656
708
|
tweet_prefix: Try video
|
657
709
|
description: >
|
@@ -671,7 +723,7 @@ settings:
|
|
671
723
|
name: Voice Kids - The Battle
|
672
724
|
type: youtube
|
673
725
|
size: "1280-720"
|
674
|
-
source: "
|
726
|
+
source: "//youtube.com/watch?v=1bvE2mgJ22I"
|
675
727
|
pinterest_prefix: Pin video
|
676
728
|
tweet_prefix: Try video
|
677
729
|
description: >
|
@@ -694,6 +746,7 @@ settings:
|
|
694
746
|
|
695
747
|
id: jg_video_online_vimeo
|
696
748
|
type: video
|
749
|
+
video: vimeo
|
697
750
|
image_base_path: /assets/videos/gallery
|
698
751
|
thumb_base_path: /assets/videos/gallery
|
699
752
|
|
@@ -724,7 +777,16 @@ settings:
|
|
724
777
|
autoplayFirstVideo: true
|
725
778
|
videojs: false
|
726
779
|
|
727
|
-
videojsOptions:
|
780
|
+
videojsOptions:
|
781
|
+
enabled: false
|
782
|
+
|
783
|
+
playerParams:
|
784
|
+
enabled: false
|
785
|
+
autoplay: 0
|
786
|
+
byline: 0
|
787
|
+
portrait: 0
|
788
|
+
color: CCCCCC
|
789
|
+
muted: 0
|
728
790
|
|
729
791
|
# ------------------------------------------------------------------------
|
730
792
|
# CSS filter options
|
@@ -787,6 +849,7 @@ settings:
|
|
787
849
|
|
788
850
|
id: jg_video_online_dailymotion
|
789
851
|
type: video
|
852
|
+
video: dailymotion
|
790
853
|
image_base_path: /assets/videos/gallery/dailymotion
|
791
854
|
thumb_base_path: /assets/videos/gallery/dailymotion
|
792
855
|
|
@@ -817,7 +880,11 @@ settings:
|
|
817
880
|
autoplayFirstVideo: true
|
818
881
|
videojs: false
|
819
882
|
|
820
|
-
videojsOptions:
|
883
|
+
videojsOptions:
|
884
|
+
enabled: false
|
885
|
+
|
886
|
+
playerParams:
|
887
|
+
enabled: false
|
821
888
|
|
822
889
|
# ------------------------------------------------------------------------
|
823
890
|
# CSS filter options
|
@@ -840,7 +907,7 @@ settings:
|
|
840
907
|
name: SELF Channel
|
841
908
|
type: dailymotion
|
842
909
|
size: "1280-720"
|
843
|
-
source: "
|
910
|
+
source: "//dai.ly/x887s09"
|
844
911
|
pinterest_prefix: Pin video
|
845
912
|
tweet_prefix: Try video
|
846
913
|
description: >
|
@@ -57,7 +57,7 @@
|
|
57
57
|
<id>{{ page.url | absolute_url | xml_escape }}</id>
|
58
58
|
<post_limited>{{ limit_posts }}</post_limited>
|
59
59
|
<template_name>J1 Theme</template_name>
|
60
|
-
<template_version>2023.10.
|
60
|
+
<template_version>2023.10.2</template_version>
|
61
61
|
|
62
62
|
{% assign title = site.title | default: site.name %}
|
63
63
|
{% if page.collection != "posts" %}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: j1-template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2023.10.
|
4
|
+
version: 2023.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- juergen_jekyll_one
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -1169,6 +1169,7 @@ files:
|
|
1169
1169
|
- assets/themes/j1/modules/lightGallery/js/lightgallery.min.js
|
1170
1170
|
- assets/themes/j1/modules/lightGallery/js/plugins/j1/j1-video.js
|
1171
1171
|
- assets/themes/j1/modules/lightGallery/js/plugins/j1/j1-video.min.js
|
1172
|
+
- assets/themes/j1/modules/lightGallery/js/plugins/j1/lg-video.1.js
|
1172
1173
|
- assets/themes/j1/modules/lightGallery/js/plugins/lg-autoplay.js
|
1173
1174
|
- assets/themes/j1/modules/lightGallery/js/plugins/lg-autoplay.min.js
|
1174
1175
|
- assets/themes/j1/modules/lightGallery/js/plugins/lg-comment.js
|