Compare commits

...

3 Commits

7 changed files with 22 additions and 14 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

@ -2,10 +2,12 @@ var errors = require("./errors.js");
var vCarousel = (function () {
function vCarousel() {
this._vContainers = [];
this._firstVideoId = undefined;
this._playFirstVideo = false;
this._playNextVideos = false;
this._noStop = false;
this.nbVContainers = 0;
this._currentVideo = undefined;
}
Object.defineProperty(vCarousel.prototype, "vContainers", {
set: function (vContainersIds) {

View File

@ -16,12 +16,12 @@ interface videoDOM
export class vCarousel
{
private _vContainers: videoDOM[] = [];
private _firstVideoId: string;
private _firstVideoId: string|undefined = undefined;
private _playFirstVideo: boolean = false;
private _playNextVideos: boolean = false;
private _noStop: boolean = false;
private nbVContainers: number = 0;
private _currentVideo: HTMLMediaElement;
private _currentVideo: HTMLMediaElement|undefined = undefined;
// Les ids reçus doivent correspondre à des éléments HTML contenant une vidéo.
set vContainers(vContainersIds: string[])
@ -47,13 +47,13 @@ export class vCarousel
}
// Si this._firstVideoId a été fourni, on vérifie qu'il est présent dans la liste des conteneurs de vidéos.
set firstVideoId(firstVideo: string)
set firstVideoId(firstVideo: string|undefined)
{
if((firstVideo!=="" && this._vContainers.findIndex(video => video.id === firstVideo) !== -1) || (firstVideo===""))
this._firstVideoId=firstVideo;
}
get firstVideoId() : string
get firstVideoId() : string|undefined
{
return this._firstVideoId;
}
@ -73,7 +73,7 @@ export class vCarousel
this._noStop=noStop;
}
get currentVideo() : HTMLMediaElement
get currentVideo() : HTMLMediaElement|undefined
{
return this._currentVideo;
}

View File

@ -1,14 +1,16 @@
{
"compilerOptions":
{
"outDir": "./src",
"noImplicitAny": true,
"module": "es6",
"removeComments": true,
"outDir": "./src/build",
"module": "ES6",
"target": "es5",
"jsx": "react",
"allowJs": true
"strict":true,
"removeComments": true,
"allowJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
},
"include": ["src/*.ts"],
"exclude": ["node_modules", "**/*.spec.ts"]
"exclude": ["src/build"]
}