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.js
CHANGED
@@ -494,7 +494,7 @@
|
|
494
494
|
// Some browsers don't allow to use bind on console object anyway
|
495
495
|
// fallback to default if needed
|
496
496
|
try {
|
497
|
-
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.14-0.canary.
|
497
|
+
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.14-0.canary.10524");
|
498
498
|
} catch (e) {
|
499
499
|
/* log fn threw an exception. All logger methods are no-ops. */
|
500
500
|
return createLogger();
|
@@ -14433,7 +14433,11 @@
|
|
14433
14433
|
textTrack: dummyTrack()
|
14434
14434
|
};
|
14435
14435
|
};
|
14436
|
-
_proto.destroy = function destroy() {
|
14436
|
+
_proto.destroy = function destroy() {
|
14437
|
+
this.cachedData = null;
|
14438
|
+
// @ts-ignore
|
14439
|
+
this._audioTrack = this._id3Track = undefined;
|
14440
|
+
};
|
14437
14441
|
return BaseAudioDemuxer;
|
14438
14442
|
}();
|
14439
14443
|
/**
|
@@ -15034,7 +15038,12 @@
|
|
15034
15038
|
_proto.demuxSampleAes = function demuxSampleAes(data, keyData, timeOffset) {
|
15035
15039
|
return Promise.reject(new Error('The MP4 demuxer does not support SAMPLE-AES decryption'));
|
15036
15040
|
};
|
15037
|
-
_proto.destroy = function destroy() {
|
15041
|
+
_proto.destroy = function destroy() {
|
15042
|
+
// @ts-ignore
|
15043
|
+
this.config = null;
|
15044
|
+
this.remainderData = null;
|
15045
|
+
this.videoTrack = this.audioTrack = this.id3Track = this.txtTrack = undefined;
|
15046
|
+
};
|
15038
15047
|
return MP4Demuxer;
|
15039
15048
|
}();
|
15040
15049
|
|
@@ -15065,14 +15074,13 @@
|
|
15065
15074
|
this.VideoSample = null;
|
15066
15075
|
}
|
15067
15076
|
var _proto = BaseVideoParser.prototype;
|
15068
|
-
_proto.createVideoSample = function createVideoSample(key, pts, dts
|
15077
|
+
_proto.createVideoSample = function createVideoSample(key, pts, dts) {
|
15069
15078
|
return {
|
15070
15079
|
key: key,
|
15071
15080
|
frame: false,
|
15072
15081
|
pts: pts,
|
15073
15082
|
dts: dts,
|
15074
15083
|
units: [],
|
15075
|
-
debug: debug,
|
15076
15084
|
length: 0
|
15077
15085
|
};
|
15078
15086
|
};
|
@@ -15108,9 +15116,6 @@
|
|
15108
15116
|
}
|
15109
15117
|
videoTrack.samples.push(VideoSample);
|
15110
15118
|
}
|
15111
|
-
if (VideoSample.debug.length) {
|
15112
|
-
logger.log(VideoSample.pts + '/' + VideoSample.dts + ':' + VideoSample.debug);
|
15113
|
-
}
|
15114
15119
|
};
|
15115
15120
|
_proto.parseNALu = function parseNALu(track, array, endOfSegment) {
|
15116
15121
|
var len = array.byteLength;
|
@@ -15380,7 +15385,7 @@
|
|
15380
15385
|
}
|
15381
15386
|
_inheritsLoose(AvcVideoParser, _BaseVideoParser);
|
15382
15387
|
var _proto = AvcVideoParser.prototype;
|
15383
|
-
_proto.parsePES = function parsePES(track, textTrack, pes, endOfSegment
|
15388
|
+
_proto.parsePES = function parsePES(track, textTrack, pes, endOfSegment) {
|
15384
15389
|
var _this = this;
|
15385
15390
|
var units = this.parseNALu(track, pes.data, endOfSegment);
|
15386
15391
|
var VideoSample = this.VideoSample;
|
@@ -15393,10 +15398,10 @@
|
|
15393
15398
|
// this helps parsing streams with missing AUD (only do this if AUD never found)
|
15394
15399
|
if (VideoSample && units.length && !track.audFound) {
|
15395
15400
|
this.pushAccessUnit(VideoSample, track);
|
15396
|
-
VideoSample = this.VideoSample = this.createVideoSample(false, pes.pts, pes.dts
|
15401
|
+
VideoSample = this.VideoSample = this.createVideoSample(false, pes.pts, pes.dts);
|
15397
15402
|
}
|
15398
15403
|
units.forEach(function (unit) {
|
15399
|
-
var _VideoSample2;
|
15404
|
+
var _VideoSample2, _VideoSample3;
|
15400
15405
|
switch (unit.type) {
|
15401
15406
|
// NDR
|
15402
15407
|
case 1:
|
@@ -15426,7 +15431,7 @@
|
|
15426
15431
|
}
|
15427
15432
|
}
|
15428
15433
|
if (!VideoSample) {
|
15429
|
-
VideoSample = _this.VideoSample = _this.createVideoSample(true, pes.pts, pes.dts
|
15434
|
+
VideoSample = _this.VideoSample = _this.createVideoSample(true, pes.pts, pes.dts);
|
15430
15435
|
}
|
15431
15436
|
VideoSample.frame = true;
|
15432
15437
|
VideoSample.key = iskey;
|
@@ -15442,7 +15447,7 @@
|
|
15442
15447
|
VideoSample = _this.VideoSample = null;
|
15443
15448
|
}
|
15444
15449
|
if (!VideoSample) {
|
15445
|
-
VideoSample = _this.VideoSample = _this.createVideoSample(true, pes.pts, pes.dts
|
15450
|
+
VideoSample = _this.VideoSample = _this.createVideoSample(true, pes.pts, pes.dts);
|
15446
15451
|
}
|
15447
15452
|
VideoSample.key = true;
|
15448
15453
|
VideoSample.frame = true;
|
@@ -15467,7 +15472,6 @@
|
|
15467
15472
|
track.height = config.height;
|
15468
15473
|
track.pixelRatio = config.pixelRatio;
|
15469
15474
|
track.sps = [sps];
|
15470
|
-
track.duration = duration;
|
15471
15475
|
var codecarray = sps.subarray(1, 4);
|
15472
15476
|
var codecstring = 'avc1.';
|
15473
15477
|
for (var i = 0; i < 3; i++) {
|
@@ -15490,10 +15494,13 @@
|
|
15490
15494
|
case 9:
|
15491
15495
|
push = true;
|
15492
15496
|
track.audFound = true;
|
15493
|
-
if (VideoSample) {
|
15497
|
+
if ((_VideoSample3 = VideoSample) != null && _VideoSample3.frame) {
|
15494
15498
|
_this.pushAccessUnit(VideoSample, track);
|
15499
|
+
VideoSample = null;
|
15500
|
+
}
|
15501
|
+
if (!VideoSample) {
|
15502
|
+
VideoSample = _this.VideoSample = _this.createVideoSample(false, pes.pts, pes.dts);
|
15495
15503
|
}
|
15496
|
-
VideoSample = _this.VideoSample = _this.createVideoSample(false, pes.pts, pes.dts, '');
|
15497
15504
|
break;
|
15498
15505
|
// Filler Data
|
15499
15506
|
case 12:
|
@@ -15501,9 +15508,6 @@
|
|
15501
15508
|
break;
|
15502
15509
|
default:
|
15503
15510
|
push = false;
|
15504
|
-
if (VideoSample) {
|
15505
|
-
VideoSample.debug += 'unknown NAL ' + unit.type + ' ';
|
15506
|
-
}
|
15507
15511
|
break;
|
15508
15512
|
}
|
15509
15513
|
if (VideoSample && push) {
|
@@ -15830,7 +15834,6 @@
|
|
15830
15834
|
this.pmtParsed = false;
|
15831
15835
|
this.audioCodec = void 0;
|
15832
15836
|
this.videoCodec = void 0;
|
15833
|
-
this._duration = 0;
|
15834
15837
|
this._pmtId = -1;
|
15835
15838
|
this._videoTrack = void 0;
|
15836
15839
|
this._audioTrack = void 0;
|
@@ -15916,6 +15919,7 @@
|
|
15916
15919
|
this.pmtParsed = false;
|
15917
15920
|
this._pmtId = -1;
|
15918
15921
|
this._videoTrack = TSDemuxer.createTrack('video');
|
15922
|
+
this._videoTrack.duration = trackDuration;
|
15919
15923
|
this._audioTrack = TSDemuxer.createTrack('audio', trackDuration);
|
15920
15924
|
this._id3Track = TSDemuxer.createTrack('id3');
|
15921
15925
|
this._txtTrack = TSDemuxer.createTrack('text');
|
@@ -15926,7 +15930,6 @@
|
|
15926
15930
|
this.remainderData = null;
|
15927
15931
|
this.audioCodec = audioCodec;
|
15928
15932
|
this.videoCodec = videoCodec;
|
15929
|
-
this._duration = trackDuration;
|
15930
15933
|
};
|
15931
15934
|
_proto.resetTimeStamp = function resetTimeStamp() {};
|
15932
15935
|
_proto.resetContiguity = function resetContiguity() {
|
@@ -16021,7 +16024,7 @@
|
|
16021
16024
|
}
|
16022
16025
|
}
|
16023
16026
|
if (this.videoParser !== null) {
|
16024
|
-
this.videoParser.parsePES(videoTrack, textTrack, pes, false
|
16027
|
+
this.videoParser.parsePES(videoTrack, textTrack, pes, false);
|
16025
16028
|
}
|
16026
16029
|
}
|
16027
16030
|
videoData = {
|
@@ -16181,7 +16184,7 @@
|
|
16181
16184
|
}
|
16182
16185
|
}
|
16183
16186
|
if (this.videoParser !== null) {
|
16184
|
-
this.videoParser.parsePES(videoTrack, textTrack, pes, true
|
16187
|
+
this.videoParser.parsePES(videoTrack, textTrack, pes, true);
|
16185
16188
|
videoTrack.pesData = null;
|
16186
16189
|
}
|
16187
16190
|
} else {
|
@@ -16241,7 +16244,13 @@
|
|
16241
16244
|
});
|
16242
16245
|
};
|
16243
16246
|
_proto.destroy = function destroy() {
|
16244
|
-
this.
|
16247
|
+
if (this.observer) {
|
16248
|
+
this.observer.removeAllListeners();
|
16249
|
+
}
|
16250
|
+
// @ts-ignore
|
16251
|
+
this.config = this.logger = this.observer = null;
|
16252
|
+
this.aacOverFlow = this.videoParser = this.remainderData = this.sampleAes = null;
|
16253
|
+
this._videoTrack = this._audioTrack = this._id3Track = this._txtTrack = undefined;
|
16245
16254
|
};
|
16246
16255
|
_proto.parseAACPES = function parseAACPES(track, pes) {
|
16247
16256
|
var startOffset = 0;
|
@@ -19336,7 +19345,7 @@
|
|
19336
19345
|
return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
|
19337
19346
|
}
|
19338
19347
|
|
19339
|
-
var version = "1.5.14-0.canary.
|
19348
|
+
var version = "1.5.14-0.canary.10524";
|
19340
19349
|
|
19341
19350
|
// ensure the worker ends up in the bundle
|
19342
19351
|
// If the worker should not be included this gets aliased to empty.js
|