# All files / src/loader level.js

100% Statements 15/15
100% Branches 2/2
100% Functions 1/1
100% Lines 15/15

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24

    64x
    64x
    64x
    64x
    64x
    64x
    64x
    64x
    64x
    64x
    64x
    64x
    64x
    64x

    10x

     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));
      }
    }