Nouvelle compilation en JS.*

This commit is contained in:
Fabrice PENHOËT 2022-01-18 18:22:58 +01:00
parent b68429a419
commit d7e9ec4dbe
7 changed files with 46 additions and 4348 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -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
*/

8
src/build/errors.js Normal file
View File

@ -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."
};

View File

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

View File

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

View File

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