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

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.11216");
1168
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.3-0.canary.11218");
1169
1169
  } catch (e) {
1170
1170
  /* log fn threw an exception. All logger methods are no-ops. */
1171
1171
  return createLogger();
@@ -10951,6 +10951,97 @@
10951
10951
  return isId3Header(data, offset) && readId3Size(data, offset + 6) + 10 <= data.length - offset;
10952
10952
  }
10953
10953
 
10954
+ function toArrayBuffer(view) {
10955
+ if (view instanceof ArrayBuffer) {
10956
+ return view;
10957
+ } else {
10958
+ if (view.byteOffset == 0 && view.byteLength == view.buffer.byteLength) {
10959
+ // This is a TypedArray over the whole buffer.
10960
+ return view.buffer;
10961
+ }
10962
+ // This is a 'view' on the buffer. Create a new buffer that only contains
10963
+ // the data. Note that since this isn't an ArrayBuffer, the 'new' call
10964
+ // will allocate a new buffer to hold the copy.
10965
+ return new Uint8Array(view).buffer;
10966
+ }
10967
+ }
10968
+
10969
+ function toUint8(data, offset, length) {
10970
+ if (offset === void 0) {
10971
+ offset = 0;
10972
+ }
10973
+ if (length === void 0) {
10974
+ length = Infinity;
10975
+ }
10976
+ return view(data, offset, length, Uint8Array);
10977
+ }
10978
+ function view(data, offset, length, Type) {
10979
+ var buffer = unsafeGetArrayBuffer(data);
10980
+ var bytesPerElement = 1;
10981
+ if ('BYTES_PER_ELEMENT' in Type) {
10982
+ bytesPerElement = Type.BYTES_PER_ELEMENT;
10983
+ }
10984
+ // Absolute end of the |data| view within |buffer|.
10985
+ var dataOffset = isArrayBufferView(data) ? data.byteOffset : 0;
10986
+ var dataEnd = (dataOffset + data.byteLength) / bytesPerElement;
10987
+ // Absolute start of the result within |buffer|.
10988
+ var rawStart = (dataOffset + offset) / bytesPerElement;
10989
+ var start = Math.floor(Math.max(0, Math.min(rawStart, dataEnd)));
10990
+ // Absolute end of the result within |buffer|.
10991
+ var end = Math.floor(Math.min(start + Math.max(length, 0), dataEnd));
10992
+ return new Type(buffer, start, end - start);
10993
+ }
10994
+ function unsafeGetArrayBuffer(view) {
10995
+ if (view instanceof ArrayBuffer) {
10996
+ return view;
10997
+ } else {
10998
+ return view.buffer;
10999
+ }
11000
+ }
11001
+ function isArrayBufferView(obj) {
11002
+ return obj && obj.buffer instanceof ArrayBuffer && obj.byteLength !== undefined && obj.byteOffset !== undefined;
11003
+ }
11004
+
11005
+ function decodeId3ImageFrame(frame) {
11006
+ var metadataFrame = {
11007
+ key: frame.type,
11008
+ description: '',
11009
+ data: '',
11010
+ mimeType: null,
11011
+ pictureType: null
11012
+ };
11013
+ var utf8Encoding = 0x03;
11014
+ if (frame.size < 2) {
11015
+ return undefined;
11016
+ }
11017
+ if (frame.data[0] !== utf8Encoding) {
11018
+ console.log('Ignore frame with unrecognized character ' + 'encoding');
11019
+ return undefined;
11020
+ }
11021
+ var mimeTypeEndIndex = frame.data.subarray(1).indexOf(0);
11022
+ if (mimeTypeEndIndex === -1) {
11023
+ return undefined;
11024
+ }
11025
+ var mimeType = utf8ArrayToStr(toUint8(frame.data, 1, mimeTypeEndIndex));
11026
+ var pictureType = frame.data[2 + mimeTypeEndIndex];
11027
+ var descriptionEndIndex = frame.data.subarray(3 + mimeTypeEndIndex).indexOf(0);
11028
+ if (descriptionEndIndex === -1) {
11029
+ return undefined;
11030
+ }
11031
+ var description = utf8ArrayToStr(toUint8(frame.data, 3 + mimeTypeEndIndex, descriptionEndIndex));
11032
+ var data;
11033
+ if (mimeType === '-->') {
11034
+ data = utf8ArrayToStr(toUint8(frame.data, 4 + mimeTypeEndIndex + descriptionEndIndex));
11035
+ } else {
11036
+ data = toArrayBuffer(frame.data.subarray(4 + mimeTypeEndIndex + descriptionEndIndex));
11037
+ }
11038
+ metadataFrame.mimeType = mimeType;
11039
+ metadataFrame.pictureType = pictureType;
11040
+ metadataFrame.description = description;
11041
+ metadataFrame.data = data;
11042
+ return metadataFrame;
11043
+ }
11044
+
10954
11045
  /**
10955
11046
  * Decode an ID3 PRIV frame.
10956
11047
  *
@@ -11065,97 +11156,6 @@
11065
11156
  };
11066
11157
  }
11067
11158
 
11068
- function toArrayBuffer(view) {
11069
- if (view instanceof ArrayBuffer) {
11070
- return view;
11071
- } else {
11072
- if (view.byteOffset == 0 && view.byteLength == view.buffer.byteLength) {
11073
- // This is a TypedArray over the whole buffer.
11074
- return view.buffer;
11075
- }
11076
- // This is a 'view' on the buffer. Create a new buffer that only contains
11077
- // the data. Note that since this isn't an ArrayBuffer, the 'new' call
11078
- // will allocate a new buffer to hold the copy.
11079
- return new Uint8Array(view).buffer;
11080
- }
11081
- }
11082
-
11083
- function toUint8(data, offset, length) {
11084
- if (offset === void 0) {
11085
- offset = 0;
11086
- }
11087
- if (length === void 0) {
11088
- length = Infinity;
11089
- }
11090
- return view(data, offset, length, Uint8Array);
11091
- }
11092
- function view(data, offset, length, Type) {
11093
- var buffer = unsafeGetArrayBuffer(data);
11094
- var bytesPerElement = 1;
11095
- if ('BYTES_PER_ELEMENT' in Type) {
11096
- bytesPerElement = Type.BYTES_PER_ELEMENT;
11097
- }
11098
- // Absolute end of the |data| view within |buffer|.
11099
- var dataOffset = isArrayBufferView(data) ? data.byteOffset : 0;
11100
- var dataEnd = (dataOffset + data.byteLength) / bytesPerElement;
11101
- // Absolute start of the result within |buffer|.
11102
- var rawStart = (dataOffset + offset) / bytesPerElement;
11103
- var start = Math.floor(Math.max(0, Math.min(rawStart, dataEnd)));
11104
- // Absolute end of the result within |buffer|.
11105
- var end = Math.floor(Math.min(start + Math.max(length, 0), dataEnd));
11106
- return new Type(buffer, start, end - start);
11107
- }
11108
- function unsafeGetArrayBuffer(view) {
11109
- if (view instanceof ArrayBuffer) {
11110
- return view;
11111
- } else {
11112
- return view.buffer;
11113
- }
11114
- }
11115
- function isArrayBufferView(obj) {
11116
- return obj && obj.buffer instanceof ArrayBuffer && obj.byteLength !== undefined && obj.byteOffset !== undefined;
11117
- }
11118
-
11119
- function decodeId3ImageFrame(frame) {
11120
- var metadataFrame = {
11121
- key: frame.type,
11122
- description: '',
11123
- data: '',
11124
- mimeType: null,
11125
- pictureType: null
11126
- };
11127
- var utf8Encoding = 0x03;
11128
- if (frame.size < 2) {
11129
- return undefined;
11130
- }
11131
- if (frame.data[0] !== utf8Encoding) {
11132
- console.log('Ignore frame with unrecognized character ' + 'encoding');
11133
- return undefined;
11134
- }
11135
- var mimeTypeEndIndex = frame.data.subarray(1).indexOf(0);
11136
- if (mimeTypeEndIndex === -1) {
11137
- return undefined;
11138
- }
11139
- var mimeType = utf8ArrayToStr(toUint8(frame.data, 1, mimeTypeEndIndex));
11140
- var pictureType = frame.data[2 + mimeTypeEndIndex];
11141
- var descriptionEndIndex = frame.data.subarray(3 + mimeTypeEndIndex).indexOf(0);
11142
- if (descriptionEndIndex === -1) {
11143
- return undefined;
11144
- }
11145
- var description = utf8ArrayToStr(toUint8(frame.data, 3 + mimeTypeEndIndex, descriptionEndIndex));
11146
- var data;
11147
- if (mimeType === '-->') {
11148
- data = utf8ArrayToStr(toUint8(frame.data, 4 + mimeTypeEndIndex + descriptionEndIndex));
11149
- } else {
11150
- data = toArrayBuffer(frame.data.subarray(4 + mimeTypeEndIndex + descriptionEndIndex));
11151
- }
11152
- metadataFrame.mimeType = mimeType;
11153
- metadataFrame.pictureType = pictureType;
11154
- metadataFrame.description = description;
11155
- metadataFrame.data = data;
11156
- return metadataFrame;
11157
- }
11158
-
11159
11159
  /**
11160
11160
  * Decode an ID3 frame.
11161
11161
  *
@@ -16677,7 +16677,7 @@
16677
16677
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
16678
16678
  }
16679
16679
 
16680
- var version = "1.6.3-0.canary.11216";
16680
+ var version = "1.6.3-0.canary.11218";
16681
16681
 
16682
16682
  // ensure the worker ends up in the bundle
16683
16683
  // If the worker should not be included this gets aliased to empty.js