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.mjs CHANGED
@@ -173,10 +173,10 @@ var PlaylistLevelType = {
173
173
  class EWMA {
174
174
  // About half of the estimated value will be from the last |halfLife| samples by weight.
175
175
  constructor(halfLife, estimate = 0, weight = 0) {
176
- this.halfLife = void 0;
177
- this.alpha_ = void 0;
178
- this.estimate_ = void 0;
179
- this.totalWeight_ = void 0;
176
+ this.halfLife = undefined;
177
+ this.alpha_ = undefined;
178
+ this.estimate_ = undefined;
179
+ this.totalWeight_ = undefined;
180
180
  this.halfLife = halfLife;
181
181
  // Larger values of alpha expire historical data more slowly.
182
182
  this.alpha_ = halfLife ? Math.exp(Math.log(0.5) / halfLife) : 0;
@@ -212,13 +212,13 @@ class EWMA {
212
212
 
213
213
  class EwmaBandWidthEstimator {
214
214
  constructor(slow, fast, defaultEstimate, defaultTTFB = 100) {
215
- this.defaultEstimate_ = void 0;
216
- this.minWeight_ = void 0;
217
- this.minDelayMs_ = void 0;
218
- this.slow_ = void 0;
219
- this.fast_ = void 0;
220
- this.defaultTTFB_ = void 0;
221
- this.ttfb_ = void 0;
215
+ this.defaultEstimate_ = undefined;
216
+ this.minWeight_ = undefined;
217
+ this.minDelayMs_ = undefined;
218
+ this.slow_ = undefined;
219
+ this.fast_ = undefined;
220
+ this.defaultTTFB_ = undefined;
221
+ this.ttfb_ = undefined;
222
222
  this.defaultEstimate_ = defaultEstimate;
223
223
  this.minWeight_ = 0.001;
224
224
  this.minDelayMs_ = 50;
@@ -290,9 +290,9 @@ class EwmaBandWidthEstimator {
290
290
  function _defineProperty(e, r, t) {
291
291
  return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
292
292
  value: t,
293
- enumerable: !0,
294
- configurable: !0,
295
- writable: !0
293
+ enumerable: true,
294
+ configurable: true,
295
+ writable: true
296
296
  }) : e[r] = t, e;
297
297
  }
298
298
  function _extends() {
@@ -317,7 +317,7 @@ function ownKeys(e, r) {
317
317
  function _objectSpread2(e) {
318
318
  for (var r = 1; r < arguments.length; r++) {
319
319
  var t = null != arguments[r] ? arguments[r] : {};
320
- r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
320
+ r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
321
321
  _defineProperty(e, r, t[r]);
322
322
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
323
323
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
@@ -328,7 +328,7 @@ function _objectSpread2(e) {
328
328
  function _toPrimitive(t, r) {
329
329
  if ("object" != typeof t || !t) return t;
330
330
  var e = t[Symbol.toPrimitive];
331
- if (void 0 !== e) {
331
+ if (undefined !== e) {
332
332
  var i = e.call(t, r || "default");
333
333
  if ("object" != typeof i) return i;
334
334
  throw new TypeError("@@toPrimitive must return a primitive value.");
@@ -342,12 +342,12 @@ function _toPropertyKey(t) {
342
342
 
343
343
  class Logger {
344
344
  constructor(label, logger) {
345
- this.trace = void 0;
346
- this.debug = void 0;
347
- this.log = void 0;
348
- this.warn = void 0;
349
- this.info = void 0;
350
- this.error = void 0;
345
+ this.trace = undefined;
346
+ this.debug = undefined;
347
+ this.log = undefined;
348
+ this.warn = undefined;
349
+ this.info = undefined;
350
+ this.error = undefined;
351
351
  const lb = `[${label}]:`;
352
352
  this.trace = noop;
353
353
  this.debug = logger.debug.bind(null, lb);
@@ -401,7 +401,7 @@ function enableLogs(debugConfig, context, id) {
401
401
  // Some browsers don't allow to use bind on console object anyway
402
402
  // fallback to default if needed
403
403
  try {
404
- newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-beta.2.0.canary.10878"}`);
404
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-beta.2.0.canary.10882"}`);
405
405
  } catch (e) {
406
406
  /* log fn threw an exception. All logger methods are no-ops. */
407
407
  return createLogger();
@@ -524,7 +524,7 @@ function areCodecsMediaSourceSupported(codecs, type, preferManagedMediaSource =
524
524
  function isCodecMediaSourceSupported(codec, type, preferManagedMediaSource = true) {
525
525
  var _MediaSource$isTypeSu;
526
526
  const MediaSource = getMediaSource(preferManagedMediaSource);
527
- return (_MediaSource$isTypeSu = MediaSource == null ? void 0 : MediaSource.isTypeSupported(mimeTypeForCodec(codec, type))) != null ? _MediaSource$isTypeSu : false;
527
+ return (_MediaSource$isTypeSu = MediaSource == null ? undefined : MediaSource.isTypeSupported(mimeTypeForCodec(codec, type))) != null ? _MediaSource$isTypeSu : false;
528
528
  }
529
529
  function mimeTypeForCodec(codec, type) {
530
530
  return `${type}/mp4;codecs=${codec}`;
@@ -647,8 +647,8 @@ const SUPPORTED_INFO_CACHE = {};
647
647
  function requiresMediaCapabilitiesDecodingInfo(level, audioTracksByGroup, currentVideoRange, currentFrameRate, currentBw, audioPreference) {
648
648
  // Only test support when configuration is exceeds minimum options
649
649
  const audioGroups = level.audioCodec ? level.audioGroups : null;
650
- const audioCodecPreference = audioPreference == null ? void 0 : audioPreference.audioCodec;
651
- const channelsPreference = audioPreference == null ? void 0 : audioPreference.channels;
650
+ const audioCodecPreference = audioPreference == null ? undefined : audioPreference.audioCodec;
651
+ const channelsPreference = audioPreference == null ? undefined : audioPreference.channels;
652
652
  const maxChannels = channelsPreference ? parseInt(channelsPreference) : audioCodecPreference ? Infinity : 2;
653
653
  let audioChannels = null;
654
654
  if (audioGroups != null && audioGroups.length) {
@@ -710,7 +710,7 @@ function getMediaDecodingInfoPromise(level, audioTracksByGroup, mediaCapabilitie
710
710
  if (!audioGroupId) {
711
711
  return;
712
712
  }
713
- (_audioTracksByGroup$g = audioTracksByGroup.groups[audioGroupId]) == null ? void 0 : _audioTracksByGroup$g.tracks.forEach(audioTrack => {
713
+ (_audioTracksByGroup$g = audioTracksByGroup.groups[audioGroupId]) == null ? undefined : _audioTracksByGroup$g.tracks.forEach(audioTrack => {
714
714
  if (audioTrack.groupId === audioGroupId) {
715
715
  const channels = audioTrack.channels || '';
716
716
  const channelsNumber = parseFloat(channels);
@@ -795,9 +795,9 @@ function getSkipValue(details) {
795
795
  }
796
796
  class HlsUrlParameters {
797
797
  constructor(msn, part, skip) {
798
- this.msn = void 0;
799
- this.part = void 0;
800
- this.skip = void 0;
798
+ this.msn = undefined;
799
+ this.part = undefined;
800
+ this.skip = undefined;
801
801
  this.msn = msn;
802
802
  this.part = part;
803
803
  this.skip = skip;
@@ -818,27 +818,27 @@ class HlsUrlParameters {
818
818
  }
819
819
  class Level {
820
820
  constructor(data) {
821
- this._attrs = void 0;
822
- this.audioCodec = void 0;
823
- this.bitrate = void 0;
824
- this.codecSet = void 0;
825
- this.url = void 0;
826
- this.frameRate = void 0;
827
- this.height = void 0;
828
- this.id = void 0;
829
- this.name = void 0;
830
- this.videoCodec = void 0;
831
- this.width = void 0;
832
- this.details = void 0;
821
+ this._attrs = undefined;
822
+ this.audioCodec = undefined;
823
+ this.bitrate = undefined;
824
+ this.codecSet = undefined;
825
+ this.url = undefined;
826
+ this.frameRate = undefined;
827
+ this.height = undefined;
828
+ this.id = undefined;
829
+ this.name = undefined;
830
+ this.videoCodec = undefined;
831
+ this.width = undefined;
832
+ this.details = undefined;
833
833
  this.fragmentError = 0;
834
834
  this.loadError = 0;
835
- this.loaded = void 0;
835
+ this.loaded = undefined;
836
836
  this.realBitrate = 0;
837
- this.supportedPromise = void 0;
838
- this.supportedResult = void 0;
837
+ this.supportedPromise = undefined;
838
+ this.supportedResult = undefined;
839
839
  this._avgBitrate = 0;
840
- this._audioGroups = void 0;
841
- this._subtitleGroups = void 0;
840
+ this._audioGroups = undefined;
841
+ this._subtitleGroups = undefined;
842
842
  // Deprecated (retained for backwards compatibility)
843
843
  this._urlId = 0;
844
844
  this.url = [data.url];
@@ -931,11 +931,11 @@ class Level {
931
931
  }
932
932
  get audioGroupId() {
933
933
  var _this$audioGroups;
934
- return (_this$audioGroups = this.audioGroups) == null ? void 0 : _this$audioGroups[0];
934
+ return (_this$audioGroups = this.audioGroups) == null ? undefined : _this$audioGroups[0];
935
935
  }
936
936
  get textGroupId() {
937
937
  var _this$subtitleGroups;
938
- return (_this$subtitleGroups = this.subtitleGroups) == null ? void 0 : _this$subtitleGroups[0];
938
+ return (_this$subtitleGroups = this.subtitleGroups) == null ? undefined : _this$subtitleGroups[0];
939
939
  }
940
940
  addFallback() {}
941
941
  }
@@ -1002,9 +1002,9 @@ function getVideoSelectionOptions(currentVideoRange, videoPreference) {
1002
1002
 
1003
1003
  function getStartCodecTier(codecTiers, currentVideoRange, currentBw, audioPreference, videoPreference) {
1004
1004
  const codecSets = Object.keys(codecTiers);
1005
- const channelsPreference = audioPreference == null ? void 0 : audioPreference.channels;
1006
- const audioCodecPreference = audioPreference == null ? void 0 : audioPreference.audioCodec;
1007
- const videoCodecPreference = videoPreference == null ? void 0 : videoPreference.videoCodec;
1005
+ const channelsPreference = audioPreference == null ? undefined : audioPreference.channels;
1006
+ const audioCodecPreference = audioPreference == null ? undefined : audioPreference.audioCodec;
1007
+ const videoCodecPreference = videoPreference == null ? undefined : videoPreference.videoCodec;
1008
1008
  const preferStereo = channelsPreference && parseInt(channelsPreference) === 2;
1009
1009
  // Use first level set to determine stereo, and minimum resolution and framerate
1010
1010
  let hasStereo = false;
@@ -1308,13 +1308,13 @@ function searchDownAndUpList(arr, searchIndex, predicate) {
1308
1308
  }
1309
1309
  function useAlternateAudio(audioTrackUrl, hls) {
1310
1310
  var _hls$levels$hls$loadL;
1311
- return !!audioTrackUrl && audioTrackUrl !== ((_hls$levels$hls$loadL = hls.levels[hls.loadLevel]) == null ? void 0 : _hls$levels$hls$loadL.uri);
1311
+ return !!audioTrackUrl && audioTrackUrl !== ((_hls$levels$hls$loadL = hls.levels[hls.loadLevel]) == null ? undefined : _hls$levels$hls$loadL.uri);
1312
1312
  }
1313
1313
 
1314
1314
  class AbrController extends Logger {
1315
1315
  constructor(_hls) {
1316
1316
  super('abr', _hls.logger);
1317
- this.hls = void 0;
1317
+ this.hls = undefined;
1318
1318
  this.lastLevelLoadSec = 0;
1319
1319
  this.lastLoadedFragLevel = -1;
1320
1320
  this.firstSelection = -1;
@@ -1326,7 +1326,7 @@ class AbrController extends Logger {
1326
1326
  this.fragCurrent = null;
1327
1327
  this.partCurrent = null;
1328
1328
  this.bitrateTestDelay = 0;
1329
- this.bwEstimator = void 0;
1329
+ this.bwEstimator = undefined;
1330
1330
  /*
1331
1331
  This method monitors the download rate of the current fragment, and will downswitch if that fragment will not load
1332
1332
  quickly enough to prevent underbuffering
@@ -1394,7 +1394,7 @@ class AbrController extends Logger {
1394
1394
  return;
1395
1395
  }
1396
1396
  const bwe = loadRate ? loadRate * 8 : bwEstimate;
1397
- const live = ((_this$hls$latestLevel = this.hls.latestLevelDetails) == null ? void 0 : _this$hls$latestLevel.live) === true;
1397
+ const live = ((_this$hls$latestLevel = this.hls.latestLevelDetails) == null ? undefined : _this$hls$latestLevel.live) === true;
1398
1398
  const abrBandWidthUpFactor = this.hls.config.abrBandWidthUpFactor;
1399
1399
  let fragLevelNextLoadedDelay = Number.POSITIVE_INFINITY;
1400
1400
  let nextLoadLevel;
@@ -1803,7 +1803,7 @@ class AbrController extends Logger {
1803
1803
  // If no matching level found, see if min auto level would be a better option
1804
1804
  const minLevel = hls.levels[minAutoLevel];
1805
1805
  const autoLevel = hls.levels[hls.loadLevel];
1806
- if ((minLevel == null ? void 0 : minLevel.bitrate) < (autoLevel == null ? void 0 : autoLevel.bitrate)) {
1806
+ if ((minLevel == null ? undefined : minLevel.bitrate) < (autoLevel == null ? undefined : autoLevel.bitrate)) {
1807
1807
  return minAutoLevel;
1808
1808
  }
1809
1809
  // or if bitrate is not lower, continue to use loadLevel
@@ -1847,7 +1847,7 @@ class AbrController extends Logger {
1847
1847
  const firstSelection = loadLevel === -1 || lastLoadedFragLevel === -1;
1848
1848
  let currentCodecSet;
1849
1849
  let currentVideoRange = 'SDR';
1850
- let currentFrameRate = (level == null ? void 0 : level.frameRate) || 0;
1850
+ let currentFrameRate = (level == null ? undefined : level.frameRate) || 0;
1851
1851
  const {
1852
1852
  audioPreference,
1853
1853
  videoPreference
@@ -1875,8 +1875,8 @@ class AbrController extends Logger {
1875
1875
  currentBw = Math.max(currentBw, minBitrate);
1876
1876
  this.log(`picked start tier ${JSON.stringify(startTier)}`);
1877
1877
  } else {
1878
- currentCodecSet = level == null ? void 0 : level.codecSet;
1879
- currentVideoRange = level == null ? void 0 : level.videoRange;
1878
+ currentCodecSet = level == null ? undefined : level.codecSet;
1879
+ currentVideoRange = level == null ? undefined : level.videoRange;
1880
1880
  }
1881
1881
  const currentFragDuration = partCurrent ? partCurrent.duration : fragCurrent ? fragCurrent.duration : 0;
1882
1882
  const ttfbEstimateSec = this.bwEstimator.getEstimateTTFB() / 1000;
@@ -1891,7 +1891,7 @@ class AbrController extends Logger {
1891
1891
  if (config.useMediaCapabilities && !levelInfo.supportedResult && !levelInfo.supportedPromise) {
1892
1892
  var _levelInfo$videoCodec;
1893
1893
  const mediaCapabilities = navigator.mediaCapabilities;
1894
- if (typeof (mediaCapabilities == null ? void 0 : mediaCapabilities.decodingInfo) === 'function' && (requiresMediaCapabilitiesDecodingInfo(levelInfo, audioTracksByGroup, currentVideoRange, currentFrameRate, currentBw, audioPreference) || ((_levelInfo$videoCodec = levelInfo.videoCodec) == null ? void 0 : _levelInfo$videoCodec.substring(0, 4)) === 'hvc1') // Force media capabilities check for HEVC to avoid failure on Windows
1894
+ if (typeof (mediaCapabilities == null ? undefined : mediaCapabilities.decodingInfo) === 'function' && (requiresMediaCapabilitiesDecodingInfo(levelInfo, audioTracksByGroup, currentVideoRange, currentFrameRate, currentBw, audioPreference) || ((_levelInfo$videoCodec = levelInfo.videoCodec) == null ? undefined : _levelInfo$videoCodec.substring(0, 4)) === 'hvc1') // Force media capabilities check for HEVC to avoid failure on Windows
1895
1895
  ) {
1896
1896
  levelInfo.supportedPromise = getMediaDecodingInfoPromise(levelInfo, audioTracksByGroup, mediaCapabilities);
1897
1897
  levelInfo.supportedPromise.then(decodingInfo => {
@@ -1928,7 +1928,7 @@ class AbrController extends Logger {
1928
1928
  }
1929
1929
  }
1930
1930
  const levelDetails = levelInfo.details;
1931
- const avgDuration = (partCurrent ? levelDetails == null ? void 0 : levelDetails.partTarget : levelDetails == null ? void 0 : levelDetails.averagetargetduration) || currentFragDuration;
1931
+ const avgDuration = (partCurrent ? levelDetails == null ? undefined : levelDetails.partTarget : levelDetails == null ? undefined : levelDetails.averagetargetduration) || currentFragDuration;
1932
1932
  let adjustedbw;
1933
1933
  // follow algorithm captured from stagefright :
1934
1934
  // https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/httplive/LiveSession.cpp
@@ -2221,7 +2221,7 @@ function shouldRetry(retryConfig, retryCount, isTimeout, loaderResponse) {
2221
2221
  if (!retryConfig) {
2222
2222
  return false;
2223
2223
  }
2224
- const httpStatus = loaderResponse == null ? void 0 : loaderResponse.code;
2224
+ const httpStatus = loaderResponse == null ? undefined : loaderResponse.code;
2225
2225
  const retry = retryCount < retryConfig.maxNumRetry && (retryForHttpStatus(httpStatus) || !!isTimeout);
2226
2226
  return retryConfig.shouldRetry ? retryConfig.shouldRetry(retryConfig, retryCount, isTimeout, loaderResponse, retry) : retry;
2227
2227
  }
@@ -2247,7 +2247,7 @@ var ErrorActionFlags = {
2247
2247
  class ErrorController extends Logger {
2248
2248
  constructor(hls) {
2249
2249
  super('error-controller', hls.logger);
2250
- this.hls = void 0;
2250
+ this.hls = undefined;
2251
2251
  this.playlistError = 0;
2252
2252
  this.penalizedRenditions = {};
2253
2253
  this.hls = hls;
@@ -2280,7 +2280,7 @@ class ErrorController extends Logger {
2280
2280
  this.playlistError = 0;
2281
2281
  }
2282
2282
  getVariantLevelIndex(frag) {
2283
- return (frag == null ? void 0 : frag.type) === PlaylistLevelType.MAIN ? frag.level : this.hls.loadLevel;
2283
+ return (frag == null ? undefined : frag.type) === PlaylistLevelType.MAIN ? frag.level : this.hls.loadLevel;
2284
2284
  }
2285
2285
  onManifestLoading() {
2286
2286
  this.playlistError = 0;
@@ -2335,7 +2335,7 @@ class ErrorController extends Logger {
2335
2335
  return;
2336
2336
  case ErrorDetails.LEVEL_LOAD_ERROR:
2337
2337
  case ErrorDetails.LEVEL_LOAD_TIMEOUT:
2338
- if (typeof (context == null ? void 0 : context.level) === 'number') {
2338
+ if (typeof (context == null ? undefined : context.level) === 'number') {
2339
2339
  data.errorAction = this.getPlaylistRetryOrSwitchAction(data, context.level);
2340
2340
  }
2341
2341
  return;
@@ -2358,7 +2358,7 @@ class ErrorController extends Logger {
2358
2358
  case ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:
2359
2359
  {
2360
2360
  const level = hls.levels[hls.loadLevel];
2361
- const restrictedHdcpLevel = level == null ? void 0 : level.attrs['HDCP-LEVEL'];
2361
+ const restrictedHdcpLevel = level == null ? undefined : level.attrs['HDCP-LEVEL'];
2362
2362
  if (restrictedHdcpLevel) {
2363
2363
  data.errorAction = {
2364
2364
  action: NetworkErrorAction.SendAlternateToPenaltyBox,
@@ -2480,7 +2480,7 @@ class ErrorController extends Logger {
2480
2480
  if (!hls.autoLevelEnabled) {
2481
2481
  hls.loadLevel = -1;
2482
2482
  }
2483
- const fragErrorType = (_data$frag2 = data.frag) == null ? void 0 : _data$frag2.type;
2483
+ const fragErrorType = (_data$frag2 = data.frag) == null ? undefined : _data$frag2.type;
2484
2484
  // Find alternate audio codec if available on audio codec error
2485
2485
  const isAudioCodecError = fragErrorType === PlaylistLevelType.AUDIO && errorDetails === ErrorDetails.FRAG_PARSING_ERROR || data.sourceBufferName === 'audio' && (errorDetails === ErrorDetails.BUFFER_ADD_CODEC_ERROR || errorDetails === ErrorDetails.BUFFER_APPEND_ERROR);
2486
2486
  const findAudioCodecAlternate = isAudioCodecError && levels.some(({
@@ -2540,7 +2540,7 @@ class ErrorController extends Logger {
2540
2540
  }
2541
2541
  onErrorOut(event, data) {
2542
2542
  var _data$errorAction;
2543
- switch ((_data$errorAction = data.errorAction) == null ? void 0 : _data$errorAction.action) {
2543
+ switch ((_data$errorAction = data.errorAction) == null ? undefined : _data$errorAction.action) {
2544
2544
  case NetworkErrorAction.DoNothing:
2545
2545
  break;
2546
2546
  case NetworkErrorAction.SendAlternateToPenaltyBox:
@@ -2623,7 +2623,7 @@ class FragmentTracker {
2623
2623
  this.fragments = Object.create(null);
2624
2624
  this.timeRanges = Object.create(null);
2625
2625
  this.bufferPadding = 0.2;
2626
- this.hls = void 0;
2626
+ this.hls = undefined;
2627
2627
  this.hasGaps = false;
2628
2628
  this.hls = hls;
2629
2629
  this._registerListeners();
@@ -2692,7 +2692,7 @@ class FragmentTracker {
2692
2692
  const keys = Object.keys(fragments);
2693
2693
  for (let i = keys.length; i--;) {
2694
2694
  const fragmentEntity = fragments[keys[i]];
2695
- if ((fragmentEntity == null ? void 0 : fragmentEntity.body.type) === levelType && (!buffered || fragmentEntity.buffered)) {
2695
+ if ((fragmentEntity == null ? undefined : fragmentEntity.body.type) === levelType && (!buffered || fragmentEntity.buffered)) {
2696
2696
  const frag = fragmentEntity.body;
2697
2697
  if (frag.start <= position && position <= frag.end) {
2698
2698
  return frag;
@@ -2713,7 +2713,7 @@ class FragmentTracker {
2713
2713
  }
2714
2714
  // Check if any flagged fragments have been unloaded
2715
2715
  // excluding anything newer than appendedPartSn
2716
- const appendedPartSn = (appendedPart == null ? void 0 : appendedPart.fragment.sn) || -1;
2716
+ const appendedPartSn = (appendedPart == null ? undefined : appendedPart.fragment.sn) || -1;
2717
2717
  Object.keys(this.fragments).forEach(key => {
2718
2718
  const fragmentEntity = this.fragments[key];
2719
2719
  if (!fragmentEntity) {
@@ -2983,7 +2983,7 @@ class FragmentTracker {
2983
2983
  }
2984
2984
  for (let i = keys.length; i--;) {
2985
2985
  const fragmentEntity = fragments[keys[i]];
2986
- if ((fragmentEntity == null ? void 0 : fragmentEntity.body.type) === type) {
2986
+ if ((fragmentEntity == null ? undefined : fragmentEntity.body.type) === type) {
2987
2987
  return true;
2988
2988
  }
2989
2989
  }
@@ -3031,7 +3031,7 @@ class FragmentTracker {
3031
3031
  this.endListFragments = Object.create(null);
3032
3032
  this.activePartLists = Object.create(null);
3033
3033
  this.hasGaps = false;
3034
- const partlist = (_this$hls = this.hls) == null ? void 0 : (_this$hls$latestLevel = _this$hls.latestLevelDetails) == null ? void 0 : _this$hls$latestLevel.partList;
3034
+ const partlist = (_this$hls = this.hls) == null ? undefined : (_this$hls$latestLevel = _this$hls.latestLevelDetails) == null ? undefined : _this$hls$latestLevel.partList;
3035
3035
  if (partlist) {
3036
3036
  partlist.forEach(part => part.clearElementaryStreamInfo());
3037
3037
  }
@@ -3039,7 +3039,7 @@ class FragmentTracker {
3039
3039
  }
3040
3040
  function isPartial(fragmentEntity) {
3041
3041
  var _fragmentEntity$range, _fragmentEntity$range2, _fragmentEntity$range3;
3042
- 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));
3042
+ 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));
3043
3043
  }
3044
3044
  function getFragmentKey(fragment) {
3045
3045
  return `${fragment.type}_${fragment.level}_${fragment.sn}`;
@@ -3052,9 +3052,9 @@ var DecrypterAesMode = {
3052
3052
 
3053
3053
  class AESCrypto {
3054
3054
  constructor(subtle, iv, aesMode) {
3055
- this.subtle = void 0;
3056
- this.aesIV = void 0;
3057
- this.aesMode = void 0;
3055
+ this.subtle = undefined;
3056
+ this.aesIV = undefined;
3057
+ this.aesMode = undefined;
3058
3058
  this.subtle = subtle;
3059
3059
  this.aesIV = iv;
3060
3060
  this.aesMode = aesMode;
@@ -3105,8 +3105,8 @@ class AESDecryptor {
3105
3105
  this.key = new Uint32Array(0);
3106
3106
  this.ksRows = 0;
3107
3107
  this.keySize = 0;
3108
- this.keySchedule = void 0;
3109
- this.invKeySchedule = void 0;
3108
+ this.keySchedule = undefined;
3109
+ this.invKeySchedule = undefined;
3110
3110
  this.initTable();
3111
3111
  }
3112
3112
 
@@ -3320,9 +3320,9 @@ class AESDecryptor {
3320
3320
 
3321
3321
  class FastAESKey {
3322
3322
  constructor(subtle, key, aesMode) {
3323
- this.subtle = void 0;
3324
- this.key = void 0;
3325
- this.aesMode = void 0;
3323
+ this.subtle = undefined;
3324
+ this.key = undefined;
3325
+ this.aesMode = undefined;
3326
3326
  this.subtle = subtle;
3327
3327
  this.key = key;
3328
3328
  this.aesMode = aesMode;
@@ -3653,9 +3653,9 @@ class BaseSegment {
3653
3653
  this._stats = null;
3654
3654
  this._streams = null;
3655
3655
  // baseurl is the URL to the playlist
3656
- this.base = void 0;
3656
+ this.base = undefined;
3657
3657
  // relurl is the portion of the URL that comes from inside the playlist.
3658
- this.relurl = void 0;
3658
+ this.relurl = undefined;
3659
3659
  if (typeof base === 'string') {
3660
3660
  base = {
3661
3661
  url: base
@@ -3669,7 +3669,7 @@ class BaseSegment {
3669
3669
  const params = value.split('@', 2);
3670
3670
  let start;
3671
3671
  if (params.length === 1) {
3672
- start = (previous == null ? void 0 : previous.byteRangeEndOffset) || 0;
3672
+ start = (previous == null ? undefined : previous.byteRangeEndOffset) || 0;
3673
3673
  } else {
3674
3674
  start = parseInt(params[1]);
3675
3675
  }
@@ -3752,7 +3752,7 @@ class Fragment extends BaseSegment {
3752
3752
  this._programDateTime = null;
3753
3753
  this._ref = null;
3754
3754
  // Approximate bit rate of the fragment expressed in bits per second (bps) as indicated by the last EXT-X-BITRATE (kbps) tag
3755
- this._bitrate = void 0;
3755
+ this._bitrate = undefined;
3756
3756
  this.rawProgramDateTime = null;
3757
3757
  this.tagList = [];
3758
3758
  // EXTINF has to be present for a m3u8 to be considered valid
@@ -3762,9 +3762,9 @@ class Fragment extends BaseSegment {
3762
3762
  // levelkeys are the EXT-X-KEY tags that apply to this segment for decryption
3763
3763
  // core difference from the private field _decryptdata is the lack of the initialized IV
3764
3764
  // _decryptdata will set the IV for this segment based on the segment number in the fragment
3765
- this.levelkeys = void 0;
3765
+ this.levelkeys = undefined;
3766
3766
  // A string representing the fragment type
3767
- this.type = void 0;
3767
+ this.type = undefined;
3768
3768
  // A reference to the loader. Set while the fragment is loading, and removed afterwards. Used to abort fragment loading
3769
3769
  this.loader = null;
3770
3770
  // A reference to the key loader. Set while the key is loading, and removed afterwards. Used to abort key loading
@@ -3774,25 +3774,25 @@ class Fragment extends BaseSegment {
3774
3774
  // The continuity counter of the fragment
3775
3775
  this.cc = 0;
3776
3776
  // The starting Presentation Time Stamp (PTS) of the fragment. Set after transmux complete.
3777
- this.startPTS = void 0;
3777
+ this.startPTS = undefined;
3778
3778
  // The ending Presentation Time Stamp (PTS) of the fragment. Set after transmux complete.
3779
- this.endPTS = void 0;
3779
+ this.endPTS = undefined;
3780
3780
  // The starting Decode Time Stamp (DTS) of the fragment. Set after transmux complete.
3781
- this.startDTS = void 0;
3781
+ this.startDTS = undefined;
3782
3782
  // The ending Decode Time Stamp (DTS) of the fragment. Set after transmux complete.
3783
- this.endDTS = void 0;
3783
+ this.endDTS = undefined;
3784
3784
  // The start time of the fragment, as listed in the manifest. Updated after transmux complete.
3785
3785
  this.start = 0;
3786
3786
  // The offset time (seconds) of the fragment from the start of the Playlist
3787
3787
  this.playlistOffset = 0;
3788
3788
  // Set by `updateFragPTSDTS` in level-helper
3789
- this.deltaPTS = void 0;
3789
+ this.deltaPTS = undefined;
3790
3790
  // The maximum starting Presentation Time Stamp (audio/video PTS) of the fragment. Set after transmux complete.
3791
- this.maxStartPTS = void 0;
3791
+ this.maxStartPTS = undefined;
3792
3792
  // The minimum ending Presentation Time Stamp (audio/video PTS) of the fragment. Set after transmux complete.
3793
- this.minEndPTS = void 0;
3793
+ this.minEndPTS = undefined;
3794
3794
  // Init Segment bytes (unset for media segments)
3795
- this.data = void 0;
3795
+ this.data = undefined;
3796
3796
  // A flag indicating whether the segment was downloaded in order to test bitrate, and was not buffered
3797
3797
  this.bitrateTest = false;
3798
3798
  // #EXTINF segment title
@@ -3800,9 +3800,9 @@ class Fragment extends BaseSegment {
3800
3800
  // The Media Initialization Section for this segment
3801
3801
  this.initSegment = null;
3802
3802
  // Fragment is the last fragment in the media playlist
3803
- this.endList = void 0;
3803
+ this.endList = undefined;
3804
3804
  // Fragment is marked by an EXT-X-GAP tag indicating that it does not contain media data and should not be loaded
3805
- this.gap = void 0;
3805
+ this.gap = undefined;
3806
3806
  // Deprecated
3807
3807
  this.urlId = 0;
3808
3808
  this.type = type;
@@ -3934,8 +3934,8 @@ class Fragment extends BaseSegment {
3934
3934
  }
3935
3935
  abortRequests() {
3936
3936
  var _this$loader, _this$keyLoader;
3937
- (_this$loader = this.loader) == null ? void 0 : _this$loader.abort();
3938
- (_this$keyLoader = this.keyLoader) == null ? void 0 : _this$keyLoader.abort();
3937
+ (_this$loader = this.loader) == null ? undefined : _this$loader.abort();
3938
+ (_this$keyLoader = this.keyLoader) == null ? undefined : _this$keyLoader.abort();
3939
3939
  }
3940
3940
  setElementaryStreamInfo(type, startPTS, endPTS, startDTS, endDTS, partial = false) {
3941
3941
  const {
@@ -3969,9 +3969,9 @@ class Part extends BaseSegment {
3969
3969
  this.duration = 0;
3970
3970
  this.gap = false;
3971
3971
  this.independent = false;
3972
- this.relurl = void 0;
3973
- this.fragment = void 0;
3974
- this.index = void 0;
3972
+ this.relurl = undefined;
3973
+ this.fragment = undefined;
3974
+ this.index = undefined;
3975
3975
  this.duration = partAttrs.decimalFloatingPoint('DURATION');
3976
3976
  this.gap = partAttrs.bool('GAP');
3977
3977
  this.independent = partAttrs.bool('INDEPENDENT');
@@ -4523,8 +4523,8 @@ function getDuration(data, initData) {
4523
4523
  continue;
4524
4524
  }
4525
4525
  const trackDefault = track.default;
4526
- const tfhdFlags = readUint32(tfhd, 0) | (trackDefault == null ? void 0 : trackDefault.flags);
4527
- let sampleDuration = trackDefault == null ? void 0 : trackDefault.duration;
4526
+ const tfhdFlags = readUint32(tfhd, 0) | (trackDefault == null ? undefined : trackDefault.flags);
4527
+ let sampleDuration = trackDefault == null ? undefined : trackDefault.duration;
4528
4528
  if (tfhdFlags & 0x000008) {
4529
4529
  // 0x000008 indicates the presence of the default_sample_duration field
4530
4530
  if (tfhdFlags & 0x000002) {
@@ -5176,7 +5176,7 @@ class Decrypter {
5176
5176
  removePKCS7Padding = true
5177
5177
  } = {}) {
5178
5178
  this.logEnabled = true;
5179
- this.removePKCS7Padding = void 0;
5179
+ this.removePKCS7Padding = undefined;
5180
5180
  this.subtle = null;
5181
5181
  this.softwareDecrypter = null;
5182
5182
  this.key = null;
@@ -5184,8 +5184,8 @@ class Decrypter {
5184
5184
  this.remainderData = null;
5185
5185
  this.currentIV = null;
5186
5186
  this.currentResult = null;
5187
- this.useSoftware = void 0;
5188
- this.enableSoftwareAES = void 0;
5187
+ this.useSoftware = undefined;
5188
+ this.enableSoftwareAES = undefined;
5189
5189
  this.enableSoftwareAES = config.enableSoftwareAES;
5190
5190
  this.removePKCS7Padding = removePKCS7Padding;
5191
5191
  // built in decryptor expects PKCS7 padding
@@ -5353,7 +5353,7 @@ const MIN_CHUNK_SIZE = Math.pow(2, 17); // 128kb
5353
5353
 
5354
5354
  class FragmentLoader {
5355
5355
  constructor(config) {
5356
- this.config = void 0;
5356
+ this.config = undefined;
5357
5357
  this.loader = null;
5358
5358
  this.partLoadTimeout = -1;
5359
5359
  this.config = config;
@@ -5619,7 +5619,7 @@ function createLoaderContext(frag, part = null) {
5619
5619
  var _frag$decryptdata;
5620
5620
  let byteRangeStart = start;
5621
5621
  let byteRangeEnd = end;
5622
- if (frag.sn === 'initSegment' && isMethodFullSegmentAesCbc((_frag$decryptdata = frag.decryptdata) == null ? void 0 : _frag$decryptdata.method)) {
5622
+ if (frag.sn === 'initSegment' && isMethodFullSegmentAesCbc((_frag$decryptdata = frag.decryptdata) == null ? undefined : _frag$decryptdata.method)) {
5623
5623
  // MAP segment encrypted with method 'AES-128' or 'AES-256' (cbc), when served with HTTP Range,
5624
5624
  // has the unencrypted size specified in the range.
5625
5625
  // Ref: https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-08#section-6.3.6
@@ -5659,7 +5659,7 @@ function isMethodFullSegmentAesCbc(method) {
5659
5659
  class LoadError extends Error {
5660
5660
  constructor(data) {
5661
5661
  super(data.error.message);
5662
- this.data = void 0;
5662
+ this.data = undefined;
5663
5663
  this.data = data;
5664
5664
  }
5665
5665
  }
@@ -5696,7 +5696,7 @@ class LoadError extends Error {
5696
5696
  class TaskLoop extends Logger {
5697
5697
  constructor(label, logger) {
5698
5698
  super(label, logger);
5699
- this._boundTick = void 0;
5699
+ this._boundTick = undefined;
5700
5700
  this._tickTimer = null;
5701
5701
  this._tickInterval = null;
5702
5702
  this._tickCallCount = 0;
@@ -5788,12 +5788,12 @@ class TaskLoop extends Logger {
5788
5788
 
5789
5789
  class ChunkMetadata {
5790
5790
  constructor(level, sn, id, size = 0, part = -1, partial = false) {
5791
- this.level = void 0;
5792
- this.sn = void 0;
5793
- this.part = void 0;
5794
- this.id = void 0;
5795
- this.size = void 0;
5796
- this.partial = void 0;
5791
+ this.level = undefined;
5792
+ this.sn = undefined;
5793
+ this.part = undefined;
5794
+ this.id = undefined;
5795
+ this.size = undefined;
5796
+ this.partial = undefined;
5797
5797
  this.transmuxing = getNewPerformanceTiming();
5798
5798
  this.buffering = {
5799
5799
  audio: getNewPerformanceTiming(),
@@ -5953,7 +5953,7 @@ function substituteVariables(parsed, value) {
5953
5953
  const variableList = parsed.variableList;
5954
5954
  return value.replace(VARIABLE_REPLACEMENT_REGEX, variableReference => {
5955
5955
  const variableName = variableReference.substring(2, variableReference.length - 1);
5956
- const variableValue = variableList == null ? void 0 : variableList[variableName];
5956
+ const variableValue = variableList == null ? undefined : variableList[variableName];
5957
5957
  if (variableValue === undefined) {
5958
5958
  parsed.playlistParsingError || (parsed.playlistParsingError = new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${variableName}"`));
5959
5959
  return variableReference;
@@ -6163,16 +6163,16 @@ function isSCTE35Attribute(attrName) {
6163
6163
  class DateRange {
6164
6164
  constructor(dateRangeAttr, dateRangeWithSameId, tagCount = 0) {
6165
6165
  var _dateRangeWithSameId$;
6166
- this.attr = void 0;
6167
- this.tagAnchor = void 0;
6168
- this.tagOrder = void 0;
6169
- this._startDate = void 0;
6170
- this._endDate = void 0;
6171
- this._dateAtEnd = void 0;
6172
- this._cue = void 0;
6173
- this._badValueForSameId = void 0;
6174
- this.tagAnchor = (dateRangeWithSameId == null ? void 0 : dateRangeWithSameId.tagAnchor) || null;
6175
- this.tagOrder = (_dateRangeWithSameId$ = dateRangeWithSameId == null ? void 0 : dateRangeWithSameId.tagOrder) != null ? _dateRangeWithSameId$ : tagCount;
6166
+ this.attr = undefined;
6167
+ this.tagAnchor = undefined;
6168
+ this.tagOrder = undefined;
6169
+ this._startDate = undefined;
6170
+ this._endDate = undefined;
6171
+ this._dateAtEnd = undefined;
6172
+ this._cue = undefined;
6173
+ this._badValueForSameId = undefined;
6174
+ this.tagAnchor = (dateRangeWithSameId == null ? undefined : dateRangeWithSameId.tagAnchor) || null;
6175
+ this.tagOrder = (_dateRangeWithSameId$ = dateRangeWithSameId == null ? undefined : dateRangeWithSameId.tagOrder) != null ? _dateRangeWithSameId$ : tagCount;
6176
6176
  if (dateRangeWithSameId) {
6177
6177
  const previousAttr = dateRangeWithSameId.attr;
6178
6178
  for (const key in previousAttr) {
@@ -6195,7 +6195,7 @@ class DateRange {
6195
6195
  this._startDate = new Date(dateRangeAttr["START-DATE"]);
6196
6196
  }
6197
6197
  if ("END-DATE" in this.attr) {
6198
- const endDate = (dateRangeWithSameId == null ? void 0 : dateRangeWithSameId.endDate) || new Date(this.attr["END-DATE"]);
6198
+ const endDate = (dateRangeWithSameId == null ? undefined : dateRangeWithSameId.endDate) || new Date(this.attr["END-DATE"]);
6199
6199
  if (isFiniteNumber(endDate.getTime())) {
6200
6200
  this._endDate = endDate;
6201
6201
  }
@@ -6280,21 +6280,21 @@ class LevelDetails {
6280
6280
  constructor(baseUrl) {
6281
6281
  this.PTSKnown = false;
6282
6282
  this.alignedSliding = false;
6283
- this.averagetargetduration = void 0;
6283
+ this.averagetargetduration = undefined;
6284
6284
  this.endCC = 0;
6285
6285
  this.endSN = 0;
6286
- this.fragments = void 0;
6287
- this.fragmentHint = void 0;
6286
+ this.fragments = undefined;
6287
+ this.fragmentHint = undefined;
6288
6288
  this.partList = null;
6289
- this.dateRanges = void 0;
6289
+ this.dateRanges = undefined;
6290
6290
  this.dateRangeTagCount = 0;
6291
6291
  this.live = true;
6292
6292
  this.requestScheduled = -1;
6293
6293
  this.ageHeader = 0;
6294
- this.advancedDateTime = void 0;
6294
+ this.advancedDateTime = undefined;
6295
6295
  this.updated = true;
6296
6296
  this.advanced = true;
6297
- this.availabilityDelay = void 0;
6297
+ this.availabilityDelay = undefined;
6298
6298
  // Manifest reload synchronization
6299
6299
  this.misses = 0;
6300
6300
  this.startCC = 0;
@@ -6303,30 +6303,30 @@ class LevelDetails {
6303
6303
  this.targetduration = 0;
6304
6304
  this.totalduration = 0;
6305
6305
  this.type = null;
6306
- this.url = void 0;
6306
+ this.url = undefined;
6307
6307
  this.m3u8 = '';
6308
6308
  this.version = null;
6309
6309
  this.canBlockReload = false;
6310
6310
  this.canSkipUntil = 0;
6311
6311
  this.canSkipDateRanges = false;
6312
6312
  this.skippedSegments = 0;
6313
- this.recentlyRemovedDateranges = void 0;
6313
+ this.recentlyRemovedDateranges = undefined;
6314
6314
  this.partHoldBack = 0;
6315
6315
  this.holdBack = 0;
6316
6316
  this.partTarget = 0;
6317
- this.preloadHint = void 0;
6318
- this.renditionReports = void 0;
6317
+ this.preloadHint = undefined;
6318
+ this.renditionReports = undefined;
6319
6319
  this.tuneInGoal = 0;
6320
- this.deltaUpdateFailed = void 0;
6320
+ this.deltaUpdateFailed = undefined;
6321
6321
  this.driftStartTime = 0;
6322
6322
  this.driftEndTime = 0;
6323
6323
  this.driftStart = 0;
6324
6324
  this.driftEnd = 0;
6325
- this.encryptedFragments = void 0;
6325
+ this.encryptedFragments = undefined;
6326
6326
  this.playlistParsingError = null;
6327
6327
  this.variableList = null;
6328
6328
  this.hasVariableRefs = false;
6329
- this.appliedTimelineOffset = void 0;
6329
+ this.appliedTimelineOffset = undefined;
6330
6330
  this.fragments = [];
6331
6331
  this.encryptedFragments = [];
6332
6332
  this.dateRanges = {};
@@ -6656,12 +6656,12 @@ class LevelKey {
6656
6656
  keyUriToKeyIdMap = {};
6657
6657
  }
6658
6658
  constructor(method, uri, format, formatversions = [1], iv = null) {
6659
- this.uri = void 0;
6660
- this.method = void 0;
6661
- this.keyFormat = void 0;
6662
- this.keyFormatVersions = void 0;
6663
- this.encrypted = void 0;
6664
- this.isCommonEncryption = void 0;
6659
+ this.uri = undefined;
6660
+ this.method = undefined;
6661
+ this.keyFormat = undefined;
6662
+ this.keyFormatVersions = undefined;
6663
+ this.encrypted = undefined;
6664
+ this.isCommonEncryption = undefined;
6665
6665
  this.iv = null;
6666
6666
  this.key = null;
6667
6667
  this.keyId = null;
@@ -7362,7 +7362,7 @@ function findFragmentWithStartDate(details, startDateTime, programDateTimes, ind
7362
7362
  const pdtStart = pdtFragment.programDateTime;
7363
7363
  if (startDateTime >= pdtStart || index === 0) {
7364
7364
  var _programDateTimes;
7365
- const durationBetweenPdt = (((_programDateTimes = programDateTimes[index + 1]) == null ? void 0 : _programDateTimes.start) || endTime) - pdtFragment.start;
7365
+ const durationBetweenPdt = (((_programDateTimes = programDateTimes[index + 1]) == null ? undefined : _programDateTimes.start) || endTime) - pdtFragment.start;
7366
7366
  if (startDateTime <= pdtStart + durationBetweenPdt * 1000) {
7367
7367
  // map to fragment with date-time range
7368
7368
  const startIndex = programDateTimes[index].sn - details.startSN;
@@ -7627,7 +7627,7 @@ function mergeDetails(oldDetails, newDetails) {
7627
7627
  if (currentInitSegment) {
7628
7628
  fragmentsToCheck.forEach(frag => {
7629
7629
  var _currentInitSegment;
7630
- if (frag && (!frag.initSegment || frag.initSegment.relurl === ((_currentInitSegment = currentInitSegment) == null ? void 0 : _currentInitSegment.relurl))) {
7630
+ if (frag && (!frag.initSegment || frag.initSegment.relurl === ((_currentInitSegment = currentInitSegment) == null ? undefined : _currentInitSegment.relurl))) {
7631
7631
  frag.initSegment = currentInitSegment;
7632
7632
  }
7633
7633
  });
@@ -7859,7 +7859,7 @@ function findPart(partList, sn, partIndex) {
7859
7859
  function reassignFragmentLevelIndexes(levels) {
7860
7860
  levels.forEach((level, index) => {
7861
7861
  var _level$details;
7862
- const fragments = (_level$details = level.details) == null ? void 0 : _level$details.fragments;
7862
+ const fragments = (_level$details = level.details) == null ? undefined : _level$details.fragments;
7863
7863
  if (fragments) {
7864
7864
  fragments.forEach(fragment => {
7865
7865
  fragment.level = index;
@@ -7874,7 +7874,7 @@ function reassignFragmentLevelIndexes(levels) {
7874
7874
  function findFirstFragWithCC(fragments, cc) {
7875
7875
  for (let i = 0, len = fragments.length; i < len; i++) {
7876
7876
  var _fragments$i;
7877
- if (((_fragments$i = fragments[i]) == null ? void 0 : _fragments$i.cc) === cc) {
7877
+ if (((_fragments$i = fragments[i]) == null ? undefined : _fragments$i.cc) === cc) {
7878
7878
  return fragments[i];
7879
7879
  }
7880
7880
  }
@@ -8035,16 +8035,16 @@ const State = {
8035
8035
  class BaseStreamController extends TaskLoop {
8036
8036
  constructor(hls, fragmentTracker, keyLoader, logPrefix, playlistType) {
8037
8037
  super(logPrefix, hls.logger);
8038
- this.hls = void 0;
8038
+ this.hls = undefined;
8039
8039
  this.fragPrevious = null;
8040
8040
  this.fragCurrent = null;
8041
- this.fragmentTracker = void 0;
8041
+ this.fragmentTracker = undefined;
8042
8042
  this.transmuxer = null;
8043
8043
  this._state = State.STOPPED;
8044
- this.playlistType = void 0;
8044
+ this.playlistType = undefined;
8045
8045
  this.media = null;
8046
8046
  this.mediaBuffer = null;
8047
- this.config = void 0;
8047
+ this.config = undefined;
8048
8048
  this.bitrateTest = false;
8049
8049
  this.lastCurrentTime = 0;
8050
8050
  this.nextLoadPosition = 0;
@@ -8052,15 +8052,15 @@ class BaseStreamController extends TaskLoop {
8052
8052
  this.startTimeOffset = null;
8053
8053
  this.retryDate = 0;
8054
8054
  this.levels = null;
8055
- this.fragmentLoader = void 0;
8056
- this.keyLoader = void 0;
8055
+ this.fragmentLoader = undefined;
8056
+ this.keyLoader = undefined;
8057
8057
  this.levelLastLoaded = null;
8058
8058
  this.startFragRequested = false;
8059
- this.decrypter = void 0;
8059
+ this.decrypter = undefined;
8060
8060
  this.initPTS = [];
8061
8061
  this.buffering = true;
8062
8062
  this.loadingParts = false;
8063
- this.loopSn = void 0;
8063
+ this.loopSn = undefined;
8064
8064
  this.onMediaSeeking = () => {
8065
8065
  const {
8066
8066
  config,
@@ -8235,7 +8235,7 @@ class BaseStreamController extends TaskLoop {
8235
8235
  getLevelDetails() {
8236
8236
  if (this.levels && this.levelLastLoaded !== null) {
8237
8237
  var _this$levelLastLoaded;
8238
- return (_this$levelLastLoaded = this.levelLastLoaded) == null ? void 0 : _this$levelLastLoaded.details;
8238
+ return (_this$levelLastLoaded = this.levelLastLoaded) == null ? undefined : _this$levelLastLoaded.details;
8239
8239
  }
8240
8240
  }
8241
8241
  onMediaAttached(event, data) {
@@ -8318,7 +8318,7 @@ class BaseStreamController extends TaskLoop {
8318
8318
  if (config.interstitialsController && config.enableInterstitialPlayback !== false && frag.type !== PlaylistLevelType.SUBTITLE) {
8319
8319
  // Do not load fragments outside the buffering schedule segment
8320
8320
  const interstitials = this.hls.interstitialsManager;
8321
- const bufferingItem = interstitials == null ? void 0 : interstitials.bufferingItem;
8321
+ const bufferingItem = interstitials == null ? undefined : interstitials.bufferingItem;
8322
8322
  if (bufferingItem) {
8323
8323
  const bufferingInterstitial = bufferingItem.event;
8324
8324
  if (bufferingInterstitial) {
@@ -8329,7 +8329,7 @@ class BaseStreamController extends TaskLoop {
8329
8329
  } else {
8330
8330
  var _level$details;
8331
8331
  // Limit fragment loading to media in schedule item
8332
- if (frag.end <= bufferingItem.start && ((_level$details = level.details) == null ? void 0 : _level$details.live) === false) {
8332
+ if (frag.end <= bufferingItem.start && ((_level$details = level.details) == null ? undefined : _level$details.live) === false) {
8333
8333
  // fragment ends by schedule item start
8334
8334
  return;
8335
8335
  }
@@ -8379,7 +8379,7 @@ class BaseStreamController extends TaskLoop {
8379
8379
  if (this.state === State.STOPPED || this.state === State.ERROR) {
8380
8380
  return;
8381
8381
  }
8382
- this.warn(`Frag error: ${(reason == null ? void 0 : reason.message) || reason}`);
8382
+ this.warn(`Frag error: ${(reason == null ? undefined : reason.message) || reason}`);
8383
8383
  this.resetFragmentLoading(fragment);
8384
8384
  });
8385
8385
  }
@@ -8400,7 +8400,7 @@ class BaseStreamController extends TaskLoop {
8400
8400
  if (backtracked === 1 || this.reduceMaxBufferLength(minForwardBufferLength, frag.duration)) {
8401
8401
  fragmentTracker.removeFragment(frag);
8402
8402
  }
8403
- } else if (((_this$mediaBuffer = this.mediaBuffer) == null ? void 0 : _this$mediaBuffer.buffered.length) === 0) {
8403
+ } else if (((_this$mediaBuffer = this.mediaBuffer) == null ? undefined : _this$mediaBuffer.buffered.length) === 0) {
8404
8404
  // Stop gap for bad tracker / buffer flush behavior
8405
8405
  fragmentTracker.removeAllFragments();
8406
8406
  } else if (fragmentTracker.hasParts(frag.type)) {
@@ -8433,7 +8433,7 @@ class BaseStreamController extends TaskLoop {
8433
8433
  }
8434
8434
  waitForLive(levelInfo) {
8435
8435
  const details = levelInfo.details;
8436
- return (details == null ? void 0 : details.live) && details.type !== 'EVENT' && (this.levelLastLoaded !== levelInfo || details.expired);
8436
+ return (details == null ? undefined : details.live) && details.type !== 'EVENT' && (this.levelLastLoaded !== levelInfo || details.expired);
8437
8437
  }
8438
8438
  flushMainBuffer(startOffset, endOffset, type = null) {
8439
8439
  if (!(startOffset - endOffset)) {
@@ -8450,7 +8450,7 @@ class BaseStreamController extends TaskLoop {
8450
8450
  }
8451
8451
  _loadInitSegment(fragment, level) {
8452
8452
  this._doFragLoad(fragment, level).then(data => {
8453
- const frag = data == null ? void 0 : data.frag;
8453
+ const frag = data == null ? undefined : data.frag;
8454
8454
  if (!frag || this.fragContextChanged(frag) || !this.levels) {
8455
8455
  throw new Error('init load aborted');
8456
8456
  }
@@ -8537,7 +8537,7 @@ class BaseStreamController extends TaskLoop {
8537
8537
  return;
8538
8538
  }
8539
8539
  }
8540
- const level = (_this$levels = this.levels) == null ? void 0 : _this$levels[frag.level];
8540
+ const level = (_this$levels = this.levels) == null ? undefined : _this$levels[frag.level];
8541
8541
  if (level != null && level.fragmentError) {
8542
8542
  this.log(`Resetting level fragment error count of ${level.fragmentError} on frag buffered`);
8543
8543
  level.fragmentError = 0;
@@ -8568,7 +8568,7 @@ class BaseStreamController extends TaskLoop {
8568
8568
  _doFragLoad(frag, level, targetBufferTime = null, progressCallback) {
8569
8569
  var _frag$decryptdata;
8570
8570
  this.fragCurrent = frag;
8571
- const details = level == null ? void 0 : level.details;
8571
+ const details = level == null ? undefined : level.details;
8572
8572
  if (!this.levels || !details) {
8573
8573
  throw new Error(`frag load aborted, missing level${details ? '' : ' detail'}s`);
8574
8574
  }
@@ -8599,7 +8599,7 @@ class BaseStreamController extends TaskLoop {
8599
8599
  if (isMediaFragment(frag) && (!fragPrevious || frag.sn !== fragPrevious.sn)) {
8600
8600
  const shouldLoadParts = this.shouldLoadParts(level.details, frag.end);
8601
8601
  if (shouldLoadParts !== this.loadingParts) {
8602
- this.log(`LL-Part loading ${shouldLoadParts ? 'ON' : 'OFF'} loading sn ${fragPrevious == null ? void 0 : fragPrevious.sn}->${frag.sn}`);
8602
+ this.log(`LL-Part loading ${shouldLoadParts ? 'ON' : 'OFF'} loading sn ${fragPrevious == null ? undefined : fragPrevious.sn}->${frag.sn}`);
8603
8603
  this.loadingParts = shouldLoadParts;
8604
8604
  }
8605
8605
  }
@@ -8662,7 +8662,7 @@ class BaseStreamController extends TaskLoop {
8662
8662
  let result;
8663
8663
  if (dataOnProgress && keyLoadingPromise) {
8664
8664
  result = keyLoadingPromise.then(keyLoadedData => {
8665
- if (!keyLoadedData || this.fragContextChanged(keyLoadedData == null ? void 0 : keyLoadedData.frag)) {
8665
+ if (!keyLoadedData || this.fragContextChanged(keyLoadedData == null ? undefined : keyLoadedData.frag)) {
8666
8666
  return null;
8667
8667
  }
8668
8668
  return this.fragmentLoader.load(frag, progressCallback);
@@ -8690,7 +8690,7 @@ class BaseStreamController extends TaskLoop {
8690
8690
  return new Promise((resolve, reject) => {
8691
8691
  var _level$details2;
8692
8692
  const partsLoaded = [];
8693
- const initialPartList = (_level$details2 = level.details) == null ? void 0 : _level$details2.partList;
8693
+ const initialPartList = (_level$details2 = level.details) == null ? undefined : _level$details2.partList;
8694
8694
  const loadPart = part => {
8695
8695
  this.fragmentLoader.loadPart(frag, part, progressCallback).then(partLoadedData => {
8696
8696
  partsLoaded[part.index] = partLoadedData;
@@ -8768,10 +8768,10 @@ class BaseStreamController extends TaskLoop {
8768
8768
  // Buffer must be ahead of first part + duration of parts after last segment
8769
8769
  // and playback must be at or past segment adjacent to part list
8770
8770
  const firstPart = details.partList[0];
8771
- const safePartStart = firstPart.end + (((_details$fragmentHint = details.fragmentHint) == null ? void 0 : _details$fragmentHint.duration) || 0);
8771
+ const safePartStart = firstPart.end + (((_details$fragmentHint = details.fragmentHint) == null ? undefined : _details$fragmentHint.duration) || 0);
8772
8772
  if (bufferEnd >= safePartStart) {
8773
8773
  var _this$media;
8774
- const playhead = this.hls.hasEnoughToStart ? ((_this$media = this.media) == null ? void 0 : _this$media.currentTime) || this.lastCurrentTime : this.getLoadPosition();
8774
+ const playhead = this.hls.hasEnoughToStart ? ((_this$media = this.media) == null ? undefined : _this$media.currentTime) || this.lastCurrentTime : this.getLoadPosition();
8775
8775
  if (playhead > firstPart.start - firstPart.fragment.duration) {
8776
8776
  return true;
8777
8777
  }
@@ -8911,7 +8911,7 @@ class BaseStreamController extends TaskLoop {
8911
8911
  }
8912
8912
  getAppendedFrag(position, playlistType = PlaylistLevelType.MAIN) {
8913
8913
  var _this$fragmentTracker;
8914
- const fragOrPart = (_this$fragmentTracker = this.fragmentTracker) == null ? void 0 : _this$fragmentTracker.getAppendedFrag(position, playlistType);
8914
+ const fragOrPart = (_this$fragmentTracker = this.fragmentTracker) == null ? undefined : _this$fragmentTracker.getAppendedFrag(position, playlistType);
8915
8915
  if (fragOrPart && 'fragment' in fragOrPart) {
8916
8916
  return fragOrPart.fragment;
8917
8917
  }
@@ -8951,7 +8951,7 @@ class BaseStreamController extends TaskLoop {
8951
8951
  const mainStart = this.hls.startPosition;
8952
8952
  const liveSyncPosition = this.hls.liveSyncPosition;
8953
8953
  const startPosition = frag ? (mainStart !== -1 && mainStart >= start ? mainStart : liveSyncPosition) || frag.start : pos;
8954
- this.log(`Setting startPosition to ${startPosition} to match initial live edge. mainStart: ${mainStart} liveSyncPosition: ${liveSyncPosition} frag.start: ${(_frag = frag) == null ? void 0 : _frag.start}`);
8954
+ this.log(`Setting startPosition to ${startPosition} to match initial live edge. mainStart: ${mainStart} liveSyncPosition: ${liveSyncPosition} frag.start: ${(_frag = frag) == null ? undefined : _frag.start}`);
8955
8955
  this.startPosition = this.nextLoadPosition = startPosition;
8956
8956
  }
8957
8957
  } else if (pos <= start) {
@@ -9225,7 +9225,7 @@ class BaseStreamController extends TaskLoop {
9225
9225
  }
9226
9226
  if (this.fragContextChanged(frag)) {
9227
9227
  var _this$fragCurrent;
9228
- this.warn(`Frag load error must match current frag to retry ${frag.url} > ${(_this$fragCurrent = this.fragCurrent) == null ? void 0 : _this$fragCurrent.url}`);
9228
+ this.warn(`Frag load error must match current frag to retry ${frag.url} > ${(_this$fragCurrent = this.fragCurrent) == null ? undefined : _this$fragCurrent.url}`);
9229
9229
  return;
9230
9230
  }
9231
9231
  const gapTagEncountered = data.details === ErrorDetails.FRAG_GAP;
@@ -9283,7 +9283,7 @@ class BaseStreamController extends TaskLoop {
9283
9283
  // reduce max buf len if current position is buffered
9284
9284
  const buffered = bufferedInfo && bufferedInfo.len > 0.5;
9285
9285
  if (buffered) {
9286
- this.reduceMaxBufferLength(bufferedInfo.len, (frag == null ? void 0 : frag.duration) || 10);
9286
+ this.reduceMaxBufferLength(bufferedInfo.len, (frag == null ? undefined : frag.duration) || 10);
9287
9287
  }
9288
9288
  const flushBuffer = !buffered;
9289
9289
  if (flushBuffer) {
@@ -9393,7 +9393,7 @@ class BaseStreamController extends TaskLoop {
9393
9393
  }
9394
9394
  return result;
9395
9395
  }, false);
9396
- if (!parsed && ((_this$transmuxer = this.transmuxer) == null ? void 0 : _this$transmuxer.error) === null) {
9396
+ if (!parsed && ((_this$transmuxer = this.transmuxer) == null ? undefined : _this$transmuxer.error) === null) {
9397
9397
  const error = new Error(`Found no media in fragment ${frag.sn} of ${this.playlistLabel()} ${frag.level} resetting transmuxer to fallback to playlist timing`);
9398
9398
  if (level.fragmentError === 0) {
9399
9399
  // Mark and track the odd empty segment as a gap to avoid reloading
@@ -9438,7 +9438,7 @@ class BaseStreamController extends TaskLoop {
9438
9438
  }
9439
9439
  resetTransmuxer() {
9440
9440
  var _this$transmuxer2;
9441
- (_this$transmuxer2 = this.transmuxer) == null ? void 0 : _this$transmuxer2.reset();
9441
+ (_this$transmuxer2 = this.transmuxer) == null ? undefined : _this$transmuxer2.reset();
9442
9442
  }
9443
9443
  recoverWorkerError(data) {
9444
9444
  if (data.event === 'demuxerWorker') {
@@ -9847,7 +9847,7 @@ var eventemitter3 = {exports: {}};
9847
9847
  var eventemitter3Exports = eventemitter3.exports;
9848
9848
  var EventEmitter = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports);
9849
9849
 
9850
- const version = "1.6.0-beta.2.0.canary.10878";
9850
+ const version = "1.6.0-beta.2.0.canary.10882";
9851
9851
 
9852
9852
  // ensure the worker ends up in the bundle
9853
9853
  // If the worker should not be included this gets aliased to empty.js
@@ -10718,8 +10718,8 @@ function dummyTrack(type = '', inputTimeScale = 90000) {
10718
10718
 
10719
10719
  class BaseAudioDemuxer {
10720
10720
  constructor() {
10721
- this._audioTrack = void 0;
10722
- this._id3Track = void 0;
10721
+ this._audioTrack = undefined;
10722
+ this._id3Track = undefined;
10723
10723
  this.frameIndex = 0;
10724
10724
  this.cachedData = null;
10725
10725
  this.basePTS = null;
@@ -11011,8 +11011,8 @@ function probe(data, offset) {
11011
11011
  class AACDemuxer extends BaseAudioDemuxer {
11012
11012
  constructor(observer, config) {
11013
11013
  super();
11014
- this.observer = void 0;
11015
- this.config = void 0;
11014
+ this.observer = undefined;
11015
+ this.config = undefined;
11016
11016
  this.observer = observer;
11017
11017
  this.config = config;
11018
11018
  }
@@ -11044,7 +11044,7 @@ class AACDemuxer extends BaseAudioDemuxer {
11044
11044
  // Layer bits (position 14 and 15) in header should be always 0 for ADTS
11045
11045
  // More info https://wiki.multimedia.cx/index.php?title=ADTS
11046
11046
  const id3Data = getId3Data(data, 0);
11047
- let offset = (id3Data == null ? void 0 : id3Data.length) || 0;
11047
+ let offset = (id3Data == null ? undefined : id3Data.length) || 0;
11048
11048
  if (probe(data, offset)) {
11049
11049
  return false;
11050
11050
  }
@@ -11093,7 +11093,7 @@ const getAudioBSID = (data, offset) => {
11093
11093
  class AC3Demuxer extends BaseAudioDemuxer {
11094
11094
  constructor(observer) {
11095
11095
  super();
11096
- this.observer = void 0;
11096
+ this.observer = undefined;
11097
11097
  this.observer = observer;
11098
11098
  }
11099
11099
  resetInitSegment(initSegment, audioCodec, videoCodec, trackDuration) {
@@ -11233,7 +11233,7 @@ class MP3Demuxer extends BaseAudioDemuxer {
11233
11233
  // Layer bits (position 14 and 15) in header should be always different from 0 (Layer I or Layer II or Layer III)
11234
11234
  // More info http://www.mp3-tech.org/programmer/frame_header.html
11235
11235
  const id3Data = getId3Data(data, 0);
11236
- let offset = (id3Data == null ? void 0 : id3Data.length) || 0;
11236
+ let offset = (id3Data == null ? undefined : id3Data.length) || 0;
11237
11237
 
11238
11238
  // Check for ac-3|ec-3 sync bytes and return false if present
11239
11239
  if (id3Data && data[offset] === 0x0b && data[offset + 1] === 0x77 && getId3Timestamp(id3Data) !== undefined &&
@@ -11265,11 +11265,11 @@ class MP4Demuxer {
11265
11265
  constructor(observer, config) {
11266
11266
  this.remainderData = null;
11267
11267
  this.timeOffset = 0;
11268
- this.config = void 0;
11269
- this.videoTrack = void 0;
11270
- this.audioTrack = void 0;
11271
- this.id3Track = void 0;
11272
- this.txtTrack = void 0;
11268
+ this.config = undefined;
11269
+ this.videoTrack = undefined;
11270
+ this.audioTrack = undefined;
11271
+ this.id3Track = undefined;
11272
+ this.txtTrack = undefined;
11273
11273
  this.config = config;
11274
11274
  }
11275
11275
  resetTimeStamp() {}
@@ -11415,8 +11415,8 @@ function getEmsgStartTime(emsgInfo, timeOffset) {
11415
11415
 
11416
11416
  class SampleAesDecrypter {
11417
11417
  constructor(observer, config, keyData) {
11418
- this.keyData = void 0;
11419
- this.decrypter = void 0;
11418
+ this.keyData = undefined;
11419
+ this.decrypter = undefined;
11420
11420
  this.keyData = keyData;
11421
11421
  this.decrypter = new Decrypter(config, {
11422
11422
  removePKCS7Padding: false
@@ -11674,10 +11674,10 @@ class BaseVideoParser {
11674
11674
 
11675
11675
  class ExpGolomb {
11676
11676
  constructor(data) {
11677
- this.data = void 0;
11678
- this.bytesAvailable = void 0;
11679
- this.word = void 0;
11680
- this.bitsAvailable = void 0;
11677
+ this.data = undefined;
11678
+ this.bytesAvailable = undefined;
11679
+ this.word = undefined;
11680
+ this.bitsAvailable = undefined;
11681
11681
  this.data = data;
11682
11682
  // the number of bytes left to examine in this.data
11683
11683
  this.bytesAvailable = data.byteLength;
@@ -11892,7 +11892,7 @@ class AvcVideoParser extends BaseVideoParser {
11892
11892
  spsfound = true;
11893
11893
  const sps = unit.data;
11894
11894
  const config = this.readSPS(sps);
11895
- 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]) {
11895
+ 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]) {
11896
11896
  track.width = config.width;
11897
11897
  track.height = config.height;
11898
11898
  track.pixelRatio = config.pixelRatio;
@@ -12740,22 +12740,22 @@ class HevcVideoParser extends BaseVideoParser {
12740
12740
  const PACKET_LENGTH = 188;
12741
12741
  class TSDemuxer {
12742
12742
  constructor(observer, config, typeSupported, logger) {
12743
- this.logger = void 0;
12744
- this.observer = void 0;
12745
- this.config = void 0;
12746
- this.typeSupported = void 0;
12743
+ this.logger = undefined;
12744
+ this.observer = undefined;
12745
+ this.config = undefined;
12746
+ this.typeSupported = undefined;
12747
12747
  this.sampleAes = null;
12748
12748
  this.pmtParsed = false;
12749
- this.audioCodec = void 0;
12750
- this.videoCodec = void 0;
12749
+ this.audioCodec = undefined;
12750
+ this.videoCodec = undefined;
12751
12751
  this._pmtId = -1;
12752
- this._videoTrack = void 0;
12753
- this._audioTrack = void 0;
12754
- this._id3Track = void 0;
12755
- this._txtTrack = void 0;
12752
+ this._videoTrack = undefined;
12753
+ this._audioTrack = undefined;
12754
+ this._id3Track = undefined;
12755
+ this._txtTrack = undefined;
12756
12756
  this.aacOverFlow = null;
12757
12757
  this.remainderData = null;
12758
- this.videoParser = void 0;
12758
+ this.videoParser = undefined;
12759
12759
  this.observer = observer;
12760
12760
  this.config = config;
12761
12761
  this.typeSupported = typeSupported;
@@ -14292,17 +14292,17 @@ class MP4 {
14292
14292
  vSpacing >> 16 & 0xff, vSpacing >> 8 & 0xff, vSpacing & 0xff])));
14293
14293
  }
14294
14294
  }
14295
- MP4.types = void 0;
14296
- MP4.HDLR_TYPES = void 0;
14297
- MP4.STTS = void 0;
14298
- MP4.STSC = void 0;
14299
- MP4.STCO = void 0;
14300
- MP4.STSZ = void 0;
14301
- MP4.VMHD = void 0;
14302
- MP4.SMHD = void 0;
14303
- MP4.STSD = void 0;
14304
- MP4.FTYP = void 0;
14305
- MP4.DINF = void 0;
14295
+ MP4.types = undefined;
14296
+ MP4.HDLR_TYPES = undefined;
14297
+ MP4.STTS = undefined;
14298
+ MP4.STSC = undefined;
14299
+ MP4.STCO = undefined;
14300
+ MP4.STSZ = undefined;
14301
+ MP4.VMHD = undefined;
14302
+ MP4.SMHD = undefined;
14303
+ MP4.STSD = undefined;
14304
+ MP4.FTYP = undefined;
14305
+ MP4.DINF = undefined;
14306
14306
 
14307
14307
  const MPEG_TS_CLOCK_FREQ_HZ = 90000;
14308
14308
  function toTimescaleFromBase(baseTime, destScale, srcBase = 1, round = false) {
@@ -14342,10 +14342,10 @@ function createMp4Sample(isKeyframe, duration, size, cts) {
14342
14342
  }
14343
14343
  class MP4Remuxer {
14344
14344
  constructor(observer, config, typeSupported, logger) {
14345
- this.logger = void 0;
14346
- this.observer = void 0;
14347
- this.config = void 0;
14348
- this.typeSupported = void 0;
14345
+ this.logger = undefined;
14346
+ this.observer = undefined;
14347
+ this.config = undefined;
14348
+ this.typeSupported = undefined;
14349
14349
  this.ISGenerated = false;
14350
14350
  this._initPTS = null;
14351
14351
  this._initDTS = null;
@@ -14354,7 +14354,7 @@ class MP4Remuxer {
14354
14354
  this.videoSampleDuration = null;
14355
14355
  this.isAudioContiguous = false;
14356
14356
  this.isVideoContiguous = false;
14357
- this.videoTrackConfig = void 0;
14357
+ this.videoTrackConfig = undefined;
14358
14358
  this.observer = observer;
14359
14359
  this.config = config;
14360
14360
  this.typeSupported = typeSupported;
@@ -14436,7 +14436,7 @@ class MP4Remuxer {
14436
14436
  if (this.ISGenerated) {
14437
14437
  var _videoTrack$pixelRati, _config$pixelRatio, _videoTrack$pixelRati2, _config$pixelRatio2;
14438
14438
  const config = this.videoTrackConfig;
14439
- 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) {
14439
+ 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) {
14440
14440
  this.resetInitSegment();
14441
14441
  }
14442
14442
  }
@@ -15186,13 +15186,13 @@ function flushTextTrackUserdataCueSamples(track, timeOffset, initPTS) {
15186
15186
 
15187
15187
  class PassThroughRemuxer {
15188
15188
  constructor(observer, config, typeSupported, logger) {
15189
- this.logger = void 0;
15189
+ this.logger = undefined;
15190
15190
  this.emitInitSegment = false;
15191
- this.audioCodec = void 0;
15192
- this.videoCodec = void 0;
15193
- this.initData = void 0;
15191
+ this.audioCodec = undefined;
15192
+ this.videoCodec = undefined;
15193
+ this.initData = undefined;
15194
15194
  this.initPTS = null;
15195
- this.initTracks = void 0;
15195
+ this.initTracks = undefined;
15196
15196
  this.lastEndTime = null;
15197
15197
  this.logger = logger;
15198
15198
  }
@@ -15364,7 +15364,7 @@ function isInvalidInitPts(initPTS, startDTS, timeOffset, duration) {
15364
15364
  return Math.abs(startTime - timeOffset) > minDuration;
15365
15365
  }
15366
15366
  function getParsedTrackCodec(track, type) {
15367
- const parsedCodec = track == null ? void 0 : track.codec;
15367
+ const parsedCodec = track == null ? undefined : track.codec;
15368
15368
  if (parsedCodec && parsedCodec.length > 4) {
15369
15369
  return parsedCodec;
15370
15370
  }
@@ -15415,18 +15415,18 @@ const muxConfig = [{
15415
15415
  class Transmuxer {
15416
15416
  constructor(observer, typeSupported, config, vendor, id, logger) {
15417
15417
  this.asyncResult = false;
15418
- this.logger = void 0;
15419
- this.observer = void 0;
15420
- this.typeSupported = void 0;
15421
- this.config = void 0;
15422
- this.id = void 0;
15423
- this.demuxer = void 0;
15424
- this.remuxer = void 0;
15425
- this.decrypter = void 0;
15426
- this.probe = void 0;
15418
+ this.logger = undefined;
15419
+ this.observer = undefined;
15420
+ this.typeSupported = undefined;
15421
+ this.config = undefined;
15422
+ this.id = undefined;
15423
+ this.demuxer = undefined;
15424
+ this.remuxer = undefined;
15425
+ this.decrypter = undefined;
15426
+ this.probe = undefined;
15427
15427
  this.decryptionPromise = null;
15428
- this.transmuxConfig = void 0;
15429
- this.currentTransmuxState = void 0;
15428
+ this.transmuxConfig = undefined;
15429
+ this.currentTransmuxState = undefined;
15430
15430
  this.observer = observer;
15431
15431
  this.typeSupported = typeSupported;
15432
15432
  this.config = config;
@@ -15731,7 +15731,7 @@ class Transmuxer {
15731
15731
  }
15732
15732
  function getEncryptionType(data, decryptData) {
15733
15733
  let encryptionType = null;
15734
- if (data.byteLength > 0 && (decryptData == null ? void 0 : decryptData.key) != null && decryptData.iv !== null && decryptData.method != null) {
15734
+ if (data.byteLength > 0 && (decryptData == null ? undefined : decryptData.key) != null && decryptData.iv !== null && decryptData.method != null) {
15735
15735
  encryptionType = decryptData;
15736
15736
  }
15737
15737
  return encryptionType;
@@ -15745,11 +15745,11 @@ function isPromise(p) {
15745
15745
  }
15746
15746
  class TransmuxConfig {
15747
15747
  constructor(audioCodec, videoCodec, initSegmentData, duration, defaultInitPts) {
15748
- this.audioCodec = void 0;
15749
- this.videoCodec = void 0;
15750
- this.initSegmentData = void 0;
15751
- this.duration = void 0;
15752
- this.defaultInitPts = void 0;
15748
+ this.audioCodec = undefined;
15749
+ this.videoCodec = undefined;
15750
+ this.initSegmentData = undefined;
15751
+ this.duration = undefined;
15752
+ this.defaultInitPts = undefined;
15753
15753
  this.audioCodec = audioCodec;
15754
15754
  this.videoCodec = videoCodec;
15755
15755
  this.initSegmentData = initSegmentData;
@@ -15759,12 +15759,12 @@ class TransmuxConfig {
15759
15759
  }
15760
15760
  class TransmuxState {
15761
15761
  constructor(discontinuity, contiguous, accurateTimeOffset, trackSwitch, timeOffset, initSegmentChange) {
15762
- this.discontinuity = void 0;
15763
- this.contiguous = void 0;
15764
- this.accurateTimeOffset = void 0;
15765
- this.trackSwitch = void 0;
15766
- this.timeOffset = void 0;
15767
- this.initSegmentChange = void 0;
15762
+ this.discontinuity = undefined;
15763
+ this.contiguous = undefined;
15764
+ this.accurateTimeOffset = undefined;
15765
+ this.trackSwitch = undefined;
15766
+ this.timeOffset = undefined;
15767
+ this.initSegmentChange = undefined;
15768
15768
  this.discontinuity = discontinuity;
15769
15769
  this.contiguous = contiguous;
15770
15770
  this.accurateTimeOffset = accurateTimeOffset;
@@ -15778,17 +15778,17 @@ let transmuxerInstanceCount = 0;
15778
15778
  class TransmuxerInterface {
15779
15779
  constructor(_hls, id, onTransmuxComplete, onFlush) {
15780
15780
  this.error = null;
15781
- this.hls = void 0;
15782
- this.id = void 0;
15781
+ this.hls = undefined;
15782
+ this.id = undefined;
15783
15783
  this.instanceNo = transmuxerInstanceCount++;
15784
- this.observer = void 0;
15784
+ this.observer = undefined;
15785
15785
  this.frag = null;
15786
15786
  this.part = null;
15787
- this.useWorker = void 0;
15787
+ this.useWorker = undefined;
15788
15788
  this.workerContext = null;
15789
15789
  this.transmuxer = null;
15790
- this.onTransmuxComplete = void 0;
15791
- this.onFlush = void 0;
15790
+ this.onTransmuxComplete = undefined;
15791
+ this.onFlush = undefined;
15792
15792
  this.onWorkerMessage = event => {
15793
15793
  const data = event.data;
15794
15794
  const hls = this.hls;
@@ -15799,7 +15799,7 @@ class TransmuxerInterface {
15799
15799
  case 'init':
15800
15800
  {
15801
15801
  var _this$workerContext;
15802
- const objectURL = (_this$workerContext = this.workerContext) == null ? void 0 : _this$workerContext.objectURL;
15802
+ const objectURL = (_this$workerContext = this.workerContext) == null ? undefined : _this$workerContext.objectURL;
15803
15803
  if (objectURL) {
15804
15804
  // revoke the Object URL that was used to create transmuxer worker, so as not to leak it
15805
15805
  self.URL.revokeObjectURL(objectURL);
@@ -15976,7 +15976,7 @@ class TransmuxerInterface {
15976
15976
  const trackSwitch = !(lastFrag && chunkMeta.level === lastFrag.level);
15977
15977
  const snDiff = lastFrag ? chunkMeta.sn - lastFrag.sn : -1;
15978
15978
  const partDiff = this.part ? chunkMeta.part - this.part.index : -1;
15979
- const progressive = snDiff === 0 && chunkMeta.id > 1 && chunkMeta.id === (lastFrag == null ? void 0 : lastFrag.stats.chunkCount);
15979
+ const progressive = snDiff === 0 && chunkMeta.id > 1 && chunkMeta.id === (lastFrag == null ? undefined : lastFrag.stats.chunkCount);
15980
15980
  const contiguous = !trackSwitch && (snDiff === 1 || snDiff === 0 && (partDiff === 1 || progressive && partDiff <= 0));
15981
15981
  const now = self.performance.now();
15982
15982
  if (trackSwitch || snDiff || frag.stats.parsing.start === 0) {
@@ -15985,7 +15985,7 @@ class TransmuxerInterface {
15985
15985
  if (part && (partDiff || !contiguous)) {
15986
15986
  part.stats.parsing.start = now;
15987
15987
  }
15988
- const initSegmentChange = !(lastFrag && ((_frag$initSegment = frag.initSegment) == null ? void 0 : _frag$initSegment.url) === ((_lastFrag$initSegment = lastFrag.initSegment) == null ? void 0 : _lastFrag$initSegment.url));
15988
+ const initSegmentChange = !(lastFrag && ((_frag$initSegment = frag.initSegment) == null ? undefined : _frag$initSegment.url) === ((_lastFrag$initSegment = lastFrag.initSegment) == null ? undefined : _lastFrag$initSegment.url));
15989
15989
  const state = new TransmuxState(discontinuity, contiguous, accurateTimeOffset, trackSwitch, timeOffset, initSegmentChange);
15990
15990
  if (!contiguous || discontinuity || initSegmentChange) {
15991
15991
  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}
@@ -16252,8 +16252,8 @@ class AudioStreamController extends BaseStreamController {
16252
16252
  levels,
16253
16253
  trackId
16254
16254
  } = this;
16255
- const currenTrack = levels == null ? void 0 : levels[trackId];
16256
- const details = currenTrack == null ? void 0 : currenTrack.details;
16255
+ const currenTrack = levels == null ? undefined : levels[trackId];
16256
+ const details = currenTrack == null ? undefined : currenTrack.details;
16257
16257
  if (details && !this.waitForLive(currenTrack)) {
16258
16258
  if (this.waitForCdnTuneIn(details)) {
16259
16259
  break;
@@ -16274,7 +16274,7 @@ class AudioStreamController extends BaseStreamController {
16274
16274
  trackId
16275
16275
  } = this;
16276
16276
  this.log('RetryDate reached, switch back to IDLE state');
16277
- this.resetStartWhenNotLoaded((levels == null ? void 0 : levels[trackId]) || null);
16277
+ this.resetStartWhenNotLoaded((levels == null ? undefined : levels[trackId]) || null);
16278
16278
  this.state = State.IDLE;
16279
16279
  }
16280
16280
  break;
@@ -16429,7 +16429,7 @@ class AudioStreamController extends BaseStreamController {
16429
16429
  }
16430
16430
 
16431
16431
  // Request audio segments up to one fragment ahead of main stream-controller
16432
- const mainFragLoading = (_this$mainFragLoading = this.mainFragLoading) == null ? void 0 : _this$mainFragLoading.frag;
16432
+ const mainFragLoading = (_this$mainFragLoading = this.mainFragLoading) == null ? undefined : _this$mainFragLoading.frag;
16433
16433
  if (!this.audioOnly && this.startFragRequested && mainFragLoading && isMediaFragment(mainFragLoading) && isMediaFragment(frag) && !frag.endList && (!trackDetails.live || !this.loadingParts && targetBufferTime < this.hls.liveSyncPosition)) {
16434
16434
  let mainFrag = mainFragLoading;
16435
16435
  if (frag.start > mainFrag.end) {
@@ -16541,7 +16541,7 @@ class AudioStreamController extends BaseStreamController {
16541
16541
  }
16542
16542
  if (trackLevel.details) {
16543
16543
  var _this$levelLastLoaded;
16544
- sliding = this.alignPlaylists(newDetails, trackLevel.details, (_this$levelLastLoaded = this.levelLastLoaded) == null ? void 0 : _this$levelLastLoaded.details);
16544
+ sliding = this.alignPlaylists(newDetails, trackLevel.details, (_this$levelLastLoaded = this.levelLastLoaded) == null ? undefined : _this$levelLastLoaded.details);
16545
16545
  }
16546
16546
  if (!newDetails.alignedSliding) {
16547
16547
  // Align audio rendition with the "main" playlist on discontinuity change
@@ -16610,7 +16610,7 @@ class AudioStreamController extends BaseStreamController {
16610
16610
  // Check if we have video initPTS
16611
16611
  // If not we need to wait for it
16612
16612
  const initPTS = this.initPTS[frag.cc];
16613
- const initSegmentData = (_frag$initSegment = frag.initSegment) == null ? void 0 : _frag$initSegment.data;
16613
+ const initSegmentData = (_frag$initSegment = frag.initSegment) == null ? undefined : _frag$initSegment.data;
16614
16614
  if (initPTS !== undefined) {
16615
16615
  // this.log(`Transmuxing ${sn} of [${details.startSN} ,${details.endSN}],track ${trackId}`);
16616
16616
  // time Offset is accurate if level PTS is known, or if playlist is not sliding (not live)
@@ -16714,7 +16714,7 @@ class AudioStreamController extends BaseStreamController {
16714
16714
  case ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:
16715
16715
  case ErrorDetails.LEVEL_PARSING_ERROR:
16716
16716
  // in case of non fatal error while loading track, if not retrying to load track, switch back to IDLE
16717
- if (!data.levelRetry && this.state === State.WAITING_TRACK && ((_data$context = data.context) == null ? void 0 : _data$context.type) === PlaylistContextType.AUDIO_TRACK) {
16717
+ if (!data.levelRetry && this.state === State.WAITING_TRACK && ((_data$context = data.context) == null ? undefined : _data$context.type) === PlaylistContextType.AUDIO_TRACK) {
16718
16718
  this.state = State.IDLE;
16719
16719
  }
16720
16720
  break;
@@ -16913,7 +16913,7 @@ class AudioStreamController extends BaseStreamController {
16913
16913
  media,
16914
16914
  bufferedTrack
16915
16915
  } = this;
16916
- const bufferedAttributes = bufferedTrack == null ? void 0 : bufferedTrack.attrs;
16916
+ const bufferedAttributes = bufferedTrack == null ? undefined : bufferedTrack.attrs;
16917
16917
  const switchAttributes = switchingTrack.attrs;
16918
16918
  if (media && bufferedAttributes && (bufferedAttributes.CHANNELS !== switchAttributes.CHANNELS || bufferedTrack.name !== switchingTrack.name || bufferedTrack.lang !== switchingTrack.lang)) {
16919
16919
  if (useAlternateAudio(switchingTrack.url, this.hls)) {
@@ -16940,7 +16940,7 @@ class AudioStreamController extends BaseStreamController {
16940
16940
  class BasePlaylistController extends Logger {
16941
16941
  constructor(hls, logPrefix) {
16942
16942
  super(logPrefix, hls.logger);
16943
- this.hls = void 0;
16943
+ this.hls = undefined;
16944
16944
  this.canLoad = false;
16945
16945
  this.timer = -1;
16946
16946
  this.hls = hls;
@@ -16965,7 +16965,7 @@ class BasePlaylistController extends Logger {
16965
16965
  this.clearTimer();
16966
16966
  }
16967
16967
  switchParams(playlistUri, previous, current) {
16968
- const renditionReports = previous == null ? void 0 : previous.renditionReports;
16968
+ const renditionReports = previous == null ? undefined : previous.renditionReports;
16969
16969
  if (renditionReports) {
16970
16970
  let foundIndex = -1;
16971
16971
  for (let i = 0; i < renditionReports.length; i++) {
@@ -16988,8 +16988,8 @@ class BasePlaylistController extends Logger {
16988
16988
  }
16989
16989
  if (foundIndex !== -1) {
16990
16990
  const attr = renditionReports[foundIndex];
16991
- const msn = parseInt(attr['LAST-MSN']) || (previous == null ? void 0 : previous.lastPartSn);
16992
- let part = parseInt(attr['LAST-PART']) || (previous == null ? void 0 : previous.lastPartIndex);
16991
+ const msn = parseInt(attr['LAST-MSN']) || (previous == null ? undefined : previous.lastPartSn);
16992
+ let part = parseInt(attr['LAST-PART']) || (previous == null ? undefined : previous.lastPartIndex);
16993
16993
  if (this.hls.config.lowLatencyMode) {
16994
16994
  const currentGoal = Math.min(previous.age - previous.partTarget, previous.targetduration);
16995
16995
  if (part >= 0 && currentGoal > previous.partTarget) {
@@ -17253,7 +17253,7 @@ class AudioTrackController extends BasePlaylistController {
17253
17253
  } = data;
17254
17254
  const trackInActiveGroup = this.tracksInGroup[id];
17255
17255
  if (!trackInActiveGroup || trackInActiveGroup.groupId !== groupId) {
17256
- this.warn(`Audio track with id:${id} and group:${groupId} not found in active group ${trackInActiveGroup == null ? void 0 : trackInActiveGroup.groupId}`);
17256
+ this.warn(`Audio track with id:${id} and group:${groupId} not found in active group ${trackInActiveGroup == null ? undefined : trackInActiveGroup.groupId}`);
17257
17257
  return;
17258
17258
  }
17259
17259
  const curDetails = trackInActiveGroup.details;
@@ -17277,7 +17277,7 @@ class AudioTrackController extends BasePlaylistController {
17277
17277
  const audioGroups = levelInfo.audioGroups || null;
17278
17278
  const currentGroups = this.groupIds;
17279
17279
  let currentTrack = this.currentTrack;
17280
- if (!audioGroups || (currentGroups == null ? void 0 : currentGroups.length) !== (audioGroups == null ? void 0 : audioGroups.length) || audioGroups != null && audioGroups.some(groupId => (currentGroups == null ? void 0 : currentGroups.indexOf(groupId)) === -1)) {
17280
+ if (!audioGroups || (currentGroups == null ? undefined : currentGroups.length) !== (audioGroups == null ? undefined : audioGroups.length) || audioGroups != null && audioGroups.some(groupId => (currentGroups == null ? undefined : currentGroups.indexOf(groupId)) === -1)) {
17281
17281
  this.groupIds = audioGroups;
17282
17282
  this.trackId = -1;
17283
17283
  this.currentTrack = null;
@@ -17319,14 +17319,14 @@ class AudioTrackController extends BasePlaylistController {
17319
17319
  const audioTracksUpdated = {
17320
17320
  audioTracks
17321
17321
  };
17322
- this.log(`Updating audio tracks, ${audioTracks.length} track(s) found in group(s): ${audioGroups == null ? void 0 : audioGroups.join(',')}`);
17322
+ this.log(`Updating audio tracks, ${audioTracks.length} track(s) found in group(s): ${audioGroups == null ? undefined : audioGroups.join(',')}`);
17323
17323
  this.hls.trigger(Events.AUDIO_TRACKS_UPDATED, audioTracksUpdated);
17324
17324
  const selectedTrackId = this.trackId;
17325
17325
  if (trackId !== -1 && selectedTrackId === -1) {
17326
17326
  this.setAudioTrack(trackId);
17327
17327
  } else if (audioTracks.length && selectedTrackId === -1) {
17328
17328
  var _this$groupIds;
17329
- const error = new Error(`No audio track selected for current audio group-ID(s): ${(_this$groupIds = this.groupIds) == null ? void 0 : _this$groupIds.join(',')} track count: ${audioTracks.length}`);
17329
+ const error = new Error(`No audio track selected for current audio group-ID(s): ${(_this$groupIds = this.groupIds) == null ? undefined : _this$groupIds.join(',')} track count: ${audioTracks.length}`);
17330
17330
  this.warn(error.message);
17331
17331
  this.hls.trigger(Events.ERROR, {
17332
17332
  type: ErrorTypes.MEDIA_ERROR,
@@ -17426,7 +17426,7 @@ class AudioTrackController extends BasePlaylistController {
17426
17426
  if (trackLoaded) {
17427
17427
  return;
17428
17428
  }
17429
- const hlsUrlParameters = this.switchParams(track.url, lastTrack == null ? void 0 : lastTrack.details, track.details);
17429
+ const hlsUrlParameters = this.switchParams(track.url, lastTrack == null ? undefined : lastTrack.details, track.details);
17430
17430
  this.loadPlaylist(hlsUrlParameters);
17431
17431
  }
17432
17432
  findTrackId(currentTrack) {
@@ -17494,8 +17494,8 @@ class AudioTrackController extends BasePlaylistController {
17494
17494
  const groupId = audioTrack.groupId;
17495
17495
  const url = this.getUrlWithDirectives(audioTrack.url, hlsUrlParameters);
17496
17496
  const details = audioTrack.details;
17497
- const age = details == null ? void 0 : details.age;
17498
- this.log(`Loading audio-track ${id} "${audioTrack.name}" lang:${audioTrack.lang} group:${groupId}${(hlsUrlParameters == null ? void 0 : hlsUrlParameters.msn) !== undefined ? ' at sn ' + hlsUrlParameters.msn + ' part ' + hlsUrlParameters.part : ''}${age && details.live ? ' age ' + age.toFixed(1) + (details.type ? ' ' + details.type || '' : '') : ''} ${url}`);
17497
+ const age = details == null ? undefined : details.age;
17498
+ this.log(`Loading audio-track ${id} "${audioTrack.name}" lang:${audioTrack.lang} group:${groupId}${(hlsUrlParameters == null ? undefined : hlsUrlParameters.msn) !== undefined ? ' at sn ' + hlsUrlParameters.msn + ' part ' + hlsUrlParameters.part : ''}${age && details.live ? ' age ' + age.toFixed(1) + (details.type ? ' ' + details.type || '' : '') : ''} ${url}`);
17499
17499
  this.hls.trigger(Events.AUDIO_TRACK_LOADING, {
17500
17500
  url,
17501
17501
  id,
@@ -17508,7 +17508,7 @@ class AudioTrackController extends BasePlaylistController {
17508
17508
 
17509
17509
  class BufferOperationQueue {
17510
17510
  constructor(sourceBufferReference) {
17511
- this.tracks = void 0;
17511
+ this.tracks = undefined;
17512
17512
  this.queues = {
17513
17513
  video: [],
17514
17514
  audio: [],
@@ -17561,7 +17561,7 @@ class BufferOperationQueue {
17561
17561
  }
17562
17562
  [this.queues.video, this.queues.audio, this.queues.audiovideo].forEach(queue => {
17563
17563
  var _queue$;
17564
- const label = (_queue$ = queue[0]) == null ? void 0 : _queue$.label;
17564
+ const label = (_queue$ = queue[0]) == null ? undefined : _queue$.label;
17565
17565
  if (label === 'async-blocker' || label === 'async-blocker-prepend') {
17566
17566
  queue[0].execute();
17567
17567
  queue.splice(0, 1);
@@ -17596,7 +17596,7 @@ class BufferOperationQueue {
17596
17596
  }
17597
17597
 
17598
17598
  // Only shift the current operation off, otherwise the updateend handler will do this for us
17599
- const sb = (_this$tracks$type = this.tracks[type]) == null ? void 0 : _this$tracks$type.buffer;
17599
+ const sb = (_this$tracks$type = this.tracks[type]) == null ? undefined : _this$tracks$type.buffer;
17600
17600
  if (!(sb != null && sb.updating)) {
17601
17601
  this.shiftAndExecuteNext(type);
17602
17602
  }
@@ -17612,7 +17612,7 @@ class BufferOperationQueue {
17612
17612
  }
17613
17613
  current(type) {
17614
17614
  var _this$queues;
17615
- return ((_this$queues = this.queues) == null ? void 0 : _this$queues[type][0]) || null;
17615
+ return ((_this$queues = this.queues) == null ? undefined : _this$queues[type][0]) || null;
17616
17616
  }
17617
17617
  toString() {
17618
17618
  const {
@@ -17633,8 +17633,8 @@ ${this.list('audiovideo')}}`;
17633
17633
  }
17634
17634
  listSbInfo(type) {
17635
17635
  var _this$tracks2;
17636
- const track = (_this$tracks2 = this.tracks) == null ? void 0 : _this$tracks2[type];
17637
- const sb = track == null ? void 0 : track.buffer;
17636
+ const track = (_this$tracks2 = this.tracks) == null ? undefined : _this$tracks2[type];
17637
+ const sb = track == null ? undefined : track.buffer;
17638
17638
  if (!sb) {
17639
17639
  return 'none';
17640
17640
  }
@@ -17642,7 +17642,7 @@ ${this.list('audiovideo')}}`;
17642
17642
  }
17643
17643
  listOps(type) {
17644
17644
  var _this$queues3;
17645
- return ((_this$queues3 = this.queues) == null ? void 0 : _this$queues3[type].map(op => op.label).join(', ')) || '';
17645
+ return ((_this$queues3 = this.queues) == null ? undefined : _this$queues3[type].map(op => op.label).join(', ')) || '';
17646
17646
  }
17647
17647
  }
17648
17648
 
@@ -17657,8 +17657,8 @@ class HlsJsTrackRemovedError extends Error {
17657
17657
  class BufferController extends Logger {
17658
17658
  constructor(hls, fragmentTracker) {
17659
17659
  super('buffer-controller', hls.logger);
17660
- this.hls = void 0;
17661
- this.fragmentTracker = void 0;
17660
+ this.hls = undefined;
17661
+ this.fragmentTracker = undefined;
17662
17662
  // The level details used to determine duration, target-duration and live
17663
17663
  this.details = null;
17664
17664
  // cache the self generated object url to detect hijack of video tag
@@ -17678,11 +17678,11 @@ class BufferController extends Logger {
17678
17678
  // Keep track of video append position for unblocking audio
17679
17679
  this.lastVideoAppendEnd = 0;
17680
17680
  // Whether or not to use ManagedMediaSource API and append source element to media element.
17681
- this.appendSource = void 0;
17681
+ this.appendSource = undefined;
17682
17682
  // Transferred MediaSource information used to detmerine if duration end endstream may be appended
17683
- this.transferData = void 0;
17683
+ this.transferData = undefined;
17684
17684
  // Directives used to override default MediaSource handling
17685
- this.overrides = void 0;
17685
+ this.overrides = undefined;
17686
17686
  // Error counters
17687
17687
  this.appendErrors = {
17688
17688
  audio: 0,
@@ -17698,7 +17698,7 @@ class BufferController extends Logger {
17698
17698
  if (!this.hls) {
17699
17699
  return;
17700
17700
  }
17701
- if (((_this$mediaSource = this.mediaSource) == null ? void 0 : _this$mediaSource.readyState) !== 'open') {
17701
+ if (((_this$mediaSource = this.mediaSource) == null ? undefined : _this$mediaSource.readyState) !== 'open') {
17702
17702
  return;
17703
17703
  }
17704
17704
  this.hls.pauseBuffering();
@@ -17871,7 +17871,7 @@ class BufferController extends Logger {
17871
17871
  // in case alt audio is not used, only one BUFFER_CODEC event will be fired from main stream controller
17872
17872
  // it will contain the expected nb of source buffers, no need to compute it
17873
17873
  let codecEvents = 2;
17874
- if (data.audio && !data.video || !data.altAudio || !true) {
17874
+ if (data.audio && !data.video || !data.altAudio || false) {
17875
17875
  codecEvents = 1;
17876
17876
  }
17877
17877
  this.bufferCodecEventsTotal = codecEvents;
@@ -17920,7 +17920,7 @@ class BufferController extends Logger {
17920
17920
  }
17921
17921
  assignMediaSource(ms) {
17922
17922
  var _this$transferData2, _ms$constructor;
17923
- 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}`);
17923
+ 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}`);
17924
17924
  // MediaSource listeners are arrow functions with a lexical scope, and do not need to be bound
17925
17925
  ms.addEventListener('sourceopen', this._onMediaSourceOpen);
17926
17926
  ms.addEventListener('sourceended', this._onMediaSourceEnded);
@@ -17961,7 +17961,7 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
17961
17961
  data.tracks = undefined;
17962
17962
  const currentTime = media.currentTime;
17963
17963
  const details = this.details;
17964
- const startTime = Math.max(currentTime, (details == null ? void 0 : details.fragments[0].start) || 0);
17964
+ const startTime = Math.max(currentTime, (details == null ? undefined : details.fragments[0].start) || 0);
17965
17965
  if (startTime - currentTime > 1) {
17966
17966
  this.log(`attachTransferred: waiting for playback to reach new tracks start time ${currentTime} -> ${startTime}`);
17967
17967
  return;
@@ -18006,7 +18006,7 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
18006
18006
  }
18007
18007
  get mediaSourceOpenOrEnded() {
18008
18008
  var _this$mediaSource2;
18009
- const readyState = (_this$mediaSource2 = this.mediaSource) == null ? void 0 : _this$mediaSource2.readyState;
18009
+ const readyState = (_this$mediaSource2 = this.mediaSource) == null ? undefined : _this$mediaSource2.readyState;
18010
18010
  return readyState === 'open' || readyState === 'ended';
18011
18011
  }
18012
18012
  onMediaDetaching(event, data) {
@@ -18101,7 +18101,7 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
18101
18101
  }
18102
18102
  resetBuffer(type) {
18103
18103
  var _this$tracks$type;
18104
- const sb = (_this$tracks$type = this.tracks[type]) == null ? void 0 : _this$tracks$type.buffer;
18104
+ const sb = (_this$tracks$type = this.tracks[type]) == null ? undefined : _this$tracks$type.buffer;
18105
18105
  this.removeBuffer(type);
18106
18106
  if (sb) {
18107
18107
  try {
@@ -18153,10 +18153,10 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
18153
18153
  metadata
18154
18154
  } = parsedTrack;
18155
18155
  let track = tracks[trackName];
18156
- const transferredTrack = (_this$transferData3 = this.transferData) == null ? void 0 : (_this$transferData3$t = _this$transferData3.tracks) == null ? void 0 : _this$transferData3$t[trackName];
18156
+ const transferredTrack = (_this$transferData3 = this.transferData) == null ? undefined : (_this$transferData3$t = _this$transferData3.tracks) == null ? undefined : _this$transferData3$t[trackName];
18157
18157
  const sbTrack = transferredTrack != null && transferredTrack.buffer ? transferredTrack : track;
18158
- const sbCodec = (sbTrack == null ? void 0 : sbTrack.pendingCodec) || (sbTrack == null ? void 0 : sbTrack.codec);
18159
- const trackLevelCodec = sbTrack == null ? void 0 : sbTrack.levelCodec;
18158
+ const sbCodec = (sbTrack == null ? undefined : sbTrack.pendingCodec) || (sbTrack == null ? undefined : sbTrack.codec);
18159
+ const trackLevelCodec = sbTrack == null ? undefined : sbTrack.levelCodec;
18160
18160
  const forceChangeType = !sbTrack || !!this.hls.config.assetPlayerId;
18161
18161
  if (!track) {
18162
18162
  track = tracks[trackName] = {
@@ -18171,9 +18171,9 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
18171
18171
  }
18172
18172
  // check if SourceBuffer codec needs to change
18173
18173
  const currentCodecFull = pickMostCompleteCodecName(sbCodec, trackLevelCodec);
18174
- const currentCodec = currentCodecFull == null ? void 0 : currentCodecFull.replace(VIDEO_CODEC_PROFILE_REPLACE, '$1');
18174
+ const currentCodec = currentCodecFull == null ? undefined : currentCodecFull.replace(VIDEO_CODEC_PROFILE_REPLACE, '$1');
18175
18175
  let trackCodec = pickMostCompleteCodecName(codec, levelCodec);
18176
- const nextCodec = (_trackCodec = trackCodec) == null ? void 0 : _trackCodec.replace(VIDEO_CODEC_PROFILE_REPLACE, '$1');
18176
+ const nextCodec = (_trackCodec = trackCodec) == null ? undefined : _trackCodec.replace(VIDEO_CODEC_PROFILE_REPLACE, '$1');
18177
18177
  if (trackCodec && (currentCodec !== nextCodec || forceChangeType)) {
18178
18178
  if (trackName.slice(0, 5) === 'audio') {
18179
18179
  trackCodec = getCodecCompatibleName(trackCodec, this.appendSource);
@@ -18239,7 +18239,7 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
18239
18239
  var _this$fragmentTracker;
18240
18240
  const pStart = partOrFrag.start;
18241
18241
  const pTime = pStart + partOrFrag.duration * 0.05;
18242
- const atGap = ((_this$fragmentTracker = this.fragmentTracker.getAppendedFrag(pStart, PlaylistLevelType.MAIN)) == null ? void 0 : _this$fragmentTracker.gap) === true;
18242
+ const atGap = ((_this$fragmentTracker = this.fragmentTracker.getAppendedFrag(pStart, PlaylistLevelType.MAIN)) == null ? undefined : _this$fragmentTracker.gap) === true;
18243
18243
  if (atGap) {
18244
18244
  return;
18245
18245
  }
@@ -18248,7 +18248,7 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
18248
18248
  execute: () => {
18249
18249
  var _this$fragmentTracker2;
18250
18250
  const videoTrack = this.tracks.video;
18251
- if (this.lastVideoAppendEnd > pTime || videoTrack != null && videoTrack.buffer && BufferHelper.isBuffered(videoTrack.buffer, pTime) || ((_this$fragmentTracker2 = this.fragmentTracker.getAppendedFrag(pTime, PlaylistLevelType.MAIN)) == null ? void 0 : _this$fragmentTracker2.gap) === true) {
18251
+ if (this.lastVideoAppendEnd > pTime || videoTrack != null && videoTrack.buffer && BufferHelper.isBuffered(videoTrack.buffer, pTime) || ((_this$fragmentTracker2 = this.fragmentTracker.getAppendedFrag(pTime, PlaylistLevelType.MAIN)) == null ? undefined : _this$fragmentTracker2.gap) === true) {
18252
18252
  this.blockedAudioAppend = null;
18253
18253
  this.shiftAndExecuteNext('audio');
18254
18254
  }
@@ -18307,14 +18307,14 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
18307
18307
  // More info here: https://github.com/video-dev/hls.js/issues/332#issuecomment-257986486
18308
18308
  const audioTrack = tracks.audio;
18309
18309
  let checkTimestampOffset = false;
18310
- if (type === 'audio' && (audioTrack == null ? void 0 : audioTrack.container) === 'audio/mpeg') {
18310
+ if (type === 'audio' && (audioTrack == null ? undefined : audioTrack.container) === 'audio/mpeg') {
18311
18311
  checkTimestampOffset = !this.lastMpegAudioChunk || chunkMeta.id === 1 || this.lastMpegAudioChunk.sn !== chunkMeta.sn;
18312
18312
  this.lastMpegAudioChunk = chunkMeta;
18313
18313
  }
18314
18314
 
18315
18315
  // Block audio append until overlapping video append
18316
18316
  const videoTrack = this.tracks.video;
18317
- const videoSb = videoTrack == null ? void 0 : videoTrack.buffer;
18317
+ const videoSb = videoTrack == null ? undefined : videoTrack.buffer;
18318
18318
  if (videoSb && sn !== 'initSegment') {
18319
18319
  const partOrFrag = part || frag;
18320
18320
  const blockedAudioAppend = this.blockedAudioAppend;
@@ -18519,7 +18519,7 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
18519
18519
  get bufferedToEnd() {
18520
18520
  return this.sourceBufferCount > 0 && !this.sourceBuffers.some(([type]) => {
18521
18521
  var _this$tracks$type2, _this$tracks$type3;
18522
- return type && (!((_this$tracks$type2 = this.tracks[type]) != null && _this$tracks$type2.ended) || ((_this$tracks$type3 = this.tracks[type]) == null ? void 0 : _this$tracks$type3.ending));
18522
+ return type && (!((_this$tracks$type2 = this.tracks[type]) != null && _this$tracks$type2.ended) || ((_this$tracks$type3 = this.tracks[type]) == null ? undefined : _this$tracks$type3.ending));
18523
18523
  });
18524
18524
  }
18525
18525
 
@@ -18539,7 +18539,7 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
18539
18539
  }
18540
18540
  }
18541
18541
  });
18542
- const allowEndOfStream = ((_this$overrides = this.overrides) == null ? void 0 : _this$overrides.endOfStream) !== false;
18542
+ const allowEndOfStream = ((_this$overrides = this.overrides) == null ? undefined : _this$overrides.endOfStream) !== false;
18543
18543
  const allTracksEnding = this.sourceBufferCount > 0 && !this.sourceBuffers.some(([type]) => {
18544
18544
  var _this$tracks$type4;
18545
18545
  return type && !((_this$tracks$type4 = this.tracks[type]) != null && _this$tracks$type4.ended);
@@ -18592,7 +18592,7 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
18592
18592
  onError(event, data) {
18593
18593
  if (data.details === ErrorDetails.BUFFER_APPEND_ERROR && data.frag) {
18594
18594
  var _data$errorAction;
18595
- const nextAutoLevel = (_data$errorAction = data.errorAction) == null ? void 0 : _data$errorAction.nextAutoLevel;
18595
+ const nextAutoLevel = (_data$errorAction = data.errorAction) == null ? undefined : _data$errorAction.nextAutoLevel;
18596
18596
  if (isFiniteNumber(nextAutoLevel) && nextAutoLevel !== data.frag.level) {
18597
18597
  this.resetAppendErrors();
18598
18598
  }
@@ -18700,7 +18700,7 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
18700
18700
  details,
18701
18701
  mediaSource
18702
18702
  } = this;
18703
- if (!details || !this.media || (mediaSource == null ? void 0 : mediaSource.readyState) !== 'open') {
18703
+ if (!details || !this.media || (mediaSource == null ? undefined : mediaSource.readyState) !== 'open') {
18704
18704
  return null;
18705
18705
  }
18706
18706
  const playlistEnd = details.edge;
@@ -18721,7 +18721,7 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
18721
18721
  duration: Infinity
18722
18722
  };
18723
18723
  }
18724
- const overrideDuration = (_this$overrides2 = this.overrides) == null ? void 0 : _this$overrides2.duration;
18724
+ const overrideDuration = (_this$overrides2 = this.overrides) == null ? undefined : _this$overrides2.duration;
18725
18725
  if (overrideDuration) {
18726
18726
  return {
18727
18727
  duration: overrideDuration
@@ -18773,7 +18773,7 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
18773
18773
  // 2 tracks is the max (one for audio, one for video). If we've reach this max go ahead and create the buffers.
18774
18774
  if (this.tracksReady) {
18775
18775
  var _this$transferData4;
18776
- const transferredTracks = (_this$transferData4 = this.transferData) == null ? void 0 : _this$transferData4.tracks;
18776
+ const transferredTracks = (_this$transferData4 = this.transferData) == null ? undefined : _this$transferData4.tracks;
18777
18777
  if (transferredTracks && Object.keys(transferredTracks).length) {
18778
18778
  this.attachTransferred();
18779
18779
  } else {
@@ -18899,8 +18899,8 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
18899
18899
  }
18900
18900
  get mediaSrc() {
18901
18901
  var _this$media2, _this$media2$querySel;
18902
- const media = ((_this$media2 = this.media) == null ? void 0 : (_this$media2$querySel = _this$media2.querySelector) == null ? void 0 : _this$media2$querySel.call(_this$media2, 'source')) || this.media;
18903
- return media == null ? void 0 : media.src;
18902
+ const media = ((_this$media2 = this.media) == null ? undefined : (_this$media2$querySel = _this$media2.querySelector) == null ? undefined : _this$media2$querySel.call(_this$media2, 'source')) || this.media;
18903
+ return media == null ? undefined : media.src;
18904
18904
  }
18905
18905
  onSBUpdateStart(type) {
18906
18906
  const operation = this.currentOp(type);
@@ -18911,7 +18911,7 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
18911
18911
  }
18912
18912
  onSBUpdateEnd(type) {
18913
18913
  var _this$mediaSource4;
18914
- if (((_this$mediaSource4 = this.mediaSource) == null ? void 0 : _this$mediaSource4.readyState) === 'closed') {
18914
+ if (((_this$mediaSource4 = this.mediaSource) == null ? undefined : _this$mediaSource4.readyState) === 'closed') {
18915
18915
  this.resetBuffer(type);
18916
18916
  return;
18917
18917
  }
@@ -18924,7 +18924,7 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
18924
18924
  }
18925
18925
  onSBUpdateError(type, event) {
18926
18926
  var _this$mediaSource5;
18927
- const error = new Error(`${type} SourceBuffer error. MediaSource readyState: ${(_this$mediaSource5 = this.mediaSource) == null ? void 0 : _this$mediaSource5.readyState}`);
18927
+ const error = new Error(`${type} SourceBuffer error. MediaSource readyState: ${(_this$mediaSource5 = this.mediaSource) == null ? undefined : _this$mediaSource5.readyState}`);
18928
18928
  this.error(`${error}`, event);
18929
18929
  // according to http://www.w3.org/TR/media-source/#sourcebuffer-append-error
18930
18930
  // SourceBuffer errors are not necessarily fatal; if so, the HTMLMediaElement will fire an error event
@@ -18949,7 +18949,7 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
18949
18949
  mediaSource
18950
18950
  } = this;
18951
18951
  const track = this.tracks[type];
18952
- const sb = track == null ? void 0 : track.buffer;
18952
+ const sb = track == null ? undefined : track.buffer;
18953
18953
  if (!media || !mediaSource || !sb) {
18954
18954
  this.warn(`Attempting to remove from the ${type} SourceBuffer, but it does not exist`);
18955
18955
  this.shiftAndExecuteNext(type);
@@ -18972,7 +18972,7 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
18972
18972
  // This method must result in an updateend event; if append is not called, onSBUpdateEnd must be called manually
18973
18973
  appendExecutor(data, type) {
18974
18974
  const track = this.tracks[type];
18975
- const sb = track == null ? void 0 : track.buffer;
18975
+ const sb = track == null ? undefined : track.buffer;
18976
18976
  if (!sb) {
18977
18977
  throw new HlsJsTrackRemovedError(`Attempting to append to the ${type} SourceBuffer, but it does not exist`);
18978
18978
  }
@@ -19028,7 +19028,7 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
19028
19028
  stepOperationQueue(bufferNames) {
19029
19029
  bufferNames.forEach(type => {
19030
19030
  var _this$tracks$type5;
19031
- const sb = (_this$tracks$type5 = this.tracks[type]) == null ? void 0 : _this$tracks$type5.buffer;
19031
+ const sb = (_this$tracks$type5 = this.tracks[type]) == null ? undefined : _this$tracks$type5.buffer;
19032
19032
  // Only cycle the queue if the SB is not updating. There's a bug in Chrome which sets the SB updating flag to
19033
19033
  // true when changing the MediaSource duration (https://bugs.chromium.org/p/chromium/issues/detail?id=959359&can=2&q=mediasource%20duration)
19034
19034
  // While this is a workaround, it's probably useful to have around
@@ -19122,14 +19122,14 @@ function sourceBufferNameToIndex(type) {
19122
19122
 
19123
19123
  class CapLevelController {
19124
19124
  constructor(hls) {
19125
- this.hls = void 0;
19126
- this.autoLevelCapping = void 0;
19127
- this.firstLevel = void 0;
19128
- this.media = void 0;
19129
- this.restrictedLevels = void 0;
19130
- this.timer = void 0;
19131
- this.clientRect = void 0;
19132
- this.streamController = void 0;
19125
+ this.hls = undefined;
19126
+ this.autoLevelCapping = undefined;
19127
+ this.firstLevel = undefined;
19128
+ this.media = undefined;
19129
+ this.restrictedLevels = undefined;
19130
+ this.timer = undefined;
19131
+ this.clientRect = undefined;
19132
+ this.streamController = undefined;
19133
19133
  this.hls = hls;
19134
19134
  this.autoLevelCapping = Number.POSITIVE_INFINITY;
19135
19135
  this.firstLevel = -1;
@@ -20000,7 +20000,7 @@ function serializeDict(dict, options = {
20000
20000
  throw serializeError(dict, DICT);
20001
20001
  }
20002
20002
  const entries = dict instanceof Map ? dict.entries() : Object.entries(dict);
20003
- const optionalWhiteSpace = (options === null || options === void 0 ? void 0 : options.whitespace) ? ' ' : '';
20003
+ const optionalWhiteSpace = (options === null || options === undefined ? undefined : options.whitespace) ? ' ' : '';
20004
20004
  return Array.from(entries).map(([key, item]) => {
20005
20005
  if (item instanceof SfItem === false) {
20006
20006
  item = new SfItem(item);
@@ -20067,7 +20067,7 @@ function isValid(value) {
20067
20067
 
20068
20068
  const toRounded = value => Math.round(value);
20069
20069
  const toUrlSafe = (value, options) => {
20070
- if (options === null || options === void 0 ? void 0 : options.baseUrl) {
20070
+ if (options === null || options === undefined ? undefined : options.baseUrl) {
20071
20071
  value = urlToRelativePath(value, options.baseUrl);
20072
20072
  }
20073
20073
  return encodeURIComponent(value);
@@ -20132,10 +20132,10 @@ function processCmcd(obj, options) {
20132
20132
  return results;
20133
20133
  }
20134
20134
  const keys = Object.keys(obj).sort();
20135
- const formatters = _extends({}, CmcdFormatters, options === null || options === void 0 ? void 0 : options.formatters);
20136
- const filter = options === null || options === void 0 ? void 0 : options.filter;
20135
+ const formatters = _extends({}, CmcdFormatters, options === null || options === undefined ? undefined : options.formatters);
20136
+ const filter = options === null || options === undefined ? undefined : options.filter;
20137
20137
  keys.forEach(key => {
20138
- if (filter === null || filter === void 0 ? void 0 : filter(key)) {
20138
+ if (filter === null || filter === undefined ? undefined : filter(key)) {
20139
20139
  return;
20140
20140
  }
20141
20141
  let value = obj[key];
@@ -20202,12 +20202,12 @@ function toCmcdHeaders(cmcd, options = {}) {
20202
20202
  return result;
20203
20203
  }
20204
20204
  const entries = Object.entries(cmcd);
20205
- const headerMap = Object.entries(CmcdHeaderMap).concat(Object.entries((options === null || options === void 0 ? void 0 : options.customHeaderMap) || {}));
20205
+ const headerMap = Object.entries(CmcdHeaderMap).concat(Object.entries((options === null || options === undefined ? undefined : options.customHeaderMap) || {}));
20206
20206
  const shards = entries.reduce((acc, entry) => {
20207
20207
  var _a, _b;
20208
20208
  const [key, value] = entry;
20209
- const field = ((_a = headerMap.find(entry => entry[1].includes(key))) === null || _a === void 0 ? void 0 : _a[0]) || CmcdHeaderField.REQUEST;
20210
- (_b = acc[field]) !== null && _b !== void 0 ? _b : acc[field] = {};
20209
+ const field = ((_a = headerMap.find(entry => entry[1].includes(key))) === null || _a === undefined ? undefined : _a[0]) || CmcdHeaderField.REQUEST;
20210
+ (_b = acc[field]) !== null && _b !== undefined ? _b : acc[field] = {};
20211
20211
  acc[field][key] = value;
20212
20212
  return acc;
20213
20213
  }, {});
@@ -20297,18 +20297,18 @@ function appendCmcdQuery(url, cmcd, options) {
20297
20297
  */
20298
20298
  class CMCDController {
20299
20299
  constructor(hls) {
20300
- this.hls = void 0;
20301
- this.config = void 0;
20302
- this.media = void 0;
20303
- this.sid = void 0;
20304
- this.cid = void 0;
20300
+ this.hls = undefined;
20301
+ this.config = undefined;
20302
+ this.media = undefined;
20303
+ this.sid = undefined;
20304
+ this.cid = undefined;
20305
20305
  this.useHeaders = false;
20306
- this.includeKeys = void 0;
20306
+ this.includeKeys = undefined;
20307
20307
  this.initialized = false;
20308
20308
  this.starved = false;
20309
20309
  this.buffering = true;
20310
- this.audioBuffer = void 0;
20311
- this.videoBuffer = void 0;
20310
+ this.audioBuffer = undefined;
20311
+ this.videoBuffer = undefined;
20312
20312
  this.onWaiting = () => {
20313
20313
  if (this.initialized) {
20314
20314
  this.starved = true;
@@ -20416,8 +20416,8 @@ class CMCDController {
20416
20416
  }
20417
20417
  onBufferCreated(event, data) {
20418
20418
  var _data$tracks$audio, _data$tracks$video;
20419
- this.audioBuffer = (_data$tracks$audio = data.tracks.audio) == null ? void 0 : _data$tracks$audio.buffer;
20420
- this.videoBuffer = (_data$tracks$video = data.tracks.video) == null ? void 0 : _data$tracks$video.buffer;
20419
+ this.audioBuffer = (_data$tracks$audio = data.tracks.audio) == null ? undefined : _data$tracks$audio.buffer;
20420
+ this.videoBuffer = (_data$tracks$video = data.tracks.video) == null ? undefined : _data$tracks$video.buffer;
20421
20421
  }
20422
20422
  /**
20423
20423
  * Create baseline CMCD data
@@ -20429,7 +20429,7 @@ class CMCDController {
20429
20429
  sf: CmcdStreamingFormat.HLS,
20430
20430
  sid: this.sid,
20431
20431
  cid: this.cid,
20432
- pr: (_this$media = this.media) == null ? void 0 : _this$media.playbackRate,
20432
+ pr: (_this$media = this.media) == null ? undefined : _this$media.playbackRate,
20433
20433
  mtp: this.hls.bandwidthEstimate / 1000
20434
20434
  };
20435
20435
  }
@@ -20475,7 +20475,7 @@ class CMCDController {
20475
20475
  }
20476
20476
  getNextFrag(fragment) {
20477
20477
  var _this$hls$levels$frag;
20478
- const levelDetails = (_this$hls$levels$frag = this.hls.levels[fragment.level]) == null ? void 0 : _this$hls$levels$frag.details;
20478
+ const levelDetails = (_this$hls$levels$frag = this.hls.levels[fragment.level]) == null ? undefined : _this$hls$levels$frag.details;
20479
20479
  if (levelDetails) {
20480
20480
  const index = fragment.sn - levelDetails.startSN;
20481
20481
  return levelDetails.fragments[index + 1];
@@ -20488,7 +20488,7 @@ class CMCDController {
20488
20488
  index,
20489
20489
  fragment
20490
20490
  } = part;
20491
- const partList = (_this$hls$levels$frag2 = this.hls.levels[fragment.level]) == null ? void 0 : (_this$hls$levels$frag3 = _this$hls$levels$frag2.details) == null ? void 0 : _this$hls$levels$frag3.partList;
20491
+ const partList = (_this$hls$levels$frag2 = this.hls.levels[fragment.level]) == null ? undefined : (_this$hls$levels$frag3 = _this$hls$levels$frag2.details) == null ? undefined : _this$hls$levels$frag3.partList;
20492
20492
  if (partList) {
20493
20493
  const {
20494
20494
  sn
@@ -20574,7 +20574,7 @@ class CMCDController {
20574
20574
  const Ctor = pLoader || this.config.loader;
20575
20575
  return class CmcdPlaylistLoader {
20576
20576
  constructor(config) {
20577
- this.loader = void 0;
20577
+ this.loader = undefined;
20578
20578
  this.loader = new Ctor(config);
20579
20579
  }
20580
20580
  get stats() {
@@ -20607,7 +20607,7 @@ class CMCDController {
20607
20607
  const Ctor = fLoader || this.config.loader;
20608
20608
  return class CmcdFragmentLoader {
20609
20609
  constructor(config) {
20610
- this.loader = void 0;
20610
+ this.loader = undefined;
20611
20611
  this.loader = new Ctor(config);
20612
20612
  }
20613
20613
  get stats() {
@@ -20634,7 +20634,7 @@ const PATHWAY_PENALTY_DURATION_MS = 300000;
20634
20634
  class ContentSteeringController extends Logger {
20635
20635
  constructor(hls) {
20636
20636
  super('content-steering', hls.logger);
20637
- this.hls = void 0;
20637
+ this.hls = undefined;
20638
20638
  this.loader = null;
20639
20639
  this.uri = null;
20640
20640
  this.pathwayId = '.';
@@ -20753,7 +20753,7 @@ class ContentSteeringController extends Logger {
20753
20753
  const {
20754
20754
  errorAction
20755
20755
  } = data;
20756
- if ((errorAction == null ? void 0 : errorAction.action) === NetworkErrorAction.SendAlternateToPenaltyBox && errorAction.flags === ErrorActionFlags.MoveAllAlternatesMatchingHost) {
20756
+ if ((errorAction == null ? undefined : errorAction.action) === NetworkErrorAction.SendAlternateToPenaltyBox && errorAction.flags === ErrorActionFlags.MoveAllAlternatesMatchingHost) {
20757
20757
  const levels = this.levels;
20758
20758
  let pathwayPriority = this._pathwayPriority;
20759
20759
  let errorPathway = this.pathwayId;
@@ -20951,7 +20951,7 @@ class ContentSteeringController extends Logger {
20951
20951
  onSuccess: (response, stats, context, networkDetails) => {
20952
20952
  this.log(`Loaded steering manifest: "${url}"`);
20953
20953
  const steeringData = response.data;
20954
- if ((steeringData == null ? void 0 : steeringData.VERSION) !== 1) {
20954
+ if ((steeringData == null ? undefined : steeringData.VERSION) !== 1) {
20955
20955
  this.log(`Steering VERSION ${steeringData.VERSION} not supported!`);
20956
20956
  return;
20957
20957
  }
@@ -20995,7 +20995,7 @@ class ContentSteeringController extends Logger {
20995
20995
  let ttl = this.timeToLoad * 1000;
20996
20996
  if (error.code === 429) {
20997
20997
  const loader = this.loader;
20998
- if (typeof (loader == null ? void 0 : loader.getResponseHeader) === 'function') {
20998
+ if (typeof (loader == null ? undefined : loader.getResponseHeader) === 'function') {
20999
20999
  const retryAfter = loader.getResponseHeader('Retry-After');
21000
21000
  if (retryAfter) {
21001
21001
  ttl = parseFloat(retryAfter) * 1000;
@@ -21018,7 +21018,7 @@ class ContentSteeringController extends Logger {
21018
21018
  this.clearTimeout();
21019
21019
  this.reloadTimer = self.setTimeout(() => {
21020
21020
  var _this$hls;
21021
- const media = (_this$hls = this.hls) == null ? void 0 : _this$hls.media;
21021
+ const media = (_this$hls = this.hls) == null ? undefined : _this$hls.media;
21022
21022
  if (media && !media.ended) {
21023
21023
  this.loadSteeringManifest(uri);
21024
21024
  return;
@@ -21052,7 +21052,7 @@ function performUriReplacement(uri, stableId, perOptionKey, uriReplacement) {
21052
21052
  } = uriReplacement;
21053
21053
  let perVariantUri;
21054
21054
  if (stableId) {
21055
- perVariantUri = perOptionUris == null ? void 0 : perOptionUris[stableId];
21055
+ perVariantUri = perOptionUris == null ? undefined : perOptionUris[stableId];
21056
21056
  if (perVariantUri) {
21057
21057
  uri = perVariantUri;
21058
21058
  }
@@ -21081,8 +21081,8 @@ function performUriReplacement(uri, stableId, perOptionKey, uriReplacement) {
21081
21081
  class EMEController extends Logger {
21082
21082
  constructor(hls) {
21083
21083
  super('eme', hls.logger);
21084
- this.hls = void 0;
21085
- this.config = void 0;
21084
+ this.hls = undefined;
21085
+ this.config = undefined;
21086
21086
  this.media = null;
21087
21087
  this.keyFormatPromise = null;
21088
21088
  this.keySystemAccessPromises = {};
@@ -21338,7 +21338,7 @@ class EMEController extends Logger {
21338
21338
  // This can throw, but is caught in event handler callpath
21339
21339
  const mediaKeySystemConfigs = getSupportedMediaKeySystemConfigurations(keySystem, audioCodecs, videoCodecs, this.config.drmSystemOptions);
21340
21340
  const keySystemAccessPromises = this.keySystemAccessPromises[keySystem];
21341
- let keySystemAccess = keySystemAccessPromises == null ? void 0 : keySystemAccessPromises.keySystemAccess;
21341
+ let keySystemAccess = keySystemAccessPromises == null ? undefined : keySystemAccessPromises.keySystemAccess;
21342
21342
  if (!keySystemAccess) {
21343
21343
  this.log(`Requesting encrypted media "${keySystem}" key-system access with config: ${JSON.stringify(mediaKeySystemConfigs)}`);
21344
21344
  keySystemAccess = this.requestMediaKeySystemAccess(keySystem, mediaKeySystemConfigs);
@@ -21410,7 +21410,7 @@ class EMEController extends Logger {
21410
21410
  updateKeySession(mediaKeySessionContext, data) {
21411
21411
  var _mediaKeySessionConte;
21412
21412
  const keySession = mediaKeySessionContext.mediaKeysSession;
21413
- this.log(`Updating key-session "${keySession.sessionId}" for keyID ${Hex.hexDump(((_mediaKeySessionConte = mediaKeySessionContext.decryptdata) == null ? void 0 : _mediaKeySessionConte.keyId) || [])}
21413
+ this.log(`Updating key-session "${keySession.sessionId}" for keyID ${Hex.hexDump(((_mediaKeySessionConte = mediaKeySessionContext.decryptdata) == null ? undefined : _mediaKeySessionConte.keyId) || [])}
21414
21414
  } (data length: ${data ? data.byteLength : data})`);
21415
21415
  return keySession.update(data);
21416
21416
  }
@@ -21535,7 +21535,7 @@ class EMEController extends Logger {
21535
21535
  }
21536
21536
  generateRequestWithPreferredKeySession(context, initDataType, initData, reason) {
21537
21537
  var _this$config$drmSyste, _this$config$drmSyste2;
21538
- const generateRequestFilter = (_this$config$drmSyste = this.config.drmSystems) == null ? void 0 : (_this$config$drmSyste2 = _this$config$drmSyste[context.keySystem]) == null ? void 0 : _this$config$drmSyste2.generateRequest;
21538
+ const generateRequestFilter = (_this$config$drmSyste = this.config.drmSystems) == null ? undefined : (_this$config$drmSyste2 = _this$config$drmSyste[context.keySystem]) == null ? undefined : _this$config$drmSyste2.generateRequest;
21539
21539
  if (generateRequestFilter) {
21540
21540
  try {
21541
21541
  const mappedInitData = generateRequestFilter.call(this.hls, initDataType, initData, context);
@@ -21630,7 +21630,7 @@ class EMEController extends Logger {
21630
21630
  });
21631
21631
  return context.mediaKeysSession.generateRequest(initDataType, initData).then(() => {
21632
21632
  var _context$mediaKeysSes;
21633
- this.log(`Request generated for key-session "${(_context$mediaKeysSes = context.mediaKeysSession) == null ? void 0 : _context$mediaKeysSes.sessionId}" keyId: ${keyId}`);
21633
+ this.log(`Request generated for key-session "${(_context$mediaKeysSes = context.mediaKeysSession) == null ? undefined : _context$mediaKeysSes.sessionId}" keyId: ${keyId}`);
21634
21634
  }).catch(error => {
21635
21635
  throw new EMEKeyError({
21636
21636
  type: ErrorTypes.KEY_SYSTEM_ERROR,
@@ -21713,7 +21713,7 @@ class EMEController extends Logger {
21713
21713
  setMediaKeysServerCertificate(mediaKeys, keySystem, cert) {
21714
21714
  return new Promise((resolve, reject) => {
21715
21715
  mediaKeys.setServerCertificate(cert).then(success => {
21716
- this.log(`setServerCertificate ${success ? 'success' : 'not supported by CDM'} (${cert == null ? void 0 : cert.byteLength}) on "${keySystem}"`);
21716
+ this.log(`setServerCertificate ${success ? 'success' : 'not supported by CDM'} (${cert == null ? undefined : cert.byteLength}) on "${keySystem}"`);
21717
21717
  resolve(mediaKeys);
21718
21718
  }).catch(error => {
21719
21719
  reject(new EMEKeyError({
@@ -21760,15 +21760,15 @@ class EMEController extends Logger {
21760
21760
  for (let i = 0, len = headers.length; i < len; i++) {
21761
21761
  var _header$querySelector, _header$querySelector2;
21762
21762
  header = headers[i];
21763
- const name = (_header$querySelector = header.querySelector('name')) == null ? void 0 : _header$querySelector.textContent;
21764
- const value = (_header$querySelector2 = header.querySelector('value')) == null ? void 0 : _header$querySelector2.textContent;
21763
+ const name = (_header$querySelector = header.querySelector('name')) == null ? undefined : _header$querySelector.textContent;
21764
+ const value = (_header$querySelector2 = header.querySelector('value')) == null ? undefined : _header$querySelector2.textContent;
21765
21765
  if (name && value) {
21766
21766
  xhr.setRequestHeader(name, value);
21767
21767
  }
21768
21768
  }
21769
21769
  }
21770
21770
  const challengeElement = keyMessageXml.querySelector('Challenge');
21771
- const challengeText = challengeElement == null ? void 0 : challengeElement.textContent;
21771
+ const challengeText = challengeElement == null ? undefined : challengeElement.textContent;
21772
21772
  if (!challengeText) {
21773
21773
  throw new Error(`Cannot find <Challenge> in key message`);
21774
21774
  }
@@ -21903,10 +21903,10 @@ class EMEController extends Logger {
21903
21903
 
21904
21904
  // Close all sessions and remove media keys from the video element.
21905
21905
  const keySessionCount = mediaKeysList.length;
21906
- EMEController.CDMCleanupPromise = Promise.all(mediaKeysList.map(mediaKeySessionContext => this.removeSession(mediaKeySessionContext)).concat(media == null ? void 0 : (_media$setMediaKeys = media.setMediaKeys(null)) == null ? void 0 : _media$setMediaKeys.catch(error => {
21906
+ EMEController.CDMCleanupPromise = Promise.all(mediaKeysList.map(mediaKeySessionContext => this.removeSession(mediaKeySessionContext)).concat(media == null ? undefined : (_media$setMediaKeys = media.setMediaKeys(null)) == null ? undefined : _media$setMediaKeys.catch(error => {
21907
21907
  var _this$hls2;
21908
21908
  this.log(`Could not clear media keys: ${error}`);
21909
- (_this$hls2 = this.hls) == null ? void 0 : _this$hls2.trigger(Events.ERROR, {
21909
+ (_this$hls2 = this.hls) == null ? undefined : _this$hls2.trigger(Events.ERROR, {
21910
21910
  type: ErrorTypes.OTHER_ERROR,
21911
21911
  details: ErrorDetails.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,
21912
21912
  fatal: false,
@@ -21920,7 +21920,7 @@ class EMEController extends Logger {
21920
21920
  }).catch(error => {
21921
21921
  var _this$hls3;
21922
21922
  this.log(`Could not close sessions and clear media keys: ${error}`);
21923
- (_this$hls3 = this.hls) == null ? void 0 : _this$hls3.trigger(Events.ERROR, {
21923
+ (_this$hls3 = this.hls) == null ? undefined : _this$hls3.trigger(Events.ERROR, {
21924
21924
  type: ErrorTypes.OTHER_ERROR,
21925
21925
  details: ErrorDetails.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,
21926
21926
  fatal: false,
@@ -21974,7 +21974,7 @@ class EMEController extends Logger {
21974
21974
  return mediaKeysSession.remove().catch(error => {
21975
21975
  var _this$hls4;
21976
21976
  this.log(`Could not remove session: ${error}`);
21977
- (_this$hls4 = this.hls) == null ? void 0 : _this$hls4.trigger(Events.ERROR, {
21977
+ (_this$hls4 = this.hls) == null ? undefined : _this$hls4.trigger(Events.ERROR, {
21978
21978
  type: ErrorTypes.OTHER_ERROR,
21979
21979
  details: ErrorDetails.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,
21980
21980
  fatal: false,
@@ -21985,7 +21985,7 @@ class EMEController extends Logger {
21985
21985
  }).catch(error => {
21986
21986
  var _this$hls5;
21987
21987
  this.log(`Could not close session: ${error}`);
21988
- (_this$hls5 = this.hls) == null ? void 0 : _this$hls5.trigger(Events.ERROR, {
21988
+ (_this$hls5 = this.hls) == null ? undefined : _this$hls5.trigger(Events.ERROR, {
21989
21989
  type: ErrorTypes.OTHER_ERROR,
21990
21990
  details: ErrorDetails.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,
21991
21991
  fatal: false,
@@ -21995,11 +21995,11 @@ class EMEController extends Logger {
21995
21995
  }
21996
21996
  }
21997
21997
  }
21998
- EMEController.CDMCleanupPromise = void 0;
21998
+ EMEController.CDMCleanupPromise = undefined;
21999
21999
  class EMEKeyError extends Error {
22000
22000
  constructor(data, message) {
22001
22001
  super(message);
22002
- this.data = void 0;
22002
+ this.data = undefined;
22003
22003
  data.error || (data.error = new Error(message));
22004
22004
  this.data = data;
22005
22005
  data.err = data.error;
@@ -22008,15 +22008,15 @@ class EMEKeyError extends Error {
22008
22008
 
22009
22009
  class FPSController {
22010
22010
  constructor(hls) {
22011
- this.hls = void 0;
22011
+ this.hls = undefined;
22012
22012
  this.isVideoPlaybackQualityAvailable = false;
22013
- this.timer = void 0;
22013
+ this.timer = undefined;
22014
22014
  this.media = null;
22015
- this.lastTime = void 0;
22015
+ this.lastTime = undefined;
22016
22016
  this.lastDroppedFrames = 0;
22017
22017
  this.lastDecodedFrames = 0;
22018
22018
  // stream controller must be provided as a dependency!
22019
- this.streamController = void 0;
22019
+ this.streamController = undefined;
22020
22020
  this.hls = hls;
22021
22021
  this.registerListeners();
22022
22022
  }
@@ -22395,7 +22395,7 @@ class SubtitleTrackController extends BasePlaylistController {
22395
22395
  } = data;
22396
22396
  const trackInActiveGroup = this.tracksInGroup[id];
22397
22397
  if (!trackInActiveGroup || trackInActiveGroup.groupId !== groupId) {
22398
- this.warn(`Subtitle track with id:${id} and group:${groupId} not found in active group ${trackInActiveGroup == null ? void 0 : trackInActiveGroup.groupId}`);
22398
+ this.warn(`Subtitle track with id:${id} and group:${groupId} not found in active group ${trackInActiveGroup == null ? undefined : trackInActiveGroup.groupId}`);
22399
22399
  return;
22400
22400
  }
22401
22401
  const curDetails = trackInActiveGroup.details;
@@ -22419,7 +22419,7 @@ class SubtitleTrackController extends BasePlaylistController {
22419
22419
  const subtitleGroups = levelInfo.subtitleGroups || null;
22420
22420
  const currentGroups = this.groupIds;
22421
22421
  let currentTrack = this.currentTrack;
22422
- if (!subtitleGroups || (currentGroups == null ? void 0 : currentGroups.length) !== (subtitleGroups == null ? void 0 : subtitleGroups.length) || subtitleGroups != null && subtitleGroups.some(groupId => (currentGroups == null ? void 0 : currentGroups.indexOf(groupId)) === -1)) {
22422
+ if (!subtitleGroups || (currentGroups == null ? undefined : currentGroups.length) !== (subtitleGroups == null ? undefined : subtitleGroups.length) || subtitleGroups != null && subtitleGroups.some(groupId => (currentGroups == null ? undefined : currentGroups.indexOf(groupId)) === -1)) {
22423
22423
  this.groupIds = subtitleGroups;
22424
22424
  this.trackId = -1;
22425
22425
  this.currentTrack = null;
@@ -22462,7 +22462,7 @@ class SubtitleTrackController extends BasePlaylistController {
22462
22462
  const subtitleTracksUpdated = {
22463
22463
  subtitleTracks
22464
22464
  };
22465
- this.log(`Updating subtitle tracks, ${subtitleTracks.length} track(s) found in "${subtitleGroups == null ? void 0 : subtitleGroups.join(',')}" group-id`);
22465
+ this.log(`Updating subtitle tracks, ${subtitleTracks.length} track(s) found in "${subtitleGroups == null ? undefined : subtitleGroups.join(',')}" group-id`);
22466
22466
  this.hls.trigger(Events.SUBTITLE_TRACKS_UPDATED, subtitleTracksUpdated);
22467
22467
  if (trackId !== -1 && this.trackId === -1) {
22468
22468
  this.setSubtitleTrack(trackId);
@@ -22582,8 +22582,8 @@ class SubtitleTrackController extends BasePlaylistController {
22582
22582
  const groupId = currentTrack.groupId;
22583
22583
  const url = this.getUrlWithDirectives(currentTrack.url, hlsUrlParameters);
22584
22584
  const details = currentTrack.details;
22585
- const age = details == null ? void 0 : details.age;
22586
- this.log(`Loading subtitle ${id} "${currentTrack.name}" lang:${currentTrack.lang} group:${groupId}${(hlsUrlParameters == null ? void 0 : hlsUrlParameters.msn) !== undefined ? ' at sn ' + hlsUrlParameters.msn + ' part ' + hlsUrlParameters.part : ''}${age && details.live ? ' age ' + age.toFixed(1) + (details.type ? ' ' + details.type || '' : '') : ''} ${url}`);
22585
+ const age = details == null ? undefined : details.age;
22586
+ this.log(`Loading subtitle ${id} "${currentTrack.name}" lang:${currentTrack.lang} group:${groupId}${(hlsUrlParameters == null ? undefined : hlsUrlParameters.msn) !== undefined ? ' at sn ' + hlsUrlParameters.msn + ' part ' + hlsUrlParameters.part : ''}${age && details.live ? ' age ' + age.toFixed(1) + (details.type ? ' ' + details.type || '' : '') : ''} ${url}`);
22587
22587
  this.hls.trigger(Events.SUBTITLE_TRACK_LOADING, {
22588
22588
  url,
22589
22589
  id,
@@ -22680,7 +22680,7 @@ class SubtitleTrackController extends BasePlaylistController {
22680
22680
  type,
22681
22681
  url
22682
22682
  });
22683
- const hlsUrlParameters = this.switchParams(track.url, lastTrack == null ? void 0 : lastTrack.details, track.details);
22683
+ const hlsUrlParameters = this.switchParams(track.url, lastTrack == null ? undefined : lastTrack.details, track.details);
22684
22684
  this.loadPlaylist(hlsUrlParameters);
22685
22685
  }
22686
22686
  }
@@ -22706,12 +22706,12 @@ function generateAssetIdentifier(interstitial, uri, assetListIndex) {
22706
22706
  }
22707
22707
  class InterstitialEvent {
22708
22708
  constructor(dateRange, base) {
22709
- this.base = void 0;
22709
+ this.base = undefined;
22710
22710
  this._duration = null;
22711
22711
  this._timelineStart = null;
22712
- this.appendInPlaceDisabled = void 0;
22713
- this.appendInPlaceStarted = void 0;
22714
- this.dateRange = void 0;
22712
+ this.appendInPlaceDisabled = undefined;
22713
+ this.appendInPlaceStarted = undefined;
22714
+ this.dateRange = undefined;
22715
22715
  this.hasPlayed = false;
22716
22716
  this.cumulativeDuration = 0;
22717
22717
  this.resumeOffset = NaN;
@@ -22725,10 +22725,10 @@ class InterstitialEvent {
22725
22725
  in: false
22726
22726
  };
22727
22727
  this.assetList = [];
22728
- this.assetListLoader = void 0;
22728
+ this.assetListLoader = undefined;
22729
22729
  this.assetListResponse = null;
22730
- this.resumeAnchor = void 0;
22731
- this.error = void 0;
22730
+ this.resumeAnchor = undefined;
22731
+ this.error = undefined;
22732
22732
  this.base = base;
22733
22733
  this.dateRange = dateRange;
22734
22734
  this.setDateRange(dateRange);
@@ -22742,7 +22742,7 @@ class InterstitialEvent {
22742
22742
  }
22743
22743
  reset() {
22744
22744
  var _this$assetListLoader;
22745
- (_this$assetListLoader = this.assetListLoader) == null ? void 0 : _this$assetListLoader.destroy();
22745
+ (_this$assetListLoader = this.assetListLoader) == null ? undefined : _this$assetListLoader.destroy();
22746
22746
  this.assetListLoader = this.error = undefined;
22747
22747
  }
22748
22748
  isAssetPastPlayoutLimit(assetIndex) {
@@ -22891,9 +22891,9 @@ function eventAssetToString(asset) {
22891
22891
 
22892
22892
  class HlsAssetPlayer {
22893
22893
  constructor(HlsPlayerClass, userConfig, _interstitial, assetItem) {
22894
- this.hls = void 0;
22895
- this.interstitial = void 0;
22896
- this.assetItem = void 0;
22894
+ this.hls = undefined;
22895
+ this.interstitial = undefined;
22896
+ this.assetItem = undefined;
22897
22897
  this.tracks = null;
22898
22898
  this.hasDetails = false;
22899
22899
  this.mediaAttached = null;
@@ -22930,7 +22930,7 @@ class HlsAssetPlayer {
22930
22930
  const event = this.interstitial;
22931
22931
  if (event.playoutLimit) {
22932
22932
  var _event$assetList$even;
22933
- this.playoutOffset = ((_event$assetList$even = event.assetList[event.assetList.indexOf(assetItem)]) == null ? void 0 : _event$assetList$even.startOffset) || 0;
22933
+ this.playoutOffset = ((_event$assetList$even = event.assetList[event.assetList.indexOf(assetItem)]) == null ? undefined : _event$assetList$even.startOffset) || 0;
22934
22934
  media.addEventListener('timeupdate', this.checkPlayout);
22935
22935
  }
22936
22936
  });
@@ -22965,7 +22965,7 @@ class HlsAssetPlayer {
22965
22965
  }
22966
22966
  get duration() {
22967
22967
  var _this$assetItem;
22968
- const duration = (_this$assetItem = this.assetItem) == null ? void 0 : _this$assetItem.duration;
22968
+ const duration = (_this$assetItem = this.assetItem) == null ? undefined : _this$assetItem.duration;
22969
22969
  if (!duration) {
22970
22970
  return 0;
22971
22971
  }
@@ -23046,7 +23046,7 @@ const ABUTTING_THRESHOLD_SECONDS = 0.033;
23046
23046
  class InterstitialsSchedule extends Logger {
23047
23047
  constructor(onScheduleUpdate, logger) {
23048
23048
  super('interstitials-sched', logger);
23049
- this.onScheduleUpdate = void 0;
23049
+ this.onScheduleUpdate = undefined;
23050
23050
  this.eventMap = {};
23051
23051
  this.events = null;
23052
23052
  this.items = null;
@@ -23146,7 +23146,7 @@ class InterstitialsSchedule extends Logger {
23146
23146
  if (items) {
23147
23147
  for (let i = items.length; i--;) {
23148
23148
  var _items$i$event;
23149
- if (((_items$i$event = items[i].event) == null ? void 0 : _items$i$event.identifier) === identifier) {
23149
+ if (((_items$i$event = items[i].event) == null ? undefined : _items$i$event.identifier) === identifier) {
23150
23150
  return i;
23151
23151
  }
23152
23152
  }
@@ -23171,7 +23171,7 @@ class InterstitialsSchedule extends Logger {
23171
23171
  }
23172
23172
  get assetIdAtEnd() {
23173
23173
  var _this$items, _this$items2;
23174
- const interstitialAtEnd = (_this$items = this.items) == null ? void 0 : (_this$items2 = _this$items[this.length - 1]) == null ? void 0 : _this$items2.event;
23174
+ const interstitialAtEnd = (_this$items = this.items) == null ? undefined : (_this$items2 = _this$items[this.length - 1]) == null ? undefined : _this$items2.event;
23175
23175
  if (interstitialAtEnd) {
23176
23176
  const assetList = interstitialAtEnd.assetList;
23177
23177
  const assetAtEnd = assetList[assetList.length - 1];
@@ -23235,7 +23235,7 @@ class InterstitialsSchedule extends Logger {
23235
23235
  if (events.length || removedInterstitials.length || this.length < 2) {
23236
23236
  const currentItems = this.items;
23237
23237
  const updatedItems = this.parseSchedule(events, mediaSelection);
23238
- const updated = removedInterstitials.length || (currentItems == null ? void 0 : currentItems.length) !== updatedItems.length || updatedItems.some((item, i) => {
23238
+ const updated = removedInterstitials.length || (currentItems == null ? undefined : currentItems.length) !== updatedItems.length || updatedItems.some((item, i) => {
23239
23239
  return Math.abs(item.playout.start - currentItems[i].playout.start) > 0.005 || Math.abs(item.playout.end - currentItems[i].playout.end) > 0.005;
23240
23240
  });
23241
23241
  if (updated) {
@@ -23290,7 +23290,7 @@ class InterstitialsSchedule extends Logger {
23290
23290
  const interstitialDuration = interstitial.duration;
23291
23291
  const timelineDuration = interstitial.timelineOccupancy === TimelineOccupancy.Range ? interstitialDuration : 0;
23292
23292
  const resumptionOffset = interstitial.resumptionOffset;
23293
- const inSameStartTimeSequence = (previousEvent == null ? void 0 : previousEvent.startTime) === eventStart;
23293
+ const inSameStartTimeSequence = (previousEvent == null ? undefined : previousEvent.startTime) === eventStart;
23294
23294
  const start = eventStart + interstitial.cumulativeDuration;
23295
23295
  let end = appendInPlace ? start + interstitialDuration : eventStart + resumptionOffset;
23296
23296
  if (preroll || !postroll && eventStart <= 0) {
@@ -23388,7 +23388,7 @@ class InterstitialsSchedule extends Logger {
23388
23388
  const playoutStart = playoutDuration;
23389
23389
  playoutDuration += segmentDuration;
23390
23390
  schedule.push({
23391
- previousEvent: ((_schedule = schedule[schedule.length - 1]) == null ? void 0 : _schedule.event) || null,
23391
+ previousEvent: ((_schedule = schedule[schedule.length - 1]) == null ? undefined : _schedule.event) || null,
23392
23392
  nextEvent: null,
23393
23393
  start: primaryPosition,
23394
23394
  end: timelineStart + segmentDuration,
@@ -23541,7 +23541,7 @@ function segmentToString(segment) {
23541
23541
 
23542
23542
  class AssetListLoader {
23543
23543
  constructor(hls) {
23544
- this.hls = void 0;
23544
+ this.hls = undefined;
23545
23545
  this.hls = hls;
23546
23546
  }
23547
23547
  destroy() {
@@ -23582,7 +23582,7 @@ class AssetListLoader {
23582
23582
  const callbacks = {
23583
23583
  onSuccess: (response, stats, context, networkDetails) => {
23584
23584
  const assetListResponse = response.data;
23585
- const assets = assetListResponse == null ? void 0 : assetListResponse.ASSETS;
23585
+ const assets = assetListResponse == null ? undefined : assetListResponse.ASSETS;
23586
23586
  if (!Array.isArray(assets)) {
23587
23587
  const errorData = this.assignAssetListError(interstitial, ErrorDetails.ASSET_LIST_PARSING_ERROR, new Error(`Invalid interstitial asset list`), context.url, stats, networkDetails);
23588
23588
  this.hls.trigger(Events.ERROR, errorData);
@@ -23626,16 +23626,16 @@ class AssetListLoader {
23626
23626
  }
23627
23627
 
23628
23628
  function playWithCatch(media) {
23629
- media == null ? void 0 : media.play().catch(() => {
23629
+ media == null ? undefined : media.play().catch(() => {
23630
23630
  /* no-op */
23631
23631
  });
23632
23632
  }
23633
23633
  class InterstitialsController extends Logger {
23634
23634
  constructor(hls, HlsPlayerClass) {
23635
23635
  super('interstitials', hls.logger);
23636
- this.HlsPlayerClass = void 0;
23637
- this.hls = void 0;
23638
- this.assetListLoader = void 0;
23636
+ this.HlsPlayerClass = undefined;
23637
+ this.hls = undefined;
23638
+ this.assetListLoader = undefined;
23639
23639
  // Last updated LevelDetails
23640
23640
  this.mediaSelection = null;
23641
23641
  this.altSelection = null;
@@ -23651,7 +23651,7 @@ class InterstitialsController extends Logger {
23651
23651
  this.bufferedPos = -1;
23652
23652
  this.timelinePos = -1;
23653
23653
  // Schedule
23654
- this.schedule = void 0;
23654
+ this.schedule = undefined;
23655
23655
  // Schedule playback and buffering state
23656
23656
  this.playingItem = null;
23657
23657
  this.bufferingItem = null;
@@ -24002,7 +24002,7 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
24002
24002
  if (interstitial) {
24003
24003
  if (timelineType === 'playout' || interstitial.timelineOccupancy !== TimelineOccupancy.Point) {
24004
24004
  const assetPlayer = getAssetPlayer(asset);
24005
- if ((assetPlayer == null ? void 0 : assetPlayer.interstitial) === interstitial) {
24005
+ if ((assetPlayer == null ? undefined : assetPlayer.interstitial) === interstitial) {
24006
24006
  time += assetPlayer.assetItem.startOffset + assetPlayer[assetPlayerField];
24007
24007
  }
24008
24008
  }
@@ -24018,7 +24018,7 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
24018
24018
  if (primaryTime !== 0 && timelineType !== 'primary' && c.schedule.length) {
24019
24019
  var _c$schedule$items;
24020
24020
  const index = c.schedule.findItemIndexAtTime(primaryTime);
24021
- const item = (_c$schedule$items = c.schedule.items) == null ? void 0 : _c$schedule$items[index];
24021
+ const item = (_c$schedule$items = c.schedule.items) == null ? undefined : _c$schedule$items[index];
24022
24022
  if (item) {
24023
24023
  const diff = item[timelineType].start - item.start;
24024
24024
  return primaryTime + diff;
@@ -24050,14 +24050,14 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
24050
24050
  c.log(`seek to ${time} "${timelineType}"`);
24051
24051
  const playingItem = effectivePlayingItem();
24052
24052
  const targetIndex = c.schedule.findItemIndexAtTime(time, timelineType);
24053
- const targetItem = (_c$schedule$items2 = c.schedule.items) == null ? void 0 : _c$schedule$items2[targetIndex];
24054
- const playingInterstitial = playingItem == null ? void 0 : playingItem.event;
24055
- const appendInPlace = playingInterstitial == null ? void 0 : playingInterstitial.appendInPlace;
24053
+ const targetItem = (_c$schedule$items2 = c.schedule.items) == null ? undefined : _c$schedule$items2[targetIndex];
24054
+ const playingInterstitial = playingItem == null ? undefined : playingItem.event;
24055
+ const appendInPlace = playingInterstitial == null ? undefined : playingInterstitial.appendInPlace;
24056
24056
  const seekInItem = playingItem && c.itemsMatch(playingItem, targetItem);
24057
24057
  if (playingItem && (appendInPlace || seekInItem)) {
24058
24058
  // seek in asset player or primary media (appendInPlace)
24059
24059
  const assetPlayer = getAssetPlayer(c.playingAsset);
24060
- const media = (assetPlayer == null ? void 0 : assetPlayer.media) || c.hls.media;
24060
+ const media = (assetPlayer == null ? undefined : assetPlayer.media) || c.hls.media;
24061
24061
  if (media) {
24062
24062
  const currentTime = timelineType === 'primary' ? media.currentTime : getMappedTime(playingItem, timelineType, c.playingAsset, 'timelinePos', 'currentTime');
24063
24063
  const diff = time - currentTime;
@@ -24097,7 +24097,7 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
24097
24097
  c.timelinePos = seekToTime;
24098
24098
  } else {
24099
24099
  var _targetItem$event;
24100
- const assetList = targetItem == null ? void 0 : (_targetItem$event = targetItem.event) == null ? void 0 : _targetItem$event.assetList;
24100
+ const assetList = targetItem == null ? undefined : (_targetItem$event = targetItem.event) == null ? undefined : _targetItem$event.assetList;
24101
24101
  if (assetList) {
24102
24102
  const eventTime = time - (targetItem[timelineType] || targetItem).start;
24103
24103
  for (let i = assetList.length; i--;) {
@@ -24116,11 +24116,11 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
24116
24116
  this.manager = {
24117
24117
  get events() {
24118
24118
  var _c$schedule, _c$schedule$events;
24119
- return ((_c$schedule = c.schedule) == null ? void 0 : (_c$schedule$events = _c$schedule.events) == null ? void 0 : _c$schedule$events.slice(0)) || [];
24119
+ return ((_c$schedule = c.schedule) == null ? undefined : (_c$schedule$events = _c$schedule.events) == null ? undefined : _c$schedule$events.slice(0)) || [];
24120
24120
  },
24121
24121
  get schedule() {
24122
24122
  var _c$schedule2, _c$schedule2$items;
24123
- return ((_c$schedule2 = c.schedule) == null ? void 0 : (_c$schedule2$items = _c$schedule2.items) == null ? void 0 : _c$schedule2$items.slice(0)) || [];
24123
+ return ((_c$schedule2 = c.schedule) == null ? undefined : (_c$schedule2$items = _c$schedule2.items) == null ? undefined : _c$schedule2$items.slice(0)) || [];
24124
24124
  },
24125
24125
  get playerQueue() {
24126
24126
  return c.playerQueue.slice(0);
@@ -24164,7 +24164,7 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
24164
24164
  },
24165
24165
  get seekableStart() {
24166
24166
  var _c$primaryDetails2;
24167
- return ((_c$primaryDetails2 = c.primaryDetails) == null ? void 0 : _c$primaryDetails2.fragmentStart) || 0;
24167
+ return ((_c$primaryDetails2 = c.primaryDetails) == null ? undefined : _c$primaryDetails2.fragmentStart) || 0;
24168
24168
  },
24169
24169
  seekTo: time => seekTo(time, 'primary')
24170
24170
  },
@@ -24180,7 +24180,7 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
24180
24180
  },
24181
24181
  get seekableStart() {
24182
24182
  var _c$primaryDetails3;
24183
- return findMappedTime(((_c$primaryDetails3 = c.primaryDetails) == null ? void 0 : _c$primaryDetails3.fragmentStart) || 0, 'playout');
24183
+ return findMappedTime(((_c$primaryDetails3 = c.primaryDetails) == null ? undefined : _c$primaryDetails3.fragmentStart) || 0, 'playout');
24184
24184
  },
24185
24185
  seekTo: time => seekTo(time, 'playout')
24186
24186
  },
@@ -24196,13 +24196,13 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
24196
24196
  },
24197
24197
  get seekableStart() {
24198
24198
  var _c$primaryDetails4;
24199
- return findMappedTime(((_c$primaryDetails4 = c.primaryDetails) == null ? void 0 : _c$primaryDetails4.fragmentStart) || 0, 'integrated');
24199
+ return findMappedTime(((_c$primaryDetails4 = c.primaryDetails) == null ? undefined : _c$primaryDetails4.fragmentStart) || 0, 'integrated');
24200
24200
  },
24201
24201
  seekTo: time => seekTo(time, 'integrated')
24202
24202
  },
24203
24203
  skip: () => {
24204
24204
  const item = effectivePlayingItem();
24205
- const event = item == null ? void 0 : item.event;
24205
+ const event = item == null ? undefined : item.event;
24206
24206
  if (event && !event.restrictions.skip) {
24207
24207
  const index = c.findItemIndex(item);
24208
24208
  if (event.appendInPlace) {
@@ -24225,7 +24225,7 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
24225
24225
  if (!this.playbackStarted || !playingItem) {
24226
24226
  return false;
24227
24227
  }
24228
- const items = (_this$schedule = this.schedule) == null ? void 0 : _this$schedule.items;
24228
+ const items = (_this$schedule = this.schedule) == null ? undefined : _this$schedule.items;
24229
24229
  return this.itemsMatch(playingItem, items ? items[items.length - 1] : null);
24230
24230
  }
24231
24231
  get playbackStarted() {
@@ -24249,7 +24249,7 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
24249
24249
  // Observe detached media currentTime when appending in place
24250
24250
  media = this.primaryMedia;
24251
24251
  }
24252
- const currentTime = (_media = media) == null ? void 0 : _media.currentTime;
24252
+ const currentTime = (_media = media) == null ? undefined : _media.currentTime;
24253
24253
  if (currentTime === undefined || !isFiniteNumber(currentTime)) {
24254
24254
  return undefined;
24255
24255
  }
@@ -24257,7 +24257,7 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
24257
24257
  }
24258
24258
  get primaryMedia() {
24259
24259
  var _this$detachedData;
24260
- return this.media || ((_this$detachedData = this.detachedData) == null ? void 0 : _this$detachedData.media) || null;
24260
+ return this.media || ((_this$detachedData = this.detachedData) == null ? undefined : _this$detachedData.media) || null;
24261
24261
  }
24262
24262
  isInterstitial(item) {
24263
24263
  return !!(item != null && item.event);
@@ -24296,7 +24296,7 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
24296
24296
  const primaryPlayer = this.hls;
24297
24297
  const isAssetPlayer = player !== primaryPlayer;
24298
24298
  const appendInPlace = isAssetPlayer && player.interstitial.appendInPlace;
24299
- const detachedMediaSource = (_this$detachedData2 = this.detachedData) == null ? void 0 : _this$detachedData2.mediaSource;
24299
+ const detachedMediaSource = (_this$detachedData2 = this.detachedData) == null ? undefined : _this$detachedData2.mediaSource;
24300
24300
  let logFromSource;
24301
24301
  if (primaryPlayer.media && appendInPlace) {
24302
24302
  attachMediaSourceData = primaryPlayer.transferMedia();
@@ -24325,7 +24325,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
24325
24325
  };
24326
24326
  }
24327
24327
  }
24328
- const transferring = attachMediaSourceData && 'mediaSource' in attachMediaSourceData && ((_attachMediaSourceDat = attachMediaSourceData.mediaSource) == null ? void 0 : _attachMediaSourceDat.readyState) !== 'closed';
24328
+ const transferring = attachMediaSourceData && 'mediaSource' in attachMediaSourceData && ((_attachMediaSourceDat = attachMediaSourceData.mediaSource) == null ? undefined : _attachMediaSourceDat.readyState) !== 'closed';
24329
24329
  const dataToAttach = transferring && attachMediaSourceData ? attachMediaSourceData : media;
24330
24330
  this.log(`${transferring ? 'transfering MediaSource' : 'attaching media'} to ${isAssetPlayer ? player : 'Primary'}`);
24331
24331
  if (dataToAttach === attachMediaSourceData) {
@@ -24416,9 +24416,9 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
24416
24416
  var _interstitial$assetLi;
24417
24417
  const interstitial = currentItem.event;
24418
24418
  const playingAsset = this.playingAsset;
24419
- const assetId = playingAsset == null ? void 0 : playingAsset.identifier;
24419
+ const assetId = playingAsset == null ? undefined : playingAsset.identifier;
24420
24420
  const player = assetId ? this.getAssetPlayer(assetId) : null;
24421
- if (player && assetId && (!this.eventItemsMatch(currentItem, scheduledItem) || assetListIndex !== undefined && assetId !== ((_interstitial$assetLi = interstitial.assetList) == null ? void 0 : _interstitial$assetLi[assetListIndex].identifier))) {
24421
+ if (player && assetId && (!this.eventItemsMatch(currentItem, scheduledItem) || assetListIndex !== undefined && assetId !== ((_interstitial$assetLi = interstitial.assetList) == null ? undefined : _interstitial$assetLi[assetListIndex].identifier))) {
24422
24422
  this.playingAsset = null;
24423
24423
  const _assetListIndex = interstitial.findAssetIndex(playingAsset);
24424
24424
  this.log(`INTERSTITIAL_ASSET_ENDED ${_assetListIndex + 1}/${interstitial.assetList.length} ${eventAssetToString(playingAsset)}`);
@@ -24567,7 +24567,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
24567
24567
  }
24568
24568
  get primaryDetails() {
24569
24569
  var _this$mediaSelection, _this$mediaSelection$;
24570
- return (_this$mediaSelection = this.mediaSelection) == null ? void 0 : (_this$mediaSelection$ = _this$mediaSelection.main) == null ? void 0 : _this$mediaSelection$.details;
24570
+ return (_this$mediaSelection = this.mediaSelection) == null ? undefined : (_this$mediaSelection$ = _this$mediaSelection.main) == null ? undefined : _this$mediaSelection$.details;
24571
24571
  }
24572
24572
  get primaryLive() {
24573
24573
  var _this$primaryDetails;
@@ -24746,7 +24746,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
24746
24746
  if (interstitial.cue.post) {
24747
24747
  var _this$schedule$items;
24748
24748
  const scheduleIndex = this.schedule.findEventIndex(interstitial.identifier);
24749
- const item = (_this$schedule$items = this.schedule.items) == null ? void 0 : _this$schedule$items[scheduleIndex];
24749
+ const item = (_this$schedule$items = this.schedule.items) == null ? undefined : _this$schedule$items[scheduleIndex];
24750
24750
  if (this.isInterstitial(item) && this.eventItemsMatch(item, this.bufferingItem)) {
24751
24751
  this.bufferedToItem(item, 0);
24752
24752
  }
@@ -24774,11 +24774,11 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
24774
24774
  }
24775
24775
  itemsMatch(a, b) {
24776
24776
  var _a$nextEvent, _b$nextEvent;
24777
- return !!b && (a === b || a.event && b.event && this.eventItemsMatch(a, b) || !a.event && !b.event && ((_a$nextEvent = a.nextEvent) == null ? void 0 : _a$nextEvent.identifier) === ((_b$nextEvent = b.nextEvent) == null ? void 0 : _b$nextEvent.identifier));
24777
+ return !!b && (a === b || a.event && b.event && this.eventItemsMatch(a, b) || !a.event && !b.event && ((_a$nextEvent = a.nextEvent) == null ? undefined : _a$nextEvent.identifier) === ((_b$nextEvent = b.nextEvent) == null ? undefined : _b$nextEvent.identifier));
24778
24778
  }
24779
24779
  eventItemsMatch(a, b) {
24780
24780
  var _b$event;
24781
- return !!b && (a === b || a.event.identifier === ((_b$event = b.event) == null ? void 0 : _b$event.identifier));
24781
+ return !!b && (a === b || a.event.identifier === ((_b$event = b.event) == null ? undefined : _b$event.identifier));
24782
24782
  }
24783
24783
  findItemIndex(item, time) {
24784
24784
  return item ? this.schedule.findItemIndex(item, time) : -1;
@@ -24822,7 +24822,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
24822
24822
  if (bufferEndIndex === -1 && bufferingItem && bufferEnd >= bufferingItem.end) {
24823
24823
  bufferEndIndex = nextToBufferIndex;
24824
24824
  }
24825
- if (nextToBufferIndex - playingIndex > 1 && (bufferingItem == null ? void 0 : (_bufferingItem$event = bufferingItem.event) == null ? void 0 : _bufferingItem$event.appendInPlace) === false) {
24825
+ if (nextToBufferIndex - playingIndex > 1 && (bufferingItem == null ? undefined : (_bufferingItem$event = bufferingItem.event) == null ? undefined : _bufferingItem$event.appendInPlace) === false) {
24826
24826
  // do not advance buffering item past Interstitial that requires source reset
24827
24827
  return;
24828
24828
  }
@@ -25128,13 +25128,13 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
25128
25128
  const scheduleIndex = this.schedule.findEventIndex(interstitial.identifier);
25129
25129
  const assetListIndex = interstitial.findAssetIndex(assetItem);
25130
25130
  const nextAssetIndex = assetListIndex + 1;
25131
- const item = (_this$schedule$items2 = this.schedule.items) == null ? void 0 : _this$schedule$items2[scheduleIndex];
25131
+ const item = (_this$schedule$items2 = this.schedule.items) == null ? undefined : _this$schedule$items2[scheduleIndex];
25132
25132
  if (this.isInterstitial(item)) {
25133
25133
  if (assetListIndex !== -1 && !interstitial.isAssetPastPlayoutLimit(nextAssetIndex) && !interstitial.assetList[nextAssetIndex].error) {
25134
25134
  this.bufferedToItem(item, assetListIndex + 1);
25135
25135
  } else {
25136
25136
  var _this$schedule$items3;
25137
- const nextItem = (_this$schedule$items3 = this.schedule.items) == null ? void 0 : _this$schedule$items3[scheduleIndex + 1];
25137
+ const nextItem = (_this$schedule$items3 = this.schedule.items) == null ? undefined : _this$schedule$items3[scheduleIndex + 1];
25138
25138
  if (nextItem) {
25139
25139
  this.bufferedToItem(nextItem);
25140
25140
  }
@@ -25246,7 +25246,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
25246
25246
  assetId
25247
25247
  } = player;
25248
25248
  const scheduleIndex = this.schedule.findEventIndex(interstitial.identifier);
25249
- const item = (_this$schedule$items4 = this.schedule.items) == null ? void 0 : _this$schedule$items4[scheduleIndex];
25249
+ const item = (_this$schedule$items4 = this.schedule.items) == null ? undefined : _this$schedule$items4[scheduleIndex];
25250
25250
  if (!item) {
25251
25251
  return;
25252
25252
  }
@@ -25256,7 +25256,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
25256
25256
  if (bufferingPlayer === player) {
25257
25257
  return;
25258
25258
  }
25259
- const activeTracks = (bufferingPlayer == null ? void 0 : bufferingPlayer.tracks) || ((_this$detachedData4 = this.detachedData) == null ? void 0 : _this$detachedData4.tracks) || this.requiredTracks;
25259
+ const activeTracks = (bufferingPlayer == null ? undefined : bufferingPlayer.tracks) || ((_this$detachedData4 = this.detachedData) == null ? undefined : _this$detachedData4.tracks) || this.requiredTracks;
25260
25260
  if (interstitial.appendInPlace && assetItem !== this.playingAsset) {
25261
25261
  // Do not buffer another item if tracks are unknown or incompatible
25262
25262
  if (!player.tracks) {
@@ -25366,23 +25366,23 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
25366
25366
  });
25367
25367
  interstitial.duration = sumDuration;
25368
25368
  const waitingItem = this.waitingItem;
25369
- const waitingForItem = (waitingItem == null ? void 0 : waitingItem.event.identifier) === interstitialId;
25369
+ const waitingForItem = (waitingItem == null ? undefined : waitingItem.event.identifier) === interstitialId;
25370
25370
 
25371
25371
  // Update schedule now that asset.DURATION(s) are parsed
25372
25372
  this.updateSchedule();
25373
- const bufferingEvent = (_this$bufferingItem2 = this.bufferingItem) == null ? void 0 : _this$bufferingItem2.event;
25373
+ const bufferingEvent = (_this$bufferingItem2 = this.bufferingItem) == null ? undefined : _this$bufferingItem2.event;
25374
25374
 
25375
25375
  // If buffer reached Interstitial, start buffering first asset
25376
25376
  if (waitingForItem) {
25377
25377
  var _this$schedule$items5;
25378
25378
  // Advance schedule when waiting for asset list data to play
25379
25379
  const scheduleIndex = this.schedule.findEventIndex(interstitialId);
25380
- const item = (_this$schedule$items5 = this.schedule.items) == null ? void 0 : _this$schedule$items5[scheduleIndex];
25380
+ const item = (_this$schedule$items5 = this.schedule.items) == null ? undefined : _this$schedule$items5[scheduleIndex];
25381
25381
  if (item) {
25382
25382
  this.setBufferingItem(item);
25383
25383
  }
25384
25384
  this.setSchedulePosition(scheduleIndex);
25385
- } else if ((bufferingEvent == null ? void 0 : bufferingEvent.identifier) === interstitialId && bufferingEvent.appendInPlace) {
25385
+ } else if ((bufferingEvent == null ? undefined : bufferingEvent.identifier) === interstitialId && bufferingEvent.appendInPlace) {
25386
25386
  // If buffering (but not playback) has reached this item transfer media-source
25387
25387
  const assetItem = interstitial.assetList[0];
25388
25388
  const player = this.getAssetPlayer(assetItem.identifier);
@@ -25538,7 +25538,7 @@ class SubtitleStreamController extends BaseStreamController {
25538
25538
  // If something goes wrong, proceed to next frag, if we were processing one.
25539
25539
  onError(event, data) {
25540
25540
  const frag = data.frag;
25541
- if ((frag == null ? void 0 : frag.type) === PlaylistLevelType.SUBTITLE) {
25541
+ if ((frag == null ? undefined : frag.type) === PlaylistLevelType.SUBTITLE) {
25542
25542
  if (data.details === ErrorDetails.FRAG_GAP) {
25543
25543
  this.fragmentTracker.fragBuffered(frag, true);
25544
25544
  }
@@ -25628,7 +25628,7 @@ class SubtitleStreamController extends BaseStreamController {
25628
25628
  }
25629
25629
  } else {
25630
25630
  var _this$levelLastLoaded;
25631
- sliding = this.alignPlaylists(newDetails, track.details, (_this$levelLastLoaded = this.levelLastLoaded) == null ? void 0 : _this$levelLastLoaded.details);
25631
+ sliding = this.alignPlaylists(newDetails, track.details, (_this$levelLastLoaded = this.levelLastLoaded) == null ? undefined : _this$levelLastLoaded.details);
25632
25632
  if (sliding === 0 && mainSlidingStartFragment) {
25633
25633
  // realign with main when there is no overlap with last refresh
25634
25634
  sliding = mainSlidingStartFragment.start;
@@ -25709,7 +25709,7 @@ class SubtitleStreamController extends BaseStreamController {
25709
25709
  currentTrackId,
25710
25710
  levels
25711
25711
  } = this;
25712
- const track = levels == null ? void 0 : levels[currentTrackId];
25712
+ const track = levels == null ? undefined : levels[currentTrackId];
25713
25713
  if (!track || !levels.length || !track.details) {
25714
25714
  return;
25715
25715
  }
@@ -25776,7 +25776,7 @@ class SubtitleStreamController extends BaseStreamController {
25776
25776
  }
25777
25777
  class BufferableInstance {
25778
25778
  constructor(timeranges) {
25779
- this.buffered = void 0;
25779
+ this.buffered = undefined;
25780
25780
  const getRange = (name, index, length) => {
25781
25781
  index = index >>> 0;
25782
25782
  if (index > length - 1) {
@@ -26177,7 +26177,7 @@ class Row {
26177
26177
  this.pos = 0;
26178
26178
  this.currPenState = new PenState();
26179
26179
  this.cueStartTime = null;
26180
- this.logger = void 0;
26180
+ this.logger = undefined;
26181
26181
  for (let i = 0; i < NR_COLS; i++) {
26182
26182
  this.chars.push(new StyledUnicodeChar());
26183
26183
  }
@@ -26303,7 +26303,7 @@ class CaptionScreen {
26303
26303
  this.currRow = NR_ROWS - 1;
26304
26304
  this.nrRollUpRows = null;
26305
26305
  this.lastOutputScreen = null;
26306
- this.logger = void 0;
26306
+ this.logger = undefined;
26307
26307
  for (let i = 0; i < NR_ROWS; i++) {
26308
26308
  this.rows.push(new Row(logger));
26309
26309
  }
@@ -26480,17 +26480,17 @@ class CaptionScreen {
26480
26480
 
26481
26481
  class Cea608Channel {
26482
26482
  constructor(channelNumber, outputFilter, logger) {
26483
- this.chNr = void 0;
26484
- this.outputFilter = void 0;
26485
- this.mode = void 0;
26486
- this.verbose = void 0;
26487
- this.displayedMemory = void 0;
26488
- this.nonDisplayedMemory = void 0;
26489
- this.lastOutputScreen = void 0;
26490
- this.currRollUpRow = void 0;
26491
- this.writeScreen = void 0;
26492
- this.cueStartTime = void 0;
26493
- this.logger = void 0;
26483
+ this.chNr = undefined;
26484
+ this.outputFilter = undefined;
26485
+ this.mode = undefined;
26486
+ this.verbose = undefined;
26487
+ this.displayedMemory = undefined;
26488
+ this.nonDisplayedMemory = undefined;
26489
+ this.lastOutputScreen = undefined;
26490
+ this.currRollUpRow = undefined;
26491
+ this.writeScreen = undefined;
26492
+ this.cueStartTime = undefined;
26493
+ this.logger = undefined;
26494
26494
  this.chNr = channelNumber;
26495
26495
  this.outputFilter = outputFilter;
26496
26496
  this.mode = null;
@@ -26701,10 +26701,10 @@ class Cea608Channel {
26701
26701
 
26702
26702
  class Cea608Parser {
26703
26703
  constructor(field, out1, out2) {
26704
- this.channels = void 0;
26704
+ this.channels = undefined;
26705
26705
  this.currentChannel = 0;
26706
26706
  this.cmdHistory = createCmdHistory();
26707
- this.logger = void 0;
26707
+ this.logger = undefined;
26708
26708
  const logger = this.logger = new CaptionsLogger();
26709
26709
  this.channels = [null, new Cea608Channel(field, out1, logger), new Cea608Channel(field + 1, out2, logger)];
26710
26710
  }
@@ -27505,9 +27505,9 @@ class VTTParser {
27505
27505
  this.decoder = new StringDecoder();
27506
27506
  this.regionList = [];
27507
27507
  this.cue = null;
27508
- this.oncue = void 0;
27509
- this.onparsingerror = void 0;
27510
- this.onflush = void 0;
27508
+ this.oncue = undefined;
27509
+ this.onparsingerror = undefined;
27510
+ this.onflush = undefined;
27511
27511
  }
27512
27512
  parse(data) {
27513
27513
  const _this = this;
@@ -28042,9 +28042,9 @@ function parseTimeUnits(timeAttributeValue, rateInfo) {
28042
28042
 
28043
28043
  class OutputFilter {
28044
28044
  constructor(timelineController, trackName) {
28045
- this.timelineController = void 0;
28045
+ this.timelineController = undefined;
28046
28046
  this.cueRanges = [];
28047
- this.trackName = void 0;
28047
+ this.trackName = undefined;
28048
28048
  this.startTime = null;
28049
28049
  this.endTime = null;
28050
28050
  this.screen = null;
@@ -28074,19 +28074,19 @@ class OutputFilter {
28074
28074
 
28075
28075
  class TimelineController {
28076
28076
  constructor(hls) {
28077
- this.hls = void 0;
28077
+ this.hls = undefined;
28078
28078
  this.media = null;
28079
- this.config = void 0;
28079
+ this.config = undefined;
28080
28080
  this.enabled = true;
28081
- this.Cues = void 0;
28081
+ this.Cues = undefined;
28082
28082
  this.textTracks = [];
28083
28083
  this.tracks = [];
28084
28084
  this.initPTS = [];
28085
28085
  this.unparsedVttFrags = [];
28086
28086
  this.captionsTracks = {};
28087
28087
  this.nonNativeCaptionsTracks = {};
28088
- this.cea608Parser1 = void 0;
28089
- this.cea608Parser2 = void 0;
28088
+ this.cea608Parser1 = undefined;
28089
+ this.cea608Parser2 = undefined;
28090
28090
  this.lastCc = -1;
28091
28091
  // Last video (CEA-608) fragment CC
28092
28092
  this.lastSn = -1;
@@ -28096,7 +28096,7 @@ class TimelineController {
28096
28096
  this.prevCC = -1;
28097
28097
  // Last subtitle fragment CC
28098
28098
  this.vttCCs = newVTTCCs();
28099
- this.captionsProperties = void 0;
28099
+ this.captionsProperties = undefined;
28100
28100
  this.hls = hls;
28101
28101
  this.config = hls.config;
28102
28102
  this.Cues = hls.config.cueHandler;
@@ -28445,7 +28445,7 @@ class TimelineController {
28445
28445
  }
28446
28446
  closedCaptionsForLevel(frag) {
28447
28447
  const level = this.hls.levels[frag.level];
28448
- return level == null ? void 0 : level.attrs['CLOSED-CAPTIONS'];
28448
+ return level == null ? undefined : level.attrs['CLOSED-CAPTIONS'];
28449
28449
  }
28450
28450
  onFragLoading(event, data) {
28451
28451
  // if this frag isn't contiguous, clear the parser so cues with bad start/end times aren't added to the textTrack
@@ -28460,7 +28460,7 @@ class TimelineController {
28460
28460
  cc,
28461
28461
  sn
28462
28462
  } = data.frag;
28463
- const partIndex = (_data$part$index = (_data$part = data.part) == null ? void 0 : _data$part.index) != null ? _data$part$index : -1;
28463
+ const partIndex = (_data$part$index = (_data$part = data.part) == null ? undefined : _data$part.index) != null ? _data$part$index : -1;
28464
28464
  if (cea608Parser1 && cea608Parser2) {
28465
28465
  if (sn !== lastSn + 1 || sn === lastSn && partIndex !== this.lastPartIndex + 1 || cc !== this.lastCc) {
28466
28466
  cea608Parser1.reset();
@@ -28814,15 +28814,15 @@ function fetchSupported() {
28814
28814
  const BYTERANGE = /(\d+)-(\d+)\/(\d+)/;
28815
28815
  class FetchLoader {
28816
28816
  constructor(config) {
28817
- this.fetchSetup = void 0;
28818
- this.requestTimeout = void 0;
28817
+ this.fetchSetup = undefined;
28818
+ this.requestTimeout = undefined;
28819
28819
  this.request = null;
28820
28820
  this.response = null;
28821
- this.controller = void 0;
28821
+ this.controller = undefined;
28822
28822
  this.context = null;
28823
28823
  this.config = null;
28824
28824
  this.callbacks = null;
28825
- this.stats = void 0;
28825
+ this.stats = undefined;
28826
28826
  this.loader = null;
28827
28827
  this.fetchSetup = config.fetchSetup || getRequest;
28828
28828
  this.controller = new self.AbortController();
@@ -28895,7 +28895,7 @@ class FetchLoader {
28895
28895
  }
28896
28896
  stats.loading.first = first;
28897
28897
  stats.total = getContentLength(response.headers) || stats.total;
28898
- const onProgress = (_this$callbacks2 = this.callbacks) == null ? void 0 : _this$callbacks2.onProgress;
28898
+ const onProgress = (_this$callbacks2 = this.callbacks) == null ? undefined : _this$callbacks2.onProgress;
28899
28899
  if (onProgress && isFiniteNumber(config.highWaterMark)) {
28900
28900
  return this.loadProgressively(response, stats, context, config.highWaterMark, onProgress);
28901
28901
  }
@@ -28923,11 +28923,11 @@ class FetchLoader {
28923
28923
  data: responseData,
28924
28924
  code: response.status
28925
28925
  };
28926
- const onProgress = (_this$callbacks3 = this.callbacks) == null ? void 0 : _this$callbacks3.onProgress;
28926
+ const onProgress = (_this$callbacks3 = this.callbacks) == null ? undefined : _this$callbacks3.onProgress;
28927
28927
  if (onProgress && !isFiniteNumber(config.highWaterMark)) {
28928
28928
  onProgress(stats, context, responseData, response);
28929
28929
  }
28930
- (_this$callbacks4 = this.callbacks) == null ? void 0 : _this$callbacks4.onSuccess(loaderResponse, stats, context, response);
28930
+ (_this$callbacks4 = this.callbacks) == null ? undefined : _this$callbacks4.onSuccess(loaderResponse, stats, context, response);
28931
28931
  }).catch(error => {
28932
28932
  var _this$callbacks5;
28933
28933
  self.clearTimeout(this.requestTimeout);
@@ -28938,7 +28938,7 @@ class FetchLoader {
28938
28938
  // when destroying, 'error' itself can be undefined
28939
28939
  const code = !error ? 0 : error.code || 0;
28940
28940
  const text = !error ? null : error.message;
28941
- (_this$callbacks5 = this.callbacks) == null ? void 0 : _this$callbacks5.onError({
28941
+ (_this$callbacks5 = this.callbacks) == null ? undefined : _this$callbacks5.onError({
28942
28942
  code,
28943
28943
  text
28944
28944
  }, context, error ? error.details : null, stats);
@@ -29029,8 +29029,8 @@ function getRequest(context, initParams) {
29029
29029
  class FetchError extends Error {
29030
29030
  constructor(message, code, details) {
29031
29031
  super(message);
29032
- this.code = void 0;
29033
- this.details = void 0;
29032
+ this.code = undefined;
29033
+ this.details = undefined;
29034
29034
  this.code = code;
29035
29035
  this.details = details;
29036
29036
  }
@@ -29039,15 +29039,15 @@ class FetchError extends Error {
29039
29039
  const AGE_HEADER_LINE_REGEX = /^age:\s*[\d.]+\s*$/im;
29040
29040
  class XhrLoader {
29041
29041
  constructor(config) {
29042
- this.xhrSetup = void 0;
29043
- this.requestTimeout = void 0;
29044
- this.retryTimeout = void 0;
29045
- this.retryDelay = void 0;
29042
+ this.xhrSetup = undefined;
29043
+ this.requestTimeout = undefined;
29044
+ this.retryTimeout = undefined;
29045
+ this.retryDelay = undefined;
29046
29046
  this.config = null;
29047
29047
  this.callbacks = null;
29048
29048
  this.context = null;
29049
29049
  this.loader = null;
29050
- this.stats = void 0;
29050
+ this.stats = undefined;
29051
29051
  this.xhrSetup = config ? config.xhrSetup || null : null;
29052
29052
  this.stats = new LoadStats();
29053
29053
  this.retryDelay = 0;
@@ -29118,7 +29118,7 @@ class XhrLoader {
29118
29118
  }).catch(error => {
29119
29119
  var _this$callbacks2;
29120
29120
  // IE11 throws an exception on xhr.open if attempting to access an HTTP resource over HTTPS
29121
- (_this$callbacks2 = this.callbacks) == null ? void 0 : _this$callbacks2.onError({
29121
+ (_this$callbacks2 = this.callbacks) == null ? undefined : _this$callbacks2.onError({
29122
29122
  code: xhr.status,
29123
29123
  text: error.message
29124
29124
  }, context, xhr, stats);
@@ -29197,7 +29197,7 @@ class XhrLoader {
29197
29197
  const len = xhr.responseType === 'arraybuffer' ? data.byteLength : data.length;
29198
29198
  stats.loaded = stats.total = len;
29199
29199
  stats.bwEstimate = stats.total * 8000 / (stats.loading.end - stats.loading.first);
29200
- const onProgress = (_this$callbacks3 = this.callbacks) == null ? void 0 : _this$callbacks3.onProgress;
29200
+ const onProgress = (_this$callbacks3 = this.callbacks) == null ? undefined : _this$callbacks3.onProgress;
29201
29201
  if (onProgress) {
29202
29202
  onProgress(stats, context, data, xhr);
29203
29203
  }
@@ -29206,7 +29206,7 @@ class XhrLoader {
29206
29206
  data: data,
29207
29207
  code: status
29208
29208
  };
29209
- (_this$callbacks4 = this.callbacks) == null ? void 0 : _this$callbacks4.onSuccess(_response, stats, context, xhr);
29209
+ (_this$callbacks4 = this.callbacks) == null ? undefined : _this$callbacks4.onSuccess(_response, stats, context, xhr);
29210
29210
  return;
29211
29211
  }
29212
29212
  }
@@ -29225,7 +29225,7 @@ class XhrLoader {
29225
29225
  } else {
29226
29226
  var _this$callbacks5;
29227
29227
  logger.error(`${status} while loading ${context.url}`);
29228
- (_this$callbacks5 = this.callbacks) == null ? void 0 : _this$callbacks5.onError({
29228
+ (_this$callbacks5 = this.callbacks) == null ? undefined : _this$callbacks5.onError({
29229
29229
  code: status,
29230
29230
  text: xhr.statusText
29231
29231
  }, context, xhr, stats);
@@ -29241,7 +29241,7 @@ class XhrLoader {
29241
29241
  this.retry(retryConfig);
29242
29242
  } else {
29243
29243
  var _this$context;
29244
- logger.warn(`timeout while loading ${(_this$context = this.context) == null ? void 0 : _this$context.url}`);
29244
+ logger.warn(`timeout while loading ${(_this$context = this.context) == null ? undefined : _this$context.url}`);
29245
29245
  const callbacks = this.callbacks;
29246
29246
  if (callbacks) {
29247
29247
  this.abortInternal();
@@ -29256,7 +29256,7 @@ class XhrLoader {
29256
29256
  } = this;
29257
29257
  this.retryDelay = getRetryDelay(retryConfig, stats.retry);
29258
29258
  stats.retry++;
29259
- logger.warn(`${status ? 'HTTP Status ' + status : 'Timeout'} while loading ${context == null ? void 0 : context.url}, retrying ${stats.retry}/${retryConfig.maxNumRetry} in ${this.retryDelay}ms`);
29259
+ logger.warn(`${status ? 'HTTP Status ' + status : 'Timeout'} while loading ${context == null ? undefined : context.url}, retrying ${stats.retry}/${retryConfig.maxNumRetry} in ${this.retryDelay}ms`);
29260
29260
  // abort and reset internal state
29261
29261
  this.abortInternal();
29262
29262
  this.loader = null;
@@ -29733,7 +29733,7 @@ function hexToArrayBuffer(str) {
29733
29733
  }
29734
29734
  class ID3TrackController {
29735
29735
  constructor(hls) {
29736
- this.hls = void 0;
29736
+ this.hls = undefined;
29737
29737
  this.id3Track = null;
29738
29738
  this.media = null;
29739
29739
  this.dateRangeCuesAppended = {};
@@ -29785,7 +29785,7 @@ class ID3TrackController {
29785
29785
  onMediaAttaching(event, data) {
29786
29786
  var _data$overrides;
29787
29787
  this.media = data.media;
29788
- if (((_data$overrides = data.overrides) == null ? void 0 : _data$overrides.cueRemoval) === false) {
29788
+ if (((_data$overrides = data.overrides) == null ? undefined : _data$overrides.cueRemoval) === false) {
29789
29789
  this.removeCues = false;
29790
29790
  }
29791
29791
  }
@@ -29892,7 +29892,7 @@ class ID3TrackController {
29892
29892
  }
29893
29893
  updateId3CueEnds(startTime, type) {
29894
29894
  var _this$id3Track;
29895
- const cues = (_this$id3Track = this.id3Track) == null ? void 0 : _this$id3Track.cues;
29895
+ const cues = (_this$id3Track = this.id3Track) == null ? undefined : _this$id3Track.cues;
29896
29896
  if (cues) {
29897
29897
  for (let i = cues.length; i--;) {
29898
29898
  const cue = cues[i];
@@ -29979,7 +29979,7 @@ class ID3TrackController {
29979
29979
  }
29980
29980
  // Exit if the playlist does not have Date Ranges or does not have Program Date Time
29981
29981
  const lastFragment = details.fragments[details.fragments.length - 1];
29982
- if (ids.length === 0 || !isFiniteNumber(lastFragment == null ? void 0 : lastFragment.programDateTime)) {
29982
+ if (ids.length === 0 || !isFiniteNumber(lastFragment == null ? undefined : lastFragment.programDateTime)) {
29983
29983
  return;
29984
29984
  }
29985
29985
  if (!this.id3Track) {
@@ -29993,8 +29993,8 @@ class ID3TrackController {
29993
29993
 
29994
29994
  // Process DateRanges to determine end-time (known DURATION, END-DATE, or END-ON-NEXT)
29995
29995
  const appendedDateRangeCues = dateRangeCuesAppended[id];
29996
- const cues = (appendedDateRangeCues == null ? void 0 : appendedDateRangeCues.cues) || {};
29997
- let durationKnown = (appendedDateRangeCues == null ? void 0 : appendedDateRangeCues.durationKnown) || false;
29996
+ const cues = (appendedDateRangeCues == null ? undefined : appendedDateRangeCues.cues) || {};
29997
+ let durationKnown = (appendedDateRangeCues == null ? undefined : appendedDateRangeCues.durationKnown) || false;
29998
29998
  let endTime = MAX_CUE_ENDTIME;
29999
29999
  const {
30000
30000
  duration,
@@ -30070,8 +30070,8 @@ class ID3TrackController {
30070
30070
 
30071
30071
  class LatencyController {
30072
30072
  constructor(hls) {
30073
- this.hls = void 0;
30074
- this.config = void 0;
30073
+ this.hls = undefined;
30074
+ this.config = undefined;
30075
30075
  this.media = null;
30076
30076
  this.currentTime = 0;
30077
30077
  this.stallCount = 0;
@@ -30133,7 +30133,7 @@ class LatencyController {
30133
30133
  if (config.liveMaxLatencyDuration !== undefined) {
30134
30134
  return config.liveMaxLatencyDuration;
30135
30135
  }
30136
- const levelDetails = (_this$hls = this.hls) == null ? void 0 : _this$hls.latestLevelDetails;
30136
+ const levelDetails = (_this$hls = this.hls) == null ? undefined : _this$hls.latestLevelDetails;
30137
30137
  return levelDetails ? config.liveMaxLatencyDurationCount * levelDetails.targetduration : 0;
30138
30138
  }
30139
30139
  get targetLatency() {
@@ -30282,12 +30282,12 @@ class LevelController extends BasePlaylistController {
30282
30282
  this._levels = [];
30283
30283
  this._firstLevel = -1;
30284
30284
  this._maxAutoLevel = -1;
30285
- this._startLevel = void 0;
30285
+ this._startLevel = undefined;
30286
30286
  this.currentLevel = null;
30287
30287
  this.currentLevelIndex = -1;
30288
30288
  this.manualLevelIndex = -1;
30289
- this.steering = void 0;
30290
- this.onParsedComplete = void 0;
30289
+ this.steering = undefined;
30290
+ this.onParsedComplete = undefined;
30291
30291
  this.steering = contentSteeringController;
30292
30292
  this._registerListeners();
30293
30293
  }
@@ -30359,7 +30359,7 @@ class LevelController extends BasePlaylistController {
30359
30359
  // Returns empty and set to undefined for 'mp4a.40.34' with fallback to 'audio/mpeg' SourceBuffer
30360
30360
  levelParsed.audioCodec = audioCodec = getCodecCompatibleName(audioCodec, preferManagedMediaSource) || undefined;
30361
30361
  }
30362
- if (((_videoCodec = videoCodec) == null ? void 0 : _videoCodec.indexOf('avc1')) === 0) {
30362
+ if (((_videoCodec = videoCodec) == null ? undefined : _videoCodec.indexOf('avc1')) === 0) {
30363
30363
  videoCodec = levelParsed.videoCodec = convertAVC1ToAVCOTI(videoCodec);
30364
30364
  }
30365
30365
 
@@ -30530,7 +30530,7 @@ class LevelController extends BasePlaylistController {
30530
30530
  const bandwidthEstimate = this.hls.bandwidthEstimate;
30531
30531
  this.log(`manifest loaded, ${levels.length} level(s) found, first bitrate: ${firstLevelBitrate}`);
30532
30532
  // Update default bwe to first variant bitrate as long it has not been configured or set
30533
- if (((_this$hls$userConfig = this.hls.userConfig) == null ? void 0 : _this$hls$userConfig.abrEwmaDefaultEstimate) === undefined) {
30533
+ if (((_this$hls$userConfig = this.hls.userConfig) == null ? undefined : _this$hls$userConfig.abrEwmaDefaultEstimate) === undefined) {
30534
30534
  const startingBwEstimate = Math.min(firstLevelBitrate, this.hls.config.abrEwmaDefaultEstimateMax);
30535
30535
  if (startingBwEstimate > bandwidthEstimate && bandwidthEstimate === this.hls.abrEwmaDefaultEstimate) {
30536
30536
  this.hls.bandwidthEstimate = startingBwEstimate;
@@ -30631,7 +30631,7 @@ class LevelController extends BasePlaylistController {
30631
30631
  const levelDetails = level.details;
30632
30632
  if (!levelDetails || levelDetails.live) {
30633
30633
  // level not retrieved yet, or live playlist we need to (re)load it
30634
- const hlsUrlParameters = this.switchParams(level.uri, lastLevel == null ? void 0 : lastLevel.details, levelDetails);
30634
+ const hlsUrlParameters = this.switchParams(level.uri, lastLevel == null ? undefined : lastLevel.details, levelDetails);
30635
30635
  this.loadPlaylist(hlsUrlParameters);
30636
30636
  }
30637
30637
  }
@@ -30756,8 +30756,8 @@ class LevelController extends BasePlaylistController {
30756
30756
  const currentLevelIndex = this.currentLevelIndex;
30757
30757
  const pathwayId = currentLevel.attrs['PATHWAY-ID'];
30758
30758
  const details = currentLevel.details;
30759
- const age = details == null ? void 0 : details.age;
30760
- 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}`);
30759
+ const age = details == null ? undefined : details.age;
30760
+ 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}`);
30761
30761
  this.hls.trigger(Events.LEVEL_LOADING, {
30762
30762
  url,
30763
30763
  level: currentLevelIndex,
@@ -30858,10 +30858,10 @@ const SKIP_BUFFER_RANGE_START = 0.05;
30858
30858
  class GapController extends Logger {
30859
30859
  constructor(config, media, fragmentTracker, hls) {
30860
30860
  super('gap-controller', hls.logger);
30861
- this.config = void 0;
30861
+ this.config = undefined;
30862
30862
  this.media = null;
30863
- this.fragmentTracker = void 0;
30864
- this.hls = void 0;
30863
+ this.fragmentTracker = undefined;
30864
+ this.hls = undefined;
30865
30865
  this.nudgeRetry = 0;
30866
30866
  this.stallReported = false;
30867
30867
  this.stalled = null;
@@ -30989,7 +30989,7 @@ class GapController extends Logger {
30989
30989
  const stalledDuration = tnow - stalled;
30990
30990
  if (!seeking && stalledDuration >= STALL_MINIMUM_DURATION_MS) {
30991
30991
  // Dispatch MEDIA_ENDED when media.ended/ended event is not signalled at end of stream
30992
- if (state === State.ENDED && !(levelDetails != null && levelDetails.live) && Math.abs(currentTime - ((levelDetails == null ? void 0 : levelDetails.edge) || 0)) < 1) {
30992
+ if (state === State.ENDED && !(levelDetails != null && levelDetails.live) && Math.abs(currentTime - ((levelDetails == null ? undefined : levelDetails.edge) || 0)) < 1) {
30993
30993
  if (stalledDuration < 1000 || this.ended) {
30994
30994
  return;
30995
30995
  }
@@ -31215,12 +31215,12 @@ function isSupported() {
31215
31215
  return false;
31216
31216
  }
31217
31217
  const mediaSource = getMediaSource();
31218
- return typeof (mediaSource == null ? void 0 : mediaSource.isTypeSupported) === 'function' && (['avc1.42E01E,mp4a.40.2', 'av01.0.01M.08', 'vp09.00.50.08'].some(codecsForVideoContainer => mediaSource.isTypeSupported(mimeTypeForCodec(codecsForVideoContainer, 'video'))) || ['mp4a.40.2', 'fLaC'].some(codecForAudioContainer => mediaSource.isTypeSupported(mimeTypeForCodec(codecForAudioContainer, 'audio'))));
31218
+ return typeof (mediaSource == null ? undefined : mediaSource.isTypeSupported) === 'function' && (['avc1.42E01E,mp4a.40.2', 'av01.0.01M.08', 'vp09.00.50.08'].some(codecsForVideoContainer => mediaSource.isTypeSupported(mimeTypeForCodec(codecsForVideoContainer, 'video'))) || ['mp4a.40.2', 'fLaC'].some(codecForAudioContainer => mediaSource.isTypeSupported(mimeTypeForCodec(codecForAudioContainer, 'audio'))));
31219
31219
  }
31220
31220
  function changeTypeSupported() {
31221
31221
  var _sourceBuffer$prototy;
31222
31222
  const sourceBuffer = getSourceBuffer();
31223
- return typeof (sourceBuffer == null ? void 0 : (_sourceBuffer$prototy = sourceBuffer.prototype) == null ? void 0 : _sourceBuffer$prototy.changeType) === 'function';
31223
+ return typeof (sourceBuffer == null ? undefined : (_sourceBuffer$prototy = sourceBuffer.prototype) == null ? undefined : _sourceBuffer$prototy.changeType) === 'function';
31224
31224
  }
31225
31225
 
31226
31226
  const TICK_INTERVAL = 100; // how often to tick in ms
@@ -31358,8 +31358,8 @@ class StreamController extends BaseStreamController {
31358
31358
  levels,
31359
31359
  level
31360
31360
  } = this;
31361
- const currentLevel = levels == null ? void 0 : levels[level];
31362
- const details = currentLevel == null ? void 0 : currentLevel.details;
31361
+ const currentLevel = levels == null ? undefined : levels[level];
31362
+ const details = currentLevel == null ? undefined : currentLevel.details;
31363
31363
  if (details && (!details.live || this.levelLastLoaded === currentLevel && !this.waitForLive(currentLevel))) {
31364
31364
  if (this.waitForCdnTuneIn(details)) {
31365
31365
  break;
@@ -31383,7 +31383,7 @@ class StreamController extends BaseStreamController {
31383
31383
  levels,
31384
31384
  level
31385
31385
  } = this;
31386
- const currentLevel = levels == null ? void 0 : levels[level];
31386
+ const currentLevel = levels == null ? undefined : levels[level];
31387
31387
  this.resetStartWhenNotLoaded(currentLevel || null);
31388
31388
  this.state = State.IDLE;
31389
31389
  }
@@ -31664,7 +31664,7 @@ class StreamController extends BaseStreamController {
31664
31664
  if (gapController.ended) {
31665
31665
  return;
31666
31666
  }
31667
- gapController.ended = ((_this$media2 = this.media) == null ? void 0 : _this$media2.currentTime) || 1;
31667
+ gapController.ended = ((_this$media2 = this.media) == null ? undefined : _this$media2.currentTime) || 1;
31668
31668
  }
31669
31669
  this.hls.trigger(Events.MEDIA_ENDED, {
31670
31670
  stalled: false
@@ -31739,7 +31739,7 @@ class StreamController extends BaseStreamController {
31739
31739
  if (newDetails.deltaUpdateFailed) {
31740
31740
  return;
31741
31741
  }
31742
- sliding = this.alignPlaylists(newDetails, curLevel.details, (_this$levelLastLoaded = this.levelLastLoaded) == null ? void 0 : _this$levelLastLoaded.details);
31742
+ sliding = this.alignPlaylists(newDetails, curLevel.details, (_this$levelLastLoaded = this.levelLastLoaded) == null ? undefined : _this$levelLastLoaded.details);
31743
31743
  }
31744
31744
  // override level info
31745
31745
  curLevel.details = newDetails;
@@ -31825,7 +31825,7 @@ class StreamController extends BaseStreamController {
31825
31825
 
31826
31826
  // time Offset is accurate if level PTS is known, or if playlist is not sliding (not live)
31827
31827
  const accurateTimeOffset = details.PTSKnown || !details.live;
31828
- const initSegmentData = (_frag$initSegment = frag.initSegment) == null ? void 0 : _frag$initSegment.data;
31828
+ const initSegmentData = (_frag$initSegment = frag.initSegment) == null ? undefined : _frag$initSegment.data;
31829
31829
  const audioCodec = this._getAudioCodec(currentLevel);
31830
31830
 
31831
31831
  // transmux the MPEG-TS data to ISO-BMFF segments
@@ -31869,7 +31869,7 @@ class StreamController extends BaseStreamController {
31869
31869
  this.fragmentTracker.removeAllFragments();
31870
31870
  hls.once(Events.BUFFER_FLUSHED, () => {
31871
31871
  var _this$hls;
31872
- (_this$hls = this.hls) == null ? void 0 : _this$hls.trigger(Events.AUDIO_TRACK_SWITCHED, data);
31872
+ (_this$hls = this.hls) == null ? undefined : _this$hls.trigger(Events.AUDIO_TRACK_SWITCHED, data);
31873
31873
  });
31874
31874
  hls.trigger(Events.BUFFER_FLUSHING, {
31875
31875
  startOffset: 0,
@@ -31982,7 +31982,7 @@ class StreamController extends BaseStreamController {
31982
31982
  case ErrorDetails.LEVEL_LOAD_TIMEOUT:
31983
31983
  case ErrorDetails.LEVEL_PARSING_ERROR:
31984
31984
  // in case of non fatal error while loading level, if level controller is not retrying to load level, switch back to IDLE
31985
- if (!data.levelRetry && this.state === State.WAITING_LEVEL && ((_data$context = data.context) == null ? void 0 : _data$context.type) === PlaylistContextType.LEVEL) {
31985
+ if (!data.levelRetry && this.state === State.WAITING_LEVEL && ((_data$context = data.context) == null ? undefined : _data$context.type) === PlaylistContextType.LEVEL) {
31986
31986
  this.state = State.IDLE;
31987
31987
  }
31988
31988
  break;
@@ -32080,13 +32080,13 @@ class StreamController extends BaseStreamController {
32080
32080
  const details = this.getLevelDetails();
32081
32081
  const configuredTimelineOffset = this.config.timelineOffset;
32082
32082
  if (configuredTimelineOffset && startPosition) {
32083
- startPosition += (details == null ? void 0 : details.appliedTimelineOffset) || configuredTimelineOffset;
32083
+ startPosition += (details == null ? undefined : details.appliedTimelineOffset) || configuredTimelineOffset;
32084
32084
  }
32085
32085
  const buffered = BufferHelper.getBuffered(media);
32086
32086
  const bufferStart = buffered.length ? buffered.start(0) : 0;
32087
32087
  const delta = bufferStart - startPosition;
32088
32088
  const skipTolerance = Math.max(this.config.maxBufferHole, this.config.maxFragLookUpTolerance);
32089
- if (delta > 0 && (delta < skipTolerance || this.loadingParts && delta < 2 * ((details == null ? void 0 : details.partTarget) || 0))) {
32089
+ if (delta > 0 && (delta < skipTolerance || this.loadingParts && delta < 2 * ((details == null ? undefined : details.partTarget) || 0))) {
32090
32090
  this.log(`adjusting start position by ${delta} to match buffer start`);
32091
32091
  startPosition += delta;
32092
32092
  this.startPosition = startPosition;
@@ -32115,7 +32115,7 @@ class StreamController extends BaseStreamController {
32115
32115
  const {
32116
32116
  hls
32117
32117
  } = this;
32118
- const frag = data == null ? void 0 : data.frag;
32118
+ const frag = data == null ? undefined : data.frag;
32119
32119
  if (!frag || this.fragContextChanged(frag)) {
32120
32120
  return;
32121
32121
  }
@@ -32349,7 +32349,7 @@ class StreamController extends BaseStreamController {
32349
32349
  video.levelCodec = currentLevel.videoCodec;
32350
32350
  video.id = 'main';
32351
32351
  const parsedVideoCodec = video.codec;
32352
- if ((parsedVideoCodec == null ? void 0 : parsedVideoCodec.length) === 4) {
32352
+ if ((parsedVideoCodec == null ? undefined : parsedVideoCodec.length) === 4) {
32353
32353
  // Make up for passthrough-remuxer not being able to parse full codec
32354
32354
  // (logger warning "Unhandled video codec...")
32355
32355
  switch (parsedVideoCodec) {
@@ -32407,7 +32407,7 @@ class StreamController extends BaseStreamController {
32407
32407
  levels,
32408
32408
  level
32409
32409
  } = this;
32410
- const levelInfo = levels == null ? void 0 : levels[level];
32410
+ const levelInfo = levels == null ? undefined : levels[level];
32411
32411
  if (!levelInfo) {
32412
32412
  return this.config.maxBufferLength;
32413
32413
  }
@@ -32476,7 +32476,7 @@ class StreamController extends BaseStreamController {
32476
32476
  if (this.fragPlaying) {
32477
32477
  return this.fragPlaying;
32478
32478
  }
32479
- const currentTime = ((_this$media3 = this.media) == null ? void 0 : _this$media3.currentTime) || this.lastCurrentTime;
32479
+ const currentTime = ((_this$media3 = this.media) == null ? undefined : _this$media3.currentTime) || this.lastCurrentTime;
32480
32480
  if (isFiniteNumber(currentTime)) {
32481
32481
  return this.getAppendedFrag(currentTime);
32482
32482
  }
@@ -32484,7 +32484,7 @@ class StreamController extends BaseStreamController {
32484
32484
  }
32485
32485
  get currentProgramDateTime() {
32486
32486
  var _this$media4;
32487
- const currentTime = ((_this$media4 = this.media) == null ? void 0 : _this$media4.currentTime) || this.lastCurrentTime;
32487
+ const currentTime = ((_this$media4 = this.media) == null ? undefined : _this$media4.currentTime) || this.lastCurrentTime;
32488
32488
  if (isFiniteNumber(currentTime)) {
32489
32489
  const details = this.getLevelDetails();
32490
32490
  const frag = this.currentFrag || (details ? findFragmentByPTS(null, details.fragments, currentTime) : null);
@@ -32519,7 +32519,7 @@ class StreamController extends BaseStreamController {
32519
32519
 
32520
32520
  class KeyLoader {
32521
32521
  constructor(config) {
32522
- this.config = void 0;
32522
+ this.config = undefined;
32523
32523
  this.keyUriToKeyInfo = {};
32524
32524
  this.emeController = null;
32525
32525
  this.config = config;
@@ -32529,7 +32529,7 @@ class KeyLoader {
32529
32529
  const loader = this.keyUriToKeyInfo[uri].loader;
32530
32530
  if (loader) {
32531
32531
  var _loader$context;
32532
- if (type && type !== ((_loader$context = loader.context) == null ? void 0 : _loader$context.frag.type)) {
32532
+ if (type && type !== ((_loader$context = loader.context) == null ? undefined : _loader$context.frag.type)) {
32533
32533
  return;
32534
32534
  }
32535
32535
  loader.abort();
@@ -32618,7 +32618,7 @@ class KeyLoader {
32618
32618
  // Return key load promise as long as it does not have a mediakey session with an unusable key status
32619
32619
  if ((_keyInfo2 = keyInfo) != null && _keyInfo2.keyLoadPromise) {
32620
32620
  var _keyInfo$mediaKeySess;
32621
- switch ((_keyInfo$mediaKeySess = keyInfo.mediaKeySessionContext) == null ? void 0 : _keyInfo$mediaKeySess.keyStatus) {
32621
+ switch ((_keyInfo$mediaKeySess = keyInfo.mediaKeySessionContext) == null ? undefined : _keyInfo$mediaKeySess.keyStatus) {
32622
32622
  case undefined:
32623
32623
  case 'status-pending':
32624
32624
  case 'usable':
@@ -32787,7 +32787,7 @@ function getResponseUrl(response, context) {
32787
32787
  }
32788
32788
  class PlaylistLoader {
32789
32789
  constructor(hls) {
32790
- this.hls = void 0;
32790
+ this.hls = undefined;
32791
32791
  this.loaders = Object.create(null);
32792
32792
  this.variableList = null;
32793
32793
  this.onManifestLoaded = this.checkAutostartLoad;
@@ -32980,7 +32980,7 @@ class PlaylistLoader {
32980
32980
 
32981
32981
  // Override level/track timeout for LL-HLS requests
32982
32982
  // (the default of 10000ms is counter productive to blocking playlist reload requests)
32983
- if (isFiniteNumber((_context$deliveryDire = context.deliveryDirectives) == null ? void 0 : _context$deliveryDire.part)) {
32983
+ if (isFiniteNumber((_context$deliveryDire = context.deliveryDirectives) == null ? undefined : _context$deliveryDire.part)) {
32984
32984
  let levelDetails;
32985
32985
  if (context.type === PlaylistContextType.LEVEL && context.level !== null) {
32986
32986
  levelDetails = this.hls.levels[context.level].details;
@@ -33223,7 +33223,7 @@ class PlaylistLoader {
33223
33223
  stats
33224
33224
  };
33225
33225
  if (response) {
33226
- const url = (networkDetails == null ? void 0 : networkDetails.url) || context.url;
33226
+ const url = (networkDetails == null ? undefined : networkDetails.url) || context.url;
33227
33227
  errorData.response = _objectSpread2({
33228
33228
  url,
33229
33229
  data: undefined
@@ -33400,35 +33400,35 @@ class Hls {
33400
33400
  /**
33401
33401
  * The runtime configuration used by the player. At instantiation this is combination of `hls.userConfig` merged over `Hls.DefaultConfig`.
33402
33402
  */
33403
- this.config = void 0;
33403
+ this.config = undefined;
33404
33404
  /**
33405
33405
  * The configuration object provided on player instantiation.
33406
33406
  */
33407
- this.userConfig = void 0;
33407
+ this.userConfig = undefined;
33408
33408
  /**
33409
33409
  * The logger functions used by this player instance, configured on player instantiation.
33410
33410
  */
33411
- this.logger = void 0;
33412
- this.coreComponents = void 0;
33413
- this.networkControllers = void 0;
33411
+ this.logger = undefined;
33412
+ this.coreComponents = undefined;
33413
+ this.networkControllers = undefined;
33414
33414
  this._emitter = new EventEmitter();
33415
33415
  this._autoLevelCapping = -1;
33416
33416
  this._maxHdcpLevel = null;
33417
- this.abrController = void 0;
33418
- this.bufferController = void 0;
33419
- this.capLevelController = void 0;
33420
- this.latencyController = void 0;
33421
- this.levelController = void 0;
33422
- this.streamController = void 0;
33423
- this.audioTrackController = void 0;
33424
- this.subtitleTrackController = void 0;
33425
- this.interstitialsController = void 0;
33426
- this.emeController = void 0;
33427
- this.cmcdController = void 0;
33417
+ this.abrController = undefined;
33418
+ this.bufferController = undefined;
33419
+ this.capLevelController = undefined;
33420
+ this.latencyController = undefined;
33421
+ this.levelController = undefined;
33422
+ this.streamController = undefined;
33423
+ this.audioTrackController = undefined;
33424
+ this.subtitleTrackController = undefined;
33425
+ this.interstitialsController = undefined;
33426
+ this.emeController = undefined;
33427
+ this.cmcdController = undefined;
33428
33428
  this._media = null;
33429
33429
  this._url = null;
33430
- this._sessionId = void 0;
33431
- this.triggeringException = void 0;
33430
+ this._sessionId = undefined;
33431
+ this.triggeringException = undefined;
33432
33432
  this.started = false;
33433
33433
  const logger = this.logger = enableLogs(userConfig.debug || false, 'Hls instance', userConfig.assetPlayerId);
33434
33434
  const config = this.config = mergeConfig(Hls.DefaultConfig, userConfig, logger);
@@ -33770,7 +33770,7 @@ class Hls {
33770
33770
  recoverMediaError() {
33771
33771
  this.logger.log('recoverMediaError');
33772
33772
  const media = this._media;
33773
- const time = media == null ? void 0 : media.currentTime;
33773
+ const time = media == null ? undefined : media.currentTime;
33774
33774
  this.detachMedia();
33775
33775
  if (media) {
33776
33776
  this.attachMedia(media);
@@ -34109,7 +34109,7 @@ class Hls {
34109
34109
  */
34110
34110
  setAudioOption(audioOption) {
34111
34111
  var _this$audioTrackContr;
34112
- return ((_this$audioTrackContr = this.audioTrackController) == null ? void 0 : _this$audioTrackContr.setAudioOption(audioOption)) || null;
34112
+ return ((_this$audioTrackContr = this.audioTrackController) == null ? undefined : _this$audioTrackContr.setAudioOption(audioOption)) || null;
34113
34113
  }
34114
34114
  /**
34115
34115
  * Find and select the best matching subtitle track, making a level switch when a Group change is necessary.
@@ -34117,7 +34117,7 @@ class Hls {
34117
34117
  */
34118
34118
  setSubtitleOption(subtitleOption) {
34119
34119
  var _this$subtitleTrackCo;
34120
- return ((_this$subtitleTrackCo = this.subtitleTrackController) == null ? void 0 : _this$subtitleTrackCo.setSubtitleOption(subtitleOption)) || null;
34120
+ return ((_this$subtitleTrackCo = this.subtitleTrackController) == null ? undefined : _this$subtitleTrackCo.setSubtitleOption(subtitleOption)) || null;
34121
34121
  }
34122
34122
 
34123
34123
  /**
@@ -34295,7 +34295,7 @@ class Hls {
34295
34295
  */
34296
34296
  get interstitialsManager() {
34297
34297
  var _this$interstitialsCo;
34298
- return ((_this$interstitialsCo = this.interstitialsController) == null ? void 0 : _this$interstitialsCo.interstitialsManager) || null;
34298
+ return ((_this$interstitialsCo = this.interstitialsController) == null ? undefined : _this$interstitialsCo.interstitialsManager) || null;
34299
34299
  }
34300
34300
 
34301
34301
  /**
@@ -34306,7 +34306,7 @@ class Hls {
34306
34306
  return getMediaDecodingInfoPromise(level, audioTracksByGroup, navigator.mediaCapabilities);
34307
34307
  }
34308
34308
  }
34309
- Hls.defaultConfig = void 0;
34309
+ Hls.defaultConfig = undefined;
34310
34310
 
34311
34311
  export { AbrController, AttrList, AudioStreamController, AudioTrackController, BasePlaylistController, BaseSegment, BaseStreamController, BufferController, CMCDController, CapLevelController, ChunkMetadata, ContentSteeringController, Cues, DateRange, EMEController, ErrorActionFlags, ErrorController, ErrorDetails, ErrorTypes, Events, FPSController, FetchLoader, Fragment, Hls, HlsSkip, HlsUrlParameters, KeySystemFormats, KeySystems, Level, LevelDetails, LevelKey, LoadStats, MetadataSchema, NetworkErrorAction, Part, PlaylistLevelType, SubtitleStreamController, SubtitleTrackController, TimelineController, XhrLoader, Hls as default, fetchSupported, getMediaSource, isMSESupported, isSupported, requestMediaKeySystemAccess };
34312
34312
  //# sourceMappingURL=hls.mjs.map