hls.js 1.6.3-0.canary.11214 → 1.6.3-0.canary.11216

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.js CHANGED
@@ -1165,7 +1165,7 @@
1165
1165
  // Some browsers don't allow to use bind on console object anyway
1166
1166
  // fallback to default if needed
1167
1167
  try {
1168
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.3-0.canary.11214");
1168
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.3-0.canary.11216");
1169
1169
  } catch (e) {
1170
1170
  /* log fn threw an exception. All logger methods are no-ops. */
1171
1171
  return createLogger();
@@ -11065,80 +11065,6 @@
11065
11065
  };
11066
11066
  }
11067
11067
 
11068
- /**
11069
- * Encodes binary data to base64
11070
- *
11071
- * @param binary - The binary data to encode
11072
- * @returns The base64 encoded string
11073
- *
11074
- * @group Utils
11075
- *
11076
- * @beta
11077
- */
11078
- function base64encode(binary) {
11079
- return btoa(String.fromCharCode.apply(String, binary));
11080
- }
11081
-
11082
- /**
11083
- * This implements the rounding procedure described in step 2 of the "Serializing a Decimal" specification.
11084
- * This rounding style is known as "even rounding", "banker's rounding", or "commercial rounding".
11085
- *
11086
- * @param value - The value to round
11087
- * @param precision - The number of decimal places to round to
11088
- * @returns The rounded value
11089
- *
11090
- * @group Utils
11091
- *
11092
- * @beta
11093
- */
11094
- function roundToEven(value, precision) {
11095
- if (value < 0) {
11096
- return -roundToEven(-value, precision);
11097
- }
11098
- var decimalShift = Math.pow(10, precision);
11099
- var isEquidistant = Math.abs(value * decimalShift % 1 - 0.5) < Number.EPSILON;
11100
- if (isEquidistant) {
11101
- // If the tail of the decimal place is 'equidistant' we round to the nearest even value
11102
- var flooredValue = Math.floor(value * decimalShift);
11103
- return (flooredValue % 2 === 0 ? flooredValue : flooredValue + 1) / decimalShift;
11104
- } else {
11105
- // Otherwise, proceed as normal
11106
- return Math.round(value * decimalShift) / decimalShift;
11107
- }
11108
- }
11109
-
11110
- /**
11111
- * Constructs a relative path from a URL.
11112
- *
11113
- * @param url - The destination URL
11114
- * @param base - The base URL
11115
- * @returns The relative path
11116
- *
11117
- * @group Utils
11118
- *
11119
- * @beta
11120
- */
11121
- function urlToRelativePath(url, base) {
11122
- var to = new URL(url);
11123
- var from = new URL(base);
11124
- if (to.origin !== from.origin) {
11125
- return url;
11126
- }
11127
- var toPath = to.pathname.split('/').slice(1);
11128
- var fromPath = from.pathname.split('/').slice(1, -1);
11129
- // remove common parents
11130
- while (toPath[0] === fromPath[0]) {
11131
- toPath.shift();
11132
- fromPath.shift();
11133
- }
11134
- // add back paths
11135
- while (fromPath.length) {
11136
- fromPath.shift();
11137
- toPath.unshift('..');
11138
- }
11139
- return toPath.join('/');
11140
- }
11141
-
11142
11068
  function toArrayBuffer(view) {
11143
11069
  if (view instanceof ArrayBuffer) {
11144
11070
  return view;
@@ -16751,7 +16677,7 @@
16751
16677
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
16752
16678
  }
16753
16679
 
16754
- var version = "1.6.3-0.canary.11214";
16680
+ var version = "1.6.3-0.canary.11216";
16755
16681
 
16756
16682
  // ensure the worker ends up in the bundle
16757
16683
  // If the worker should not be included this gets aliased to empty.js
@@ -20723,6 +20649,20 @@
20723
20649
  return value ? '?1' : '?0';
20724
20650
  }
20725
20651
 
20652
+ /**
20653
+ * Encodes binary data to base64
20654
+ *
20655
+ * @param binary - The binary data to encode
20656
+ * @returns The base64 encoded string
20657
+ *
20658
+ * @group Utils
20659
+ *
20660
+ * @beta
20661
+ */
20662
+ function base64encode(binary) {
20663
+ return btoa(String.fromCharCode.apply(String, binary));
20664
+ }
20665
+
20726
20666
  var BYTES = 'Byte Sequence';
20727
20667
 
20728
20668
  // 4.1.8. Serializing a Byte Sequence
@@ -20799,6 +20739,34 @@
20799
20739
  return "@" + serializeInteger(value.getTime() / 1000);
20800
20740
  }
20801
20741
 
20742
+ /**
20743
+ * This implements the rounding procedure described in step 2 of the "Serializing a Decimal" specification.
20744
+ * This rounding style is known as "even rounding", "banker's rounding", or "commercial rounding".
20745
+ *
20746
+ * @param value - The value to round
20747
+ * @param precision - The number of decimal places to round to
20748
+ * @returns The rounded value
20749
+ *
20750
+ * @group Utils
20751
+ *
20752
+ * @beta
20753
+ */
20754
+ function roundToEven(value, precision) {
20755
+ if (value < 0) {
20756
+ return -roundToEven(-value, precision);
20757
+ }
20758
+ var decimalShift = Math.pow(10, precision);
20759
+ var isEquidistant = Math.abs(value * decimalShift % 1 - 0.5) < Number.EPSILON;
20760
+ if (isEquidistant) {
20761
+ // If the tail of the decimal place is 'equidistant' we round to the nearest even value
20762
+ var flooredValue = Math.floor(value * decimalShift);
20763
+ return (flooredValue % 2 === 0 ? flooredValue : flooredValue + 1) / decimalShift;
20764
+ } else {
20765
+ // Otherwise, proceed as normal
20766
+ return Math.round(value * decimalShift) / decimalShift;
20767
+ }
20768
+ }
20769
+
20802
20770
  var DECIMAL = 'Decimal';
20803
20771
 
20804
20772
  // 4.1.5. Serializing a Decimal
@@ -21190,6 +21158,38 @@
21190
21158
  return value != null && value !== '' && value !== false;
21191
21159
  }
21192
21160
 
21161
+ /**
21162
+ * Constructs a relative path from a URL.
21163
+ *
21164
+ * @param url - The destination URL
21165
+ * @param base - The base URL
21166
+ * @returns The relative path
21167
+ *
21168
+ * @group Utils
21169
+ *
21170
+ * @beta
21171
+ */
21172
+ function urlToRelativePath(url, base) {
21173
+ var to = new URL(url);
21174
+ var from = new URL(base);
21175
+ if (to.origin !== from.origin) {
21176
+ return url;
21177
+ }
21178
+ var toPath = to.pathname.split('/').slice(1);
21179
+ var fromPath = from.pathname.split('/').slice(1, -1);
21180
+ // remove common parents
21181
+ while (toPath[0] === fromPath[0]) {
21182
+ toPath.shift();
21183
+ fromPath.shift();
21184
+ }
21185
+ // add back paths
21186
+ while (fromPath.length) {
21187
+ fromPath.shift();
21188
+ toPath.unshift('..');
21189
+ }
21190
+ return toPath.join('/');
21191
+ }
21192
+
21193
21193
  var toRounded = function toRounded(value) {
21194
21194
  return Math.round(value);
21195
21195
  };