hls.js 1.6.0-beta.1.0.canary.10758 → 1.6.0-beta.1.0.canary.10761

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/hls.light.js CHANGED
@@ -1028,7 +1028,7 @@
1028
1028
  // Some browsers don't allow to use bind on console object anyway
1029
1029
  // fallback to default if needed
1030
1030
  try {
1031
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.1.0.canary.10758");
1031
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.1.0.canary.10761");
1032
1032
  } catch (e) {
1033
1033
  /* log fn threw an exception. All logger methods are no-ops. */
1034
1034
  return createLogger();
@@ -19697,7 +19697,7 @@
19697
19697
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
19698
19698
  }
19699
19699
 
19700
- var version = "1.6.0-beta.1.0.canary.10758";
19700
+ var version = "1.6.0-beta.1.0.canary.10761";
19701
19701
 
19702
19702
  // ensure the worker ends up in the bundle
19703
19703
  // If the worker should not be included this gets aliased to empty.js
@@ -20109,7 +20109,7 @@
20109
20109
  _this.level = -1;
20110
20110
  _this._forceStartLoad = false;
20111
20111
  _this._hasEnoughToStart = false;
20112
- _this.altAudio = false;
20112
+ _this.altAudio = 0;
20113
20113
  _this.audioOnly = false;
20114
20114
  _this.fragPlaying = null;
20115
20115
  _this.fragLastKbps = 0;
@@ -20301,7 +20301,7 @@
20301
20301
  var lastDetails = this.getLevelDetails();
20302
20302
  if (lastDetails && this._streamEnded(bufferInfo, lastDetails)) {
20303
20303
  var data = {};
20304
- if (this.altAudio) {
20304
+ if (this.altAudio === 2) {
20305
20305
  data.type = 'video';
20306
20306
  }
20307
20307
  this.hls.trigger(Events.BUFFER_EOS, data);
@@ -20489,7 +20489,7 @@
20489
20489
  this.nextLoadPosition = this.getLoadPosition();
20490
20490
  };
20491
20491
  _proto.flushMainBuffer = function flushMainBuffer(startOffset, endOffset) {
20492
- _BaseStreamController.prototype.flushMainBuffer.call(this, startOffset, endOffset, this.altAudio ? 'video' : null);
20492
+ _BaseStreamController.prototype.flushMainBuffer.call(this, startOffset, endOffset, this.altAudio === 2 ? 'video' : null);
20493
20493
  };
20494
20494
  _proto.onMediaAttached = function onMediaAttached(event, data) {
20495
20495
  _BaseStreamController.prototype.onMediaAttached.call(this, event, data);
@@ -20540,7 +20540,8 @@
20540
20540
  this.couldBacktrack = false;
20541
20541
  this.fragLastKbps = 0;
20542
20542
  this.fragPlaying = this.backtrackFragment = null;
20543
- this.altAudio = this.audioOnly = false;
20543
+ this.altAudio = 0;
20544
+ this.audioOnly = false;
20544
20545
  };
20545
20546
  _proto.onManifestParsed = function onManifestParsed(event, data) {
20546
20547
  // detect if we have different kind of audio codecs used amongst playlists
@@ -20690,7 +20691,7 @@
20690
20691
  };
20691
20692
  _proto.onAudioTrackSwitching = function onAudioTrackSwitching(event, data) {
20692
20693
  // if any URL found on new audio track, it is an alternate audio track
20693
- var fromAltAudio = this.altAudio;
20694
+ var fromAltAudio = this.altAudio === 2;
20694
20695
  var altAudio = !!data.url;
20695
20696
  // if we switch on main audio, ensure that main fragment scheduling is synced with media.buffered
20696
20697
  // don't do anything if we switch to alt audio: audio stream controller is handling it.
@@ -20725,6 +20726,8 @@
20725
20726
  this.fragmentTracker.removeAllFragments();
20726
20727
  }
20727
20728
  hls.trigger(Events.AUDIO_TRACK_SWITCHED, data);
20729
+ } else {
20730
+ this.altAudio = 1;
20728
20731
  }
20729
20732
  };
20730
20733
  _proto.onAudioTrackSwitched = function onAudioTrackSwitched(event, data) {
@@ -20738,7 +20741,7 @@
20738
20741
  this.mediaBuffer = videoBuffer;
20739
20742
  }
20740
20743
  }
20741
- this.altAudio = altAudio;
20744
+ this.altAudio = altAudio ? 2 : 0;
20742
20745
  this.tick();
20743
20746
  };
20744
20747
  _proto.onBufferCreated = function onBufferCreated(event, data) {