Nouvelle compilation en JS.*

master
Fabrice PENHOËT 1 year ago
parent b68429a419
commit d7e9ec4dbe

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,28 @@
/*!
* Flickity v2.3.0
* Touch, responsive, flickable carousels
*
* Licensed GPLv3 for open source use
* or Flickity Commercial License for commercial use
*
* https://flickity.metafizzy.co
* Copyright 2015-2021 Metafizzy
*/
/*!
* Unidragger v2.4.0
* Draggable base class
* MIT license
*/
/*!
* Unipointer v2.4.0
* base class for doing one thing with pointer event
* MIT license
*/
/*!
* getSize v2.0.3
* measure size of elements
* MIT license
*/

@ -0,0 +1,8 @@
"use strict";
module.exports =
{
elementNotFound: "Aucun élément HTML trouvé dans la page pour l'id : ",
videoNotFound: "Aucune balise vidéo trouvée dans l'élément HTML ayant comme id : ",
need2Videos: "Il vous faut fournir au moins deux conteneurs de vidéo valides pour pouvoir lancer le carrousel.",
needVideosProvided: "vCarousel ne peut être lancé sans avoir fourni les vidéos concernées."
};

@ -5,6 +5,7 @@ try {
testvCarousel_1.vContainers = videosContainers;
if (window.location.hash !== undefined && window.location.hash !== "")
testvCarousel_1.firstVideoId = window.location.hash.replace("#", "");
testvCarousel_1.playNextVideos = true;
testvCarousel_1.run();
var selectLinks = document.querySelectorAll(".selectVideo");
var _loop_1 = function (i) {

@ -7,7 +7,7 @@ var selectFlickityForHash = function (flickityCarousel, urlHash) {
var childrens = cel.element.childNodes;
for (var i = 0, c = childrens.length; i < c; i++) {
if (childrens[i].nodeType === Node.ELEMENT_NODE) {
if (childrens[i].hash != undefined && childrens[i].hash === urlHash) {
if (childrens[i].hash !== undefined && childrens[i].hash === urlHash) {
flickityCarousel.select(nb);
find = true;
break;
@ -45,6 +45,7 @@ try {
testvCarousel_1.firstVideoId = link.hash.replace("#", "");
testvCarousel_1.playFirstVideo = true;
testvCarousel_1.playNextVideos = true;
testvCarousel_1.noStop = true;
testvCarousel_1.run();
});
};

@ -84,12 +84,12 @@ var vCarousel = (function () {
vCarousel._currentVideo.pause();
vContainer.style.display = "block";
vCarousel._currentVideo = video;
if (vCarousel._playFirstVideo === true)
if (vCarousel._playFirstVideo)
video.play();
}
nbTurn = 0;
video.addEventListener("ended", function () {
if (nbTurn < (vCarousel.nbVContainers - 1) || vCarousel._noStop === true) {
if (nbTurn < (vCarousel.nbVContainers - 1) || vCarousel._noStop) {
vContainer.style.display = "none";
var nextVContainer = void 0, nextVideo = void 0, nextHash = void 0, nextOne = 0;
if (i < (vCarousel.nbVContainers - 1))
@ -99,8 +99,9 @@ var vCarousel = (function () {
nextHash = vCarousel._vContainers[nextOne].id;
nextVContainer.style.display = "block";
vCarousel._currentVideo = nextVideo;
nextVideo.currentTime = 0;
window.location.assign("#" + nextHash);
if (vCarousel._playNextVideos === true)
if (vCarousel._playNextVideos)
nextVideo.play();
nbTurn++;
}

Loading…
Cancel
Save