Home Reference Source

src/loader/level.js

  1. export default class Level {
  2. constructor (baseUrl) {
  3. // Please keep properties in alphabetical order
  4. this.endCC = 0;
  5. this.endSN = 0;
  6. this.fragments = [];
  7. this.initSegment = null;
  8. this.live = true;
  9. this.needSidxRanges = false;
  10. this.startCC = 0;
  11. this.startSN = 0;
  12. this.startTimeOffset = null;
  13. this.targetduration = 0;
  14. this.totalduration = 0;
  15. this.type = null;
  16. this.url = baseUrl;
  17. this.version = null;
  18. }
  19.  
  20. get hasProgramDateTime () {
  21. return !!(this.fragments[0] && Number.isFinite(this.fragments[0].programDateTime));
  22. }
  23. }