hls.js 1.5.14-0.canary.10520 → 1.5.14-0.canary.10524
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 +46 -38
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +34 -25
- 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 +34 -25
- 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 +46 -38
- 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 +1 -1
- package/src/demux/audio/base-audio-demuxer.ts +5 -1
- package/src/demux/mp4demuxer.ts +10 -1
- package/src/demux/tsdemuxer.ts +17 -11
- package/src/demux/video/avc-video-parser.ts +9 -35
- package/src/demux/video/base-video-parser.ts +0 -9
- package/src/demux/video/hevc-video-parser.ts +9 -40
- package/src/types/demuxer.ts +0 -1
package/dist/hls.light.mjs
CHANGED
@@ -421,7 +421,7 @@ function enableLogs(debugConfig, context, id) {
|
|
421
421
|
// Some browsers don't allow to use bind on console object anyway
|
422
422
|
// fallback to default if needed
|
423
423
|
try {
|
424
|
-
newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.14-0.canary.
|
424
|
+
newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.14-0.canary.10524"}`);
|
425
425
|
} catch (e) {
|
426
426
|
/* log fn threw an exception. All logger methods are no-ops. */
|
427
427
|
return createLogger();
|
@@ -13865,7 +13865,7 @@ function changeTypeSupported() {
|
|
13865
13865
|
return typeof (sourceBuffer == null ? void 0 : (_sourceBuffer$prototy = sourceBuffer.prototype) == null ? void 0 : _sourceBuffer$prototy.changeType) === 'function';
|
13866
13866
|
}
|
13867
13867
|
|
13868
|
-
const version = "1.5.14-0.canary.
|
13868
|
+
const version = "1.5.14-0.canary.10524";
|
13869
13869
|
|
13870
13870
|
// ensure the worker ends up in the bundle
|
13871
13871
|
// If the worker should not be included this gets aliased to empty.js
|
@@ -14162,7 +14162,11 @@ class BaseAudioDemuxer {
|
|
14162
14162
|
textTrack: dummyTrack()
|
14163
14163
|
};
|
14164
14164
|
}
|
14165
|
-
destroy() {
|
14165
|
+
destroy() {
|
14166
|
+
this.cachedData = null;
|
14167
|
+
// @ts-ignore
|
14168
|
+
this._audioTrack = this._id3Track = undefined;
|
14169
|
+
}
|
14166
14170
|
}
|
14167
14171
|
|
14168
14172
|
/**
|
@@ -14763,7 +14767,12 @@ class MP4Demuxer {
|
|
14763
14767
|
demuxSampleAes(data, keyData, timeOffset) {
|
14764
14768
|
return Promise.reject(new Error('The MP4 demuxer does not support SAMPLE-AES decryption'));
|
14765
14769
|
}
|
14766
|
-
destroy() {
|
14770
|
+
destroy() {
|
14771
|
+
// @ts-ignore
|
14772
|
+
this.config = null;
|
14773
|
+
this.remainderData = null;
|
14774
|
+
this.videoTrack = this.audioTrack = this.id3Track = this.txtTrack = undefined;
|
14775
|
+
}
|
14767
14776
|
}
|
14768
14777
|
|
14769
14778
|
const getAudioBSID = (data, offset) => {
|
@@ -14792,14 +14801,13 @@ class BaseVideoParser {
|
|
14792
14801
|
constructor() {
|
14793
14802
|
this.VideoSample = null;
|
14794
14803
|
}
|
14795
|
-
createVideoSample(key, pts, dts
|
14804
|
+
createVideoSample(key, pts, dts) {
|
14796
14805
|
return {
|
14797
14806
|
key,
|
14798
14807
|
frame: false,
|
14799
14808
|
pts,
|
14800
14809
|
dts,
|
14801
14810
|
units: [],
|
14802
|
-
debug,
|
14803
14811
|
length: 0
|
14804
14812
|
};
|
14805
14813
|
}
|
@@ -14835,9 +14843,6 @@ class BaseVideoParser {
|
|
14835
14843
|
}
|
14836
14844
|
videoTrack.samples.push(VideoSample);
|
14837
14845
|
}
|
14838
|
-
if (VideoSample.debug.length) {
|
14839
|
-
logger.log(VideoSample.pts + '/' + VideoSample.dts + ':' + VideoSample.debug);
|
14840
|
-
}
|
14841
14846
|
}
|
14842
14847
|
parseNALu(track, array, endOfSegment) {
|
14843
14848
|
const len = array.byteLength;
|
@@ -15088,7 +15093,7 @@ class ExpGolomb {
|
|
15088
15093
|
}
|
15089
15094
|
|
15090
15095
|
class AvcVideoParser extends BaseVideoParser {
|
15091
|
-
parsePES(track, textTrack, pes, endOfSegment
|
15096
|
+
parsePES(track, textTrack, pes, endOfSegment) {
|
15092
15097
|
const units = this.parseNALu(track, pes.data, endOfSegment);
|
15093
15098
|
let VideoSample = this.VideoSample;
|
15094
15099
|
let push;
|
@@ -15100,10 +15105,10 @@ class AvcVideoParser extends BaseVideoParser {
|
|
15100
15105
|
// this helps parsing streams with missing AUD (only do this if AUD never found)
|
15101
15106
|
if (VideoSample && units.length && !track.audFound) {
|
15102
15107
|
this.pushAccessUnit(VideoSample, track);
|
15103
|
-
VideoSample = this.VideoSample = this.createVideoSample(false, pes.pts, pes.dts
|
15108
|
+
VideoSample = this.VideoSample = this.createVideoSample(false, pes.pts, pes.dts);
|
15104
15109
|
}
|
15105
15110
|
units.forEach(unit => {
|
15106
|
-
var _VideoSample2;
|
15111
|
+
var _VideoSample2, _VideoSample3;
|
15107
15112
|
switch (unit.type) {
|
15108
15113
|
// NDR
|
15109
15114
|
case 1:
|
@@ -15133,7 +15138,7 @@ class AvcVideoParser extends BaseVideoParser {
|
|
15133
15138
|
}
|
15134
15139
|
}
|
15135
15140
|
if (!VideoSample) {
|
15136
|
-
VideoSample = this.VideoSample = this.createVideoSample(true, pes.pts, pes.dts
|
15141
|
+
VideoSample = this.VideoSample = this.createVideoSample(true, pes.pts, pes.dts);
|
15137
15142
|
}
|
15138
15143
|
VideoSample.frame = true;
|
15139
15144
|
VideoSample.key = iskey;
|
@@ -15149,7 +15154,7 @@ class AvcVideoParser extends BaseVideoParser {
|
|
15149
15154
|
VideoSample = this.VideoSample = null;
|
15150
15155
|
}
|
15151
15156
|
if (!VideoSample) {
|
15152
|
-
VideoSample = this.VideoSample = this.createVideoSample(true, pes.pts, pes.dts
|
15157
|
+
VideoSample = this.VideoSample = this.createVideoSample(true, pes.pts, pes.dts);
|
15153
15158
|
}
|
15154
15159
|
VideoSample.key = true;
|
15155
15160
|
VideoSample.frame = true;
|
@@ -15174,7 +15179,6 @@ class AvcVideoParser extends BaseVideoParser {
|
|
15174
15179
|
track.height = config.height;
|
15175
15180
|
track.pixelRatio = config.pixelRatio;
|
15176
15181
|
track.sps = [sps];
|
15177
|
-
track.duration = duration;
|
15178
15182
|
const codecarray = sps.subarray(1, 4);
|
15179
15183
|
let codecstring = 'avc1.';
|
15180
15184
|
for (let i = 0; i < 3; i++) {
|
@@ -15197,10 +15201,13 @@ class AvcVideoParser extends BaseVideoParser {
|
|
15197
15201
|
case 9:
|
15198
15202
|
push = true;
|
15199
15203
|
track.audFound = true;
|
15200
|
-
if (VideoSample) {
|
15204
|
+
if ((_VideoSample3 = VideoSample) != null && _VideoSample3.frame) {
|
15201
15205
|
this.pushAccessUnit(VideoSample, track);
|
15206
|
+
VideoSample = null;
|
15207
|
+
}
|
15208
|
+
if (!VideoSample) {
|
15209
|
+
VideoSample = this.VideoSample = this.createVideoSample(false, pes.pts, pes.dts);
|
15202
15210
|
}
|
15203
|
-
VideoSample = this.VideoSample = this.createVideoSample(false, pes.pts, pes.dts, '');
|
15204
15211
|
break;
|
15205
15212
|
// Filler Data
|
15206
15213
|
case 12:
|
@@ -15208,9 +15215,6 @@ class AvcVideoParser extends BaseVideoParser {
|
|
15208
15215
|
break;
|
15209
15216
|
default:
|
15210
15217
|
push = false;
|
15211
|
-
if (VideoSample) {
|
15212
|
-
VideoSample.debug += 'unknown NAL ' + unit.type + ' ';
|
15213
|
-
}
|
15214
15218
|
break;
|
15215
15219
|
}
|
15216
15220
|
if (VideoSample && push) {
|
@@ -15530,7 +15534,6 @@ class TSDemuxer {
|
|
15530
15534
|
this.pmtParsed = false;
|
15531
15535
|
this.audioCodec = void 0;
|
15532
15536
|
this.videoCodec = void 0;
|
15533
|
-
this._duration = 0;
|
15534
15537
|
this._pmtId = -1;
|
15535
15538
|
this._videoTrack = void 0;
|
15536
15539
|
this._audioTrack = void 0;
|
@@ -15615,6 +15618,7 @@ class TSDemuxer {
|
|
15615
15618
|
this.pmtParsed = false;
|
15616
15619
|
this._pmtId = -1;
|
15617
15620
|
this._videoTrack = TSDemuxer.createTrack('video');
|
15621
|
+
this._videoTrack.duration = trackDuration;
|
15618
15622
|
this._audioTrack = TSDemuxer.createTrack('audio', trackDuration);
|
15619
15623
|
this._id3Track = TSDemuxer.createTrack('id3');
|
15620
15624
|
this._txtTrack = TSDemuxer.createTrack('text');
|
@@ -15625,7 +15629,6 @@ class TSDemuxer {
|
|
15625
15629
|
this.remainderData = null;
|
15626
15630
|
this.audioCodec = audioCodec;
|
15627
15631
|
this.videoCodec = videoCodec;
|
15628
|
-
this._duration = trackDuration;
|
15629
15632
|
}
|
15630
15633
|
resetTimeStamp() {}
|
15631
15634
|
resetContiguity() {
|
@@ -15716,7 +15719,7 @@ class TSDemuxer {
|
|
15716
15719
|
}
|
15717
15720
|
}
|
15718
15721
|
if (this.videoParser !== null) {
|
15719
|
-
this.videoParser.parsePES(videoTrack, textTrack, pes, false
|
15722
|
+
this.videoParser.parsePES(videoTrack, textTrack, pes, false);
|
15720
15723
|
}
|
15721
15724
|
}
|
15722
15725
|
videoData = {
|
@@ -15880,7 +15883,7 @@ class TSDemuxer {
|
|
15880
15883
|
}
|
15881
15884
|
}
|
15882
15885
|
if (this.videoParser !== null) {
|
15883
|
-
this.videoParser.parsePES(videoTrack, textTrack, pes, true
|
15886
|
+
this.videoParser.parsePES(videoTrack, textTrack, pes, true);
|
15884
15887
|
videoTrack.pesData = null;
|
15885
15888
|
}
|
15886
15889
|
} else {
|
@@ -15942,7 +15945,13 @@ class TSDemuxer {
|
|
15942
15945
|
});
|
15943
15946
|
}
|
15944
15947
|
destroy() {
|
15945
|
-
this.
|
15948
|
+
if (this.observer) {
|
15949
|
+
this.observer.removeAllListeners();
|
15950
|
+
}
|
15951
|
+
// @ts-ignore
|
15952
|
+
this.config = this.logger = this.observer = null;
|
15953
|
+
this.aacOverFlow = this.videoParser = this.remainderData = this.sampleAes = null;
|
15954
|
+
this._videoTrack = this._audioTrack = this._id3Track = this._txtTrack = undefined;
|
15946
15955
|
}
|
15947
15956
|
parseAACPES(track, pes) {
|
15948
15957
|
let startOffset = 0;
|