hls.js 1.6.0-beta.3.0.canary.10976 → 1.6.0-beta.3.0.canary.10979

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.d.mts CHANGED
@@ -48,6 +48,7 @@ export declare class AbrController extends Logger implements AbrComponentAPI {
48
48
  private getBwEstimate;
49
49
  private findBestLevel;
50
50
  set nextAutoLevel(nextLevel: number);
51
+ protected deriveNextAutoLevel(nextLevel: number): number;
51
52
  }
52
53
 
53
54
  export declare type ABRControllerConfig = {
package/dist/hls.d.ts CHANGED
@@ -48,6 +48,7 @@ export declare class AbrController extends Logger implements AbrComponentAPI {
48
48
  private getBwEstimate;
49
49
  private findBestLevel;
50
50
  set nextAutoLevel(nextLevel: number);
51
+ protected deriveNextAutoLevel(nextLevel: number): number;
51
52
  }
52
53
 
53
54
  export declare type ABRControllerConfig = {
package/dist/hls.js CHANGED
@@ -1059,7 +1059,7 @@
1059
1059
  // Some browsers don't allow to use bind on console object anyway
1060
1060
  // fallback to default if needed
1061
1061
  try {
1062
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.3.0.canary.10976");
1062
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.3.0.canary.10979");
1063
1063
  } catch (e) {
1064
1064
  /* log fn threw an exception. All logger methods are no-ops. */
1065
1065
  return createLogger();
@@ -2642,12 +2642,18 @@
2642
2642
  // not enough time budget even with quality level 0 ... rebuffering might happen
2643
2643
  return -1;
2644
2644
  };
2645
+ _proto.deriveNextAutoLevel = function deriveNextAutoLevel(nextLevel) {
2646
+ var _this$hls2 = this.hls,
2647
+ maxAutoLevel = _this$hls2.maxAutoLevel,
2648
+ minAutoLevel = _this$hls2.minAutoLevel;
2649
+ return Math.min(Math.max(nextLevel, minAutoLevel), maxAutoLevel);
2650
+ };
2645
2651
  return _createClass(AbrController, [{
2646
2652
  key: "firstAutoLevel",
2647
2653
  get: function get() {
2648
- var _this$hls2 = this.hls,
2649
- maxAutoLevel = _this$hls2.maxAutoLevel,
2650
- minAutoLevel = _this$hls2.minAutoLevel;
2654
+ var _this$hls3 = this.hls,
2655
+ maxAutoLevel = _this$hls3.maxAutoLevel,
2656
+ minAutoLevel = _this$hls3.minAutoLevel;
2651
2657
  var bwEstimate = this.getBwEstimate();
2652
2658
  var maxStartDelay = this.hls.config.maxStarvationDelay;
2653
2659
  var abrAutoLevel = this.findBestLevel(bwEstimate, minAutoLevel, maxAutoLevel, 0, maxStartDelay, 1, 1);
@@ -2698,10 +2704,7 @@
2698
2704
  return nextABRAutoLevel;
2699
2705
  },
2700
2706
  set: function set(nextLevel) {
2701
- var _this$hls3 = this.hls,
2702
- maxAutoLevel = _this$hls3.maxAutoLevel,
2703
- minAutoLevel = _this$hls3.minAutoLevel;
2704
- var value = Math.min(Math.max(nextLevel, minAutoLevel), maxAutoLevel);
2707
+ var value = this.deriveNextAutoLevel(nextLevel);
2705
2708
  if (this._nextAutoLevel !== value) {
2706
2709
  this.nextAutoLevelKey = '';
2707
2710
  this._nextAutoLevel = value;
@@ -10737,57 +10740,6 @@
10737
10740
  };
10738
10741
  }
10739
10742
 
10740
- function toUint8(data, offset, length) {
10741
- if (offset === void 0) {
10742
- offset = 0;
10743
- }
10744
- if (length === void 0) {
10745
- length = Infinity;
10746
- }
10747
- return view(data, offset, length, Uint8Array);
10748
- }
10749
- function view(data, offset, length, Type) {
10750
- var buffer = unsafeGetArrayBuffer(data);
10751
- var bytesPerElement = 1;
10752
- if ('BYTES_PER_ELEMENT' in Type) {
10753
- bytesPerElement = Type.BYTES_PER_ELEMENT;
10754
- }
10755
- // Absolute end of the |data| view within |buffer|.
10756
- var dataOffset = isArrayBufferView(data) ? data.byteOffset : 0;
10757
- var dataEnd = (dataOffset + data.byteLength) / bytesPerElement;
10758
- // Absolute start of the result within |buffer|.
10759
- var rawStart = (dataOffset + offset) / bytesPerElement;
10760
- var start = Math.floor(Math.max(0, Math.min(rawStart, dataEnd)));
10761
- // Absolute end of the result within |buffer|.
10762
- var end = Math.floor(Math.min(start + Math.max(length, 0), dataEnd));
10763
- return new Type(buffer, start, end - start);
10764
- }
10765
- function unsafeGetArrayBuffer(view) {
10766
- if (view instanceof ArrayBuffer) {
10767
- return view;
10768
- } else {
10769
- return view.buffer;
10770
- }
10771
- }
10772
- function isArrayBufferView(obj) {
10773
- return obj && obj.buffer instanceof ArrayBuffer && obj.byteLength !== undefined && obj.byteOffset !== undefined;
10774
- }
10775
-
10776
- function toArrayBuffer(view) {
10777
- if (view instanceof ArrayBuffer) {
10778
- return view;
10779
- } else {
10780
- if (view.byteOffset == 0 && view.byteLength == view.buffer.byteLength) {
10781
- // This is a TypedArray over the whole buffer.
10782
- return view.buffer;
10783
- }
10784
- // This is a 'view' on the buffer. Create a new buffer that only contains
10785
- // the data. Note that since this isn't an ArrayBuffer, the 'new' call
10786
- // will allocate a new buffer to hold the copy.
10787
- return new Uint8Array(view).buffer;
10788
- }
10789
- }
10790
-
10791
10743
  /**
10792
10744
  * Encodes binary data to base64
10793
10745
  *
@@ -10862,6 +10814,57 @@
10862
10814
  return toPath.join('/');
10863
10815
  }
10864
10816
 
10817
+ function toArrayBuffer(view) {
10818
+ if (view instanceof ArrayBuffer) {
10819
+ return view;
10820
+ } else {
10821
+ if (view.byteOffset == 0 && view.byteLength == view.buffer.byteLength) {
10822
+ // This is a TypedArray over the whole buffer.
10823
+ return view.buffer;
10824
+ }
10825
+ // This is a 'view' on the buffer. Create a new buffer that only contains
10826
+ // the data. Note that since this isn't an ArrayBuffer, the 'new' call
10827
+ // will allocate a new buffer to hold the copy.
10828
+ return new Uint8Array(view).buffer;
10829
+ }
10830
+ }
10831
+
10832
+ function toUint8(data, offset, length) {
10833
+ if (offset === void 0) {
10834
+ offset = 0;
10835
+ }
10836
+ if (length === void 0) {
10837
+ length = Infinity;
10838
+ }
10839
+ return view(data, offset, length, Uint8Array);
10840
+ }
10841
+ function view(data, offset, length, Type) {
10842
+ var buffer = unsafeGetArrayBuffer(data);
10843
+ var bytesPerElement = 1;
10844
+ if ('BYTES_PER_ELEMENT' in Type) {
10845
+ bytesPerElement = Type.BYTES_PER_ELEMENT;
10846
+ }
10847
+ // Absolute end of the |data| view within |buffer|.
10848
+ var dataOffset = isArrayBufferView(data) ? data.byteOffset : 0;
10849
+ var dataEnd = (dataOffset + data.byteLength) / bytesPerElement;
10850
+ // Absolute start of the result within |buffer|.
10851
+ var rawStart = (dataOffset + offset) / bytesPerElement;
10852
+ var start = Math.floor(Math.max(0, Math.min(rawStart, dataEnd)));
10853
+ // Absolute end of the result within |buffer|.
10854
+ var end = Math.floor(Math.min(start + Math.max(length, 0), dataEnd));
10855
+ return new Type(buffer, start, end - start);
10856
+ }
10857
+ function unsafeGetArrayBuffer(view) {
10858
+ if (view instanceof ArrayBuffer) {
10859
+ return view;
10860
+ } else {
10861
+ return view.buffer;
10862
+ }
10863
+ }
10864
+ function isArrayBufferView(obj) {
10865
+ return obj && obj.buffer instanceof ArrayBuffer && obj.byteLength !== undefined && obj.byteOffset !== undefined;
10866
+ }
10867
+
10865
10868
  function decodeId3ImageFrame(frame) {
10866
10869
  var metadataFrame = {
10867
10870
  key: frame.type,
@@ -16358,7 +16361,7 @@
16358
16361
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
16359
16362
  }
16360
16363
 
16361
- var version = "1.6.0-beta.3.0.canary.10976";
16364
+ var version = "1.6.0-beta.3.0.canary.10979";
16362
16365
 
16363
16366
  // ensure the worker ends up in the bundle
16364
16367
  // If the worker should not be included this gets aliased to empty.js
package/dist/hls.js.d.ts CHANGED
@@ -48,6 +48,7 @@ export declare class AbrController extends Logger implements AbrComponentAPI {
48
48
  private getBwEstimate;
49
49
  private findBestLevel;
50
50
  set nextAutoLevel(nextLevel: number);
51
+ protected deriveNextAutoLevel(nextLevel: number): number;
51
52
  }
52
53
 
53
54
  export declare type ABRControllerConfig = {