Nouvelle compilation des scripts.

This commit is contained in:
Fabrice PENHOËT 2021-08-04 18:16:02 +02:00
parent 8b7d9adb05
commit a7f55b109b
3 changed files with 23 additions and 38 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

@ -36,7 +36,7 @@ var vCarousel = (function () {
return this._firstVideoId;
},
set: function (firstVideo) {
if ((firstVideo !== "" && this._vContainers.findIndex(function (video) { return video.id === firstVideo; }) !== -1) || (firstVideo === ""))
if ((firstVideo !== undefined && firstVideo !== "" && this._vContainers.findIndex(function (video) { return video.id === firstVideo; }) !== -1) || (firstVideo === ""))
this._firstVideoId = firstVideo;
},
enumerable: true,
@ -91,17 +91,12 @@ var vCarousel = (function () {
video.addEventListener("ended", function () {
if (nbTurn < (vCarousel.nbVContainers - 1) || vCarousel._noStop === true) {
vContainer.style.display = "none";
var nextVContainer = void 0, nextVideo = void 0, nextHash = void 0;
if (i < (vCarousel.nbVContainers - 1)) {
nextVContainer = vCarousel._vContainers[i + 1].containerElt;
nextVideo = vCarousel._vContainers[i + 1].videoElt;
nextHash = vCarousel._vContainers[i + 1].id;
}
else {
nextVContainer = vCarousel._vContainers[0].containerElt;
nextVideo = vCarousel._vContainers[0].videoElt;
nextHash = vCarousel._vContainers[0].id;
}
var nextVContainer = void 0, nextVideo = void 0, nextHash = void 0, nextOne = 0;
if (i < (vCarousel.nbVContainers - 1))
nextOne = i + 1;
nextVContainer = vCarousel._vContainers[nextOne].containerElt;
nextVideo = vCarousel._vContainers[nextOne].videoElt;
nextHash = vCarousel._vContainers[nextOne].id;
nextVContainer.style.display = "block";
vCarousel._currentVideo = nextVideo;
window.location.assign("#" + nextHash);