hls.js 1.6.3-0.canary.11216 → 1.6.3-0.canary.11219
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 +93 -93
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +93 -93
- package/dist/hls.light.js.map +1 -1
- package/dist/hls.light.min.js +1 -1
- package/dist/hls.light.min.js.map +1 -1
- package/dist/hls.light.mjs +87 -87
- package/dist/hls.light.mjs.map +1 -1
- package/dist/hls.min.js +1 -1
- package/dist/hls.min.js.map +1 -1
- package/dist/hls.mjs +87 -87
- package/dist/hls.mjs.map +1 -1
- package/dist/hls.worker.js +1 -1
- package/dist/hls.worker.js.map +1 -1
- package/package.json +3 -3
package/dist/hls.mjs
CHANGED
@@ -523,7 +523,7 @@ function enableLogs(debugConfig, context, id) {
|
|
523
523
|
// Some browsers don't allow to use bind on console object anyway
|
524
524
|
// fallback to default if needed
|
525
525
|
try {
|
526
|
-
newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.3-0.canary.
|
526
|
+
newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.3-0.canary.11219"}`);
|
527
527
|
} catch (e) {
|
528
528
|
/* log fn threw an exception. All logger methods are no-ops. */
|
529
529
|
return createLogger();
|
@@ -10237,7 +10237,7 @@ function requireEventemitter3 () {
|
|
10237
10237
|
var eventemitter3Exports = requireEventemitter3();
|
10238
10238
|
var EventEmitter = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports);
|
10239
10239
|
|
10240
|
-
const version = "1.6.3-0.canary.
|
10240
|
+
const version = "1.6.3-0.canary.11219";
|
10241
10241
|
|
10242
10242
|
// ensure the worker ends up in the bundle
|
10243
10243
|
// If the worker should not be included this gets aliased to empty.js
|
@@ -10627,6 +10627,91 @@ function canParseId3(data, offset) {
|
|
10627
10627
|
return isId3Header(data, offset) && readId3Size(data, offset + 6) + 10 <= data.length - offset;
|
10628
10628
|
}
|
10629
10629
|
|
10630
|
+
function toArrayBuffer(view) {
|
10631
|
+
if (view instanceof ArrayBuffer) {
|
10632
|
+
return view;
|
10633
|
+
} else {
|
10634
|
+
if (view.byteOffset == 0 && view.byteLength == view.buffer.byteLength) {
|
10635
|
+
// This is a TypedArray over the whole buffer.
|
10636
|
+
return view.buffer;
|
10637
|
+
}
|
10638
|
+
// This is a 'view' on the buffer. Create a new buffer that only contains
|
10639
|
+
// the data. Note that since this isn't an ArrayBuffer, the 'new' call
|
10640
|
+
// will allocate a new buffer to hold the copy.
|
10641
|
+
return new Uint8Array(view).buffer;
|
10642
|
+
}
|
10643
|
+
}
|
10644
|
+
|
10645
|
+
function toUint8(data, offset = 0, length = Infinity) {
|
10646
|
+
return view(data, offset, length, Uint8Array);
|
10647
|
+
}
|
10648
|
+
function view(data, offset, length, Type) {
|
10649
|
+
const buffer = unsafeGetArrayBuffer(data);
|
10650
|
+
let bytesPerElement = 1;
|
10651
|
+
if ('BYTES_PER_ELEMENT' in Type) {
|
10652
|
+
bytesPerElement = Type.BYTES_PER_ELEMENT;
|
10653
|
+
}
|
10654
|
+
// Absolute end of the |data| view within |buffer|.
|
10655
|
+
const dataOffset = isArrayBufferView(data) ? data.byteOffset : 0;
|
10656
|
+
const dataEnd = (dataOffset + data.byteLength) / bytesPerElement;
|
10657
|
+
// Absolute start of the result within |buffer|.
|
10658
|
+
const rawStart = (dataOffset + offset) / bytesPerElement;
|
10659
|
+
const start = Math.floor(Math.max(0, Math.min(rawStart, dataEnd)));
|
10660
|
+
// Absolute end of the result within |buffer|.
|
10661
|
+
const end = Math.floor(Math.min(start + Math.max(length, 0), dataEnd));
|
10662
|
+
return new Type(buffer, start, end - start);
|
10663
|
+
}
|
10664
|
+
function unsafeGetArrayBuffer(view) {
|
10665
|
+
if (view instanceof ArrayBuffer) {
|
10666
|
+
return view;
|
10667
|
+
} else {
|
10668
|
+
return view.buffer;
|
10669
|
+
}
|
10670
|
+
}
|
10671
|
+
function isArrayBufferView(obj) {
|
10672
|
+
return obj && obj.buffer instanceof ArrayBuffer && obj.byteLength !== undefined && obj.byteOffset !== undefined;
|
10673
|
+
}
|
10674
|
+
|
10675
|
+
function decodeId3ImageFrame(frame) {
|
10676
|
+
const metadataFrame = {
|
10677
|
+
key: frame.type,
|
10678
|
+
description: '',
|
10679
|
+
data: '',
|
10680
|
+
mimeType: null,
|
10681
|
+
pictureType: null
|
10682
|
+
};
|
10683
|
+
const utf8Encoding = 0x03;
|
10684
|
+
if (frame.size < 2) {
|
10685
|
+
return undefined;
|
10686
|
+
}
|
10687
|
+
if (frame.data[0] !== utf8Encoding) {
|
10688
|
+
console.log('Ignore frame with unrecognized character ' + 'encoding');
|
10689
|
+
return undefined;
|
10690
|
+
}
|
10691
|
+
const mimeTypeEndIndex = frame.data.subarray(1).indexOf(0);
|
10692
|
+
if (mimeTypeEndIndex === -1) {
|
10693
|
+
return undefined;
|
10694
|
+
}
|
10695
|
+
const mimeType = utf8ArrayToStr(toUint8(frame.data, 1, mimeTypeEndIndex));
|
10696
|
+
const pictureType = frame.data[2 + mimeTypeEndIndex];
|
10697
|
+
const descriptionEndIndex = frame.data.subarray(3 + mimeTypeEndIndex).indexOf(0);
|
10698
|
+
if (descriptionEndIndex === -1) {
|
10699
|
+
return undefined;
|
10700
|
+
}
|
10701
|
+
const description = utf8ArrayToStr(toUint8(frame.data, 3 + mimeTypeEndIndex, descriptionEndIndex));
|
10702
|
+
let data;
|
10703
|
+
if (mimeType === '-->') {
|
10704
|
+
data = utf8ArrayToStr(toUint8(frame.data, 4 + mimeTypeEndIndex + descriptionEndIndex));
|
10705
|
+
} else {
|
10706
|
+
data = toArrayBuffer(frame.data.subarray(4 + mimeTypeEndIndex + descriptionEndIndex));
|
10707
|
+
}
|
10708
|
+
metadataFrame.mimeType = mimeType;
|
10709
|
+
metadataFrame.pictureType = pictureType;
|
10710
|
+
metadataFrame.description = description;
|
10711
|
+
metadataFrame.data = data;
|
10712
|
+
return metadataFrame;
|
10713
|
+
}
|
10714
|
+
|
10630
10715
|
/**
|
10631
10716
|
* Decode an ID3 PRIV frame.
|
10632
10717
|
*
|
@@ -10741,91 +10826,6 @@ function decodeId3UrlFrame(frame) {
|
|
10741
10826
|
};
|
10742
10827
|
}
|
10743
10828
|
|
10744
|
-
function toArrayBuffer(view) {
|
10745
|
-
if (view instanceof ArrayBuffer) {
|
10746
|
-
return view;
|
10747
|
-
} else {
|
10748
|
-
if (view.byteOffset == 0 && view.byteLength == view.buffer.byteLength) {
|
10749
|
-
// This is a TypedArray over the whole buffer.
|
10750
|
-
return view.buffer;
|
10751
|
-
}
|
10752
|
-
// This is a 'view' on the buffer. Create a new buffer that only contains
|
10753
|
-
// the data. Note that since this isn't an ArrayBuffer, the 'new' call
|
10754
|
-
// will allocate a new buffer to hold the copy.
|
10755
|
-
return new Uint8Array(view).buffer;
|
10756
|
-
}
|
10757
|
-
}
|
10758
|
-
|
10759
|
-
function toUint8(data, offset = 0, length = Infinity) {
|
10760
|
-
return view(data, offset, length, Uint8Array);
|
10761
|
-
}
|
10762
|
-
function view(data, offset, length, Type) {
|
10763
|
-
const buffer = unsafeGetArrayBuffer(data);
|
10764
|
-
let bytesPerElement = 1;
|
10765
|
-
if ('BYTES_PER_ELEMENT' in Type) {
|
10766
|
-
bytesPerElement = Type.BYTES_PER_ELEMENT;
|
10767
|
-
}
|
10768
|
-
// Absolute end of the |data| view within |buffer|.
|
10769
|
-
const dataOffset = isArrayBufferView(data) ? data.byteOffset : 0;
|
10770
|
-
const dataEnd = (dataOffset + data.byteLength) / bytesPerElement;
|
10771
|
-
// Absolute start of the result within |buffer|.
|
10772
|
-
const rawStart = (dataOffset + offset) / bytesPerElement;
|
10773
|
-
const start = Math.floor(Math.max(0, Math.min(rawStart, dataEnd)));
|
10774
|
-
// Absolute end of the result within |buffer|.
|
10775
|
-
const end = Math.floor(Math.min(start + Math.max(length, 0), dataEnd));
|
10776
|
-
return new Type(buffer, start, end - start);
|
10777
|
-
}
|
10778
|
-
function unsafeGetArrayBuffer(view) {
|
10779
|
-
if (view instanceof ArrayBuffer) {
|
10780
|
-
return view;
|
10781
|
-
} else {
|
10782
|
-
return view.buffer;
|
10783
|
-
}
|
10784
|
-
}
|
10785
|
-
function isArrayBufferView(obj) {
|
10786
|
-
return obj && obj.buffer instanceof ArrayBuffer && obj.byteLength !== undefined && obj.byteOffset !== undefined;
|
10787
|
-
}
|
10788
|
-
|
10789
|
-
function decodeId3ImageFrame(frame) {
|
10790
|
-
const metadataFrame = {
|
10791
|
-
key: frame.type,
|
10792
|
-
description: '',
|
10793
|
-
data: '',
|
10794
|
-
mimeType: null,
|
10795
|
-
pictureType: null
|
10796
|
-
};
|
10797
|
-
const utf8Encoding = 0x03;
|
10798
|
-
if (frame.size < 2) {
|
10799
|
-
return undefined;
|
10800
|
-
}
|
10801
|
-
if (frame.data[0] !== utf8Encoding) {
|
10802
|
-
console.log('Ignore frame with unrecognized character ' + 'encoding');
|
10803
|
-
return undefined;
|
10804
|
-
}
|
10805
|
-
const mimeTypeEndIndex = frame.data.subarray(1).indexOf(0);
|
10806
|
-
if (mimeTypeEndIndex === -1) {
|
10807
|
-
return undefined;
|
10808
|
-
}
|
10809
|
-
const mimeType = utf8ArrayToStr(toUint8(frame.data, 1, mimeTypeEndIndex));
|
10810
|
-
const pictureType = frame.data[2 + mimeTypeEndIndex];
|
10811
|
-
const descriptionEndIndex = frame.data.subarray(3 + mimeTypeEndIndex).indexOf(0);
|
10812
|
-
if (descriptionEndIndex === -1) {
|
10813
|
-
return undefined;
|
10814
|
-
}
|
10815
|
-
const description = utf8ArrayToStr(toUint8(frame.data, 3 + mimeTypeEndIndex, descriptionEndIndex));
|
10816
|
-
let data;
|
10817
|
-
if (mimeType === '-->') {
|
10818
|
-
data = utf8ArrayToStr(toUint8(frame.data, 4 + mimeTypeEndIndex + descriptionEndIndex));
|
10819
|
-
} else {
|
10820
|
-
data = toArrayBuffer(frame.data.subarray(4 + mimeTypeEndIndex + descriptionEndIndex));
|
10821
|
-
}
|
10822
|
-
metadataFrame.mimeType = mimeType;
|
10823
|
-
metadataFrame.pictureType = pictureType;
|
10824
|
-
metadataFrame.description = description;
|
10825
|
-
metadataFrame.data = data;
|
10826
|
-
return metadataFrame;
|
10827
|
-
}
|
10828
|
-
|
10829
10829
|
/**
|
10830
10830
|
* Decode an ID3 frame.
|
10831
10831
|
*
|