hls.js 1.6.0-beta.2.0.canary.10878 → 1.6.0-beta.2.0.canary.10882

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/hls.light.js CHANGED
@@ -15,20 +15,20 @@
15
15
  function _defineProperties(e, r) {
16
16
  for (var t = 0; t < r.length; t++) {
17
17
  var o = r[t];
18
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
18
+ o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
19
19
  }
20
20
  }
21
21
  function _createClass(e, r, t) {
22
22
  return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
23
- writable: !1
23
+ writable: false
24
24
  }), e;
25
25
  }
26
26
  function _defineProperty(e, r, t) {
27
27
  return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
28
28
  value: t,
29
- enumerable: !0,
30
- configurable: !0,
31
- writable: !0
29
+ enumerable: true,
30
+ configurable: true,
31
+ writable: true
32
32
  }) : e[r] = t, e;
33
33
  }
34
34
  function _extends() {
@@ -76,7 +76,7 @@
76
76
  function _objectSpread2(e) {
77
77
  for (var r = 1; r < arguments.length; r++) {
78
78
  var t = null != arguments[r] ? arguments[r] : {};
79
- r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
79
+ r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
80
80
  _defineProperty(e, r, t[r]);
81
81
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
82
82
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
@@ -92,7 +92,7 @@
92
92
  function _toPrimitive(t, r) {
93
93
  if ("object" != typeof t || !t) return t;
94
94
  var e = t[Symbol.toPrimitive];
95
- if (void 0 !== e) {
95
+ if (undefined !== e) {
96
96
  var i = e.call(t, r || "default");
97
97
  if ("object" != typeof i) return i;
98
98
  throw new TypeError("@@toPrimitive must return a primitive value.");
@@ -104,11 +104,11 @@
104
104
  return "symbol" == typeof i ? i : i + "";
105
105
  }
106
106
  function _wrapNativeSuper(t) {
107
- var r = "function" == typeof Map ? new Map() : void 0;
107
+ var r = "function" == typeof Map ? new Map() : undefined;
108
108
  return _wrapNativeSuper = function (t) {
109
109
  if (null === t || !_isNativeFunction(t)) return t;
110
110
  if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
111
- if (void 0 !== r) {
111
+ if (undefined !== r) {
112
112
  if (r.has(t)) return r.get(t);
113
113
  r.set(t, Wrapper);
114
114
  }
@@ -118,9 +118,9 @@
118
118
  return Wrapper.prototype = Object.create(t.prototype, {
119
119
  constructor: {
120
120
  value: Wrapper,
121
- enumerable: !1,
122
- writable: !0,
123
- configurable: !0
121
+ enumerable: false,
122
+ writable: true,
123
+ configurable: true
124
124
  }
125
125
  }), _setPrototypeOf(Wrapper, t);
126
126
  }, _wrapNativeSuper(t);
@@ -851,16 +851,16 @@
851
851
  var EWMA = /*#__PURE__*/function () {
852
852
  // About half of the estimated value will be from the last |halfLife| samples by weight.
853
853
  function EWMA(halfLife, estimate, weight) {
854
- if (estimate === void 0) {
854
+ if (estimate === undefined) {
855
855
  estimate = 0;
856
856
  }
857
- if (weight === void 0) {
857
+ if (weight === undefined) {
858
858
  weight = 0;
859
859
  }
860
- this.halfLife = void 0;
861
- this.alpha_ = void 0;
862
- this.estimate_ = void 0;
863
- this.totalWeight_ = void 0;
860
+ this.halfLife = undefined;
861
+ this.alpha_ = undefined;
862
+ this.estimate_ = undefined;
863
+ this.totalWeight_ = undefined;
864
864
  this.halfLife = halfLife;
865
865
  // Larger values of alpha expire historical data more slowly.
866
866
  this.alpha_ = halfLife ? Math.exp(Math.log(0.5) / halfLife) : 0;
@@ -890,16 +890,16 @@
890
890
 
891
891
  var EwmaBandWidthEstimator = /*#__PURE__*/function () {
892
892
  function EwmaBandWidthEstimator(slow, fast, defaultEstimate, defaultTTFB) {
893
- if (defaultTTFB === void 0) {
893
+ if (defaultTTFB === undefined) {
894
894
  defaultTTFB = 100;
895
895
  }
896
- this.defaultEstimate_ = void 0;
897
- this.minWeight_ = void 0;
898
- this.minDelayMs_ = void 0;
899
- this.slow_ = void 0;
900
- this.fast_ = void 0;
901
- this.defaultTTFB_ = void 0;
902
- this.ttfb_ = void 0;
896
+ this.defaultEstimate_ = undefined;
897
+ this.minWeight_ = undefined;
898
+ this.minDelayMs_ = undefined;
899
+ this.slow_ = undefined;
900
+ this.fast_ = undefined;
901
+ this.defaultTTFB_ = undefined;
902
+ this.ttfb_ = undefined;
903
903
  this.defaultEstimate_ = defaultEstimate;
904
904
  this.minWeight_ = 0.001;
905
905
  this.minDelayMs_ = 50;
@@ -971,12 +971,12 @@
971
971
  }();
972
972
 
973
973
  var Logger = function Logger(label, logger) {
974
- this.trace = void 0;
975
- this.debug = void 0;
976
- this.log = void 0;
977
- this.warn = void 0;
978
- this.info = void 0;
979
- this.error = void 0;
974
+ this.trace = undefined;
975
+ this.debug = undefined;
976
+ this.log = undefined;
977
+ this.warn = undefined;
978
+ this.info = undefined;
979
+ this.error = undefined;
980
980
  var lb = "[" + label + "]:";
981
981
  this.trace = noop;
982
982
  this.debug = logger.debug.bind(null, lb);
@@ -1029,7 +1029,7 @@
1029
1029
  // Some browsers don't allow to use bind on console object anyway
1030
1030
  // fallback to default if needed
1031
1031
  try {
1032
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.2.0.canary.10878");
1032
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.2.0.canary.10882");
1033
1033
  } catch (e) {
1034
1034
  /* log fn threw an exception. All logger methods are no-ops. */
1035
1035
  return createLogger();
@@ -1052,7 +1052,7 @@
1052
1052
  var Cues = /*@__PURE__*/getDefaultExportFromCjs(empty);
1053
1053
 
1054
1054
  function getMediaSource(preferManagedMediaSource) {
1055
- if (preferManagedMediaSource === void 0) {
1055
+ if (preferManagedMediaSource === undefined) {
1056
1056
  preferManagedMediaSource = true;
1057
1057
  }
1058
1058
  if (typeof self === 'undefined') return undefined;
@@ -1157,7 +1157,7 @@
1157
1157
  return !!typeCodes && !!typeCodes[codec.slice(0, 4)];
1158
1158
  }
1159
1159
  function areCodecsMediaSourceSupported(codecs, type, preferManagedMediaSource) {
1160
- if (preferManagedMediaSource === void 0) {
1160
+ if (preferManagedMediaSource === undefined) {
1161
1161
  preferManagedMediaSource = true;
1162
1162
  }
1163
1163
  return !codecs.split(',').some(function (codec) {
@@ -1166,11 +1166,11 @@
1166
1166
  }
1167
1167
  function isCodecMediaSourceSupported(codec, type, preferManagedMediaSource) {
1168
1168
  var _MediaSource$isTypeSu;
1169
- if (preferManagedMediaSource === void 0) {
1169
+ if (preferManagedMediaSource === undefined) {
1170
1170
  preferManagedMediaSource = true;
1171
1171
  }
1172
1172
  var MediaSource = getMediaSource(preferManagedMediaSource);
1173
- return (_MediaSource$isTypeSu = MediaSource == null ? void 0 : MediaSource.isTypeSupported(mimeTypeForCodec(codec, type))) != null ? _MediaSource$isTypeSu : false;
1173
+ return (_MediaSource$isTypeSu = MediaSource == null ? undefined : MediaSource.isTypeSupported(mimeTypeForCodec(codec, type))) != null ? _MediaSource$isTypeSu : false;
1174
1174
  }
1175
1175
  function mimeTypeForCodec(codec, type) {
1176
1176
  return type + "/mp4;codecs=" + codec;
@@ -1193,7 +1193,7 @@
1193
1193
  }
1194
1194
  var CODEC_COMPATIBLE_NAMES = {};
1195
1195
  function getCodecCompatibleNameLower(lowerCaseCodec, preferManagedMediaSource) {
1196
- if (preferManagedMediaSource === void 0) {
1196
+ if (preferManagedMediaSource === undefined) {
1197
1197
  preferManagedMediaSource = true;
1198
1198
  }
1199
1199
  if (CODEC_COMPATIBLE_NAMES[lowerCaseCodec]) {
@@ -1222,7 +1222,7 @@
1222
1222
  }
1223
1223
  var AUDIO_CODEC_REGEXP = /flac|opus|mp4a\.40\.34/i;
1224
1224
  function getCodecCompatibleName(codec, preferManagedMediaSource) {
1225
- if (preferManagedMediaSource === void 0) {
1225
+ if (preferManagedMediaSource === undefined) {
1226
1226
  preferManagedMediaSource = true;
1227
1227
  }
1228
1228
  return codec.replace(AUDIO_CODEC_REGEXP, function (m) {
@@ -1321,9 +1321,9 @@
1321
1321
  }
1322
1322
  var HlsUrlParameters = /*#__PURE__*/function () {
1323
1323
  function HlsUrlParameters(msn, part, skip) {
1324
- this.msn = void 0;
1325
- this.part = void 0;
1326
- this.skip = void 0;
1324
+ this.msn = undefined;
1325
+ this.part = undefined;
1326
+ this.skip = undefined;
1327
1327
  this.msn = msn;
1328
1328
  this.part = part;
1329
1329
  this.skip = skip;
@@ -1346,27 +1346,27 @@
1346
1346
  }();
1347
1347
  var Level = /*#__PURE__*/function () {
1348
1348
  function Level(data) {
1349
- this._attrs = void 0;
1350
- this.audioCodec = void 0;
1351
- this.bitrate = void 0;
1352
- this.codecSet = void 0;
1353
- this.url = void 0;
1354
- this.frameRate = void 0;
1355
- this.height = void 0;
1356
- this.id = void 0;
1357
- this.name = void 0;
1358
- this.videoCodec = void 0;
1359
- this.width = void 0;
1360
- this.details = void 0;
1349
+ this._attrs = undefined;
1350
+ this.audioCodec = undefined;
1351
+ this.bitrate = undefined;
1352
+ this.codecSet = undefined;
1353
+ this.url = undefined;
1354
+ this.frameRate = undefined;
1355
+ this.height = undefined;
1356
+ this.id = undefined;
1357
+ this.name = undefined;
1358
+ this.videoCodec = undefined;
1359
+ this.width = undefined;
1360
+ this.details = undefined;
1361
1361
  this.fragmentError = 0;
1362
1362
  this.loadError = 0;
1363
- this.loaded = void 0;
1363
+ this.loaded = undefined;
1364
1364
  this.realBitrate = 0;
1365
- this.supportedPromise = void 0;
1366
- this.supportedResult = void 0;
1365
+ this.supportedPromise = undefined;
1366
+ this.supportedResult = undefined;
1367
1367
  this._avgBitrate = 0;
1368
- this._audioGroups = void 0;
1369
- this._subtitleGroups = void 0;
1368
+ this._audioGroups = undefined;
1369
+ this._subtitleGroups = undefined;
1370
1370
  // Deprecated (retained for backwards compatibility)
1371
1371
  this._urlId = 0;
1372
1372
  this.url = [data.url];
@@ -1494,13 +1494,13 @@
1494
1494
  key: "audioGroupId",
1495
1495
  get: function get() {
1496
1496
  var _this$audioGroups;
1497
- return (_this$audioGroups = this.audioGroups) == null ? void 0 : _this$audioGroups[0];
1497
+ return (_this$audioGroups = this.audioGroups) == null ? undefined : _this$audioGroups[0];
1498
1498
  }
1499
1499
  }, {
1500
1500
  key: "textGroupId",
1501
1501
  get: function get() {
1502
1502
  var _this$subtitleGroups;
1503
- return (_this$subtitleGroups = this.subtitleGroups) == null ? void 0 : _this$subtitleGroups[0];
1503
+ return (_this$subtitleGroups = this.subtitleGroups) == null ? undefined : _this$subtitleGroups[0];
1504
1504
  }
1505
1505
  }]);
1506
1506
  }();
@@ -1567,9 +1567,9 @@
1567
1567
 
1568
1568
  function getStartCodecTier(codecTiers, currentVideoRange, currentBw, audioPreference, videoPreference) {
1569
1569
  var codecSets = Object.keys(codecTiers);
1570
- var channelsPreference = audioPreference == null ? void 0 : audioPreference.channels;
1571
- var audioCodecPreference = audioPreference == null ? void 0 : audioPreference.audioCodec;
1572
- var videoCodecPreference = videoPreference == null ? void 0 : videoPreference.videoCodec;
1570
+ var channelsPreference = audioPreference == null ? undefined : audioPreference.channels;
1571
+ var audioCodecPreference = audioPreference == null ? undefined : audioPreference.audioCodec;
1572
+ var videoCodecPreference = videoPreference == null ? undefined : videoPreference.videoCodec;
1573
1573
  var preferStereo = channelsPreference && parseInt(channelsPreference) === 2;
1574
1574
  // Use first level set to determine stereo, and minimum resolution and framerate
1575
1575
  var hasStereo = false;
@@ -1752,14 +1752,14 @@
1752
1752
  }
1753
1753
  function useAlternateAudio(audioTrackUrl, hls) {
1754
1754
  var _hls$levels$hls$loadL;
1755
- return !!audioTrackUrl && audioTrackUrl !== ((_hls$levels$hls$loadL = hls.levels[hls.loadLevel]) == null ? void 0 : _hls$levels$hls$loadL.uri);
1755
+ return !!audioTrackUrl && audioTrackUrl !== ((_hls$levels$hls$loadL = hls.levels[hls.loadLevel]) == null ? undefined : _hls$levels$hls$loadL.uri);
1756
1756
  }
1757
1757
 
1758
1758
  var AbrController = /*#__PURE__*/function (_Logger) {
1759
1759
  function AbrController(_hls) {
1760
1760
  var _this;
1761
1761
  _this = _Logger.call(this, 'abr', _hls.logger) || this;
1762
- _this.hls = void 0;
1762
+ _this.hls = undefined;
1763
1763
  _this.lastLevelLoadSec = 0;
1764
1764
  _this.lastLoadedFragLevel = -1;
1765
1765
  _this.firstSelection = -1;
@@ -1771,7 +1771,7 @@
1771
1771
  _this.fragCurrent = null;
1772
1772
  _this.partCurrent = null;
1773
1773
  _this.bitrateTestDelay = 0;
1774
- _this.bwEstimator = void 0;
1774
+ _this.bwEstimator = undefined;
1775
1775
  /*
1776
1776
  This method monitors the download rate of the current fragment, and will downswitch if that fragment will not load
1777
1777
  quickly enough to prevent underbuffering
@@ -1836,7 +1836,7 @@
1836
1836
  return;
1837
1837
  }
1838
1838
  var bwe = loadRate ? loadRate * 8 : bwEstimate;
1839
- var live = ((_this$hls$latestLevel = _this.hls.latestLevelDetails) == null ? void 0 : _this$hls$latestLevel.live) === true;
1839
+ var live = ((_this$hls$latestLevel = _this.hls.latestLevelDetails) == null ? undefined : _this$hls$latestLevel.live) === true;
1840
1840
  var abrBandWidthUpFactor = _this.hls.config.abrBandWidthUpFactor;
1841
1841
  var fragLevelNextLoadedDelay = Number.POSITIVE_INFINITY;
1842
1842
  var nextLoadLevel;
@@ -2173,7 +2173,7 @@
2173
2173
  // If no matching level found, see if min auto level would be a better option
2174
2174
  var minLevel = hls.levels[minAutoLevel];
2175
2175
  var autoLevel = hls.levels[hls.loadLevel];
2176
- if ((minLevel == null ? void 0 : minLevel.bitrate) < (autoLevel == null ? void 0 : autoLevel.bitrate)) {
2176
+ if ((minLevel == null ? undefined : minLevel.bitrate) < (autoLevel == null ? undefined : autoLevel.bitrate)) {
2177
2177
  return minAutoLevel;
2178
2178
  }
2179
2179
  // or if bitrate is not lower, continue to use loadLevel
@@ -2215,7 +2215,7 @@
2215
2215
  var firstSelection = loadLevel === -1 || lastLoadedFragLevel === -1;
2216
2216
  var currentCodecSet;
2217
2217
  var currentVideoRange = 'SDR';
2218
- var currentFrameRate = (level == null ? void 0 : level.frameRate) || 0;
2218
+ var currentFrameRate = (level == null ? undefined : level.frameRate) || 0;
2219
2219
  var audioPreference = config.audioPreference,
2220
2220
  videoPreference = config.videoPreference;
2221
2221
  var audioTracksByGroup = this.audioTracksByGroup || (this.audioTracksByGroup = getAudioTracksByGroup(allAudioTracks));
@@ -2239,8 +2239,8 @@
2239
2239
  currentBw = Math.max(currentBw, minBitrate);
2240
2240
  this.log("picked start tier " + JSON.stringify(startTier));
2241
2241
  } else {
2242
- currentCodecSet = level == null ? void 0 : level.codecSet;
2243
- currentVideoRange = level == null ? void 0 : level.videoRange;
2242
+ currentCodecSet = level == null ? undefined : level.codecSet;
2243
+ currentVideoRange = level == null ? undefined : level.videoRange;
2244
2244
  }
2245
2245
  var currentFragDuration = partCurrent ? partCurrent.duration : fragCurrent ? fragCurrent.duration : 0;
2246
2246
  var ttfbEstimateSec = this.bwEstimator.getEstimateTTFB() / 1000;
@@ -2262,7 +2262,7 @@
2262
2262
  }
2263
2263
  }
2264
2264
  var levelDetails = levelInfo.details;
2265
- var avgDuration = (partCurrent ? levelDetails == null ? void 0 : levelDetails.partTarget : levelDetails == null ? void 0 : levelDetails.averagetargetduration) || currentFragDuration;
2265
+ var avgDuration = (partCurrent ? levelDetails == null ? undefined : levelDetails.partTarget : levelDetails == null ? undefined : levelDetails.averagetargetduration) || currentFragDuration;
2266
2266
  var adjustedbw;
2267
2267
  // follow algorithm captured from stagefright :
2268
2268
  // https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/httplive/LiveSession.cpp
@@ -2384,7 +2384,7 @@
2384
2384
 
2385
2385
  var BufferOperationQueue = /*#__PURE__*/function () {
2386
2386
  function BufferOperationQueue(sourceBufferReference) {
2387
- this.tracks = void 0;
2387
+ this.tracks = undefined;
2388
2388
  this.queues = {
2389
2389
  video: [],
2390
2390
  audio: [],
@@ -2440,7 +2440,7 @@
2440
2440
  }
2441
2441
  [this.queues.video, this.queues.audio, this.queues.audiovideo].forEach(function (queue) {
2442
2442
  var _queue$;
2443
- var label = (_queue$ = queue[0]) == null ? void 0 : _queue$.label;
2443
+ var label = (_queue$ = queue[0]) == null ? undefined : _queue$.label;
2444
2444
  if (label === 'async-blocker' || label === 'async-blocker-prepend') {
2445
2445
  queue[0].execute();
2446
2446
  queue.splice(0, 1);
@@ -2475,7 +2475,7 @@
2475
2475
  }
2476
2476
 
2477
2477
  // Only shift the current operation off, otherwise the updateend handler will do this for us
2478
- var sb = (_this$tracks$type = this.tracks[type]) == null ? void 0 : _this$tracks$type.buffer;
2478
+ var sb = (_this$tracks$type = this.tracks[type]) == null ? undefined : _this$tracks$type.buffer;
2479
2479
  if (!(sb != null && sb.updating)) {
2480
2480
  this.shiftAndExecuteNext(type);
2481
2481
  }
@@ -2491,7 +2491,7 @@
2491
2491
  };
2492
2492
  _proto.current = function current(type) {
2493
2493
  var _this$queues;
2494
- return ((_this$queues = this.queues) == null ? void 0 : _this$queues[type][0]) || null;
2494
+ return ((_this$queues = this.queues) == null ? undefined : _this$queues[type][0]) || null;
2495
2495
  };
2496
2496
  _proto.toString = function toString() {
2497
2497
  var queues = this.queues,
@@ -2507,8 +2507,8 @@
2507
2507
  };
2508
2508
  _proto.listSbInfo = function listSbInfo(type) {
2509
2509
  var _this$tracks2;
2510
- var track = (_this$tracks2 = this.tracks) == null ? void 0 : _this$tracks2[type];
2511
- var sb = track == null ? void 0 : track.buffer;
2510
+ var track = (_this$tracks2 = this.tracks) == null ? undefined : _this$tracks2[type];
2511
+ var sb = track == null ? undefined : track.buffer;
2512
2512
  if (!sb) {
2513
2513
  return 'none';
2514
2514
  }
@@ -2516,7 +2516,7 @@
2516
2516
  };
2517
2517
  _proto.listOps = function listOps(type) {
2518
2518
  var _this$queues3;
2519
- return ((_this$queues3 = this.queues) == null ? void 0 : _this$queues3[type].map(function (op) {
2519
+ return ((_this$queues3 = this.queues) == null ? undefined : _this$queues3[type].map(function (op) {
2520
2520
  return op.label;
2521
2521
  }).join(', ')) || '';
2522
2522
  };
@@ -2601,13 +2601,13 @@
2601
2601
  * @returns a matching fragment or null
2602
2602
  */
2603
2603
  function findFragmentByPTS(fragPrevious, fragments, bufferEnd, maxFragLookUpTolerance, nextFragLookupTolerance) {
2604
- if (bufferEnd === void 0) {
2604
+ if (bufferEnd === undefined) {
2605
2605
  bufferEnd = 0;
2606
2606
  }
2607
- if (maxFragLookUpTolerance === void 0) {
2607
+ if (maxFragLookUpTolerance === undefined) {
2608
2608
  maxFragLookUpTolerance = 0;
2609
2609
  }
2610
- if (nextFragLookupTolerance === void 0) {
2610
+ if (nextFragLookupTolerance === undefined) {
2611
2611
  nextFragLookupTolerance = 0.005;
2612
2612
  }
2613
2613
  var fragNext = null;
@@ -2657,10 +2657,10 @@
2657
2657
  * @returns 0 if it matches, 1 if too low, -1 if too high
2658
2658
  */
2659
2659
  function fragmentWithinToleranceTest(bufferEnd, maxFragLookUpTolerance, candidate) {
2660
- if (bufferEnd === void 0) {
2660
+ if (bufferEnd === undefined) {
2661
2661
  bufferEnd = 0;
2662
2662
  }
2663
- if (maxFragLookUpTolerance === void 0) {
2663
+ if (maxFragLookUpTolerance === undefined) {
2664
2664
  maxFragLookUpTolerance = 0;
2665
2665
  }
2666
2666
  // eagerly accept an accurate match (no tolerance)
@@ -2747,7 +2747,7 @@
2747
2747
  if (!retryConfig) {
2748
2748
  return false;
2749
2749
  }
2750
- var httpStatus = loaderResponse == null ? void 0 : loaderResponse.code;
2750
+ var httpStatus = loaderResponse == null ? undefined : loaderResponse.code;
2751
2751
  var retry = retryCount < retryConfig.maxNumRetry && (retryForHttpStatus(httpStatus) || !!isTimeout);
2752
2752
  return retryConfig.shouldRetry ? retryConfig.shouldRetry(retryConfig, retryCount, isTimeout, loaderResponse, retry) : retry;
2753
2753
  }
@@ -2774,7 +2774,7 @@
2774
2774
  function ErrorController(hls) {
2775
2775
  var _this;
2776
2776
  _this = _Logger.call(this, 'error-controller', hls.logger) || this;
2777
- _this.hls = void 0;
2777
+ _this.hls = undefined;
2778
2778
  _this.playlistError = 0;
2779
2779
  _this.penalizedRenditions = {};
2780
2780
  _this.hls = hls;
@@ -2810,7 +2810,7 @@
2810
2810
  this.playlistError = 0;
2811
2811
  };
2812
2812
  _proto.getVariantLevelIndex = function getVariantLevelIndex(frag) {
2813
- return (frag == null ? void 0 : frag.type) === PlaylistLevelType.MAIN ? frag.level : this.hls.loadLevel;
2813
+ return (frag == null ? undefined : frag.type) === PlaylistLevelType.MAIN ? frag.level : this.hls.loadLevel;
2814
2814
  };
2815
2815
  _proto.onManifestLoading = function onManifestLoading() {
2816
2816
  this.playlistError = 0;
@@ -2865,7 +2865,7 @@
2865
2865
  return;
2866
2866
  case ErrorDetails.LEVEL_LOAD_ERROR:
2867
2867
  case ErrorDetails.LEVEL_LOAD_TIMEOUT:
2868
- if (typeof (context == null ? void 0 : context.level) === 'number') {
2868
+ if (typeof (context == null ? undefined : context.level) === 'number') {
2869
2869
  data.errorAction = this.getPlaylistRetryOrSwitchAction(data, context.level);
2870
2870
  }
2871
2871
  return;
@@ -2888,7 +2888,7 @@
2888
2888
  case ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:
2889
2889
  {
2890
2890
  var _level = hls.levels[hls.loadLevel];
2891
- var restrictedHdcpLevel = _level == null ? void 0 : _level.attrs['HDCP-LEVEL'];
2891
+ var restrictedHdcpLevel = _level == null ? undefined : _level.attrs['HDCP-LEVEL'];
2892
2892
  if (restrictedHdcpLevel) {
2893
2893
  data.errorAction = {
2894
2894
  action: NetworkErrorAction.SendAlternateToPenaltyBox,
@@ -3009,7 +3009,7 @@
3009
3009
  if (!hls.autoLevelEnabled) {
3010
3010
  hls.loadLevel = -1;
3011
3011
  }
3012
- var fragErrorType = (_data$frag2 = data.frag) == null ? void 0 : _data$frag2.type;
3012
+ var fragErrorType = (_data$frag2 = data.frag) == null ? undefined : _data$frag2.type;
3013
3013
  // Find alternate audio codec if available on audio codec error
3014
3014
  var isAudioCodecError = fragErrorType === PlaylistLevelType.AUDIO && errorDetails === ErrorDetails.FRAG_PARSING_ERROR || data.sourceBufferName === 'audio' && (errorDetails === ErrorDetails.BUFFER_ADD_CODEC_ERROR || errorDetails === ErrorDetails.BUFFER_APPEND_ERROR);
3015
3015
  var findAudioCodecAlternate = isAudioCodecError && levels.some(function (_ref) {
@@ -3080,7 +3080,7 @@
3080
3080
  };
3081
3081
  _proto.onErrorOut = function onErrorOut(event, data) {
3082
3082
  var _data$errorAction;
3083
- switch ((_data$errorAction = data.errorAction) == null ? void 0 : _data$errorAction.action) {
3083
+ switch ((_data$errorAction = data.errorAction) == null ? undefined : _data$errorAction.action) {
3084
3084
  case NetworkErrorAction.DoNothing:
3085
3085
  break;
3086
3086
  case NetworkErrorAction.SendAlternateToPenaltyBox:
@@ -3181,9 +3181,9 @@
3181
3181
  this._stats = null;
3182
3182
  this._streams = null;
3183
3183
  // baseurl is the URL to the playlist
3184
- this.base = void 0;
3184
+ this.base = undefined;
3185
3185
  // relurl is the portion of the URL that comes from inside the playlist.
3186
- this.relurl = void 0;
3186
+ this.relurl = undefined;
3187
3187
  if (typeof base === 'string') {
3188
3188
  base = {
3189
3189
  url: base
@@ -3198,7 +3198,7 @@
3198
3198
  var params = value.split('@', 2);
3199
3199
  var start;
3200
3200
  if (params.length === 1) {
3201
- start = (previous == null ? void 0 : previous.byteRangeEndOffset) || 0;
3201
+ start = (previous == null ? undefined : previous.byteRangeEndOffset) || 0;
3202
3202
  } else {
3203
3203
  start = parseInt(params[1]);
3204
3204
  }
@@ -3296,7 +3296,7 @@
3296
3296
  _this._programDateTime = null;
3297
3297
  _this._ref = null;
3298
3298
  // Approximate bit rate of the fragment expressed in bits per second (bps) as indicated by the last EXT-X-BITRATE (kbps) tag
3299
- _this._bitrate = void 0;
3299
+ _this._bitrate = undefined;
3300
3300
  _this.rawProgramDateTime = null;
3301
3301
  _this.tagList = [];
3302
3302
  // EXTINF has to be present for a m3u8 to be considered valid
@@ -3306,9 +3306,9 @@
3306
3306
  // levelkeys are the EXT-X-KEY tags that apply to this segment for decryption
3307
3307
  // core difference from the private field _decryptdata is the lack of the initialized IV
3308
3308
  // _decryptdata will set the IV for this segment based on the segment number in the fragment
3309
- _this.levelkeys = void 0;
3309
+ _this.levelkeys = undefined;
3310
3310
  // A string representing the fragment type
3311
- _this.type = void 0;
3311
+ _this.type = undefined;
3312
3312
  // A reference to the loader. Set while the fragment is loading, and removed afterwards. Used to abort fragment loading
3313
3313
  _this.loader = null;
3314
3314
  // A reference to the key loader. Set while the key is loading, and removed afterwards. Used to abort key loading
@@ -3318,25 +3318,25 @@
3318
3318
  // The continuity counter of the fragment
3319
3319
  _this.cc = 0;
3320
3320
  // The starting Presentation Time Stamp (PTS) of the fragment. Set after transmux complete.
3321
- _this.startPTS = void 0;
3321
+ _this.startPTS = undefined;
3322
3322
  // The ending Presentation Time Stamp (PTS) of the fragment. Set after transmux complete.
3323
- _this.endPTS = void 0;
3323
+ _this.endPTS = undefined;
3324
3324
  // The starting Decode Time Stamp (DTS) of the fragment. Set after transmux complete.
3325
- _this.startDTS = void 0;
3325
+ _this.startDTS = undefined;
3326
3326
  // The ending Decode Time Stamp (DTS) of the fragment. Set after transmux complete.
3327
- _this.endDTS = void 0;
3327
+ _this.endDTS = undefined;
3328
3328
  // The start time of the fragment, as listed in the manifest. Updated after transmux complete.
3329
3329
  _this.start = 0;
3330
3330
  // The offset time (seconds) of the fragment from the start of the Playlist
3331
3331
  _this.playlistOffset = 0;
3332
3332
  // Set by `updateFragPTSDTS` in level-helper
3333
- _this.deltaPTS = void 0;
3333
+ _this.deltaPTS = undefined;
3334
3334
  // The maximum starting Presentation Time Stamp (audio/video PTS) of the fragment. Set after transmux complete.
3335
- _this.maxStartPTS = void 0;
3335
+ _this.maxStartPTS = undefined;
3336
3336
  // The minimum ending Presentation Time Stamp (audio/video PTS) of the fragment. Set after transmux complete.
3337
- _this.minEndPTS = void 0;
3337
+ _this.minEndPTS = undefined;
3338
3338
  // Init Segment bytes (unset for media segments)
3339
- _this.data = void 0;
3339
+ _this.data = undefined;
3340
3340
  // A flag indicating whether the segment was downloaded in order to test bitrate, and was not buffered
3341
3341
  _this.bitrateTest = false;
3342
3342
  // #EXTINF segment title
@@ -3344,9 +3344,9 @@
3344
3344
  // The Media Initialization Section for this segment
3345
3345
  _this.initSegment = null;
3346
3346
  // Fragment is the last fragment in the media playlist
3347
- _this.endList = void 0;
3347
+ _this.endList = undefined;
3348
3348
  // Fragment is marked by an EXT-X-GAP tag indicating that it does not contain media data and should not be loaded
3349
- _this.gap = void 0;
3349
+ _this.gap = undefined;
3350
3350
  // Deprecated
3351
3351
  _this.urlId = 0;
3352
3352
  _this.type = type;
@@ -3379,11 +3379,11 @@
3379
3379
  };
3380
3380
  _proto2.abortRequests = function abortRequests() {
3381
3381
  var _this$loader, _this$keyLoader;
3382
- (_this$loader = this.loader) == null ? void 0 : _this$loader.abort();
3383
- (_this$keyLoader = this.keyLoader) == null ? void 0 : _this$keyLoader.abort();
3382
+ (_this$loader = this.loader) == null ? undefined : _this$loader.abort();
3383
+ (_this$keyLoader = this.keyLoader) == null ? undefined : _this$keyLoader.abort();
3384
3384
  };
3385
3385
  _proto2.setElementaryStreamInfo = function setElementaryStreamInfo(type, startPTS, endPTS, startDTS, endDTS, partial) {
3386
- if (partial === void 0) {
3386
+ if (partial === undefined) {
3387
3387
  partial = false;
3388
3388
  }
3389
3389
  var elementaryStreams = this.elementaryStreams;
@@ -3533,9 +3533,9 @@
3533
3533
  _this2.duration = 0;
3534
3534
  _this2.gap = false;
3535
3535
  _this2.independent = false;
3536
- _this2.relurl = void 0;
3537
- _this2.fragment = void 0;
3538
- _this2.index = void 0;
3536
+ _this2.relurl = undefined;
3537
+ _this2.fragment = undefined;
3538
+ _this2.index = undefined;
3539
3539
  _this2.duration = partAttrs.decimalFloatingPoint('DURATION');
3540
3540
  _this2.gap = partAttrs.bool('GAP');
3541
3541
  _this2.independent = partAttrs.bool('INDEPENDENT');
@@ -3722,8 +3722,8 @@
3722
3722
  function BufferController(hls, fragmentTracker) {
3723
3723
  var _this2;
3724
3724
  _this2 = _Logger.call(this, 'buffer-controller', hls.logger) || this;
3725
- _this2.hls = void 0;
3726
- _this2.fragmentTracker = void 0;
3725
+ _this2.hls = undefined;
3726
+ _this2.fragmentTracker = undefined;
3727
3727
  // The level details used to determine duration, target-duration and live
3728
3728
  _this2.details = null;
3729
3729
  // cache the self generated object url to detect hijack of video tag
@@ -3743,11 +3743,11 @@
3743
3743
  // Keep track of video append position for unblocking audio
3744
3744
  _this2.lastVideoAppendEnd = 0;
3745
3745
  // Whether or not to use ManagedMediaSource API and append source element to media element.
3746
- _this2.appendSource = void 0;
3746
+ _this2.appendSource = undefined;
3747
3747
  // Transferred MediaSource information used to detmerine if duration end endstream may be appended
3748
- _this2.transferData = void 0;
3748
+ _this2.transferData = undefined;
3749
3749
  // Directives used to override default MediaSource handling
3750
- _this2.overrides = void 0;
3750
+ _this2.overrides = undefined;
3751
3751
  // Error counters
3752
3752
  _this2.appendErrors = {
3753
3753
  audio: 0,
@@ -3763,7 +3763,7 @@
3763
3763
  if (!_this2.hls) {
3764
3764
  return;
3765
3765
  }
3766
- if (((_this2$mediaSource = _this2.mediaSource) == null ? void 0 : _this2$mediaSource.readyState) !== 'open') {
3766
+ if (((_this2$mediaSource = _this2.mediaSource) == null ? undefined : _this2$mediaSource.readyState) !== 'open') {
3767
3767
  return;
3768
3768
  }
3769
3769
  _this2.hls.pauseBuffering();
@@ -3932,7 +3932,7 @@
3932
3932
  // in case alt audio is not used, only one BUFFER_CODEC event will be fired from main stream controller
3933
3933
  // it will contain the expected nb of source buffers, no need to compute it
3934
3934
  var codecEvents = 2;
3935
- if (data.audio && !data.video || !data.altAudio || !false) {
3935
+ if (data.audio && !data.video || !data.altAudio || true) {
3936
3936
  codecEvents = 1;
3937
3937
  }
3938
3938
  this.bufferCodecEventsTotal = codecEvents;
@@ -3981,7 +3981,7 @@
3981
3981
  };
3982
3982
  _proto.assignMediaSource = function assignMediaSource(ms) {
3983
3983
  var _this$transferData2, _ms$constructor;
3984
- this.log((((_this$transferData2 = this.transferData) == null ? void 0 : _this$transferData2.mediaSource) === ms ? 'transferred' : 'created') + " media source: " + ((_ms$constructor = ms.constructor) == null ? void 0 : _ms$constructor.name));
3984
+ this.log((((_this$transferData2 = this.transferData) == null ? undefined : _this$transferData2.mediaSource) === ms ? 'transferred' : 'created') + " media source: " + ((_ms$constructor = ms.constructor) == null ? undefined : _ms$constructor.name));
3985
3985
  // MediaSource listeners are arrow functions with a lexical scope, and do not need to be bound
3986
3986
  ms.addEventListener('sourceopen', this._onMediaSourceOpen);
3987
3987
  ms.addEventListener('sourceended', this._onMediaSourceEnded);
@@ -4025,7 +4025,7 @@
4025
4025
  data.tracks = undefined;
4026
4026
  var currentTime = media.currentTime;
4027
4027
  var details = this.details;
4028
- var startTime = Math.max(currentTime, (details == null ? void 0 : details.fragments[0].start) || 0);
4028
+ var startTime = Math.max(currentTime, (details == null ? undefined : details.fragments[0].start) || 0);
4029
4029
  if (startTime - currentTime > 1) {
4030
4030
  this.log("attachTransferred: waiting for playback to reach new tracks start time " + currentTime + " -> " + startTime);
4031
4031
  return;
@@ -4162,7 +4162,7 @@
4162
4162
  };
4163
4163
  _proto.resetBuffer = function resetBuffer(type) {
4164
4164
  var _this$tracks$type;
4165
- var sb = (_this$tracks$type = this.tracks[type]) == null ? void 0 : _this$tracks$type.buffer;
4165
+ var sb = (_this$tracks$type = this.tracks[type]) == null ? undefined : _this$tracks$type.buffer;
4166
4166
  this.removeBuffer(type);
4167
4167
  if (sb) {
4168
4168
  try {
@@ -4215,10 +4215,10 @@
4215
4215
  container = parsedTrack.container,
4216
4216
  metadata = parsedTrack.metadata;
4217
4217
  var track = tracks[trackName];
4218
- var transferredTrack = (_this9$transferData = _this9.transferData) == null ? void 0 : (_this9$transferData$t = _this9$transferData.tracks) == null ? void 0 : _this9$transferData$t[trackName];
4218
+ var transferredTrack = (_this9$transferData = _this9.transferData) == null ? undefined : (_this9$transferData$t = _this9$transferData.tracks) == null ? undefined : _this9$transferData$t[trackName];
4219
4219
  var sbTrack = transferredTrack != null && transferredTrack.buffer ? transferredTrack : track;
4220
- var sbCodec = (sbTrack == null ? void 0 : sbTrack.pendingCodec) || (sbTrack == null ? void 0 : sbTrack.codec);
4221
- var trackLevelCodec = sbTrack == null ? void 0 : sbTrack.levelCodec;
4220
+ var sbCodec = (sbTrack == null ? undefined : sbTrack.pendingCodec) || (sbTrack == null ? undefined : sbTrack.codec);
4221
+ var trackLevelCodec = sbTrack == null ? undefined : sbTrack.levelCodec;
4222
4222
  var forceChangeType = !sbTrack || !!_this9.hls.config.assetPlayerId;
4223
4223
  if (!track) {
4224
4224
  track = tracks[trackName] = {
@@ -4233,9 +4233,9 @@
4233
4233
  }
4234
4234
  // check if SourceBuffer codec needs to change
4235
4235
  var currentCodecFull = pickMostCompleteCodecName(sbCodec, trackLevelCodec);
4236
- var currentCodec = currentCodecFull == null ? void 0 : currentCodecFull.replace(VIDEO_CODEC_PROFILE_REPLACE, '$1');
4236
+ var currentCodec = currentCodecFull == null ? undefined : currentCodecFull.replace(VIDEO_CODEC_PROFILE_REPLACE, '$1');
4237
4237
  var trackCodec = pickMostCompleteCodecName(codec, levelCodec);
4238
- var nextCodec = (_trackCodec = trackCodec) == null ? void 0 : _trackCodec.replace(VIDEO_CODEC_PROFILE_REPLACE, '$1');
4238
+ var nextCodec = (_trackCodec = trackCodec) == null ? undefined : _trackCodec.replace(VIDEO_CODEC_PROFILE_REPLACE, '$1');
4239
4239
  if (trackCodec && (currentCodec !== nextCodec || forceChangeType)) {
4240
4240
  if (trackName.slice(0, 5) === 'audio') {
4241
4241
  trackCodec = getCodecCompatibleName(trackCodec, _this9.appendSource);
@@ -4291,7 +4291,7 @@
4291
4291
  _this11 = this;
4292
4292
  var pStart = partOrFrag.start;
4293
4293
  var pTime = pStart + partOrFrag.duration * 0.05;
4294
- var atGap = ((_this$fragmentTracker = this.fragmentTracker.getAppendedFrag(pStart, PlaylistLevelType.MAIN)) == null ? void 0 : _this$fragmentTracker.gap) === true;
4294
+ var atGap = ((_this$fragmentTracker = this.fragmentTracker.getAppendedFrag(pStart, PlaylistLevelType.MAIN)) == null ? undefined : _this$fragmentTracker.gap) === true;
4295
4295
  if (atGap) {
4296
4296
  return;
4297
4297
  }
@@ -4300,7 +4300,7 @@
4300
4300
  execute: function execute() {
4301
4301
  var _this11$fragmentTrack;
4302
4302
  var videoTrack = _this11.tracks.video;
4303
- if (_this11.lastVideoAppendEnd > pTime || videoTrack != null && videoTrack.buffer && BufferHelper.isBuffered(videoTrack.buffer, pTime) || ((_this11$fragmentTrack = _this11.fragmentTracker.getAppendedFrag(pTime, PlaylistLevelType.MAIN)) == null ? void 0 : _this11$fragmentTrack.gap) === true) {
4303
+ if (_this11.lastVideoAppendEnd > pTime || videoTrack != null && videoTrack.buffer && BufferHelper.isBuffered(videoTrack.buffer, pTime) || ((_this11$fragmentTrack = _this11.fragmentTracker.getAppendedFrag(pTime, PlaylistLevelType.MAIN)) == null ? undefined : _this11$fragmentTrack.gap) === true) {
4304
4304
  _this11.blockedAudioAppend = null;
4305
4305
  _this11.shiftAndExecuteNext('audio');
4306
4306
  }
@@ -4354,14 +4354,14 @@
4354
4354
  // More info here: https://github.com/video-dev/hls.js/issues/332#issuecomment-257986486
4355
4355
  var audioTrack = tracks.audio;
4356
4356
  var checkTimestampOffset = false;
4357
- if (type === 'audio' && (audioTrack == null ? void 0 : audioTrack.container) === 'audio/mpeg') {
4357
+ if (type === 'audio' && (audioTrack == null ? undefined : audioTrack.container) === 'audio/mpeg') {
4358
4358
  checkTimestampOffset = !this.lastMpegAudioChunk || chunkMeta.id === 1 || this.lastMpegAudioChunk.sn !== chunkMeta.sn;
4359
4359
  this.lastMpegAudioChunk = chunkMeta;
4360
4360
  }
4361
4361
 
4362
4362
  // Block audio append until overlapping video append
4363
4363
  var videoTrack = this.tracks.video;
4364
- var videoSb = videoTrack == null ? void 0 : videoTrack.buffer;
4364
+ var videoSb = videoTrack == null ? undefined : videoTrack.buffer;
4365
4365
  if (videoSb && sn !== 'initSegment') {
4366
4366
  var partOrFrag = part || frag;
4367
4367
  var blockedAudioAppend = this.blockedAudioAppend;
@@ -4583,7 +4583,7 @@
4583
4583
  }
4584
4584
  }
4585
4585
  });
4586
- var allowEndOfStream = ((_this$overrides = this.overrides) == null ? void 0 : _this$overrides.endOfStream) !== false;
4586
+ var allowEndOfStream = ((_this$overrides = this.overrides) == null ? undefined : _this$overrides.endOfStream) !== false;
4587
4587
  var allTracksEnding = this.sourceBufferCount > 0 && !this.sourceBuffers.some(function (_ref6) {
4588
4588
  var _this16$tracks$type;
4589
4589
  var type = _ref6[0];
@@ -4638,7 +4638,7 @@
4638
4638
  _proto.onError = function onError(event, data) {
4639
4639
  if (data.details === ErrorDetails.BUFFER_APPEND_ERROR && data.frag) {
4640
4640
  var _data$errorAction;
4641
- var nextAutoLevel = (_data$errorAction = data.errorAction) == null ? void 0 : _data$errorAction.nextAutoLevel;
4641
+ var nextAutoLevel = (_data$errorAction = data.errorAction) == null ? undefined : _data$errorAction.nextAutoLevel;
4642
4642
  if (isFiniteNumber(nextAutoLevel) && nextAutoLevel !== data.frag.level) {
4643
4643
  this.resetAppendErrors();
4644
4644
  }
@@ -4748,7 +4748,7 @@
4748
4748
  var _this$overrides2;
4749
4749
  var details = this.details,
4750
4750
  mediaSource = this.mediaSource;
4751
- if (!details || !this.media || (mediaSource == null ? void 0 : mediaSource.readyState) !== 'open') {
4751
+ if (!details || !this.media || (mediaSource == null ? undefined : mediaSource.readyState) !== 'open') {
4752
4752
  return null;
4753
4753
  }
4754
4754
  var playlistEnd = details.edge;
@@ -4769,7 +4769,7 @@
4769
4769
  duration: Infinity
4770
4770
  };
4771
4771
  }
4772
- var overrideDuration = (_this$overrides2 = this.overrides) == null ? void 0 : _this$overrides2.duration;
4772
+ var overrideDuration = (_this$overrides2 = this.overrides) == null ? undefined : _this$overrides2.duration;
4773
4773
  if (overrideDuration) {
4774
4774
  return {
4775
4775
  duration: overrideDuration
@@ -4814,7 +4814,7 @@
4814
4814
  // 2 tracks is the max (one for audio, one for video). If we've reach this max go ahead and create the buffers.
4815
4815
  if (this.tracksReady) {
4816
4816
  var _this$transferData3;
4817
- var transferredTracks = (_this$transferData3 = this.transferData) == null ? void 0 : _this$transferData3.tracks;
4817
+ var transferredTracks = (_this$transferData3 = this.transferData) == null ? undefined : _this$transferData3.tracks;
4818
4818
  if (transferredTracks && Object.keys(transferredTracks).length) {
4819
4819
  this.attachTransferred();
4820
4820
  } else {
@@ -4950,7 +4950,7 @@
4950
4950
  };
4951
4951
  _proto.onSBUpdateEnd = function onSBUpdateEnd(type) {
4952
4952
  var _this$mediaSource2;
4953
- if (((_this$mediaSource2 = this.mediaSource) == null ? void 0 : _this$mediaSource2.readyState) === 'closed') {
4953
+ if (((_this$mediaSource2 = this.mediaSource) == null ? undefined : _this$mediaSource2.readyState) === 'closed') {
4954
4954
  this.resetBuffer(type);
4955
4955
  return;
4956
4956
  }
@@ -4963,7 +4963,7 @@
4963
4963
  };
4964
4964
  _proto.onSBUpdateError = function onSBUpdateError(type, event) {
4965
4965
  var _this$mediaSource3;
4966
- var error = new Error(type + " SourceBuffer error. MediaSource readyState: " + ((_this$mediaSource3 = this.mediaSource) == null ? void 0 : _this$mediaSource3.readyState));
4966
+ var error = new Error(type + " SourceBuffer error. MediaSource readyState: " + ((_this$mediaSource3 = this.mediaSource) == null ? undefined : _this$mediaSource3.readyState));
4967
4967
  this.error("" + error, event);
4968
4968
  // according to http://www.w3.org/TR/media-source/#sourcebuffer-append-error
4969
4969
  // SourceBuffer errors are not necessarily fatal; if so, the HTMLMediaElement will fire an error event
@@ -4987,7 +4987,7 @@
4987
4987
  var media = this.media,
4988
4988
  mediaSource = this.mediaSource;
4989
4989
  var track = this.tracks[type];
4990
- var sb = track == null ? void 0 : track.buffer;
4990
+ var sb = track == null ? undefined : track.buffer;
4991
4991
  if (!media || !mediaSource || !sb) {
4992
4992
  this.warn("Attempting to remove from the " + type + " SourceBuffer, but it does not exist");
4993
4993
  this.shiftAndExecuteNext(type);
@@ -5011,7 +5011,7 @@
5011
5011
  ;
5012
5012
  _proto.appendExecutor = function appendExecutor(data, type) {
5013
5013
  var track = this.tracks[type];
5014
- var sb = track == null ? void 0 : track.buffer;
5014
+ var sb = track == null ? undefined : track.buffer;
5015
5015
  if (!sb) {
5016
5016
  throw new HlsJsTrackRemovedError("Attempting to append to the " + type + " SourceBuffer, but it does not exist");
5017
5017
  }
@@ -5050,7 +5050,7 @@
5050
5050
  ;
5051
5051
  _proto.blockBuffers = function blockBuffers(onUnblocked, bufferNames) {
5052
5052
  var _this23 = this;
5053
- if (bufferNames === void 0) {
5053
+ if (bufferNames === undefined) {
5054
5054
  bufferNames = this.sourceBufferTypes;
5055
5055
  }
5056
5056
  if (!bufferNames.length) {
@@ -5081,7 +5081,7 @@
5081
5081
  var _this24 = this;
5082
5082
  bufferNames.forEach(function (type) {
5083
5083
  var _this24$tracks$type;
5084
- var sb = (_this24$tracks$type = _this24.tracks[type]) == null ? void 0 : _this24$tracks$type.buffer;
5084
+ var sb = (_this24$tracks$type = _this24.tracks[type]) == null ? undefined : _this24$tracks$type.buffer;
5085
5085
  // Only cycle the queue if the SB is not updating. There's a bug in Chrome which sets the SB updating flag to
5086
5086
  // true when changing the MediaSource duration (https://bugs.chromium.org/p/chromium/issues/detail?id=959359&can=2&q=mediasource%20duration)
5087
5087
  // While this is a workaround, it's probably useful to have around
@@ -5151,7 +5151,7 @@
5151
5151
  key: "mediaSourceOpenOrEnded",
5152
5152
  get: function get() {
5153
5153
  var _this$mediaSource4;
5154
- var readyState = (_this$mediaSource4 = this.mediaSource) == null ? void 0 : _this$mediaSource4.readyState;
5154
+ var readyState = (_this$mediaSource4 = this.mediaSource) == null ? undefined : _this$mediaSource4.readyState;
5155
5155
  return readyState === 'open' || readyState === 'ended';
5156
5156
  }
5157
5157
  }, {
@@ -5176,7 +5176,7 @@
5176
5176
  return this.sourceBufferCount > 0 && !this.sourceBuffers.some(function (_ref16) {
5177
5177
  var _this26$tracks$type, _this26$tracks$type2;
5178
5178
  var type = _ref16[0];
5179
- return type && (!((_this26$tracks$type = _this26.tracks[type]) != null && _this26$tracks$type.ended) || ((_this26$tracks$type2 = _this26.tracks[type]) == null ? void 0 : _this26$tracks$type2.ending));
5179
+ return type && (!((_this26$tracks$type = _this26.tracks[type]) != null && _this26$tracks$type.ended) || ((_this26$tracks$type2 = _this26.tracks[type]) == null ? undefined : _this26$tracks$type2.ending));
5180
5180
  });
5181
5181
  }
5182
5182
  }, {
@@ -5189,8 +5189,8 @@
5189
5189
  key: "mediaSrc",
5190
5190
  get: function get() {
5191
5191
  var _this$media, _this$media$querySele;
5192
- var media = ((_this$media = this.media) == null ? void 0 : (_this$media$querySele = _this$media.querySelector) == null ? void 0 : _this$media$querySele.call(_this$media, 'source')) || this.media;
5193
- return media == null ? void 0 : media.src;
5192
+ var media = ((_this$media = this.media) == null ? undefined : (_this$media$querySele = _this$media.querySelector) == null ? undefined : _this$media$querySele.call(_this$media, 'source')) || this.media;
5193
+ return media == null ? undefined : media.src;
5194
5194
  }
5195
5195
  }, {
5196
5196
  key: "pendingTrackCount",
@@ -5238,14 +5238,14 @@
5238
5238
 
5239
5239
  var CapLevelController = /*#__PURE__*/function () {
5240
5240
  function CapLevelController(hls) {
5241
- this.hls = void 0;
5242
- this.autoLevelCapping = void 0;
5243
- this.firstLevel = void 0;
5244
- this.media = void 0;
5245
- this.restrictedLevels = void 0;
5246
- this.timer = void 0;
5247
- this.clientRect = void 0;
5248
- this.streamController = void 0;
5241
+ this.hls = undefined;
5242
+ this.autoLevelCapping = undefined;
5243
+ this.firstLevel = undefined;
5244
+ this.media = undefined;
5245
+ this.restrictedLevels = undefined;
5246
+ this.timer = undefined;
5247
+ this.clientRect = undefined;
5248
+ this.streamController = undefined;
5249
5249
  this.hls = hls;
5250
5250
  this.autoLevelCapping = Number.POSITIVE_INFINITY;
5251
5251
  this.firstLevel = -1;
@@ -5637,19 +5637,19 @@
5637
5637
  var DateRange = /*#__PURE__*/function () {
5638
5638
  function DateRange(dateRangeAttr, dateRangeWithSameId, tagCount) {
5639
5639
  var _dateRangeWithSameId$;
5640
- if (tagCount === void 0) {
5640
+ if (tagCount === undefined) {
5641
5641
  tagCount = 0;
5642
5642
  }
5643
- this.attr = void 0;
5644
- this.tagAnchor = void 0;
5645
- this.tagOrder = void 0;
5646
- this._startDate = void 0;
5647
- this._endDate = void 0;
5648
- this._dateAtEnd = void 0;
5649
- this._cue = void 0;
5650
- this._badValueForSameId = void 0;
5651
- this.tagAnchor = (dateRangeWithSameId == null ? void 0 : dateRangeWithSameId.tagAnchor) || null;
5652
- this.tagOrder = (_dateRangeWithSameId$ = dateRangeWithSameId == null ? void 0 : dateRangeWithSameId.tagOrder) != null ? _dateRangeWithSameId$ : tagCount;
5643
+ this.attr = undefined;
5644
+ this.tagAnchor = undefined;
5645
+ this.tagOrder = undefined;
5646
+ this._startDate = undefined;
5647
+ this._endDate = undefined;
5648
+ this._dateAtEnd = undefined;
5649
+ this._cue = undefined;
5650
+ this._badValueForSameId = undefined;
5651
+ this.tagAnchor = (dateRangeWithSameId == null ? undefined : dateRangeWithSameId.tagAnchor) || null;
5652
+ this.tagOrder = (_dateRangeWithSameId$ = dateRangeWithSameId == null ? undefined : dateRangeWithSameId.tagOrder) != null ? _dateRangeWithSameId$ : tagCount;
5653
5653
  if (dateRangeWithSameId) {
5654
5654
  var previousAttr = dateRangeWithSameId.attr;
5655
5655
  for (var key in previousAttr) {
@@ -5672,7 +5672,7 @@
5672
5672
  this._startDate = new Date(dateRangeAttr["START-DATE"]);
5673
5673
  }
5674
5674
  if ("END-DATE" in this.attr) {
5675
- var endDate = (dateRangeWithSameId == null ? void 0 : dateRangeWithSameId.endDate) || new Date(this.attr["END-DATE"]);
5675
+ var endDate = (dateRangeWithSameId == null ? undefined : dateRangeWithSameId.endDate) || new Date(this.attr["END-DATE"]);
5676
5676
  if (isFiniteNumber(endDate.getTime())) {
5677
5677
  this._endDate = endDate;
5678
5678
  }
@@ -5778,21 +5778,21 @@
5778
5778
  function LevelDetails(baseUrl) {
5779
5779
  this.PTSKnown = false;
5780
5780
  this.alignedSliding = false;
5781
- this.averagetargetduration = void 0;
5781
+ this.averagetargetduration = undefined;
5782
5782
  this.endCC = 0;
5783
5783
  this.endSN = 0;
5784
- this.fragments = void 0;
5785
- this.fragmentHint = void 0;
5784
+ this.fragments = undefined;
5785
+ this.fragmentHint = undefined;
5786
5786
  this.partList = null;
5787
- this.dateRanges = void 0;
5787
+ this.dateRanges = undefined;
5788
5788
  this.dateRangeTagCount = 0;
5789
5789
  this.live = true;
5790
5790
  this.requestScheduled = -1;
5791
5791
  this.ageHeader = 0;
5792
- this.advancedDateTime = void 0;
5792
+ this.advancedDateTime = undefined;
5793
5793
  this.updated = true;
5794
5794
  this.advanced = true;
5795
- this.availabilityDelay = void 0;
5795
+ this.availabilityDelay = undefined;
5796
5796
  // Manifest reload synchronization
5797
5797
  this.misses = 0;
5798
5798
  this.startCC = 0;
@@ -5801,30 +5801,30 @@
5801
5801
  this.targetduration = 0;
5802
5802
  this.totalduration = 0;
5803
5803
  this.type = null;
5804
- this.url = void 0;
5804
+ this.url = undefined;
5805
5805
  this.m3u8 = '';
5806
5806
  this.version = null;
5807
5807
  this.canBlockReload = false;
5808
5808
  this.canSkipUntil = 0;
5809
5809
  this.canSkipDateRanges = false;
5810
5810
  this.skippedSegments = 0;
5811
- this.recentlyRemovedDateranges = void 0;
5811
+ this.recentlyRemovedDateranges = undefined;
5812
5812
  this.partHoldBack = 0;
5813
5813
  this.holdBack = 0;
5814
5814
  this.partTarget = 0;
5815
- this.preloadHint = void 0;
5816
- this.renditionReports = void 0;
5815
+ this.preloadHint = undefined;
5816
+ this.renditionReports = undefined;
5817
5817
  this.tuneInGoal = 0;
5818
- this.deltaUpdateFailed = void 0;
5818
+ this.deltaUpdateFailed = undefined;
5819
5819
  this.driftStartTime = 0;
5820
5820
  this.driftEndTime = 0;
5821
5821
  this.driftStart = 0;
5822
5822
  this.driftEnd = 0;
5823
- this.encryptedFragments = void 0;
5823
+ this.encryptedFragments = undefined;
5824
5824
  this.playlistParsingError = null;
5825
5825
  this.variableList = null;
5826
5826
  this.hasVariableRefs = false;
5827
- this.appliedTimelineOffset = void 0;
5827
+ this.appliedTimelineOffset = undefined;
5828
5828
  this.fragments = [];
5829
5829
  this.encryptedFragments = [];
5830
5830
  this.dateRanges = {};
@@ -5999,7 +5999,7 @@
5999
5999
  * @beta
6000
6000
  */
6001
6001
  function utf8ArrayToStr(array, exitOnNull) {
6002
- if (exitOnNull === void 0) {
6002
+ if (exitOnNull === undefined) {
6003
6003
  exitOnNull = false;
6004
6004
  }
6005
6005
  if (typeof TextDecoder !== 'undefined') {
@@ -6605,8 +6605,8 @@
6605
6605
  continue;
6606
6606
  }
6607
6607
  var trackDefault = track.default;
6608
- var tfhdFlags = readUint32(tfhd, 0) | (trackDefault == null ? void 0 : trackDefault.flags);
6609
- var sampleDuration = trackDefault == null ? void 0 : trackDefault.duration;
6608
+ var tfhdFlags = readUint32(tfhd, 0) | (trackDefault == null ? undefined : trackDefault.flags);
6609
+ var sampleDuration = trackDefault == null ? undefined : trackDefault.duration;
6610
6610
  if (tfhdFlags & 0x000008) {
6611
6611
  // 0x000008 indicates the presence of the default_sample_duration field
6612
6612
  if (tfhdFlags & 0x000002) {
@@ -7136,18 +7136,18 @@
7136
7136
 
7137
7137
  var LevelKey = /*#__PURE__*/function () {
7138
7138
  function LevelKey(method, uri, format, formatversions, iv) {
7139
- if (formatversions === void 0) {
7139
+ if (formatversions === undefined) {
7140
7140
  formatversions = [1];
7141
7141
  }
7142
- if (iv === void 0) {
7142
+ if (iv === undefined) {
7143
7143
  iv = null;
7144
7144
  }
7145
- this.uri = void 0;
7146
- this.method = void 0;
7147
- this.keyFormat = void 0;
7148
- this.keyFormatVersions = void 0;
7149
- this.encrypted = void 0;
7150
- this.isCommonEncryption = void 0;
7145
+ this.uri = undefined;
7146
+ this.method = undefined;
7147
+ this.keyFormat = undefined;
7148
+ this.keyFormatVersions = undefined;
7149
+ this.encrypted = undefined;
7150
+ this.isCommonEncryption = undefined;
7151
7151
  this.iv = null;
7152
7152
  this.key = null;
7153
7153
  this.keyId = null;
@@ -7789,7 +7789,7 @@
7789
7789
  var pdtStart = pdtFragment.programDateTime;
7790
7790
  if (startDateTime >= pdtStart || index === 0) {
7791
7791
  var _programDateTimes;
7792
- var durationBetweenPdt = (((_programDateTimes = programDateTimes[index + 1]) == null ? void 0 : _programDateTimes.start) || endTime) - pdtFragment.start;
7792
+ var durationBetweenPdt = (((_programDateTimes = programDateTimes[index + 1]) == null ? undefined : _programDateTimes.start) || endTime) - pdtFragment.start;
7793
7793
  if (startDateTime <= pdtStart + durationBetweenPdt * 1000) {
7794
7794
  // map to fragment with date-time range
7795
7795
  var startIndex = programDateTimes[index].sn - details.startSN;
@@ -8060,7 +8060,7 @@
8060
8060
  if (currentInitSegment) {
8061
8061
  fragmentsToCheck.forEach(function (frag) {
8062
8062
  var _currentInitSegment;
8063
- if (frag && (!frag.initSegment || frag.initSegment.relurl === ((_currentInitSegment = currentInitSegment) == null ? void 0 : _currentInitSegment.relurl))) {
8063
+ if (frag && (!frag.initSegment || frag.initSegment.relurl === ((_currentInitSegment = currentInitSegment) == null ? undefined : _currentInitSegment.relurl))) {
8064
8064
  frag.initSegment = currentInitSegment;
8065
8065
  }
8066
8066
  });
@@ -8205,7 +8205,7 @@
8205
8205
  }
8206
8206
  }
8207
8207
  function adjustSliding(oldDetails, newDetails, matchingStableVariantOrRendition) {
8208
- if (matchingStableVariantOrRendition === void 0) {
8208
+ if (matchingStableVariantOrRendition === undefined) {
8209
8209
  matchingStableVariantOrRendition = true;
8210
8210
  }
8211
8211
  var delta = newDetails.startSN + newDetails.skippedSegments - oldDetails.startSN;
@@ -8240,7 +8240,7 @@
8240
8240
  }
8241
8241
  }
8242
8242
  function computeReloadInterval(newDetails, distanceToLiveEdgeMs) {
8243
- if (distanceToLiveEdgeMs === void 0) {
8243
+ if (distanceToLiveEdgeMs === undefined) {
8244
8244
  distanceToLiveEdgeMs = Infinity;
8245
8245
  }
8246
8246
  var reloadInterval = 1000 * newDetails.targetduration;
@@ -8300,7 +8300,7 @@
8300
8300
  function reassignFragmentLevelIndexes(levels) {
8301
8301
  levels.forEach(function (level, index) {
8302
8302
  var _level$details;
8303
- var fragments = (_level$details = level.details) == null ? void 0 : _level$details.fragments;
8303
+ var fragments = (_level$details = level.details) == null ? undefined : _level$details.fragments;
8304
8304
  if (fragments) {
8305
8305
  fragments.forEach(function (fragment) {
8306
8306
  fragment.level = index;
@@ -8317,7 +8317,7 @@
8317
8317
  function ContentSteeringController(hls) {
8318
8318
  var _this;
8319
8319
  _this = _Logger.call(this, 'content-steering', hls.logger) || this;
8320
- _this.hls = void 0;
8320
+ _this.hls = undefined;
8321
8321
  _this.loader = null;
8322
8322
  _this.uri = null;
8323
8323
  _this.pathwayId = '.';
@@ -8431,7 +8431,7 @@
8431
8431
  };
8432
8432
  _proto.onError = function onError(event, data) {
8433
8433
  var errorAction = data.errorAction;
8434
- if ((errorAction == null ? void 0 : errorAction.action) === NetworkErrorAction.SendAlternateToPenaltyBox && errorAction.flags === ErrorActionFlags.MoveAllAlternatesMatchingHost) {
8434
+ if ((errorAction == null ? undefined : errorAction.action) === NetworkErrorAction.SendAlternateToPenaltyBox && errorAction.flags === ErrorActionFlags.MoveAllAlternatesMatchingHost) {
8435
8435
  var levels = this.levels;
8436
8436
  var pathwayPriority = this._pathwayPriority;
8437
8437
  var errorPathway = this.pathwayId;
@@ -8632,7 +8632,7 @@
8632
8632
  onSuccess: function onSuccess(response, stats, context, networkDetails) {
8633
8633
  _this3.log("Loaded steering manifest: \"" + url + "\"");
8634
8634
  var steeringData = response.data;
8635
- if ((steeringData == null ? void 0 : steeringData.VERSION) !== 1) {
8635
+ if ((steeringData == null ? undefined : steeringData.VERSION) !== 1) {
8636
8636
  _this3.log("Steering VERSION " + steeringData.VERSION + " not supported!");
8637
8637
  return;
8638
8638
  }
@@ -8674,7 +8674,7 @@
8674
8674
  var ttl = _this3.timeToLoad * 1000;
8675
8675
  if (error.code === 429) {
8676
8676
  var loader = _this3.loader;
8677
- if (typeof (loader == null ? void 0 : loader.getResponseHeader) === 'function') {
8677
+ if (typeof (loader == null ? undefined : loader.getResponseHeader) === 'function') {
8678
8678
  var retryAfter = loader.getResponseHeader('Retry-After');
8679
8679
  if (retryAfter) {
8680
8680
  ttl = parseFloat(retryAfter) * 1000;
@@ -8695,13 +8695,13 @@
8695
8695
  };
8696
8696
  _proto.scheduleRefresh = function scheduleRefresh(uri, ttlMs) {
8697
8697
  var _this4 = this;
8698
- if (ttlMs === void 0) {
8698
+ if (ttlMs === undefined) {
8699
8699
  ttlMs = this.timeToLoad * 1000;
8700
8700
  }
8701
8701
  this.clearTimeout();
8702
8702
  this.reloadTimer = self.setTimeout(function () {
8703
8703
  var _this4$hls;
8704
- var media = (_this4$hls = _this4.hls) == null ? void 0 : _this4$hls.media;
8704
+ var media = (_this4$hls = _this4.hls) == null ? undefined : _this4$hls.media;
8705
8705
  if (media && !media.ended) {
8706
8706
  _this4.loadSteeringManifest(uri);
8707
8707
  return;
@@ -8744,7 +8744,7 @@
8744
8744
  perOptionUris = uriReplacement[perOptionKey];
8745
8745
  var perVariantUri;
8746
8746
  if (stableId) {
8747
- perVariantUri = perOptionUris == null ? void 0 : perOptionUris[stableId];
8747
+ perVariantUri = perOptionUris == null ? undefined : perOptionUris[stableId];
8748
8748
  if (perVariantUri) {
8749
8749
  uri = perVariantUri;
8750
8750
  }
@@ -8765,15 +8765,15 @@
8765
8765
 
8766
8766
  var FPSController = /*#__PURE__*/function () {
8767
8767
  function FPSController(hls) {
8768
- this.hls = void 0;
8768
+ this.hls = undefined;
8769
8769
  this.isVideoPlaybackQualityAvailable = false;
8770
- this.timer = void 0;
8770
+ this.timer = undefined;
8771
8771
  this.media = null;
8772
- this.lastTime = void 0;
8772
+ this.lastTime = undefined;
8773
8773
  this.lastDroppedFrames = 0;
8774
8774
  this.lastDecodedFrames = 0;
8775
8775
  // stream controller must be provided as a dependency!
8776
- this.streamController = void 0;
8776
+ this.streamController = undefined;
8777
8777
  this.hls = hls;
8778
8778
  this.registerListeners();
8779
8779
  }
@@ -9345,10 +9345,10 @@
9345
9345
  }
9346
9346
 
9347
9347
  function toUint8(data, offset, length) {
9348
- if (offset === void 0) {
9348
+ if (offset === undefined) {
9349
9349
  offset = 0;
9350
9350
  }
9351
- if (length === void 0) {
9351
+ if (length === undefined) {
9352
9352
  length = Infinity;
9353
9353
  }
9354
9354
  return view(data, offset, length, Uint8Array);
@@ -9600,10 +9600,10 @@
9600
9600
  }({});
9601
9601
 
9602
9602
  function dummyTrack(type, inputTimeScale) {
9603
- if (type === void 0) {
9603
+ if (type === undefined) {
9604
9604
  type = '';
9605
9605
  }
9606
- if (inputTimeScale === void 0) {
9606
+ if (inputTimeScale === undefined) {
9607
9607
  inputTimeScale = 90000;
9608
9608
  }
9609
9609
  return {
@@ -9619,8 +9619,8 @@
9619
9619
 
9620
9620
  var BaseAudioDemuxer = /*#__PURE__*/function () {
9621
9621
  function BaseAudioDemuxer() {
9622
- this._audioTrack = void 0;
9623
- this._id3Track = void 0;
9622
+ this._audioTrack = undefined;
9623
+ this._id3Track = undefined;
9624
9624
  this.frameIndex = 0;
9625
9625
  this.cachedData = null;
9626
9626
  this.basePTS = null;
@@ -9912,8 +9912,8 @@
9912
9912
  function AACDemuxer(observer, config) {
9913
9913
  var _this;
9914
9914
  _this = _BaseAudioDemuxer.call(this) || this;
9915
- _this.observer = void 0;
9916
- _this.config = void 0;
9915
+ _this.observer = undefined;
9916
+ _this.config = undefined;
9917
9917
  _this.observer = observer;
9918
9918
  _this.config = config;
9919
9919
  return _this;
@@ -9949,7 +9949,7 @@
9949
9949
  // Layer bits (position 14 and 15) in header should be always 0 for ADTS
9950
9950
  // More info https://wiki.multimedia.cx/index.php?title=ADTS
9951
9951
  var id3Data = getId3Data(data, 0);
9952
- var offset = (id3Data == null ? void 0 : id3Data.length) || 0;
9952
+ var offset = (id3Data == null ? undefined : id3Data.length) || 0;
9953
9953
  if (probe(data, offset)) {
9954
9954
  return false;
9955
9955
  }
@@ -10028,7 +10028,7 @@
10028
10028
  // Layer bits (position 14 and 15) in header should be always different from 0 (Layer I or Layer II or Layer III)
10029
10029
  // More info http://www.mp3-tech.org/programmer/frame_header.html
10030
10030
  var id3Data = getId3Data(data, 0);
10031
- var offset = (id3Data == null ? void 0 : id3Data.length) || 0;
10031
+ var offset = (id3Data == null ? undefined : id3Data.length) || 0;
10032
10032
 
10033
10033
  // Check for ac-3|ec-3 sync bytes and return false if present
10034
10034
  if (id3Data && data[offset] === 0x0b && data[offset + 1] === 0x77 && getId3Timestamp(id3Data) !== undefined &&
@@ -10058,9 +10058,9 @@
10058
10058
 
10059
10059
  var AESCrypto = /*#__PURE__*/function () {
10060
10060
  function AESCrypto(subtle, iv, aesMode) {
10061
- this.subtle = void 0;
10062
- this.aesIV = void 0;
10063
- this.aesMode = void 0;
10061
+ this.subtle = undefined;
10062
+ this.aesIV = undefined;
10063
+ this.aesMode = undefined;
10064
10064
  this.subtle = subtle;
10065
10065
  this.aesIV = iv;
10066
10066
  this.aesMode = aesMode;
@@ -10107,8 +10107,8 @@
10107
10107
  this.key = new Uint32Array(0);
10108
10108
  this.ksRows = 0;
10109
10109
  this.keySize = 0;
10110
- this.keySchedule = void 0;
10111
- this.invKeySchedule = void 0;
10110
+ this.keySchedule = undefined;
10111
+ this.invKeySchedule = undefined;
10112
10112
  this.initTable();
10113
10113
  }
10114
10114
 
@@ -10325,9 +10325,9 @@
10325
10325
 
10326
10326
  var FastAESKey = /*#__PURE__*/function () {
10327
10327
  function FastAESKey(subtle, key, aesMode) {
10328
- this.subtle = void 0;
10329
- this.key = void 0;
10330
- this.aesMode = void 0;
10328
+ this.subtle = undefined;
10329
+ this.key = undefined;
10330
+ this.aesMode = undefined;
10331
10331
  this.subtle = subtle;
10332
10332
  this.key = key;
10333
10333
  this.aesMode = aesMode;
@@ -10355,11 +10355,11 @@
10355
10355
  var CHUNK_SIZE = 16; // 16 bytes, 128 bits
10356
10356
  var Decrypter = /*#__PURE__*/function () {
10357
10357
  function Decrypter(config, _temp) {
10358
- var _ref = _temp === void 0 ? {} : _temp,
10358
+ var _ref = _temp === undefined ? {} : _temp,
10359
10359
  _ref$removePKCS7Paddi = _ref.removePKCS7Padding,
10360
- removePKCS7Padding = _ref$removePKCS7Paddi === void 0 ? true : _ref$removePKCS7Paddi;
10360
+ removePKCS7Padding = _ref$removePKCS7Paddi === undefined ? true : _ref$removePKCS7Paddi;
10361
10361
  this.logEnabled = true;
10362
- this.removePKCS7Padding = void 0;
10362
+ this.removePKCS7Padding = undefined;
10363
10363
  this.subtle = null;
10364
10364
  this.softwareDecrypter = null;
10365
10365
  this.key = null;
@@ -10367,8 +10367,8 @@
10367
10367
  this.remainderData = null;
10368
10368
  this.currentIV = null;
10369
10369
  this.currentResult = null;
10370
- this.useSoftware = void 0;
10371
- this.enableSoftwareAES = void 0;
10370
+ this.useSoftware = undefined;
10371
+ this.enableSoftwareAES = undefined;
10372
10372
  this.enableSoftwareAES = config.enableSoftwareAES;
10373
10373
  this.removePKCS7Padding = removePKCS7Padding;
10374
10374
  // built in decryptor expects PKCS7 padding
@@ -10538,11 +10538,11 @@
10538
10538
  function MP4Demuxer(observer, config) {
10539
10539
  this.remainderData = null;
10540
10540
  this.timeOffset = 0;
10541
- this.config = void 0;
10542
- this.videoTrack = void 0;
10543
- this.audioTrack = void 0;
10544
- this.id3Track = void 0;
10545
- this.txtTrack = void 0;
10541
+ this.config = undefined;
10542
+ this.videoTrack = undefined;
10543
+ this.audioTrack = undefined;
10544
+ this.id3Track = undefined;
10545
+ this.txtTrack = undefined;
10546
10546
  this.config = config;
10547
10547
  }
10548
10548
  var _proto = MP4Demuxer.prototype;
@@ -10689,8 +10689,8 @@
10689
10689
 
10690
10690
  var SampleAesDecrypter = /*#__PURE__*/function () {
10691
10691
  function SampleAesDecrypter(observer, config, keyData) {
10692
- this.keyData = void 0;
10693
- this.decrypter = void 0;
10692
+ this.keyData = undefined;
10693
+ this.decrypter = undefined;
10694
10694
  this.keyData = keyData;
10695
10695
  this.decrypter = new Decrypter(config, {
10696
10696
  removePKCS7Padding: false
@@ -10956,10 +10956,10 @@
10956
10956
 
10957
10957
  var ExpGolomb = /*#__PURE__*/function () {
10958
10958
  function ExpGolomb(data) {
10959
- this.data = void 0;
10960
- this.bytesAvailable = void 0;
10961
- this.word = void 0;
10962
- this.bitsAvailable = void 0;
10959
+ this.data = undefined;
10960
+ this.bytesAvailable = undefined;
10961
+ this.word = undefined;
10962
+ this.bitsAvailable = undefined;
10963
10963
  this.data = data;
10964
10964
  // the number of bytes left to examine in this.data
10965
10965
  this.bytesAvailable = data.byteLength;
@@ -11193,7 +11193,7 @@
11193
11193
  spsfound = true;
11194
11194
  var sps = unit.data;
11195
11195
  var config = _this.readSPS(sps);
11196
- if (!track.sps || track.width !== config.width || track.height !== config.height || ((_track$pixelRatio = track.pixelRatio) == null ? void 0 : _track$pixelRatio[0]) !== config.pixelRatio[0] || ((_track$pixelRatio2 = track.pixelRatio) == null ? void 0 : _track$pixelRatio2[1]) !== config.pixelRatio[1]) {
11196
+ if (!track.sps || track.width !== config.width || track.height !== config.height || ((_track$pixelRatio = track.pixelRatio) == null ? undefined : _track$pixelRatio[0]) !== config.pixelRatio[0] || ((_track$pixelRatio2 = track.pixelRatio) == null ? undefined : _track$pixelRatio2[1]) !== config.pixelRatio[1]) {
11197
11197
  track.width = config.width;
11198
11198
  track.height = config.height;
11199
11199
  track.pixelRatio = config.pixelRatio;
@@ -11440,22 +11440,22 @@
11440
11440
  var PACKET_LENGTH = 188;
11441
11441
  var TSDemuxer = /*#__PURE__*/function () {
11442
11442
  function TSDemuxer(observer, config, typeSupported, logger) {
11443
- this.logger = void 0;
11444
- this.observer = void 0;
11445
- this.config = void 0;
11446
- this.typeSupported = void 0;
11443
+ this.logger = undefined;
11444
+ this.observer = undefined;
11445
+ this.config = undefined;
11446
+ this.typeSupported = undefined;
11447
11447
  this.sampleAes = null;
11448
11448
  this.pmtParsed = false;
11449
- this.audioCodec = void 0;
11450
- this.videoCodec = void 0;
11449
+ this.audioCodec = undefined;
11450
+ this.videoCodec = undefined;
11451
11451
  this._pmtId = -1;
11452
- this._videoTrack = void 0;
11453
- this._audioTrack = void 0;
11454
- this._id3Track = void 0;
11455
- this._txtTrack = void 0;
11452
+ this._videoTrack = undefined;
11453
+ this._audioTrack = undefined;
11454
+ this._id3Track = undefined;
11455
+ this._txtTrack = undefined;
11456
11456
  this.aacOverFlow = null;
11457
11457
  this.remainderData = null;
11458
- this.videoParser = void 0;
11458
+ this.videoParser = undefined;
11459
11459
  this.observer = observer;
11460
11460
  this.config = config;
11461
11461
  this.typeSupported = typeSupported;
@@ -11563,10 +11563,10 @@
11563
11563
  this.remainderData = null;
11564
11564
  };
11565
11565
  _proto.demux = function demux(data, timeOffset, isSampleAes, flush) {
11566
- if (isSampleAes === void 0) {
11566
+ if (isSampleAes === undefined) {
11567
11567
  isSampleAes = false;
11568
11568
  }
11569
- if (flush === void 0) {
11569
+ if (flush === undefined) {
11570
11570
  flush = false;
11571
11571
  }
11572
11572
  if (!isSampleAes) {
@@ -11616,7 +11616,7 @@
11616
11616
  var atf = (data[start + 3] & 0x30) >> 4;
11617
11617
 
11618
11618
  // if an adaption field is present, its length is specified by the fifth byte of the TS packet header.
11619
- var offset = void 0;
11619
+ var offset = undefined;
11620
11620
  if (atf > 1) {
11621
11621
  offset = start + 5 + data[start + 4];
11622
11622
  // continue if there is only adaptation field
@@ -12866,21 +12866,21 @@
12866
12866
  };
12867
12867
  return MP4;
12868
12868
  }();
12869
- MP4.types = void 0;
12870
- MP4.HDLR_TYPES = void 0;
12871
- MP4.STTS = void 0;
12872
- MP4.STSC = void 0;
12873
- MP4.STCO = void 0;
12874
- MP4.STSZ = void 0;
12875
- MP4.VMHD = void 0;
12876
- MP4.SMHD = void 0;
12877
- MP4.STSD = void 0;
12878
- MP4.FTYP = void 0;
12879
- MP4.DINF = void 0;
12869
+ MP4.types = undefined;
12870
+ MP4.HDLR_TYPES = undefined;
12871
+ MP4.STTS = undefined;
12872
+ MP4.STSC = undefined;
12873
+ MP4.STCO = undefined;
12874
+ MP4.STSZ = undefined;
12875
+ MP4.VMHD = undefined;
12876
+ MP4.SMHD = undefined;
12877
+ MP4.STSD = undefined;
12878
+ MP4.FTYP = undefined;
12879
+ MP4.DINF = undefined;
12880
12880
 
12881
12881
  var MPEG_TS_CLOCK_FREQ_HZ = 90000;
12882
12882
  function toTimescaleFromBase(baseTime, destScale, srcBase, round) {
12883
- if (round === void 0) {
12883
+ if (round === undefined) {
12884
12884
  round = false;
12885
12885
  }
12886
12886
  var result = baseTime * destScale * srcBase; // equivalent to `(value * scale) / (1 / base)`
@@ -12913,10 +12913,10 @@
12913
12913
  }
12914
12914
  var MP4Remuxer = /*#__PURE__*/function () {
12915
12915
  function MP4Remuxer(observer, config, typeSupported, logger) {
12916
- this.logger = void 0;
12917
- this.observer = void 0;
12918
- this.config = void 0;
12919
- this.typeSupported = void 0;
12916
+ this.logger = undefined;
12917
+ this.observer = undefined;
12918
+ this.config = undefined;
12919
+ this.typeSupported = undefined;
12920
12920
  this.ISGenerated = false;
12921
12921
  this._initPTS = null;
12922
12922
  this._initDTS = null;
@@ -12925,7 +12925,7 @@
12925
12925
  this.videoSampleDuration = null;
12926
12926
  this.isAudioContiguous = false;
12927
12927
  this.isVideoContiguous = false;
12928
- this.videoTrackConfig = void 0;
12928
+ this.videoTrackConfig = undefined;
12929
12929
  this.observer = observer;
12930
12930
  this.config = config;
12931
12931
  this.typeSupported = typeSupported;
@@ -13008,7 +13008,7 @@
13008
13008
  if (this.ISGenerated) {
13009
13009
  var _videoTrack$pixelRati, _config$pixelRatio, _videoTrack$pixelRati2, _config$pixelRatio2;
13010
13010
  var config = this.videoTrackConfig;
13011
- if (config && (videoTrack.width !== config.width || videoTrack.height !== config.height || ((_videoTrack$pixelRati = videoTrack.pixelRatio) == null ? void 0 : _videoTrack$pixelRati[0]) !== ((_config$pixelRatio = config.pixelRatio) == null ? void 0 : _config$pixelRatio[0]) || ((_videoTrack$pixelRati2 = videoTrack.pixelRatio) == null ? void 0 : _videoTrack$pixelRati2[1]) !== ((_config$pixelRatio2 = config.pixelRatio) == null ? void 0 : _config$pixelRatio2[1])) || !config && enoughVideoSamples || this.nextAudioPts === null && enoughAudioSamples) {
13011
+ if (config && (videoTrack.width !== config.width || videoTrack.height !== config.height || ((_videoTrack$pixelRati = videoTrack.pixelRatio) == null ? undefined : _videoTrack$pixelRati[0]) !== ((_config$pixelRatio = config.pixelRatio) == null ? undefined : _config$pixelRatio[0]) || ((_videoTrack$pixelRati2 = videoTrack.pixelRatio) == null ? undefined : _videoTrack$pixelRati2[1]) !== ((_config$pixelRatio2 = config.pixelRatio) == null ? undefined : _config$pixelRatio2[1])) || !config && enoughVideoSamples || this.nextAudioPts === null && enoughAudioSamples) {
13012
13012
  this.resetInitSegment();
13013
13013
  }
13014
13014
  }
@@ -13372,7 +13372,7 @@
13372
13372
  }
13373
13373
 
13374
13374
  // expected sample duration is the Decoding Timestamp diff of consecutive samples
13375
- var ptsDelta = void 0;
13375
+ var ptsDelta = undefined;
13376
13376
  if (_i3 < nbSamples - 1) {
13377
13377
  mp4SampleDuration = inputSamples[_i3 + 1].dts - VideoSample.dts;
13378
13378
  ptsDelta = inputSamples[_i3 + 1].pts - VideoSample.pts;
@@ -13763,13 +13763,13 @@
13763
13763
 
13764
13764
  var PassThroughRemuxer = /*#__PURE__*/function () {
13765
13765
  function PassThroughRemuxer(observer, config, typeSupported, logger) {
13766
- this.logger = void 0;
13766
+ this.logger = undefined;
13767
13767
  this.emitInitSegment = false;
13768
- this.audioCodec = void 0;
13769
- this.videoCodec = void 0;
13770
- this.initData = void 0;
13768
+ this.audioCodec = undefined;
13769
+ this.videoCodec = undefined;
13770
+ this.initData = undefined;
13771
13771
  this.initPTS = null;
13772
- this.initTracks = void 0;
13772
+ this.initTracks = undefined;
13773
13773
  this.lastEndTime = null;
13774
13774
  this.logger = logger;
13775
13775
  }
@@ -13939,7 +13939,7 @@
13939
13939
  return Math.abs(startTime - timeOffset) > minDuration;
13940
13940
  }
13941
13941
  function getParsedTrackCodec(track, type) {
13942
- var parsedCodec = track == null ? void 0 : track.codec;
13942
+ var parsedCodec = track == null ? undefined : track.codec;
13943
13943
  if (parsedCodec && parsedCodec.length > 4) {
13944
13944
  return parsedCodec;
13945
13945
  }
@@ -13984,18 +13984,18 @@
13984
13984
  var Transmuxer = /*#__PURE__*/function () {
13985
13985
  function Transmuxer(observer, typeSupported, config, vendor, id, logger) {
13986
13986
  this.asyncResult = false;
13987
- this.logger = void 0;
13988
- this.observer = void 0;
13989
- this.typeSupported = void 0;
13990
- this.config = void 0;
13991
- this.id = void 0;
13992
- this.demuxer = void 0;
13993
- this.remuxer = void 0;
13994
- this.decrypter = void 0;
13995
- this.probe = void 0;
13987
+ this.logger = undefined;
13988
+ this.observer = undefined;
13989
+ this.typeSupported = undefined;
13990
+ this.config = undefined;
13991
+ this.id = undefined;
13992
+ this.demuxer = undefined;
13993
+ this.remuxer = undefined;
13994
+ this.decrypter = undefined;
13995
+ this.probe = undefined;
13996
13996
  this.decryptionPromise = null;
13997
- this.transmuxConfig = void 0;
13998
- this.currentTransmuxState = void 0;
13997
+ this.transmuxConfig = undefined;
13998
+ this.currentTransmuxState = undefined;
13999
13999
  this.observer = observer;
14000
14000
  this.typeSupported = typeSupported;
14001
14001
  this.config = config;
@@ -14283,7 +14283,7 @@
14283
14283
  }();
14284
14284
  function getEncryptionType(data, decryptData) {
14285
14285
  var encryptionType = null;
14286
- if (data.byteLength > 0 && (decryptData == null ? void 0 : decryptData.key) != null && decryptData.iv !== null && decryptData.method != null) {
14286
+ if (data.byteLength > 0 && (decryptData == null ? undefined : decryptData.key) != null && decryptData.iv !== null && decryptData.method != null) {
14287
14287
  encryptionType = decryptData;
14288
14288
  }
14289
14289
  return encryptionType;
@@ -14298,11 +14298,11 @@
14298
14298
  return 'then' in p && p.then instanceof Function;
14299
14299
  }
14300
14300
  var TransmuxConfig = function TransmuxConfig(audioCodec, videoCodec, initSegmentData, duration, defaultInitPts) {
14301
- this.audioCodec = void 0;
14302
- this.videoCodec = void 0;
14303
- this.initSegmentData = void 0;
14304
- this.duration = void 0;
14305
- this.defaultInitPts = void 0;
14301
+ this.audioCodec = undefined;
14302
+ this.videoCodec = undefined;
14303
+ this.initSegmentData = undefined;
14304
+ this.duration = undefined;
14305
+ this.defaultInitPts = undefined;
14306
14306
  this.audioCodec = audioCodec;
14307
14307
  this.videoCodec = videoCodec;
14308
14308
  this.initSegmentData = initSegmentData;
@@ -14310,12 +14310,12 @@
14310
14310
  this.defaultInitPts = defaultInitPts || null;
14311
14311
  };
14312
14312
  var TransmuxState = function TransmuxState(discontinuity, contiguous, accurateTimeOffset, trackSwitch, timeOffset, initSegmentChange) {
14313
- this.discontinuity = void 0;
14314
- this.contiguous = void 0;
14315
- this.accurateTimeOffset = void 0;
14316
- this.trackSwitch = void 0;
14317
- this.timeOffset = void 0;
14318
- this.initSegmentChange = void 0;
14313
+ this.discontinuity = undefined;
14314
+ this.contiguous = undefined;
14315
+ this.accurateTimeOffset = undefined;
14316
+ this.trackSwitch = undefined;
14317
+ this.timeOffset = undefined;
14318
+ this.initSegmentChange = undefined;
14319
14319
  this.discontinuity = discontinuity;
14320
14320
  this.contiguous = contiguous;
14321
14321
  this.accurateTimeOffset = accurateTimeOffset;
@@ -14340,15 +14340,15 @@
14340
14340
  var BYTERANGE = /(\d+)-(\d+)\/(\d+)/;
14341
14341
  var FetchLoader = /*#__PURE__*/function () {
14342
14342
  function FetchLoader(config) {
14343
- this.fetchSetup = void 0;
14344
- this.requestTimeout = void 0;
14343
+ this.fetchSetup = undefined;
14344
+ this.requestTimeout = undefined;
14345
14345
  this.request = null;
14346
14346
  this.response = null;
14347
- this.controller = void 0;
14347
+ this.controller = undefined;
14348
14348
  this.context = null;
14349
14349
  this.config = null;
14350
14350
  this.callbacks = null;
14351
- this.stats = void 0;
14351
+ this.stats = undefined;
14352
14352
  this.loader = null;
14353
14353
  this.fetchSetup = config.fetchSetup || getRequest;
14354
14354
  this.controller = new self.AbortController();
@@ -14420,7 +14420,7 @@
14420
14420
  }
14421
14421
  stats.loading.first = first;
14422
14422
  stats.total = getContentLength(response.headers) || stats.total;
14423
- var onProgress = (_this$callbacks2 = _this.callbacks) == null ? void 0 : _this$callbacks2.onProgress;
14423
+ var onProgress = (_this$callbacks2 = _this.callbacks) == null ? undefined : _this$callbacks2.onProgress;
14424
14424
  if (onProgress && isFiniteNumber(config.highWaterMark)) {
14425
14425
  return _this.loadProgressively(response, stats, context, config.highWaterMark, onProgress);
14426
14426
  }
@@ -14448,11 +14448,11 @@
14448
14448
  data: responseData,
14449
14449
  code: response.status
14450
14450
  };
14451
- var onProgress = (_this$callbacks3 = _this.callbacks) == null ? void 0 : _this$callbacks3.onProgress;
14451
+ var onProgress = (_this$callbacks3 = _this.callbacks) == null ? undefined : _this$callbacks3.onProgress;
14452
14452
  if (onProgress && !isFiniteNumber(config.highWaterMark)) {
14453
14453
  onProgress(stats, context, responseData, response);
14454
14454
  }
14455
- (_this$callbacks4 = _this.callbacks) == null ? void 0 : _this$callbacks4.onSuccess(loaderResponse, stats, context, response);
14455
+ (_this$callbacks4 = _this.callbacks) == null ? undefined : _this$callbacks4.onSuccess(loaderResponse, stats, context, response);
14456
14456
  }).catch(function (error) {
14457
14457
  var _this$callbacks5;
14458
14458
  self.clearTimeout(_this.requestTimeout);
@@ -14463,7 +14463,7 @@
14463
14463
  // when destroying, 'error' itself can be undefined
14464
14464
  var code = !error ? 0 : error.code || 0;
14465
14465
  var text = !error ? null : error.message;
14466
- (_this$callbacks5 = _this.callbacks) == null ? void 0 : _this$callbacks5.onError({
14466
+ (_this$callbacks5 = _this.callbacks) == null ? undefined : _this$callbacks5.onError({
14467
14467
  code: code,
14468
14468
  text: text
14469
14469
  }, context, error ? error.details : null, stats);
@@ -14481,7 +14481,7 @@
14481
14481
  return this.response ? this.response.headers.get(name) : null;
14482
14482
  };
14483
14483
  _proto.loadProgressively = function loadProgressively(response, stats, context, highWaterMark, onProgress) {
14484
- if (highWaterMark === void 0) {
14484
+ if (highWaterMark === undefined) {
14485
14485
  highWaterMark = 0;
14486
14486
  }
14487
14487
  var chunkCache = new ChunkCache();
@@ -14559,8 +14559,8 @@
14559
14559
  function FetchError(message, code, details) {
14560
14560
  var _this2;
14561
14561
  _this2 = _Error.call(this, message) || this;
14562
- _this2.code = void 0;
14563
- _this2.details = void 0;
14562
+ _this2.code = undefined;
14563
+ _this2.details = undefined;
14564
14564
  _this2.code = code;
14565
14565
  _this2.details = details;
14566
14566
  return _this2;
@@ -14572,15 +14572,15 @@
14572
14572
  var AGE_HEADER_LINE_REGEX = /^age:\s*[\d.]+\s*$/im;
14573
14573
  var XhrLoader = /*#__PURE__*/function () {
14574
14574
  function XhrLoader(config) {
14575
- this.xhrSetup = void 0;
14576
- this.requestTimeout = void 0;
14577
- this.retryTimeout = void 0;
14578
- this.retryDelay = void 0;
14575
+ this.xhrSetup = undefined;
14576
+ this.requestTimeout = undefined;
14577
+ this.retryTimeout = undefined;
14578
+ this.retryDelay = undefined;
14579
14579
  this.config = null;
14580
14580
  this.callbacks = null;
14581
14581
  this.context = null;
14582
14582
  this.loader = null;
14583
- this.stats = void 0;
14583
+ this.stats = undefined;
14584
14584
  this.xhrSetup = config ? config.xhrSetup || null : null;
14585
14585
  this.stats = new LoadStats();
14586
14586
  this.retryDelay = 0;
@@ -14651,7 +14651,7 @@
14651
14651
  }).catch(function (error) {
14652
14652
  var _this$callbacks2;
14653
14653
  // IE11 throws an exception on xhr.open if attempting to access an HTTP resource over HTTPS
14654
- (_this$callbacks2 = _this.callbacks) == null ? void 0 : _this$callbacks2.onError({
14654
+ (_this$callbacks2 = _this.callbacks) == null ? undefined : _this$callbacks2.onError({
14655
14655
  code: xhr.status,
14656
14656
  text: error.message
14657
14657
  }, context, xhr, stats);
@@ -14727,7 +14727,7 @@
14727
14727
  var len = xhr.responseType === 'arraybuffer' ? data.byteLength : data.length;
14728
14728
  stats.loaded = stats.total = len;
14729
14729
  stats.bwEstimate = stats.total * 8000 / (stats.loading.end - stats.loading.first);
14730
- var onProgress = (_this$callbacks3 = this.callbacks) == null ? void 0 : _this$callbacks3.onProgress;
14730
+ var onProgress = (_this$callbacks3 = this.callbacks) == null ? undefined : _this$callbacks3.onProgress;
14731
14731
  if (onProgress) {
14732
14732
  onProgress(stats, context, data, xhr);
14733
14733
  }
@@ -14736,7 +14736,7 @@
14736
14736
  data: data,
14737
14737
  code: _status
14738
14738
  };
14739
- (_this$callbacks4 = this.callbacks) == null ? void 0 : _this$callbacks4.onSuccess(_response, stats, context, xhr);
14739
+ (_this$callbacks4 = this.callbacks) == null ? undefined : _this$callbacks4.onSuccess(_response, stats, context, xhr);
14740
14740
  return;
14741
14741
  }
14742
14742
  }
@@ -14755,7 +14755,7 @@
14755
14755
  } else {
14756
14756
  var _this$callbacks5;
14757
14757
  logger.error(_status + " while loading " + context.url);
14758
- (_this$callbacks5 = this.callbacks) == null ? void 0 : _this$callbacks5.onError({
14758
+ (_this$callbacks5 = this.callbacks) == null ? undefined : _this$callbacks5.onError({
14759
14759
  code: _status,
14760
14760
  text: xhr.statusText
14761
14761
  }, context, xhr, stats);
@@ -14771,7 +14771,7 @@
14771
14771
  this.retry(retryConfig);
14772
14772
  } else {
14773
14773
  var _this$context;
14774
- logger.warn("timeout while loading " + ((_this$context = this.context) == null ? void 0 : _this$context.url));
14774
+ logger.warn("timeout while loading " + ((_this$context = this.context) == null ? undefined : _this$context.url));
14775
14775
  var callbacks = this.callbacks;
14776
14776
  if (callbacks) {
14777
14777
  this.abortInternal();
@@ -14784,7 +14784,7 @@
14784
14784
  stats = this.stats;
14785
14785
  this.retryDelay = getRetryDelay(retryConfig, stats.retry);
14786
14786
  stats.retry++;
14787
- logger.warn((status ? 'HTTP Status ' + status : 'Timeout') + " while loading " + (context == null ? void 0 : context.url) + ", retrying " + stats.retry + "/" + retryConfig.maxNumRetry + " in " + this.retryDelay + "ms");
14787
+ logger.warn((status ? 'HTTP Status ' + status : 'Timeout') + " while loading " + (context == null ? undefined : context.url) + ", retrying " + stats.retry + "/" + retryConfig.maxNumRetry + " in " + this.retryDelay + "ms");
14788
14788
  // abort and reset internal state
14789
14789
  this.abortInternal();
14790
14790
  this.loader = null;
@@ -15226,7 +15226,7 @@
15226
15226
  this.fragments = Object.create(null);
15227
15227
  this.timeRanges = Object.create(null);
15228
15228
  this.bufferPadding = 0.2;
15229
- this.hls = void 0;
15229
+ this.hls = undefined;
15230
15230
  this.hasGaps = false;
15231
15231
  this.hls = hls;
15232
15232
  this._registerListeners();
@@ -15290,7 +15290,7 @@
15290
15290
  var keys = Object.keys(fragments);
15291
15291
  for (var i = keys.length; i--;) {
15292
15292
  var fragmentEntity = fragments[keys[i]];
15293
- if ((fragmentEntity == null ? void 0 : fragmentEntity.body.type) === levelType && (!buffered || fragmentEntity.buffered)) {
15293
+ if ((fragmentEntity == null ? undefined : fragmentEntity.body.type) === levelType && (!buffered || fragmentEntity.buffered)) {
15294
15294
  var frag = fragmentEntity.body;
15295
15295
  if (frag.start <= position && position <= frag.end) {
15296
15296
  return frag;
@@ -15312,7 +15312,7 @@
15312
15312
  }
15313
15313
  // Check if any flagged fragments have been unloaded
15314
15314
  // excluding anything newer than appendedPartSn
15315
- var appendedPartSn = (appendedPart == null ? void 0 : appendedPart.fragment.sn) || -1;
15315
+ var appendedPartSn = (appendedPart == null ? undefined : appendedPart.fragment.sn) || -1;
15316
15316
  Object.keys(this.fragments).forEach(function (key) {
15317
15317
  var fragmentEntity = _this.fragments[key];
15318
15318
  if (!fragmentEntity) {
@@ -15579,7 +15579,7 @@
15579
15579
  }
15580
15580
  for (var i = keys.length; i--;) {
15581
15581
  var fragmentEntity = fragments[keys[i]];
15582
- if ((fragmentEntity == null ? void 0 : fragmentEntity.body.type) === type) {
15582
+ if ((fragmentEntity == null ? undefined : fragmentEntity.body.type) === type) {
15583
15583
  return true;
15584
15584
  }
15585
15585
  }
@@ -15630,7 +15630,7 @@
15630
15630
  this.endListFragments = Object.create(null);
15631
15631
  this.activePartLists = Object.create(null);
15632
15632
  this.hasGaps = false;
15633
- var partlist = (_this$hls = this.hls) == null ? void 0 : (_this$hls$latestLevel = _this$hls.latestLevelDetails) == null ? void 0 : _this$hls$latestLevel.partList;
15633
+ var partlist = (_this$hls = this.hls) == null ? undefined : (_this$hls$latestLevel = _this$hls.latestLevelDetails) == null ? undefined : _this$hls$latestLevel.partList;
15634
15634
  if (partlist) {
15635
15635
  partlist.forEach(function (part) {
15636
15636
  return part.clearElementaryStreamInfo();
@@ -15641,7 +15641,7 @@
15641
15641
  }();
15642
15642
  function isPartial(fragmentEntity) {
15643
15643
  var _fragmentEntity$range, _fragmentEntity$range2, _fragmentEntity$range3;
15644
- return fragmentEntity.buffered && (fragmentEntity.body.gap || ((_fragmentEntity$range = fragmentEntity.range.video) == null ? void 0 : _fragmentEntity$range.partial) || ((_fragmentEntity$range2 = fragmentEntity.range.audio) == null ? void 0 : _fragmentEntity$range2.partial) || ((_fragmentEntity$range3 = fragmentEntity.range.audiovideo) == null ? void 0 : _fragmentEntity$range3.partial));
15644
+ return fragmentEntity.buffered && (fragmentEntity.body.gap || ((_fragmentEntity$range = fragmentEntity.range.video) == null ? undefined : _fragmentEntity$range.partial) || ((_fragmentEntity$range2 = fragmentEntity.range.audio) == null ? undefined : _fragmentEntity$range2.partial) || ((_fragmentEntity$range3 = fragmentEntity.range.audiovideo) == null ? undefined : _fragmentEntity$range3.partial));
15645
15645
  }
15646
15646
  function getFragmentKey(fragment) {
15647
15647
  return fragment.type + "_" + fragment.level + "_" + fragment.sn;
@@ -15779,7 +15779,7 @@
15779
15779
  var ID3TrackController = /*#__PURE__*/function () {
15780
15780
  function ID3TrackController(hls) {
15781
15781
  var _this = this;
15782
- this.hls = void 0;
15782
+ this.hls = undefined;
15783
15783
  this.id3Track = null;
15784
15784
  this.media = null;
15785
15785
  this.dateRangeCuesAppended = {};
@@ -15828,7 +15828,7 @@
15828
15828
  _proto.onMediaAttaching = function onMediaAttaching(event, data) {
15829
15829
  var _data$overrides;
15830
15830
  this.media = data.media;
15831
- if (((_data$overrides = data.overrides) == null ? void 0 : _data$overrides.cueRemoval) === false) {
15831
+ if (((_data$overrides = data.overrides) == null ? undefined : _data$overrides.cueRemoval) === false) {
15832
15832
  this.removeCues = false;
15833
15833
  }
15834
15834
  };
@@ -15928,7 +15928,7 @@
15928
15928
  };
15929
15929
  _proto.updateId3CueEnds = function updateId3CueEnds(startTime, type) {
15930
15930
  var _this$id3Track;
15931
- var cues = (_this$id3Track = this.id3Track) == null ? void 0 : _this$id3Track.cues;
15931
+ var cues = (_this$id3Track = this.id3Track) == null ? undefined : _this$id3Track.cues;
15932
15932
  if (cues) {
15933
15933
  for (var i = cues.length; i--;) {
15934
15934
  var cue = cues[i];
@@ -16016,7 +16016,7 @@
16016
16016
  }
16017
16017
  // Exit if the playlist does not have Date Ranges or does not have Program Date Time
16018
16018
  var lastFragment = details.fragments[details.fragments.length - 1];
16019
- if (ids.length === 0 || !isFiniteNumber(lastFragment == null ? void 0 : lastFragment.programDateTime)) {
16019
+ if (ids.length === 0 || !isFiniteNumber(lastFragment == null ? undefined : lastFragment.programDateTime)) {
16020
16020
  return;
16021
16021
  }
16022
16022
  if (!this.id3Track) {
@@ -16030,8 +16030,8 @@
16030
16030
 
16031
16031
  // Process DateRanges to determine end-time (known DURATION, END-DATE, or END-ON-NEXT)
16032
16032
  var appendedDateRangeCues = dateRangeCuesAppended[id];
16033
- var cues = (appendedDateRangeCues == null ? void 0 : appendedDateRangeCues.cues) || {};
16034
- var durationKnown = (appendedDateRangeCues == null ? void 0 : appendedDateRangeCues.durationKnown) || false;
16033
+ var cues = (appendedDateRangeCues == null ? undefined : appendedDateRangeCues.cues) || {};
16034
+ var durationKnown = (appendedDateRangeCues == null ? undefined : appendedDateRangeCues.durationKnown) || false;
16035
16035
  var endTime = MAX_CUE_ENDTIME;
16036
16036
  var duration = dateRange.duration,
16037
16037
  endDate = dateRange.endDate;
@@ -16105,8 +16105,8 @@
16105
16105
  var LatencyController = /*#__PURE__*/function () {
16106
16106
  function LatencyController(hls) {
16107
16107
  var _this = this;
16108
- this.hls = void 0;
16109
- this.config = void 0;
16108
+ this.hls = undefined;
16109
+ this.config = undefined;
16110
16110
  this.media = null;
16111
16111
  this.currentTime = 0;
16112
16112
  this.stallCount = 0;
@@ -16235,7 +16235,7 @@
16235
16235
  if (config.liveMaxLatencyDuration !== undefined) {
16236
16236
  return config.liveMaxLatencyDuration;
16237
16237
  }
16238
- var levelDetails = (_this$hls = this.hls) == null ? void 0 : _this$hls.latestLevelDetails;
16238
+ var levelDetails = (_this$hls = this.hls) == null ? undefined : _this$hls.latestLevelDetails;
16239
16239
  return levelDetails ? config.liveMaxLatencyDurationCount * levelDetails.targetduration : 0;
16240
16240
  }
16241
16241
  }, {
@@ -16320,7 +16320,7 @@
16320
16320
  function BasePlaylistController(hls, logPrefix) {
16321
16321
  var _this;
16322
16322
  _this = _Logger.call(this, logPrefix, hls.logger) || this;
16323
- _this.hls = void 0;
16323
+ _this.hls = undefined;
16324
16324
  _this.canLoad = false;
16325
16325
  _this.timer = -1;
16326
16326
  _this.hls = hls;
@@ -16348,12 +16348,12 @@
16348
16348
  this.clearTimer();
16349
16349
  };
16350
16350
  _proto.switchParams = function switchParams(playlistUri, previous, current) {
16351
- var renditionReports = previous == null ? void 0 : previous.renditionReports;
16351
+ var renditionReports = previous == null ? undefined : previous.renditionReports;
16352
16352
  if (renditionReports) {
16353
16353
  var foundIndex = -1;
16354
16354
  for (var i = 0; i < renditionReports.length; i++) {
16355
16355
  var attr = renditionReports[i];
16356
- var uri = void 0;
16356
+ var uri = undefined;
16357
16357
  try {
16358
16358
  uri = new self.URL(attr.URI, previous.url).href;
16359
16359
  } catch (error) {
@@ -16371,8 +16371,8 @@
16371
16371
  }
16372
16372
  if (foundIndex !== -1) {
16373
16373
  var _attr = renditionReports[foundIndex];
16374
- var msn = parseInt(_attr['LAST-MSN']) || (previous == null ? void 0 : previous.lastPartSn);
16375
- var part = parseInt(_attr['LAST-PART']) || (previous == null ? void 0 : previous.lastPartIndex);
16374
+ var msn = parseInt(_attr['LAST-MSN']) || (previous == null ? undefined : previous.lastPartSn);
16375
+ var part = parseInt(_attr['LAST-PART']) || (previous == null ? undefined : previous.lastPartIndex);
16376
16376
  if (this.hls.config.lowLatencyMode) {
16377
16377
  var currentGoal = Math.min(previous.age - previous.partTarget, previous.targetduration);
16378
16378
  if (part >= 0 && currentGoal > previous.partTarget) {
@@ -16552,7 +16552,7 @@
16552
16552
  var _ref = errorAction || {},
16553
16553
  action = _ref.action,
16554
16554
  _ref$retryCount = _ref.retryCount,
16555
- retryCount = _ref$retryCount === void 0 ? 0 : _ref$retryCount,
16555
+ retryCount = _ref$retryCount === undefined ? 0 : _ref$retryCount,
16556
16556
  retryConfig = _ref.retryConfig;
16557
16557
  var retry = !!errorAction && !!retryConfig && (action === NetworkErrorAction.RetryRequest || !errorAction.resolved && action === NetworkErrorAction.SendAlternateToPenaltyBox);
16558
16558
  if (retry) {
@@ -16589,12 +16589,12 @@
16589
16589
  _this._levels = [];
16590
16590
  _this._firstLevel = -1;
16591
16591
  _this._maxAutoLevel = -1;
16592
- _this._startLevel = void 0;
16592
+ _this._startLevel = undefined;
16593
16593
  _this.currentLevel = null;
16594
16594
  _this.currentLevelIndex = -1;
16595
16595
  _this.manualLevelIndex = -1;
16596
- _this.steering = void 0;
16597
- _this.onParsedComplete = void 0;
16596
+ _this.steering = undefined;
16597
+ _this.onParsedComplete = undefined;
16598
16598
  _this.steering = contentSteeringController;
16599
16599
  _this._registerListeners();
16600
16600
  return _this;
@@ -16664,7 +16664,7 @@
16664
16664
  // Returns empty and set to undefined for 'mp4a.40.34' with fallback to 'audio/mpeg' SourceBuffer
16665
16665
  levelParsed.audioCodec = audioCodec = getCodecCompatibleName(audioCodec, preferManagedMediaSource) || undefined;
16666
16666
  }
16667
- if (((_videoCodec = videoCodec) == null ? void 0 : _videoCodec.indexOf('avc1')) === 0) {
16667
+ if (((_videoCodec = videoCodec) == null ? undefined : _videoCodec.indexOf('avc1')) === 0) {
16668
16668
  videoCodec = levelParsed.videoCodec = convertAVC1ToAVCOTI(videoCodec);
16669
16669
  }
16670
16670
 
@@ -16835,7 +16835,7 @@
16835
16835
  var bandwidthEstimate = this.hls.bandwidthEstimate;
16836
16836
  this.log("manifest loaded, " + levels.length + " level(s) found, first bitrate: " + firstLevelBitrate);
16837
16837
  // Update default bwe to first variant bitrate as long it has not been configured or set
16838
- if (((_this$hls$userConfig = this.hls.userConfig) == null ? void 0 : _this$hls$userConfig.abrEwmaDefaultEstimate) === undefined) {
16838
+ if (((_this$hls$userConfig = this.hls.userConfig) == null ? undefined : _this$hls$userConfig.abrEwmaDefaultEstimate) === undefined) {
16839
16839
  var startingBwEstimate = Math.min(firstLevelBitrate, this.hls.config.abrEwmaDefaultEstimateMax);
16840
16840
  if (startingBwEstimate > bandwidthEstimate && bandwidthEstimate === this.hls.abrEwmaDefaultEstimate) {
16841
16841
  this.hls.bandwidthEstimate = startingBwEstimate;
@@ -16934,8 +16934,8 @@
16934
16934
  var currentLevelIndex = this.currentLevelIndex;
16935
16935
  var pathwayId = currentLevel.attrs['PATHWAY-ID'];
16936
16936
  var details = currentLevel.details;
16937
- var age = details == null ? void 0 : details.age;
16938
- this.log("Loading level index " + currentLevelIndex + ((hlsUrlParameters == null ? void 0 : hlsUrlParameters.msn) !== undefined ? ' at sn ' + hlsUrlParameters.msn + ' part ' + hlsUrlParameters.part : '') + (pathwayId ? ' Pathway ' + pathwayId : '') + (age && details.live ? ' age ' + age.toFixed(1) + (details.type ? ' ' + details.type || '' : '') : '') + " " + url);
16937
+ var age = details == null ? undefined : details.age;
16938
+ this.log("Loading level index " + currentLevelIndex + ((hlsUrlParameters == null ? undefined : hlsUrlParameters.msn) !== undefined ? ' at sn ' + hlsUrlParameters.msn + ' part ' + hlsUrlParameters.part : '') + (pathwayId ? ' Pathway ' + pathwayId : '') + (age && details.live ? ' age ' + age.toFixed(1) + (details.type ? ' ' + details.type || '' : '') : '') + " " + url);
16939
16939
  this.hls.trigger(Events.LEVEL_LOADING, {
16940
16940
  url: url,
16941
16941
  level: currentLevelIndex,
@@ -17085,7 +17085,7 @@
17085
17085
  var levelDetails = level.details;
17086
17086
  if (!levelDetails || levelDetails.live) {
17087
17087
  // level not retrieved yet, or live playlist we need to (re)load it
17088
- var hlsUrlParameters = this.switchParams(level.uri, lastLevel == null ? void 0 : lastLevel.details, levelDetails);
17088
+ var hlsUrlParameters = this.switchParams(level.uri, lastLevel == null ? undefined : lastLevel.details, levelDetails);
17089
17089
  this.loadPlaylist(hlsUrlParameters);
17090
17090
  }
17091
17091
  }
@@ -17177,7 +17177,7 @@
17177
17177
  var MIN_CHUNK_SIZE = Math.pow(2, 17); // 128kb
17178
17178
  var FragmentLoader = /*#__PURE__*/function () {
17179
17179
  function FragmentLoader(config) {
17180
- this.config = void 0;
17180
+ this.config = undefined;
17181
17181
  this.loader = null;
17182
17182
  this.partLoadTimeout = -1;
17183
17183
  this.config = config;
@@ -17435,7 +17435,7 @@
17435
17435
  return FragmentLoader;
17436
17436
  }();
17437
17437
  function createLoaderContext(frag, part) {
17438
- if (part === void 0) {
17438
+ if (part === undefined) {
17439
17439
  part = null;
17440
17440
  }
17441
17441
  var segment = part || frag;
@@ -17454,7 +17454,7 @@
17454
17454
  var _frag$decryptdata;
17455
17455
  var byteRangeStart = start;
17456
17456
  var byteRangeEnd = end;
17457
- if (frag.sn === 'initSegment' && isMethodFullSegmentAesCbc((_frag$decryptdata = frag.decryptdata) == null ? void 0 : _frag$decryptdata.method)) {
17457
+ if (frag.sn === 'initSegment' && isMethodFullSegmentAesCbc((_frag$decryptdata = frag.decryptdata) == null ? undefined : _frag$decryptdata.method)) {
17458
17458
  // MAP segment encrypted with method 'AES-128' or 'AES-256' (cbc), when served with HTTP Range,
17459
17459
  // has the unencrypted size specified in the range.
17460
17460
  // Ref: https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-08#section-6.3.6
@@ -17495,7 +17495,7 @@
17495
17495
  function LoadError(data) {
17496
17496
  var _this3;
17497
17497
  _this3 = _Error.call(this, data.error.message) || this;
17498
- _this3.data = void 0;
17498
+ _this3.data = undefined;
17499
17499
  _this3.data = data;
17500
17500
  return _this3;
17501
17501
  }
@@ -17536,7 +17536,7 @@
17536
17536
  function TaskLoop(label, logger) {
17537
17537
  var _this;
17538
17538
  _this = _Logger.call(this, label, logger) || this;
17539
- _this._boundTick = void 0;
17539
+ _this._boundTick = undefined;
17540
17540
  _this._tickTimer = null;
17541
17541
  _this._tickInterval = null;
17542
17542
  _this._tickCallCount = 0;
@@ -17631,21 +17631,21 @@
17631
17631
  }(Logger);
17632
17632
 
17633
17633
  var ChunkMetadata = function ChunkMetadata(level, sn, id, size, part, partial) {
17634
- if (size === void 0) {
17634
+ if (size === undefined) {
17635
17635
  size = 0;
17636
17636
  }
17637
- if (part === void 0) {
17637
+ if (part === undefined) {
17638
17638
  part = -1;
17639
17639
  }
17640
- if (partial === void 0) {
17640
+ if (partial === undefined) {
17641
17641
  partial = false;
17642
17642
  }
17643
- this.level = void 0;
17644
- this.sn = void 0;
17645
- this.part = void 0;
17646
- this.id = void 0;
17647
- this.size = void 0;
17648
- this.partial = void 0;
17643
+ this.level = undefined;
17644
+ this.sn = undefined;
17645
+ this.part = undefined;
17646
+ this.id = undefined;
17647
+ this.size = undefined;
17648
+ this.partial = undefined;
17649
17649
  this.transmuxing = getNewPerformanceTiming();
17650
17650
  this.buffering = {
17651
17651
  audio: getNewPerformanceTiming(),
@@ -17671,7 +17671,7 @@
17671
17671
  function findFirstFragWithCC(fragments, cc) {
17672
17672
  for (var i = 0, len = fragments.length; i < len; i++) {
17673
17673
  var _fragments$i;
17674
- if (((_fragments$i = fragments[i]) == null ? void 0 : _fragments$i.cc) === cc) {
17674
+ if (((_fragments$i = fragments[i]) == null ? undefined : _fragments$i.cc) === cc) {
17675
17675
  return fragments[i];
17676
17676
  }
17677
17677
  }
@@ -17833,16 +17833,16 @@
17833
17833
  function BaseStreamController(hls, fragmentTracker, keyLoader, logPrefix, playlistType) {
17834
17834
  var _this;
17835
17835
  _this = _TaskLoop.call(this, logPrefix, hls.logger) || this;
17836
- _this.hls = void 0;
17836
+ _this.hls = undefined;
17837
17837
  _this.fragPrevious = null;
17838
17838
  _this.fragCurrent = null;
17839
- _this.fragmentTracker = void 0;
17839
+ _this.fragmentTracker = undefined;
17840
17840
  _this.transmuxer = null;
17841
17841
  _this._state = State.STOPPED;
17842
- _this.playlistType = void 0;
17842
+ _this.playlistType = undefined;
17843
17843
  _this.media = null;
17844
17844
  _this.mediaBuffer = null;
17845
- _this.config = void 0;
17845
+ _this.config = undefined;
17846
17846
  _this.bitrateTest = false;
17847
17847
  _this.lastCurrentTime = 0;
17848
17848
  _this.nextLoadPosition = 0;
@@ -17850,15 +17850,15 @@
17850
17850
  _this.startTimeOffset = null;
17851
17851
  _this.retryDate = 0;
17852
17852
  _this.levels = null;
17853
- _this.fragmentLoader = void 0;
17854
- _this.keyLoader = void 0;
17853
+ _this.fragmentLoader = undefined;
17854
+ _this.keyLoader = undefined;
17855
17855
  _this.levelLastLoaded = null;
17856
17856
  _this.startFragRequested = false;
17857
- _this.decrypter = void 0;
17857
+ _this.decrypter = undefined;
17858
17858
  _this.initPTS = [];
17859
17859
  _this.buffering = true;
17860
17860
  _this.loadingParts = false;
17861
- _this.loopSn = void 0;
17861
+ _this.loopSn = undefined;
17862
17862
  _this.onMediaSeeking = function () {
17863
17863
  var _this2 = _this,
17864
17864
  config = _this2.config,
@@ -18019,7 +18019,7 @@
18019
18019
  _proto.getLevelDetails = function getLevelDetails() {
18020
18020
  if (this.levels && this.levelLastLoaded !== null) {
18021
18021
  var _this$levelLastLoaded;
18022
- return (_this$levelLastLoaded = this.levelLastLoaded) == null ? void 0 : _this$levelLastLoaded.details;
18022
+ return (_this$levelLastLoaded = this.levelLastLoaded) == null ? undefined : _this$levelLastLoaded.details;
18023
18023
  }
18024
18024
  };
18025
18025
  _proto.onMediaAttached = function onMediaAttached(event, data) {
@@ -18139,7 +18139,7 @@
18139
18139
  if (_this3.state === State.STOPPED || _this3.state === State.ERROR) {
18140
18140
  return;
18141
18141
  }
18142
- _this3.warn("Frag error: " + ((reason == null ? void 0 : reason.message) || reason));
18142
+ _this3.warn("Frag error: " + ((reason == null ? undefined : reason.message) || reason));
18143
18143
  _this3.resetFragmentLoading(fragment);
18144
18144
  });
18145
18145
  };
@@ -18158,7 +18158,7 @@
18158
18158
  if (backtracked === 1 || this.reduceMaxBufferLength(minForwardBufferLength, frag.duration)) {
18159
18159
  fragmentTracker.removeFragment(frag);
18160
18160
  }
18161
- } else if (((_this$mediaBuffer = this.mediaBuffer) == null ? void 0 : _this$mediaBuffer.buffered.length) === 0) {
18161
+ } else if (((_this$mediaBuffer = this.mediaBuffer) == null ? undefined : _this$mediaBuffer.buffered.length) === 0) {
18162
18162
  // Stop gap for bad tracker / buffer flush behavior
18163
18163
  fragmentTracker.removeAllFragments();
18164
18164
  } else if (fragmentTracker.hasParts(frag.type)) {
@@ -18191,10 +18191,10 @@
18191
18191
  };
18192
18192
  _proto.waitForLive = function waitForLive(levelInfo) {
18193
18193
  var details = levelInfo.details;
18194
- return (details == null ? void 0 : details.live) && details.type !== 'EVENT' && (this.levelLastLoaded !== levelInfo || details.expired);
18194
+ return (details == null ? undefined : details.live) && details.type !== 'EVENT' && (this.levelLastLoaded !== levelInfo || details.expired);
18195
18195
  };
18196
18196
  _proto.flushMainBuffer = function flushMainBuffer(startOffset, endOffset, type) {
18197
- if (type === void 0) {
18197
+ if (type === undefined) {
18198
18198
  type = null;
18199
18199
  }
18200
18200
  if (!(startOffset - endOffset)) {
@@ -18212,7 +18212,7 @@
18212
18212
  _proto._loadInitSegment = function _loadInitSegment(fragment, level) {
18213
18213
  var _this4 = this;
18214
18214
  this._doFragLoad(fragment, level).then(function (data) {
18215
- var frag = data == null ? void 0 : data.frag;
18215
+ var frag = data == null ? undefined : data.frag;
18216
18216
  if (!frag || _this4.fragContextChanged(frag) || !_this4.levels) {
18217
18217
  throw new Error('init load aborted');
18218
18218
  }
@@ -18293,7 +18293,7 @@
18293
18293
  return;
18294
18294
  }
18295
18295
  }
18296
- var level = (_this$levels = this.levels) == null ? void 0 : _this$levels[frag.level];
18296
+ var level = (_this$levels = this.levels) == null ? undefined : _this$levels[frag.level];
18297
18297
  if (level != null && level.fragmentError) {
18298
18298
  this.log("Resetting level fragment error count of " + level.fragmentError + " on frag buffered");
18299
18299
  level.fragmentError = 0;
@@ -18323,11 +18323,11 @@
18323
18323
  _proto._doFragLoad = function _doFragLoad(frag, level, targetBufferTime, progressCallback) {
18324
18324
  var _frag$decryptdata,
18325
18325
  _this5 = this;
18326
- if (targetBufferTime === void 0) {
18326
+ if (targetBufferTime === undefined) {
18327
18327
  targetBufferTime = null;
18328
18328
  }
18329
18329
  this.fragCurrent = frag;
18330
- var details = level == null ? void 0 : level.details;
18330
+ var details = level == null ? undefined : level.details;
18331
18331
  if (!this.levels || !details) {
18332
18332
  throw new Error("frag load aborted, missing level" + (details ? '' : ' detail') + "s");
18333
18333
  }
@@ -18358,7 +18358,7 @@
18358
18358
  if (isMediaFragment(frag) && (!fragPrevious || frag.sn !== fragPrevious.sn)) {
18359
18359
  var shouldLoadParts = this.shouldLoadParts(level.details, frag.end);
18360
18360
  if (shouldLoadParts !== this.loadingParts) {
18361
- this.log("LL-Part loading " + (shouldLoadParts ? 'ON' : 'OFF') + " loading sn " + (fragPrevious == null ? void 0 : fragPrevious.sn) + "->" + frag.sn);
18361
+ this.log("LL-Part loading " + (shouldLoadParts ? 'ON' : 'OFF') + " loading sn " + (fragPrevious == null ? undefined : fragPrevious.sn) + "->" + frag.sn);
18362
18362
  this.loadingParts = shouldLoadParts;
18363
18363
  }
18364
18364
  }
@@ -18425,7 +18425,7 @@
18425
18425
  var result;
18426
18426
  if (dataOnProgress && keyLoadingPromise) {
18427
18427
  result = keyLoadingPromise.then(function (keyLoadedData) {
18428
- if (!keyLoadedData || _this5.fragContextChanged(keyLoadedData == null ? void 0 : keyLoadedData.frag)) {
18428
+ if (!keyLoadedData || _this5.fragContextChanged(keyLoadedData == null ? undefined : keyLoadedData.frag)) {
18429
18429
  return null;
18430
18430
  }
18431
18431
  return _this5.fragmentLoader.load(frag, progressCallback);
@@ -18459,7 +18459,7 @@
18459
18459
  return new Promise(function (resolve, reject) {
18460
18460
  var _level$details2;
18461
18461
  var partsLoaded = [];
18462
- var initialPartList = (_level$details2 = level.details) == null ? void 0 : _level$details2.partList;
18462
+ var initialPartList = (_level$details2 = level.details) == null ? undefined : _level$details2.partList;
18463
18463
  var _loadPart = function loadPart(part) {
18464
18464
  _this6.fragmentLoader.loadPart(frag, part, progressCallback).then(function (partLoadedData) {
18465
18465
  partsLoaded[part.index] = partLoadedData;
@@ -18535,10 +18535,10 @@
18535
18535
  // Buffer must be ahead of first part + duration of parts after last segment
18536
18536
  // and playback must be at or past segment adjacent to part list
18537
18537
  var firstPart = details.partList[0];
18538
- var safePartStart = firstPart.end + (((_details$fragmentHint = details.fragmentHint) == null ? void 0 : _details$fragmentHint.duration) || 0);
18538
+ var safePartStart = firstPart.end + (((_details$fragmentHint = details.fragmentHint) == null ? undefined : _details$fragmentHint.duration) || 0);
18539
18539
  if (bufferEnd >= safePartStart) {
18540
18540
  var _this$media;
18541
- var playhead = this.hls.hasEnoughToStart ? ((_this$media = this.media) == null ? void 0 : _this$media.currentTime) || this.lastCurrentTime : this.getLoadPosition();
18541
+ var playhead = this.hls.hasEnoughToStart ? ((_this$media = this.media) == null ? undefined : _this$media.currentTime) || this.lastCurrentTime : this.getLoadPosition();
18542
18542
  if (playhead > firstPart.start - firstPart.fragment.duration) {
18543
18543
  return true;
18544
18544
  }
@@ -18670,10 +18670,10 @@
18670
18670
  };
18671
18671
  _proto.getAppendedFrag = function getAppendedFrag(position, playlistType) {
18672
18672
  var _this$fragmentTracker;
18673
- if (playlistType === void 0) {
18673
+ if (playlistType === undefined) {
18674
18674
  playlistType = PlaylistLevelType.MAIN;
18675
18675
  }
18676
- var fragOrPart = (_this$fragmentTracker = this.fragmentTracker) == null ? void 0 : _this$fragmentTracker.getAppendedFrag(position, playlistType);
18676
+ var fragOrPart = (_this$fragmentTracker = this.fragmentTracker) == null ? undefined : _this$fragmentTracker.getAppendedFrag(position, playlistType);
18677
18677
  if (fragOrPart && 'fragment' in fragOrPart) {
18678
18678
  return fragOrPart.fragment;
18679
18679
  }
@@ -18711,7 +18711,7 @@
18711
18711
  var mainStart = this.hls.startPosition;
18712
18712
  var liveSyncPosition = this.hls.liveSyncPosition;
18713
18713
  var startPosition = frag ? (mainStart !== -1 && mainStart >= start ? mainStart : liveSyncPosition) || frag.start : pos;
18714
- this.log("Setting startPosition to " + startPosition + " to match initial live edge. mainStart: " + mainStart + " liveSyncPosition: " + liveSyncPosition + " frag.start: " + ((_frag = frag) == null ? void 0 : _frag.start));
18714
+ this.log("Setting startPosition to " + startPosition + " to match initial live edge. mainStart: " + mainStart + " liveSyncPosition: " + liveSyncPosition + " frag.start: " + ((_frag = frag) == null ? undefined : _frag.start));
18715
18715
  this.startPosition = this.nextLoadPosition = startPosition;
18716
18716
  }
18717
18717
  } else if (pos <= start) {
@@ -18973,7 +18973,7 @@
18973
18973
  }
18974
18974
  if (this.fragContextChanged(frag)) {
18975
18975
  var _this$fragCurrent;
18976
- this.warn("Frag load error must match current frag to retry " + frag.url + " > " + ((_this$fragCurrent = this.fragCurrent) == null ? void 0 : _this$fragCurrent.url));
18976
+ this.warn("Frag load error must match current frag to retry " + frag.url + " > " + ((_this$fragCurrent = this.fragCurrent) == null ? undefined : _this$fragCurrent.url));
18977
18977
  return;
18978
18978
  }
18979
18979
  var gapTagEncountered = data.details === ErrorDetails.FRAG_GAP;
@@ -18986,7 +18986,7 @@
18986
18986
  action = _ref2.action,
18987
18987
  flags = _ref2.flags,
18988
18988
  _ref2$retryCount = _ref2.retryCount,
18989
- retryCount = _ref2$retryCount === void 0 ? 0 : _ref2$retryCount,
18989
+ retryCount = _ref2$retryCount === undefined ? 0 : _ref2$retryCount,
18990
18990
  retryConfig = _ref2.retryConfig;
18991
18991
  var couldRetry = !!errorAction && !!retryConfig;
18992
18992
  var retry = couldRetry && action === NetworkErrorAction.RetryRequest;
@@ -19031,7 +19031,7 @@
19031
19031
  // reduce max buf len if current position is buffered
19032
19032
  var buffered = bufferedInfo && bufferedInfo.len > 0.5;
19033
19033
  if (buffered) {
19034
- this.reduceMaxBufferLength(bufferedInfo.len, (frag == null ? void 0 : frag.duration) || 10);
19034
+ this.reduceMaxBufferLength(bufferedInfo.len, (frag == null ? undefined : frag.duration) || 10);
19035
19035
  }
19036
19036
  var flushBuffer = !buffered;
19037
19037
  if (flushBuffer) {
@@ -19107,7 +19107,7 @@
19107
19107
  this.resetLoadingState();
19108
19108
  };
19109
19109
  _proto.removeUnbufferedFrags = function removeUnbufferedFrags(start) {
19110
- if (start === void 0) {
19110
+ if (start === undefined) {
19111
19111
  start = 0;
19112
19112
  }
19113
19113
  this.fragmentTracker.removeFragmentsInRange(start, Infinity, this.playlistType, false, true);
@@ -19145,7 +19145,7 @@
19145
19145
  }
19146
19146
  return result;
19147
19147
  }, false);
19148
- if (!parsed && ((_this$transmuxer = this.transmuxer) == null ? void 0 : _this$transmuxer.error) === null) {
19148
+ if (!parsed && ((_this$transmuxer = this.transmuxer) == null ? undefined : _this$transmuxer.error) === null) {
19149
19149
  var error = new Error("Found no media in fragment " + frag.sn + " of " + this.playlistLabel() + " " + frag.level + " resetting transmuxer to fallback to playlist timing");
19150
19150
  if (level.fragmentError === 0) {
19151
19151
  // Mark and track the odd empty segment as a gap to avoid reloading
@@ -19178,7 +19178,7 @@
19178
19178
  };
19179
19179
  _proto.fragInfo = function fragInfo(frag, pts, part) {
19180
19180
  var _ref3, _ref4;
19181
- if (pts === void 0) {
19181
+ if (pts === undefined) {
19182
19182
  pts = true;
19183
19183
  }
19184
19184
  return this.playlistLabel() + " " + frag.level + " (" + (part ? 'part' : 'frag') + ":[" + ((_ref3 = pts && !part ? frag.startPTS : (part || frag).start) != null ? _ref3 : NaN).toFixed(3) + "-" + ((_ref4 = pts && !part ? frag.endPTS : (part || frag).end) != null ? _ref4 : NaN).toFixed(3) + "]" + (part && frag.type === 'main' ? 'INDEPENDENT=' + (part.independent ? 'YES' : 'NO') : '');
@@ -19193,7 +19193,7 @@
19193
19193
  };
19194
19194
  _proto.resetTransmuxer = function resetTransmuxer() {
19195
19195
  var _this$transmuxer2;
19196
- (_this$transmuxer2 = this.transmuxer) == null ? void 0 : _this$transmuxer2.reset();
19196
+ (_this$transmuxer2 = this.transmuxer) == null ? undefined : _this$transmuxer2.reset();
19197
19197
  };
19198
19198
  _proto.recoverWorkerError = function recoverWorkerError(data) {
19199
19199
  if (data.event === 'demuxerWorker') {
@@ -19244,10 +19244,10 @@
19244
19244
  function GapController(config, media, fragmentTracker, hls) {
19245
19245
  var _this;
19246
19246
  _this = _Logger.call(this, 'gap-controller', hls.logger) || this;
19247
- _this.config = void 0;
19247
+ _this.config = undefined;
19248
19248
  _this.media = null;
19249
- _this.fragmentTracker = void 0;
19250
- _this.hls = void 0;
19249
+ _this.fragmentTracker = undefined;
19250
+ _this.hls = undefined;
19251
19251
  _this.nudgeRetry = 0;
19252
19252
  _this.stallReported = false;
19253
19253
  _this.stalled = null;
@@ -19374,7 +19374,7 @@
19374
19374
  var stalledDuration = tnow - stalled;
19375
19375
  if (!seeking && stalledDuration >= STALL_MINIMUM_DURATION_MS) {
19376
19376
  // Dispatch MEDIA_ENDED when media.ended/ended event is not signalled at end of stream
19377
- if (state === State.ENDED && !(levelDetails != null && levelDetails.live) && Math.abs(currentTime - ((levelDetails == null ? void 0 : levelDetails.edge) || 0)) < 1) {
19377
+ if (state === State.ENDED && !(levelDetails != null && levelDetails.live) && Math.abs(currentTime - ((levelDetails == null ? undefined : levelDetails.edge) || 0)) < 1) {
19378
19378
  if (stalledDuration < 1000 || this.ended) {
19379
19379
  return;
19380
19380
  }
@@ -19735,7 +19735,7 @@
19735
19735
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
19736
19736
  }
19737
19737
 
19738
- var version = "1.6.0-beta.2.0.canary.10878";
19738
+ var version = "1.6.0-beta.2.0.canary.10882";
19739
19739
 
19740
19740
  // ensure the worker ends up in the bundle
19741
19741
  // If the worker should not be included this gets aliased to empty.js
@@ -19800,17 +19800,17 @@
19800
19800
  function TransmuxerInterface(_hls, id, onTransmuxComplete, onFlush) {
19801
19801
  var _this = this;
19802
19802
  this.error = null;
19803
- this.hls = void 0;
19804
- this.id = void 0;
19803
+ this.hls = undefined;
19804
+ this.id = undefined;
19805
19805
  this.instanceNo = transmuxerInstanceCount++;
19806
- this.observer = void 0;
19806
+ this.observer = undefined;
19807
19807
  this.frag = null;
19808
19808
  this.part = null;
19809
- this.useWorker = void 0;
19809
+ this.useWorker = undefined;
19810
19810
  this.workerContext = null;
19811
19811
  this.transmuxer = null;
19812
- this.onTransmuxComplete = void 0;
19813
- this.onFlush = void 0;
19812
+ this.onTransmuxComplete = undefined;
19813
+ this.onFlush = undefined;
19814
19814
  this.onWorkerMessage = function (event) {
19815
19815
  var data = event.data;
19816
19816
  var hls = _this.hls;
@@ -19821,7 +19821,7 @@
19821
19821
  case 'init':
19822
19822
  {
19823
19823
  var _this$workerContext;
19824
- var objectURL = (_this$workerContext = _this.workerContext) == null ? void 0 : _this$workerContext.objectURL;
19824
+ var objectURL = (_this$workerContext = _this.workerContext) == null ? undefined : _this$workerContext.objectURL;
19825
19825
  if (objectURL) {
19826
19826
  // revoke the Object URL that was used to create transmuxer worker, so as not to leak it
19827
19827
  self.URL.revokeObjectURL(objectURL);
@@ -19995,7 +19995,7 @@
19995
19995
  var trackSwitch = !(lastFrag && chunkMeta.level === lastFrag.level);
19996
19996
  var snDiff = lastFrag ? chunkMeta.sn - lastFrag.sn : -1;
19997
19997
  var partDiff = this.part ? chunkMeta.part - this.part.index : -1;
19998
- var progressive = snDiff === 0 && chunkMeta.id > 1 && chunkMeta.id === (lastFrag == null ? void 0 : lastFrag.stats.chunkCount);
19998
+ var progressive = snDiff === 0 && chunkMeta.id > 1 && chunkMeta.id === (lastFrag == null ? undefined : lastFrag.stats.chunkCount);
19999
19999
  var contiguous = !trackSwitch && (snDiff === 1 || snDiff === 0 && (partDiff === 1 || progressive && partDiff <= 0));
20000
20000
  var now = self.performance.now();
20001
20001
  if (trackSwitch || snDiff || frag.stats.parsing.start === 0) {
@@ -20004,7 +20004,7 @@
20004
20004
  if (part && (partDiff || !contiguous)) {
20005
20005
  part.stats.parsing.start = now;
20006
20006
  }
20007
- var initSegmentChange = !(lastFrag && ((_frag$initSegment = frag.initSegment) == null ? void 0 : _frag$initSegment.url) === ((_lastFrag$initSegment = lastFrag.initSegment) == null ? void 0 : _lastFrag$initSegment.url));
20007
+ var initSegmentChange = !(lastFrag && ((_frag$initSegment = frag.initSegment) == null ? undefined : _frag$initSegment.url) === ((_lastFrag$initSegment = lastFrag.initSegment) == null ? undefined : _lastFrag$initSegment.url));
20008
20008
  var state = new TransmuxState(discontinuity, contiguous, accurateTimeOffset, trackSwitch, timeOffset, initSegmentChange);
20009
20009
  if (!contiguous || discontinuity || initSegmentChange) {
20010
20010
  this.hls.logger.log("[transmuxer-interface]: Starting new transmux session for " + frag.type + " sn: " + chunkMeta.sn + (chunkMeta.part > -1 ? ' part: ' + chunkMeta.part : '') + " " + (this.id === PlaylistLevelType.MAIN ? 'level' : 'track') + ": " + chunkMeta.level + " id: " + chunkMeta.id + "\n discontinuity: " + discontinuity + "\n trackSwitch: " + trackSwitch + "\n contiguous: " + contiguous + "\n accurateTimeOffset: " + accurateTimeOffset + "\n timeOffset: " + timeOffset + "\n initSegmentChange: " + initSegmentChange);
@@ -20125,7 +20125,7 @@
20125
20125
  return false;
20126
20126
  }
20127
20127
  var mediaSource = getMediaSource();
20128
- return typeof (mediaSource == null ? void 0 : mediaSource.isTypeSupported) === 'function' && (['avc1.42E01E,mp4a.40.2', 'av01.0.01M.08', 'vp09.00.50.08'].some(function (codecsForVideoContainer) {
20128
+ return typeof (mediaSource == null ? undefined : mediaSource.isTypeSupported) === 'function' && (['avc1.42E01E,mp4a.40.2', 'av01.0.01M.08', 'vp09.00.50.08'].some(function (codecsForVideoContainer) {
20129
20129
  return mediaSource.isTypeSupported(mimeTypeForCodec(codecsForVideoContainer, 'video'));
20130
20130
  }) || ['mp4a.40.2', 'fLaC'].some(function (codecForAudioContainer) {
20131
20131
  return mediaSource.isTypeSupported(mimeTypeForCodec(codecForAudioContainer, 'audio'));
@@ -20134,7 +20134,7 @@
20134
20134
  function changeTypeSupported() {
20135
20135
  var _sourceBuffer$prototy;
20136
20136
  var sourceBuffer = getSourceBuffer();
20137
- return typeof (sourceBuffer == null ? void 0 : (_sourceBuffer$prototy = sourceBuffer.prototype) == null ? void 0 : _sourceBuffer$prototy.changeType) === 'function';
20137
+ return typeof (sourceBuffer == null ? undefined : (_sourceBuffer$prototy = sourceBuffer.prototype) == null ? undefined : _sourceBuffer$prototy.changeType) === 'function';
20138
20138
  }
20139
20139
 
20140
20140
  var TICK_INTERVAL = 100; // how often to tick in ms
@@ -20267,8 +20267,8 @@
20267
20267
  {
20268
20268
  var levels = this.levels,
20269
20269
  level = this.level;
20270
- var currentLevel = levels == null ? void 0 : levels[level];
20271
- var details = currentLevel == null ? void 0 : currentLevel.details;
20270
+ var currentLevel = levels == null ? undefined : levels[level];
20271
+ var details = currentLevel == null ? undefined : currentLevel.details;
20272
20272
  if (details && (!details.live || this.levelLastLoaded === currentLevel && !this.waitForLive(currentLevel))) {
20273
20273
  if (this.waitForCdnTuneIn(details)) {
20274
20274
  break;
@@ -20290,7 +20290,7 @@
20290
20290
  if (!retryDate || now >= retryDate || (_this$media = this.media) != null && _this$media.seeking) {
20291
20291
  var _levels = this.levels,
20292
20292
  _level = this.level;
20293
- var _currentLevel = _levels == null ? void 0 : _levels[_level];
20293
+ var _currentLevel = _levels == null ? undefined : _levels[_level];
20294
20294
  this.resetStartWhenNotLoaded(_currentLevel || null);
20295
20295
  this.state = State.IDLE;
20296
20296
  }
@@ -20565,7 +20565,7 @@
20565
20565
  if (gapController.ended) {
20566
20566
  return;
20567
20567
  }
20568
- gapController.ended = ((_this$media2 = this.media) == null ? void 0 : _this$media2.currentTime) || 1;
20568
+ gapController.ended = ((_this$media2 = this.media) == null ? undefined : _this$media2.currentTime) || 1;
20569
20569
  }
20570
20570
  this.hls.trigger(Events.MEDIA_ENDED, {
20571
20571
  stalled: false
@@ -20636,7 +20636,7 @@
20636
20636
  if (newDetails.deltaUpdateFailed) {
20637
20637
  return;
20638
20638
  }
20639
- sliding = this.alignPlaylists(newDetails, curLevel.details, (_this$levelLastLoaded = this.levelLastLoaded) == null ? void 0 : _this$levelLastLoaded.details);
20639
+ sliding = this.alignPlaylists(newDetails, curLevel.details, (_this$levelLastLoaded = this.levelLastLoaded) == null ? undefined : _this$levelLastLoaded.details);
20640
20640
  }
20641
20641
  // override level info
20642
20642
  curLevel.details = newDetails;
@@ -20716,7 +20716,7 @@
20716
20716
 
20717
20717
  // time Offset is accurate if level PTS is known, or if playlist is not sliding (not live)
20718
20718
  var accurateTimeOffset = details.PTSKnown || !details.live;
20719
- var initSegmentData = (_frag$initSegment = frag.initSegment) == null ? void 0 : _frag$initSegment.data;
20719
+ var initSegmentData = (_frag$initSegment = frag.initSegment) == null ? undefined : _frag$initSegment.data;
20720
20720
  var audioCodec = this._getAudioCodec(currentLevel);
20721
20721
 
20722
20722
  // transmux the MPEG-TS data to ISO-BMFF segments
@@ -20761,7 +20761,7 @@
20761
20761
  this.fragmentTracker.removeAllFragments();
20762
20762
  hls.once(Events.BUFFER_FLUSHED, function () {
20763
20763
  var _this2$hls;
20764
- (_this2$hls = _this2.hls) == null ? void 0 : _this2$hls.trigger(Events.AUDIO_TRACK_SWITCHED, data);
20764
+ (_this2$hls = _this2.hls) == null ? undefined : _this2$hls.trigger(Events.AUDIO_TRACK_SWITCHED, data);
20765
20765
  });
20766
20766
  hls.trigger(Events.BUFFER_FLUSHING, {
20767
20767
  startOffset: 0,
@@ -20869,7 +20869,7 @@
20869
20869
  case ErrorDetails.LEVEL_LOAD_TIMEOUT:
20870
20870
  case ErrorDetails.LEVEL_PARSING_ERROR:
20871
20871
  // in case of non fatal error while loading level, if level controller is not retrying to load level, switch back to IDLE
20872
- if (!data.levelRetry && this.state === State.WAITING_LEVEL && ((_data$context = data.context) == null ? void 0 : _data$context.type) === PlaylistContextType.LEVEL) {
20872
+ if (!data.levelRetry && this.state === State.WAITING_LEVEL && ((_data$context = data.context) == null ? undefined : _data$context.type) === PlaylistContextType.LEVEL) {
20873
20873
  this.state = State.IDLE;
20874
20874
  }
20875
20875
  break;
@@ -20963,13 +20963,13 @@
20963
20963
  var details = this.getLevelDetails();
20964
20964
  var configuredTimelineOffset = this.config.timelineOffset;
20965
20965
  if (configuredTimelineOffset && startPosition) {
20966
- startPosition += (details == null ? void 0 : details.appliedTimelineOffset) || configuredTimelineOffset;
20966
+ startPosition += (details == null ? undefined : details.appliedTimelineOffset) || configuredTimelineOffset;
20967
20967
  }
20968
20968
  var buffered = BufferHelper.getBuffered(media);
20969
20969
  var bufferStart = buffered.length ? buffered.start(0) : 0;
20970
20970
  var delta = bufferStart - startPosition;
20971
20971
  var skipTolerance = Math.max(this.config.maxBufferHole, this.config.maxFragLookUpTolerance);
20972
- if (delta > 0 && (delta < skipTolerance || this.loadingParts && delta < 2 * ((details == null ? void 0 : details.partTarget) || 0))) {
20972
+ if (delta > 0 && (delta < skipTolerance || this.loadingParts && delta < 2 * ((details == null ? undefined : details.partTarget) || 0))) {
20973
20973
  this.log("adjusting start position by " + delta + " to match buffer start");
20974
20974
  startPosition += delta;
20975
20975
  this.startPosition = startPosition;
@@ -20997,7 +20997,7 @@
20997
20997
  fragment.bitrateTest = true;
20998
20998
  this._doFragLoad(fragment, level).then(function (data) {
20999
20999
  var hls = _this3.hls;
21000
- var frag = data == null ? void 0 : data.frag;
21000
+ var frag = data == null ? undefined : data.frag;
21001
21001
  if (!frag || _this3.fragContextChanged(frag)) {
21002
21002
  return;
21003
21003
  }
@@ -21216,7 +21216,7 @@
21216
21216
  video.levelCodec = currentLevel.videoCodec;
21217
21217
  video.id = 'main';
21218
21218
  var parsedVideoCodec = video.codec;
21219
- if ((parsedVideoCodec == null ? void 0 : parsedVideoCodec.length) === 4) {
21219
+ if ((parsedVideoCodec == null ? undefined : parsedVideoCodec.length) === 4) {
21220
21220
  // Make up for passthrough-remuxer not being able to parse full codec
21221
21221
  // (logger warning "Unhandled video codec...")
21222
21222
  switch (parsedVideoCodec) {
@@ -21330,7 +21330,7 @@
21330
21330
  get: function get() {
21331
21331
  var levels = this.levels,
21332
21332
  level = this.level;
21333
- var levelInfo = levels == null ? void 0 : levels[level];
21333
+ var levelInfo = levels == null ? undefined : levels[level];
21334
21334
  if (!levelInfo) {
21335
21335
  return this.config.maxBufferLength;
21336
21336
  }
@@ -21352,7 +21352,7 @@
21352
21352
  if (this.fragPlaying) {
21353
21353
  return this.fragPlaying;
21354
21354
  }
21355
- var currentTime = ((_this$media3 = this.media) == null ? void 0 : _this$media3.currentTime) || this.lastCurrentTime;
21355
+ var currentTime = ((_this$media3 = this.media) == null ? undefined : _this$media3.currentTime) || this.lastCurrentTime;
21356
21356
  if (isFiniteNumber(currentTime)) {
21357
21357
  return this.getAppendedFrag(currentTime);
21358
21358
  }
@@ -21362,7 +21362,7 @@
21362
21362
  key: "currentProgramDateTime",
21363
21363
  get: function get() {
21364
21364
  var _this$media4;
21365
- var currentTime = ((_this$media4 = this.media) == null ? void 0 : _this$media4.currentTime) || this.lastCurrentTime;
21365
+ var currentTime = ((_this$media4 = this.media) == null ? undefined : _this$media4.currentTime) || this.lastCurrentTime;
21366
21366
  if (isFiniteNumber(currentTime)) {
21367
21367
  var details = this.getLevelDetails();
21368
21368
  var frag = this.currentFrag || (details ? findFragmentByPTS(null, details.fragments, currentTime) : null);
@@ -21404,7 +21404,7 @@
21404
21404
 
21405
21405
  var KeyLoader = /*#__PURE__*/function () {
21406
21406
  function KeyLoader(config) {
21407
- this.config = void 0;
21407
+ this.config = undefined;
21408
21408
  this.keyUriToKeyInfo = {};
21409
21409
  this.emeController = null;
21410
21410
  this.config = config;
@@ -21415,7 +21415,7 @@
21415
21415
  var loader = this.keyUriToKeyInfo[uri].loader;
21416
21416
  if (loader) {
21417
21417
  var _loader$context;
21418
- if (type && type !== ((_loader$context = loader.context) == null ? void 0 : _loader$context.frag.type)) {
21418
+ if (type && type !== ((_loader$context = loader.context) == null ? undefined : _loader$context.frag.type)) {
21419
21419
  return;
21420
21420
  }
21421
21421
  loader.abort();
@@ -21442,7 +21442,7 @@
21442
21442
  this.keyUriToKeyInfo = {};
21443
21443
  };
21444
21444
  _proto.createKeyLoadError = function createKeyLoadError(frag, details, error, networkDetails, response) {
21445
- if (details === void 0) {
21445
+ if (details === undefined) {
21446
21446
  details = ErrorDetails.KEY_LOAD_ERROR;
21447
21447
  }
21448
21448
  return new LoadError({
@@ -21510,7 +21510,7 @@
21510
21510
  // Return key load promise as long as it does not have a mediakey session with an unusable key status
21511
21511
  if ((_keyInfo2 = keyInfo) != null && _keyInfo2.keyLoadPromise) {
21512
21512
  var _keyInfo$mediaKeySess;
21513
- switch ((_keyInfo$mediaKeySess = keyInfo.mediaKeySessionContext) == null ? void 0 : _keyInfo$mediaKeySess.keyStatus) {
21513
+ switch ((_keyInfo$mediaKeySess = keyInfo.mediaKeySessionContext) == null ? undefined : _keyInfo$mediaKeySess.keyStatus) {
21514
21514
  case undefined:
21515
21515
  case 'status-pending':
21516
21516
  case 'usable':
@@ -21675,7 +21675,7 @@
21675
21675
  }
21676
21676
  var PlaylistLoader = /*#__PURE__*/function () {
21677
21677
  function PlaylistLoader(hls) {
21678
- this.hls = void 0;
21678
+ this.hls = undefined;
21679
21679
  this.loaders = Object.create(null);
21680
21680
  this.variableList = null;
21681
21681
  this.onManifestLoaded = this.checkAutostartLoad;
@@ -21860,7 +21860,7 @@
21860
21860
 
21861
21861
  // Override level/track timeout for LL-HLS requests
21862
21862
  // (the default of 10000ms is counter productive to blocking playlist reload requests)
21863
- if (isFiniteNumber((_context$deliveryDire = context.deliveryDirectives) == null ? void 0 : _context$deliveryDire.part)) {
21863
+ if (isFiniteNumber((_context$deliveryDire = context.deliveryDirectives) == null ? undefined : _context$deliveryDire.part)) {
21864
21864
  var levelDetails;
21865
21865
  if (context.type === PlaylistContextType.LEVEL && context.level !== null) {
21866
21866
  levelDetails = this.hls.levels[context.level].details;
@@ -21951,7 +21951,7 @@
21951
21951
  this.variableList = variableList;
21952
21952
  var _M3U8Parser$parseMast = M3U8Parser.parseMasterPlaylistMedia(string, url, parsedResult),
21953
21953
  _M3U8Parser$parseMast2 = _M3U8Parser$parseMast.AUDIO,
21954
- audioTracks = _M3U8Parser$parseMast2 === void 0 ? [] : _M3U8Parser$parseMast2,
21954
+ audioTracks = _M3U8Parser$parseMast2 === undefined ? [] : _M3U8Parser$parseMast2,
21955
21955
  subtitles = _M3U8Parser$parseMast.SUBTITLES,
21956
21956
  captions = _M3U8Parser$parseMast['CLOSED-CAPTIONS'];
21957
21957
  if (audioTracks.length) {
@@ -22055,7 +22055,7 @@
22055
22055
  });
22056
22056
  };
22057
22057
  _proto.handleNetworkError = function handleNetworkError(context, networkDetails, timeout, response, stats) {
22058
- if (timeout === void 0) {
22058
+ if (timeout === undefined) {
22059
22059
  timeout = false;
22060
22060
  }
22061
22061
  var message = "A network " + (timeout ? 'timeout' : 'error' + (response ? ' (status ' + response.code + ')' : '')) + " occurred while loading " + context.type;
@@ -22102,7 +22102,7 @@
22102
22102
  stats: stats
22103
22103
  };
22104
22104
  if (response) {
22105
- var url = (networkDetails == null ? void 0 : networkDetails.url) || context.url;
22105
+ var url = (networkDetails == null ? undefined : networkDetails.url) || context.url;
22106
22106
  errorData.response = _objectSpread2({
22107
22107
  url: url,
22108
22108
  data: undefined
@@ -22252,7 +22252,7 @@
22252
22252
  if (!audioGroupId) {
22253
22253
  return;
22254
22254
  }
22255
- (_audioTracksByGroup$g = audioTracksByGroup.groups[audioGroupId]) == null ? void 0 : _audioTracksByGroup$g.tracks.forEach(function (audioTrack) {
22255
+ (_audioTracksByGroup$g = audioTracksByGroup.groups[audioGroupId]) == null ? undefined : _audioTracksByGroup$g.tracks.forEach(function (audioTrack) {
22256
22256
  if (audioTrack.groupId === audioGroupId) {
22257
22257
  var channels = audioTrack.channels || '';
22258
22258
  var channelsNumber = parseFloat(channels);
@@ -22320,41 +22320,41 @@
22320
22320
  * @param userConfig - Configuration options applied over `Hls.DefaultConfig`
22321
22321
  */
22322
22322
  function Hls(userConfig) {
22323
- if (userConfig === void 0) {
22323
+ if (userConfig === undefined) {
22324
22324
  userConfig = {};
22325
22325
  }
22326
22326
  /**
22327
22327
  * The runtime configuration used by the player. At instantiation this is combination of `hls.userConfig` merged over `Hls.DefaultConfig`.
22328
22328
  */
22329
- this.config = void 0;
22329
+ this.config = undefined;
22330
22330
  /**
22331
22331
  * The configuration object provided on player instantiation.
22332
22332
  */
22333
- this.userConfig = void 0;
22333
+ this.userConfig = undefined;
22334
22334
  /**
22335
22335
  * The logger functions used by this player instance, configured on player instantiation.
22336
22336
  */
22337
- this.logger = void 0;
22338
- this.coreComponents = void 0;
22339
- this.networkControllers = void 0;
22337
+ this.logger = undefined;
22338
+ this.coreComponents = undefined;
22339
+ this.networkControllers = undefined;
22340
22340
  this._emitter = new EventEmitter();
22341
22341
  this._autoLevelCapping = -1;
22342
22342
  this._maxHdcpLevel = null;
22343
- this.abrController = void 0;
22344
- this.bufferController = void 0;
22345
- this.capLevelController = void 0;
22346
- this.latencyController = void 0;
22347
- this.levelController = void 0;
22348
- this.streamController = void 0;
22349
- this.audioTrackController = void 0;
22350
- this.subtitleTrackController = void 0;
22351
- this.interstitialsController = void 0;
22352
- this.emeController = void 0;
22353
- this.cmcdController = void 0;
22343
+ this.abrController = undefined;
22344
+ this.bufferController = undefined;
22345
+ this.capLevelController = undefined;
22346
+ this.latencyController = undefined;
22347
+ this.levelController = undefined;
22348
+ this.streamController = undefined;
22349
+ this.audioTrackController = undefined;
22350
+ this.subtitleTrackController = undefined;
22351
+ this.interstitialsController = undefined;
22352
+ this.emeController = undefined;
22353
+ this.cmcdController = undefined;
22354
22354
  this._media = null;
22355
22355
  this._url = null;
22356
- this._sessionId = void 0;
22357
- this.triggeringException = void 0;
22356
+ this._sessionId = undefined;
22357
+ this.triggeringException = undefined;
22358
22358
  this.started = false;
22359
22359
  var logger = this.logger = enableLogs(userConfig.debug || false, 'Hls instance', userConfig.assetPlayerId);
22360
22360
  var config = this.config = mergeConfig(Hls.DefaultConfig, userConfig, logger);
@@ -22462,13 +22462,13 @@
22462
22462
  // Delegate the EventEmitter through the public API of Hls.js
22463
22463
  ;
22464
22464
  _proto.on = function on(event, listener, context) {
22465
- if (context === void 0) {
22465
+ if (context === undefined) {
22466
22466
  context = this;
22467
22467
  }
22468
22468
  this._emitter.on(event, listener, context);
22469
22469
  };
22470
22470
  _proto.once = function once(event, listener, context) {
22471
- if (context === void 0) {
22471
+ if (context === undefined) {
22472
22472
  context = this;
22473
22473
  }
22474
22474
  this._emitter.once(event, listener, context);
@@ -22477,7 +22477,7 @@
22477
22477
  this._emitter.removeAllListeners(event);
22478
22478
  };
22479
22479
  _proto.off = function off(event, listener, context, once) {
22480
- if (context === void 0) {
22480
+ if (context === undefined) {
22481
22481
  context = this;
22482
22482
  }
22483
22483
  this._emitter.off(event, listener, context, once);
@@ -22626,7 +22626,7 @@
22626
22626
  * Defaults to -1 (None: starts from earliest point)
22627
22627
  */
22628
22628
  _proto.startLoad = function startLoad(startPosition, skipSeekToStartPosition) {
22629
- if (startPosition === void 0) {
22629
+ if (startPosition === undefined) {
22630
22630
  startPosition = -1;
22631
22631
  }
22632
22632
  this.logger.log("startLoad(" + (startPosition + (skipSeekToStartPosition ? ', <skip seek to start>' : '')) + ")");
@@ -22703,7 +22703,7 @@
22703
22703
  _proto.recoverMediaError = function recoverMediaError() {
22704
22704
  this.logger.log('recoverMediaError');
22705
22705
  var media = this._media;
22706
- var time = media == null ? void 0 : media.currentTime;
22706
+ var time = media == null ? undefined : media.currentTime;
22707
22707
  this.detachMedia();
22708
22708
  if (media) {
22709
22709
  this.attachMedia(media);
@@ -22725,7 +22725,7 @@
22725
22725
  */
22726
22726
  _proto.setAudioOption = function setAudioOption(audioOption) {
22727
22727
  var _this$audioTrackContr;
22728
- return ((_this$audioTrackContr = this.audioTrackController) == null ? void 0 : _this$audioTrackContr.setAudioOption(audioOption)) || null;
22728
+ return ((_this$audioTrackContr = this.audioTrackController) == null ? undefined : _this$audioTrackContr.setAudioOption(audioOption)) || null;
22729
22729
  }
22730
22730
  /**
22731
22731
  * Find and select the best matching subtitle track, making a level switch when a Group change is necessary.
@@ -22733,7 +22733,7 @@
22733
22733
  */;
22734
22734
  _proto.setSubtitleOption = function setSubtitleOption(subtitleOption) {
22735
22735
  var _this$subtitleTrackCo;
22736
- return ((_this$subtitleTrackCo = this.subtitleTrackController) == null ? void 0 : _this$subtitleTrackCo.setSubtitleOption(subtitleOption)) || null;
22736
+ return ((_this$subtitleTrackCo = this.subtitleTrackController) == null ? undefined : _this$subtitleTrackCo.setSubtitleOption(subtitleOption)) || null;
22737
22737
  }
22738
22738
 
22739
22739
  /**
@@ -22743,7 +22743,7 @@
22743
22743
  * returns mediaCapabilities.decodingInfo for a variant/rendition
22744
22744
  */
22745
22745
  _proto.getMediaDecodingInfo = function getMediaDecodingInfo(level, audioTracks) {
22746
- if (audioTracks === void 0) {
22746
+ if (audioTracks === undefined) {
22747
22747
  audioTracks = this.allAudioTracks;
22748
22748
  }
22749
22749
  var audioTracksByGroup = getAudioTracksByGroup(audioTracks);
@@ -23346,7 +23346,7 @@
23346
23346
  key: "interstitialsManager",
23347
23347
  get: function get() {
23348
23348
  var _this$interstitialsCo;
23349
- return ((_this$interstitialsCo = this.interstitialsController) == null ? void 0 : _this$interstitialsCo.interstitialsManager) || null;
23349
+ return ((_this$interstitialsCo = this.interstitialsController) == null ? undefined : _this$interstitialsCo.interstitialsManager) || null;
23350
23350
  }
23351
23351
  }], [{
23352
23352
  key: "version",
@@ -23398,7 +23398,7 @@
23398
23398
  }
23399
23399
  }]);
23400
23400
  }();
23401
- Hls.defaultConfig = void 0;
23401
+ Hls.defaultConfig = undefined;
23402
23402
 
23403
23403
  return Hls;
23404
23404