hls.js 1.6.0-beta.3.0.canary.10979 → 1.6.0-beta.3.0.canary.10980
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 +42 -39
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +35 -16
- 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 +33 -16
- 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 +40 -37
- package/dist/hls.mjs.map +1 -1
- package/dist/hls.worker.js +1 -1
- package/package.json +1 -1
- package/src/config.ts +2 -1
- package/src/controller/abr-controller.ts +4 -3
- package/src/controller/buffer-controller.ts +5 -4
- package/src/controller/content-steering-controller.ts +3 -2
- package/src/controller/eme-controller.ts +3 -2
- package/src/controller/gap-controller.ts +2 -1
- package/src/controller/id3-track-controller.ts +2 -1
- package/src/controller/level-controller.ts +2 -1
- package/src/demux/transmuxer-interface.ts +3 -2
- package/src/utils/cea-608-parser.ts +4 -9
- package/src/utils/level-helper.ts +2 -1
- package/src/utils/rendition-helper.ts +2 -3
- package/src/utils/safe-json-stringify.ts +10 -3
package/dist/hls.js
CHANGED
@@ -1059,7 +1059,7 @@
|
|
1059
1059
|
// Some browsers don't allow to use bind on console object anyway
|
1060
1060
|
// fallback to default if needed
|
1061
1061
|
try {
|
1062
|
-
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.3.0.canary.
|
1062
|
+
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.3.0.canary.10980");
|
1063
1063
|
} catch (e) {
|
1064
1064
|
/* log fn threw an exception. All logger methods are no-ops. */
|
1065
1065
|
return createLogger();
|
@@ -1728,6 +1728,25 @@
|
|
1728
1728
|
};
|
1729
1729
|
}
|
1730
1730
|
|
1731
|
+
var omitCircularRefsReplacer = function omitCircularRefsReplacer(replacer) {
|
1732
|
+
var known = new WeakSet();
|
1733
|
+
return function (_, value) {
|
1734
|
+
if (replacer) {
|
1735
|
+
value = replacer(_, value);
|
1736
|
+
}
|
1737
|
+
if (typeof value === 'object' && value !== null) {
|
1738
|
+
if (known.has(value)) {
|
1739
|
+
return;
|
1740
|
+
}
|
1741
|
+
known.add(value);
|
1742
|
+
}
|
1743
|
+
return value;
|
1744
|
+
};
|
1745
|
+
};
|
1746
|
+
var stringify = function stringify(object, replacer) {
|
1747
|
+
return JSON.stringify(object, omitCircularRefsReplacer(replacer));
|
1748
|
+
};
|
1749
|
+
|
1731
1750
|
function getStartCodecTier(codecTiers, currentVideoRange, currentBw, audioPreference, videoPreference) {
|
1732
1751
|
var codecSets = Object.keys(codecTiers);
|
1733
1752
|
var channelsPreference = audioPreference == null ? void 0 : audioPreference.channels;
|
@@ -1815,7 +1834,7 @@
|
|
1815
1834
|
if (!videoRanges.some(function (range) {
|
1816
1835
|
return candidateTier.videoRanges[range] > 0;
|
1817
1836
|
})) {
|
1818
|
-
logStartCodecCandidateIgnored(candidate, "no variants with VIDEO-RANGE of " +
|
1837
|
+
logStartCodecCandidateIgnored(candidate, "no variants with VIDEO-RANGE of " + stringify(videoRanges) + " found");
|
1819
1838
|
return selected;
|
1820
1839
|
}
|
1821
1840
|
if (videoCodecPreference && candidate.indexOf(videoCodecPreference.substring(0, 4)) % 5 !== 0) {
|
@@ -2535,7 +2554,7 @@
|
|
2535
2554
|
currentVideoRange = preferHDR ? videoRanges[videoRanges.length - 1] : videoRanges[0];
|
2536
2555
|
currentFrameRate = minFramerate;
|
2537
2556
|
currentBw = Math.max(currentBw, minBitrate);
|
2538
|
-
this.log("picked start tier " +
|
2557
|
+
this.log("picked start tier " + stringify(startTier));
|
2539
2558
|
} else {
|
2540
2559
|
currentCodecSet = level == null ? void 0 : level.codecSet;
|
2541
2560
|
currentVideoRange = level == null ? void 0 : level.videoRange;
|
@@ -2564,9 +2583,9 @@
|
|
2564
2583
|
var levels = _this3.hls.levels;
|
2565
2584
|
var index = levels.indexOf(levelInfo);
|
2566
2585
|
if (decodingInfo.error) {
|
2567
|
-
_this3.warn("MediaCapabilities decodingInfo error: \"" + decodingInfo.error + "\" for level " + index + " " +
|
2586
|
+
_this3.warn("MediaCapabilities decodingInfo error: \"" + decodingInfo.error + "\" for level " + index + " " + stringify(decodingInfo));
|
2568
2587
|
} else if (!decodingInfo.supported) {
|
2569
|
-
_this3.warn("Unsupported MediaCapabilities decodingInfo result for level " + index + " " +
|
2588
|
+
_this3.warn("Unsupported MediaCapabilities decodingInfo result for level " + index + " " + stringify(decodingInfo));
|
2570
2589
|
if (index > -1 && levels.length > 1) {
|
2571
2590
|
_this3.log("Removing unsupported level " + index);
|
2572
2591
|
_this3.hls.removeLevel(index);
|
@@ -8500,7 +8519,7 @@
|
|
8500
8519
|
dateRange.tagOrder += mergeCount;
|
8501
8520
|
}
|
8502
8521
|
} else {
|
8503
|
-
logger.warn("Ignoring invalid Playlist Delta Update DATERANGE tag: \"" +
|
8522
|
+
logger.warn("Ignoring invalid Playlist Delta Update DATERANGE tag: \"" + stringify(deltaDateRanges[id].attr) + "\"");
|
8504
8523
|
}
|
8505
8524
|
});
|
8506
8525
|
}
|
@@ -16361,7 +16380,7 @@
|
|
16361
16380
|
return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
|
16362
16381
|
}
|
16363
16382
|
|
16364
|
-
var version = "1.6.0-beta.3.0.canary.
|
16383
|
+
var version = "1.6.0-beta.3.0.canary.10980";
|
16365
16384
|
|
16366
16385
|
// ensure the worker ends up in the bundle
|
16367
16386
|
// If the worker should not be included this gets aliased to empty.js
|
@@ -16542,7 +16561,7 @@
|
|
16542
16561
|
cmd: 'init',
|
16543
16562
|
typeSupported: m2tsTypeSupported,
|
16544
16563
|
id: id,
|
16545
|
-
config:
|
16564
|
+
config: stringify(config)
|
16546
16565
|
});
|
16547
16566
|
} catch (err) {
|
16548
16567
|
logger.warn("Error setting up \"" + id + "\" Web Worker, fallback to inline", err);
|
@@ -16570,7 +16589,7 @@
|
|
16570
16589
|
resetNo: instanceNo,
|
16571
16590
|
typeSupported: m2tsTypeSupported,
|
16572
16591
|
id: this.id,
|
16573
|
-
config:
|
16592
|
+
config: stringify(config)
|
16574
16593
|
});
|
16575
16594
|
}
|
16576
16595
|
};
|
@@ -18581,9 +18600,9 @@
|
|
18581
18600
|
this.log("attachTransferred: waiting for SourceBuffer track info");
|
18582
18601
|
return;
|
18583
18602
|
}
|
18584
|
-
this.log("attachTransferred: (bufferCodecEventsTotal " + this.bufferCodecEventsTotal + ")\nrequired tracks: " +
|
18603
|
+
this.log("attachTransferred: (bufferCodecEventsTotal " + this.bufferCodecEventsTotal + ")\nrequired tracks: " + stringify(requiredTracks, function (key, value) {
|
18585
18604
|
return key === 'initSegment' ? undefined : value;
|
18586
|
-
}) + ";\ntransfer tracks: " +
|
18605
|
+
}) + ";\ntransfer tracks: " + stringify(transferredTracks, function (key, value) {
|
18587
18606
|
return key === 'initSegment' ? undefined : value;
|
18588
18607
|
}) + "}");
|
18589
18608
|
if (!isCompatibleTrackChange(transferredTracks, requiredTracks)) {
|
@@ -19374,7 +19393,7 @@
|
|
19374
19393
|
var bufferCodecEventsTotal = this.bufferCodecEventsTotal,
|
19375
19394
|
pendingTrackCount = this.pendingTrackCount,
|
19376
19395
|
tracks = this.tracks;
|
19377
|
-
this.log("checkPendingTracks (pending: " + pendingTrackCount + " codec events expected: " + bufferCodecEventsTotal + ") " +
|
19396
|
+
this.log("checkPendingTracks (pending: " + pendingTrackCount + " codec events expected: " + bufferCodecEventsTotal + ") " + stringify(tracks));
|
19378
19397
|
// Check if we've received all of the expected bufferCodec events. When none remain, create all the sourceBuffers at once.
|
19379
19398
|
// This is important because the MSE spec allows implementations to throw QuotaExceededErrors if creating new sourceBuffers after
|
19380
19399
|
// data has been appended to existing ones.
|
@@ -19443,7 +19462,7 @@
|
|
19443
19462
|
var codec = this.getTrackCodec(track, type);
|
19444
19463
|
var mimeType = track.container + ";codecs=" + codec;
|
19445
19464
|
track.codec = codec;
|
19446
|
-
this.log("creating sourceBuffer(" + mimeType + ")" + (this.currentOp(type) ? ' Queued' : '') + " " +
|
19465
|
+
this.log("creating sourceBuffer(" + mimeType + ")" + (this.currentOp(type) ? ' Queued' : '') + " " + stringify(track));
|
19447
19466
|
try {
|
19448
19467
|
var sb = mediaSource.addSourceBuffer(mimeType);
|
19449
19468
|
var sbIndex = sourceBufferNameToIndex(type);
|
@@ -21476,7 +21495,7 @@
|
|
21476
21495
|
errorAction.resolved = this.pathwayId !== errorPathway;
|
21477
21496
|
}
|
21478
21497
|
if (!errorAction.resolved) {
|
21479
|
-
this.warn("Could not resolve " + data.details + " (\"" + data.error.message + "\") with content-steering for Pathway: " + errorPathway + " levels: " + (levels ? levels.length : levels) + " priorities: " +
|
21498
|
+
this.warn("Could not resolve " + data.details + " (\"" + data.error.message + "\") with content-steering for Pathway: " + errorPathway + " levels: " + (levels ? levels.length : levels) + " priorities: " + stringify(pathwayPriority) + " penalized: " + stringify(this.penalizedPathways));
|
21480
21499
|
}
|
21481
21500
|
}
|
21482
21501
|
};
|
@@ -22075,7 +22094,7 @@
|
|
22075
22094
|
var keySystemAccessPromises = this.keySystemAccessPromises[keySystem];
|
22076
22095
|
var keySystemAccess = keySystemAccessPromises == null ? void 0 : keySystemAccessPromises.keySystemAccess;
|
22077
22096
|
if (!keySystemAccess) {
|
22078
|
-
this.log("Requesting encrypted media \"" + keySystem + "\" key-system access with config: " +
|
22097
|
+
this.log("Requesting encrypted media \"" + keySystem + "\" key-system access with config: " + stringify(mediaKeySystemConfigs));
|
22079
22098
|
keySystemAccess = this.requestMediaKeySystemAccess(keySystem, mediaKeySystemConfigs);
|
22080
22099
|
var _keySystemAccessPromises = this.keySystemAccessPromises[keySystem] = {
|
22081
22100
|
keySystemAccess: keySystemAccess
|
@@ -22248,7 +22267,7 @@
|
|
22248
22267
|
type: ErrorTypes.KEY_SYSTEM_ERROR,
|
22249
22268
|
details: ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE,
|
22250
22269
|
fatal: true
|
22251
|
-
}, "Missing key-system license configuration options " +
|
22270
|
+
}, "Missing key-system license configuration options " + stringify({
|
22252
22271
|
drmSystems: this.config.drmSystems
|
22253
22272
|
}));
|
22254
22273
|
}
|
@@ -23904,22 +23923,6 @@
|
|
23904
23923
|
el.removeEventListener(type, listener);
|
23905
23924
|
}
|
23906
23925
|
|
23907
|
-
var replacer = function replacer() {
|
23908
|
-
var known = new WeakSet();
|
23909
|
-
return function (_, value) {
|
23910
|
-
if (typeof value === 'object' && value !== null) {
|
23911
|
-
if (known.has(value)) {
|
23912
|
-
return;
|
23913
|
-
}
|
23914
|
-
known.add(value);
|
23915
|
-
}
|
23916
|
-
return value;
|
23917
|
-
};
|
23918
|
-
};
|
23919
|
-
var stringify = function stringify(object) {
|
23920
|
-
return JSON.stringify(object, replacer());
|
23921
|
-
};
|
23922
|
-
|
23923
23926
|
function playWithCatch(media) {
|
23924
23927
|
media == null ? void 0 : media.play().catch(function () {
|
23925
23928
|
/* no-op */
|
@@ -27322,7 +27325,7 @@
|
|
27322
27325
|
};
|
27323
27326
|
_proto5.setPAC = function setPAC(pacData) {
|
27324
27327
|
this.logger.log(2, function () {
|
27325
|
-
return 'pacData = ' +
|
27328
|
+
return 'pacData = ' + stringify(pacData);
|
27326
27329
|
});
|
27327
27330
|
var newRow = pacData.row - 1;
|
27328
27331
|
if (this.nrRollUpRows && newRow < this.nrRollUpRows - 1) {
|
@@ -27375,7 +27378,7 @@
|
|
27375
27378
|
*/;
|
27376
27379
|
_proto5.setBkgData = function setBkgData(bkgData) {
|
27377
27380
|
this.logger.log(2, function () {
|
27378
|
-
return 'bkgData = ' +
|
27381
|
+
return 'bkgData = ' + stringify(bkgData);
|
27379
27382
|
});
|
27380
27383
|
this.backSpace();
|
27381
27384
|
this.setPen(bkgData);
|
@@ -27630,7 +27633,7 @@
|
|
27630
27633
|
} else {
|
27631
27634
|
styles.foreground = 'white';
|
27632
27635
|
}
|
27633
|
-
this.logger.log(2, 'MIDROW: ' +
|
27636
|
+
this.logger.log(2, 'MIDROW: ' + stringify(styles));
|
27634
27637
|
this.writeScreen.setPen(styles);
|
27635
27638
|
};
|
27636
27639
|
_proto6.outputDataUpdate = function outputDataUpdate(dispatch) {
|
@@ -30663,7 +30666,7 @@
|
|
30663
30666
|
}
|
30664
30667
|
});
|
30665
30668
|
if (report.length) {
|
30666
|
-
logger.warn("hls.js config: \"" + report.join('", "') + "\" setting(s) are deprecated, use \"" + policyName + "\": " +
|
30669
|
+
logger.warn("hls.js config: \"" + report.join('", "') + "\" setting(s) are deprecated, use \"" + policyName + "\": " + stringify(userConfig[policyName]));
|
30667
30670
|
}
|
30668
30671
|
});
|
30669
30672
|
return _objectSpread2(_objectSpread2({}, defaultsCopy), userConfig);
|
@@ -31066,7 +31069,7 @@
|
|
31066
31069
|
if (!stallReported && stalled !== null && media && hls) {
|
31067
31070
|
// Report stalled error once
|
31068
31071
|
this.stallReported = true;
|
31069
|
-
var error = new Error("Playback stalling at @" + media.currentTime + " due to low buffer (" +
|
31072
|
+
var error = new Error("Playback stalling at @" + media.currentTime + " due to low buffer (" + stringify(bufferInfo) + ")");
|
31070
31073
|
this.warn(error.message);
|
31071
31074
|
hls.trigger(Events.ERROR, {
|
31072
31075
|
type: ErrorTypes.MEDIA_ERROR,
|
@@ -31254,7 +31257,7 @@
|
|
31254
31257
|
cue.type = type;
|
31255
31258
|
}
|
31256
31259
|
} catch (e) {
|
31257
|
-
cue = new Cue(startTime, endTime,
|
31260
|
+
cue = new Cue(startTime, endTime, stringify(type ? _objectSpread2({
|
31258
31261
|
type: type
|
31259
31262
|
}, data) : data));
|
31260
31263
|
}
|
@@ -32000,7 +32003,7 @@
|
|
32000
32003
|
Promise.resolve().then(function () {
|
32001
32004
|
if (_this3.hls) {
|
32002
32005
|
if (data.levels.length) {
|
32003
|
-
_this3.warn("One or more CODECS in variant not supported: " +
|
32006
|
+
_this3.warn("One or more CODECS in variant not supported: " + stringify(data.levels[0].attrs));
|
32004
32007
|
}
|
32005
32008
|
var error = new Error('no level with compatible codecs found in manifest');
|
32006
32009
|
_this3.hls.trigger(Events.ERROR, {
|