av/cmd/mjpeg-player/hlsjs/loader/level.js

24 lines
590 B
JavaScript
Raw Normal View History

export default class Level {
constructor (baseUrl) {
// Please keep properties in alphabetical order
this.endCC = 0;
this.endSN = 0;
this.fragments = [];
this.initSegment = null;
this.live = true;
this.needSidxRanges = false;
this.startCC = 0;
this.startSN = 0;
this.startTimeOffset = null;
this.targetduration = 0;
this.totalduration = 0;
this.type = null;
this.url = baseUrl;
this.version = null;
}
get hasProgramDateTime () {
return !!(this.fragments[0] && Number.isFinite(this.fragments[0].programDateTime));
}
}