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.js
CHANGED
@@ -523,7 +523,7 @@
|
|
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.5.14-0.canary.
|
526
|
+
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.14-0.canary.10524");
|
527
527
|
} catch (e) {
|
528
528
|
/* log fn threw an exception. All logger methods are no-ops. */
|
529
529
|
return createLogger();
|
@@ -11621,7 +11621,11 @@
|
|
11621
11621
|
textTrack: dummyTrack()
|
11622
11622
|
};
|
11623
11623
|
};
|
11624
|
-
_proto.destroy = function destroy() {
|
11624
|
+
_proto.destroy = function destroy() {
|
11625
|
+
this.cachedData = null;
|
11626
|
+
// @ts-ignore
|
11627
|
+
this._audioTrack = this._id3Track = undefined;
|
11628
|
+
};
|
11625
11629
|
return BaseAudioDemuxer;
|
11626
11630
|
}();
|
11627
11631
|
/**
|
@@ -12222,7 +12226,12 @@
|
|
12222
12226
|
_proto.demuxSampleAes = function demuxSampleAes(data, keyData, timeOffset) {
|
12223
12227
|
return Promise.reject(new Error('The MP4 demuxer does not support SAMPLE-AES decryption'));
|
12224
12228
|
};
|
12225
|
-
_proto.destroy = function destroy() {
|
12229
|
+
_proto.destroy = function destroy() {
|
12230
|
+
// @ts-ignore
|
12231
|
+
this.config = null;
|
12232
|
+
this.remainderData = null;
|
12233
|
+
this.videoTrack = this.audioTrack = this.id3Track = this.txtTrack = undefined;
|
12234
|
+
};
|
12226
12235
|
return MP4Demuxer;
|
12227
12236
|
}();
|
12228
12237
|
|
@@ -12371,14 +12380,13 @@
|
|
12371
12380
|
this.VideoSample = null;
|
12372
12381
|
}
|
12373
12382
|
var _proto = BaseVideoParser.prototype;
|
12374
|
-
_proto.createVideoSample = function createVideoSample(key, pts, dts
|
12383
|
+
_proto.createVideoSample = function createVideoSample(key, pts, dts) {
|
12375
12384
|
return {
|
12376
12385
|
key: key,
|
12377
12386
|
frame: false,
|
12378
12387
|
pts: pts,
|
12379
12388
|
dts: dts,
|
12380
12389
|
units: [],
|
12381
|
-
debug: debug,
|
12382
12390
|
length: 0
|
12383
12391
|
};
|
12384
12392
|
};
|
@@ -12414,9 +12422,6 @@
|
|
12414
12422
|
}
|
12415
12423
|
videoTrack.samples.push(VideoSample);
|
12416
12424
|
}
|
12417
|
-
if (VideoSample.debug.length) {
|
12418
|
-
logger.log(VideoSample.pts + '/' + VideoSample.dts + ':' + VideoSample.debug);
|
12419
|
-
}
|
12420
12425
|
};
|
12421
12426
|
_proto.parseNALu = function parseNALu(track, array, endOfSegment) {
|
12422
12427
|
var len = array.byteLength;
|
@@ -12686,7 +12691,7 @@
|
|
12686
12691
|
}
|
12687
12692
|
_inheritsLoose(AvcVideoParser, _BaseVideoParser);
|
12688
12693
|
var _proto = AvcVideoParser.prototype;
|
12689
|
-
_proto.parsePES = function parsePES(track, textTrack, pes, endOfSegment
|
12694
|
+
_proto.parsePES = function parsePES(track, textTrack, pes, endOfSegment) {
|
12690
12695
|
var _this = this;
|
12691
12696
|
var units = this.parseNALu(track, pes.data, endOfSegment);
|
12692
12697
|
var VideoSample = this.VideoSample;
|
@@ -12699,10 +12704,10 @@
|
|
12699
12704
|
// this helps parsing streams with missing AUD (only do this if AUD never found)
|
12700
12705
|
if (VideoSample && units.length && !track.audFound) {
|
12701
12706
|
this.pushAccessUnit(VideoSample, track);
|
12702
|
-
VideoSample = this.VideoSample = this.createVideoSample(false, pes.pts, pes.dts
|
12707
|
+
VideoSample = this.VideoSample = this.createVideoSample(false, pes.pts, pes.dts);
|
12703
12708
|
}
|
12704
12709
|
units.forEach(function (unit) {
|
12705
|
-
var _VideoSample2;
|
12710
|
+
var _VideoSample2, _VideoSample3;
|
12706
12711
|
switch (unit.type) {
|
12707
12712
|
// NDR
|
12708
12713
|
case 1:
|
@@ -12732,7 +12737,7 @@
|
|
12732
12737
|
}
|
12733
12738
|
}
|
12734
12739
|
if (!VideoSample) {
|
12735
|
-
VideoSample = _this.VideoSample = _this.createVideoSample(true, pes.pts, pes.dts
|
12740
|
+
VideoSample = _this.VideoSample = _this.createVideoSample(true, pes.pts, pes.dts);
|
12736
12741
|
}
|
12737
12742
|
VideoSample.frame = true;
|
12738
12743
|
VideoSample.key = iskey;
|
@@ -12748,7 +12753,7 @@
|
|
12748
12753
|
VideoSample = _this.VideoSample = null;
|
12749
12754
|
}
|
12750
12755
|
if (!VideoSample) {
|
12751
|
-
VideoSample = _this.VideoSample = _this.createVideoSample(true, pes.pts, pes.dts
|
12756
|
+
VideoSample = _this.VideoSample = _this.createVideoSample(true, pes.pts, pes.dts);
|
12752
12757
|
}
|
12753
12758
|
VideoSample.key = true;
|
12754
12759
|
VideoSample.frame = true;
|
@@ -12773,7 +12778,6 @@
|
|
12773
12778
|
track.height = config.height;
|
12774
12779
|
track.pixelRatio = config.pixelRatio;
|
12775
12780
|
track.sps = [sps];
|
12776
|
-
track.duration = duration;
|
12777
12781
|
var codecarray = sps.subarray(1, 4);
|
12778
12782
|
var codecstring = 'avc1.';
|
12779
12783
|
for (var i = 0; i < 3; i++) {
|
@@ -12796,10 +12800,13 @@
|
|
12796
12800
|
case 9:
|
12797
12801
|
push = true;
|
12798
12802
|
track.audFound = true;
|
12799
|
-
if (VideoSample) {
|
12803
|
+
if ((_VideoSample3 = VideoSample) != null && _VideoSample3.frame) {
|
12800
12804
|
_this.pushAccessUnit(VideoSample, track);
|
12805
|
+
VideoSample = null;
|
12806
|
+
}
|
12807
|
+
if (!VideoSample) {
|
12808
|
+
VideoSample = _this.VideoSample = _this.createVideoSample(false, pes.pts, pes.dts);
|
12801
12809
|
}
|
12802
|
-
VideoSample = _this.VideoSample = _this.createVideoSample(false, pes.pts, pes.dts, '');
|
12803
12810
|
break;
|
12804
12811
|
// Filler Data
|
12805
12812
|
case 12:
|
@@ -12807,9 +12814,6 @@
|
|
12807
12814
|
break;
|
12808
12815
|
default:
|
12809
12816
|
push = false;
|
12810
|
-
if (VideoSample) {
|
12811
|
-
VideoSample.debug += 'unknown NAL ' + unit.type + ' ';
|
12812
|
-
}
|
12813
12817
|
break;
|
12814
12818
|
}
|
12815
12819
|
if (VideoSample && push) {
|
@@ -13025,7 +13029,7 @@
|
|
13025
13029
|
}
|
13026
13030
|
_inheritsLoose(HevcVideoParser, _BaseVideoParser);
|
13027
13031
|
var _proto = HevcVideoParser.prototype;
|
13028
|
-
_proto.parsePES = function parsePES(track, textTrack, pes, endOfSegment
|
13032
|
+
_proto.parsePES = function parsePES(track, textTrack, pes, endOfSegment) {
|
13029
13033
|
var _this2 = this;
|
13030
13034
|
var units = this.parseNALu(track, pes.data, endOfSegment);
|
13031
13035
|
var VideoSample = this.VideoSample;
|
@@ -13038,10 +13042,10 @@
|
|
13038
13042
|
// this helps parsing streams with missing AUD (only do this if AUD never found)
|
13039
13043
|
if (VideoSample && units.length && !track.audFound) {
|
13040
13044
|
this.pushAccessUnit(VideoSample, track);
|
13041
|
-
VideoSample = this.VideoSample = this.createVideoSample(false, pes.pts, pes.dts
|
13045
|
+
VideoSample = this.VideoSample = this.createVideoSample(false, pes.pts, pes.dts);
|
13042
13046
|
}
|
13043
13047
|
units.forEach(function (unit) {
|
13044
|
-
var _VideoSample2;
|
13048
|
+
var _VideoSample2, _VideoSample3;
|
13045
13049
|
switch (unit.type) {
|
13046
13050
|
// NON-IDR, NON RANDOM ACCESS SLICE
|
13047
13051
|
case 0:
|
@@ -13055,7 +13059,7 @@
|
|
13055
13059
|
case 8:
|
13056
13060
|
case 9:
|
13057
13061
|
if (!VideoSample) {
|
13058
|
-
VideoSample = _this2.VideoSample = _this2.createVideoSample(false, pes.pts, pes.dts
|
13062
|
+
VideoSample = _this2.VideoSample = _this2.createVideoSample(false, pes.pts, pes.dts);
|
13059
13063
|
}
|
13060
13064
|
VideoSample.frame = true;
|
13061
13065
|
push = true;
|
@@ -13077,7 +13081,7 @@
|
|
13077
13081
|
}
|
13078
13082
|
}
|
13079
13083
|
if (!VideoSample) {
|
13080
|
-
VideoSample = _this2.VideoSample = _this2.createVideoSample(true, pes.pts, pes.dts
|
13084
|
+
VideoSample = _this2.VideoSample = _this2.createVideoSample(true, pes.pts, pes.dts);
|
13081
13085
|
}
|
13082
13086
|
VideoSample.key = true;
|
13083
13087
|
VideoSample.frame = true;
|
@@ -13094,7 +13098,7 @@
|
|
13094
13098
|
VideoSample = _this2.VideoSample = null;
|
13095
13099
|
}
|
13096
13100
|
if (!VideoSample) {
|
13097
|
-
VideoSample = _this2.VideoSample = _this2.createVideoSample(true, pes.pts, pes.dts
|
13101
|
+
VideoSample = _this2.VideoSample = _this2.createVideoSample(true, pes.pts, pes.dts);
|
13098
13102
|
}
|
13099
13103
|
VideoSample.key = true;
|
13100
13104
|
VideoSample.frame = true;
|
@@ -13133,7 +13137,6 @@
|
|
13133
13137
|
track.width = _config.width;
|
13134
13138
|
track.height = _config.height;
|
13135
13139
|
track.pixelRatio = _config.pixelRatio;
|
13136
|
-
track.duration = duration;
|
13137
13140
|
track.codec = _config.codecString;
|
13138
13141
|
track.sps = [];
|
13139
13142
|
for (var prop in _config.params) {
|
@@ -13145,7 +13148,7 @@
|
|
13145
13148
|
}
|
13146
13149
|
}
|
13147
13150
|
if (!VideoSample) {
|
13148
|
-
VideoSample = _this2.VideoSample = _this2.createVideoSample(true, pes.pts, pes.dts
|
13151
|
+
VideoSample = _this2.VideoSample = _this2.createVideoSample(true, pes.pts, pes.dts);
|
13149
13152
|
}
|
13150
13153
|
VideoSample.key = true;
|
13151
13154
|
break;
|
@@ -13171,16 +13174,16 @@
|
|
13171
13174
|
case 35:
|
13172
13175
|
push = true;
|
13173
13176
|
track.audFound = true;
|
13174
|
-
if (VideoSample) {
|
13177
|
+
if ((_VideoSample3 = VideoSample) != null && _VideoSample3.frame) {
|
13175
13178
|
_this2.pushAccessUnit(VideoSample, track);
|
13179
|
+
VideoSample = null;
|
13180
|
+
}
|
13181
|
+
if (!VideoSample) {
|
13182
|
+
VideoSample = _this2.VideoSample = _this2.createVideoSample(false, pes.pts, pes.dts);
|
13176
13183
|
}
|
13177
|
-
VideoSample = _this2.VideoSample = _this2.createVideoSample(false, pes.pts, pes.dts, '');
|
13178
13184
|
break;
|
13179
13185
|
default:
|
13180
13186
|
push = false;
|
13181
|
-
if (VideoSample) {
|
13182
|
-
VideoSample.debug += 'unknown or irrelevant NAL ' + unit.type + ' ';
|
13183
|
-
}
|
13184
13187
|
break;
|
13185
13188
|
}
|
13186
13189
|
if (VideoSample && push) {
|
@@ -13738,7 +13741,6 @@
|
|
13738
13741
|
this.pmtParsed = false;
|
13739
13742
|
this.audioCodec = void 0;
|
13740
13743
|
this.videoCodec = void 0;
|
13741
|
-
this._duration = 0;
|
13742
13744
|
this._pmtId = -1;
|
13743
13745
|
this._videoTrack = void 0;
|
13744
13746
|
this._audioTrack = void 0;
|
@@ -13824,6 +13826,7 @@
|
|
13824
13826
|
this.pmtParsed = false;
|
13825
13827
|
this._pmtId = -1;
|
13826
13828
|
this._videoTrack = TSDemuxer.createTrack('video');
|
13829
|
+
this._videoTrack.duration = trackDuration;
|
13827
13830
|
this._audioTrack = TSDemuxer.createTrack('audio', trackDuration);
|
13828
13831
|
this._id3Track = TSDemuxer.createTrack('id3');
|
13829
13832
|
this._txtTrack = TSDemuxer.createTrack('text');
|
@@ -13834,7 +13837,6 @@
|
|
13834
13837
|
this.remainderData = null;
|
13835
13838
|
this.audioCodec = audioCodec;
|
13836
13839
|
this.videoCodec = videoCodec;
|
13837
|
-
this._duration = trackDuration;
|
13838
13840
|
};
|
13839
13841
|
_proto.resetTimeStamp = function resetTimeStamp() {};
|
13840
13842
|
_proto.resetContiguity = function resetContiguity() {
|
@@ -13934,7 +13936,7 @@
|
|
13934
13936
|
}
|
13935
13937
|
}
|
13936
13938
|
if (this.videoParser !== null) {
|
13937
|
-
this.videoParser.parsePES(videoTrack, textTrack, pes, false
|
13939
|
+
this.videoParser.parsePES(videoTrack, textTrack, pes, false);
|
13938
13940
|
}
|
13939
13941
|
}
|
13940
13942
|
videoData = {
|
@@ -14104,7 +14106,7 @@
|
|
14104
14106
|
}
|
14105
14107
|
}
|
14106
14108
|
if (this.videoParser !== null) {
|
14107
|
-
this.videoParser.parsePES(videoTrack, textTrack, pes, true
|
14109
|
+
this.videoParser.parsePES(videoTrack, textTrack, pes, true);
|
14108
14110
|
videoTrack.pesData = null;
|
14109
14111
|
}
|
14110
14112
|
} else {
|
@@ -14169,7 +14171,13 @@
|
|
14169
14171
|
});
|
14170
14172
|
};
|
14171
14173
|
_proto.destroy = function destroy() {
|
14172
|
-
this.
|
14174
|
+
if (this.observer) {
|
14175
|
+
this.observer.removeAllListeners();
|
14176
|
+
}
|
14177
|
+
// @ts-ignore
|
14178
|
+
this.config = this.logger = this.observer = null;
|
14179
|
+
this.aacOverFlow = this.videoParser = this.remainderData = this.sampleAes = null;
|
14180
|
+
this._videoTrack = this._audioTrack = this._id3Track = this._txtTrack = undefined;
|
14173
14181
|
};
|
14174
14182
|
_proto.parseAACPES = function parseAACPES(track, pes) {
|
14175
14183
|
var startOffset = 0;
|
@@ -17317,7 +17325,7 @@
|
|
17317
17325
|
return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
|
17318
17326
|
}
|
17319
17327
|
|
17320
|
-
var version = "1.5.14-0.canary.
|
17328
|
+
var version = "1.5.14-0.canary.10524";
|
17321
17329
|
|
17322
17330
|
// ensure the worker ends up in the bundle
|
17323
17331
|
// If the worker should not be included this gets aliased to empty.js
|