hls.js 1.6.0-beta.2.0.canary.10880 → 1.6.0-beta.2.0.canary.10883
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-demo.js +16 -16
- package/dist/hls-demo.js.map +1 -1
- package/dist/hls.d.mts +21 -0
- package/dist/hls.d.ts +21 -0
- package/dist/hls.js +757 -712
- package/dist/hls.js.d.ts +21 -0
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +577 -532
- 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 +512 -469
- 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 +671 -628
- 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 +2 -2
- package/src/config.ts +2 -0
- package/src/controller/gap-controller.ts +92 -58
- package/src/controller/stream-controller.ts +13 -3
- package/src/events.ts +3 -0
- package/src/hls.ts +2 -1
- package/src/types/events.ts +3 -0
- package/src/utils/buffer-helper.ts +5 -8
package/dist/hls.light.js
CHANGED
@@ -15,20 +15,20 @@
|
|
15
15
|
function _defineProperties(e, r) {
|
16
16
|
for (var t = 0; t < r.length; t++) {
|
17
17
|
var o = r[t];
|
18
|
-
o.enumerable = o.enumerable ||
|
18
|
+
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
19
19
|
}
|
20
20
|
}
|
21
21
|
function _createClass(e, r, t) {
|
22
22
|
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
23
|
-
writable:
|
23
|
+
writable: false
|
24
24
|
}), e;
|
25
25
|
}
|
26
26
|
function _defineProperty(e, r, t) {
|
27
27
|
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
28
28
|
value: t,
|
29
|
-
enumerable:
|
30
|
-
configurable:
|
31
|
-
writable:
|
29
|
+
enumerable: true,
|
30
|
+
configurable: true,
|
31
|
+
writable: true
|
32
32
|
}) : e[r] = t, e;
|
33
33
|
}
|
34
34
|
function _extends() {
|
@@ -76,7 +76,7 @@
|
|
76
76
|
function _objectSpread2(e) {
|
77
77
|
for (var r = 1; r < arguments.length; r++) {
|
78
78
|
var t = null != arguments[r] ? arguments[r] : {};
|
79
|
-
r % 2 ? ownKeys(Object(t),
|
79
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
80
80
|
_defineProperty(e, r, t[r]);
|
81
81
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
82
82
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
@@ -92,7 +92,7 @@
|
|
92
92
|
function _toPrimitive(t, r) {
|
93
93
|
if ("object" != typeof t || !t) return t;
|
94
94
|
var e = t[Symbol.toPrimitive];
|
95
|
-
if (
|
95
|
+
if (undefined !== e) {
|
96
96
|
var i = e.call(t, r || "default");
|
97
97
|
if ("object" != typeof i) return i;
|
98
98
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
@@ -104,11 +104,11 @@
|
|
104
104
|
return "symbol" == typeof i ? i : i + "";
|
105
105
|
}
|
106
106
|
function _wrapNativeSuper(t) {
|
107
|
-
var r = "function" == typeof Map ? new Map() :
|
107
|
+
var r = "function" == typeof Map ? new Map() : undefined;
|
108
108
|
return _wrapNativeSuper = function (t) {
|
109
109
|
if (null === t || !_isNativeFunction(t)) return t;
|
110
110
|
if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
|
111
|
-
if (
|
111
|
+
if (undefined !== r) {
|
112
112
|
if (r.has(t)) return r.get(t);
|
113
113
|
r.set(t, Wrapper);
|
114
114
|
}
|
@@ -118,9 +118,9 @@
|
|
118
118
|
return Wrapper.prototype = Object.create(t.prototype, {
|
119
119
|
constructor: {
|
120
120
|
value: Wrapper,
|
121
|
-
enumerable:
|
122
|
-
writable:
|
123
|
-
configurable:
|
121
|
+
enumerable: false,
|
122
|
+
writable: true,
|
123
|
+
configurable: true
|
124
124
|
}
|
125
125
|
}), _setPrototypeOf(Wrapper, t);
|
126
126
|
}, _wrapNativeSuper(t);
|
@@ -756,6 +756,7 @@
|
|
756
756
|
Events["MEDIA_DETACHING"] = "hlsMediaDetaching";
|
757
757
|
Events["MEDIA_DETACHED"] = "hlsMediaDetached";
|
758
758
|
Events["MEDIA_ENDED"] = "hlsMediaEnded";
|
759
|
+
Events["STALL_RESOLVED"] = "hlsStallResolved";
|
759
760
|
Events["BUFFER_RESET"] = "hlsBufferReset";
|
760
761
|
Events["BUFFER_CODECS"] = "hlsBufferCodecs";
|
761
762
|
Events["BUFFER_CREATED"] = "hlsBufferCreated";
|
@@ -851,16 +852,16 @@
|
|
851
852
|
var EWMA = /*#__PURE__*/function () {
|
852
853
|
// About half of the estimated value will be from the last |halfLife| samples by weight.
|
853
854
|
function EWMA(halfLife, estimate, weight) {
|
854
|
-
if (estimate ===
|
855
|
+
if (estimate === undefined) {
|
855
856
|
estimate = 0;
|
856
857
|
}
|
857
|
-
if (weight ===
|
858
|
+
if (weight === undefined) {
|
858
859
|
weight = 0;
|
859
860
|
}
|
860
|
-
this.halfLife =
|
861
|
-
this.alpha_ =
|
862
|
-
this.estimate_ =
|
863
|
-
this.totalWeight_ =
|
861
|
+
this.halfLife = undefined;
|
862
|
+
this.alpha_ = undefined;
|
863
|
+
this.estimate_ = undefined;
|
864
|
+
this.totalWeight_ = undefined;
|
864
865
|
this.halfLife = halfLife;
|
865
866
|
// Larger values of alpha expire historical data more slowly.
|
866
867
|
this.alpha_ = halfLife ? Math.exp(Math.log(0.5) / halfLife) : 0;
|
@@ -890,16 +891,16 @@
|
|
890
891
|
|
891
892
|
var EwmaBandWidthEstimator = /*#__PURE__*/function () {
|
892
893
|
function EwmaBandWidthEstimator(slow, fast, defaultEstimate, defaultTTFB) {
|
893
|
-
if (defaultTTFB ===
|
894
|
+
if (defaultTTFB === undefined) {
|
894
895
|
defaultTTFB = 100;
|
895
896
|
}
|
896
|
-
this.defaultEstimate_ =
|
897
|
-
this.minWeight_ =
|
898
|
-
this.minDelayMs_ =
|
899
|
-
this.slow_ =
|
900
|
-
this.fast_ =
|
901
|
-
this.defaultTTFB_ =
|
902
|
-
this.ttfb_ =
|
897
|
+
this.defaultEstimate_ = undefined;
|
898
|
+
this.minWeight_ = undefined;
|
899
|
+
this.minDelayMs_ = undefined;
|
900
|
+
this.slow_ = undefined;
|
901
|
+
this.fast_ = undefined;
|
902
|
+
this.defaultTTFB_ = undefined;
|
903
|
+
this.ttfb_ = undefined;
|
903
904
|
this.defaultEstimate_ = defaultEstimate;
|
904
905
|
this.minWeight_ = 0.001;
|
905
906
|
this.minDelayMs_ = 50;
|
@@ -971,12 +972,12 @@
|
|
971
972
|
}();
|
972
973
|
|
973
974
|
var Logger = function Logger(label, logger) {
|
974
|
-
this.trace =
|
975
|
-
this.debug =
|
976
|
-
this.log =
|
977
|
-
this.warn =
|
978
|
-
this.info =
|
979
|
-
this.error =
|
975
|
+
this.trace = undefined;
|
976
|
+
this.debug = undefined;
|
977
|
+
this.log = undefined;
|
978
|
+
this.warn = undefined;
|
979
|
+
this.info = undefined;
|
980
|
+
this.error = undefined;
|
980
981
|
var lb = "[" + label + "]:";
|
981
982
|
this.trace = noop;
|
982
983
|
this.debug = logger.debug.bind(null, lb);
|
@@ -1029,7 +1030,7 @@
|
|
1029
1030
|
// Some browsers don't allow to use bind on console object anyway
|
1030
1031
|
// fallback to default if needed
|
1031
1032
|
try {
|
1032
|
-
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.2.0.canary.
|
1033
|
+
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.2.0.canary.10883");
|
1033
1034
|
} catch (e) {
|
1034
1035
|
/* log fn threw an exception. All logger methods are no-ops. */
|
1035
1036
|
return createLogger();
|
@@ -1052,7 +1053,7 @@
|
|
1052
1053
|
var Cues = /*@__PURE__*/getDefaultExportFromCjs(empty);
|
1053
1054
|
|
1054
1055
|
function getMediaSource(preferManagedMediaSource) {
|
1055
|
-
if (preferManagedMediaSource ===
|
1056
|
+
if (preferManagedMediaSource === undefined) {
|
1056
1057
|
preferManagedMediaSource = true;
|
1057
1058
|
}
|
1058
1059
|
if (typeof self === 'undefined') return undefined;
|
@@ -1157,7 +1158,7 @@
|
|
1157
1158
|
return !!typeCodes && !!typeCodes[codec.slice(0, 4)];
|
1158
1159
|
}
|
1159
1160
|
function areCodecsMediaSourceSupported(codecs, type, preferManagedMediaSource) {
|
1160
|
-
if (preferManagedMediaSource ===
|
1161
|
+
if (preferManagedMediaSource === undefined) {
|
1161
1162
|
preferManagedMediaSource = true;
|
1162
1163
|
}
|
1163
1164
|
return !codecs.split(',').some(function (codec) {
|
@@ -1166,11 +1167,11 @@
|
|
1166
1167
|
}
|
1167
1168
|
function isCodecMediaSourceSupported(codec, type, preferManagedMediaSource) {
|
1168
1169
|
var _MediaSource$isTypeSu;
|
1169
|
-
if (preferManagedMediaSource ===
|
1170
|
+
if (preferManagedMediaSource === undefined) {
|
1170
1171
|
preferManagedMediaSource = true;
|
1171
1172
|
}
|
1172
1173
|
var MediaSource = getMediaSource(preferManagedMediaSource);
|
1173
|
-
return (_MediaSource$isTypeSu = MediaSource == null ?
|
1174
|
+
return (_MediaSource$isTypeSu = MediaSource == null ? undefined : MediaSource.isTypeSupported(mimeTypeForCodec(codec, type))) != null ? _MediaSource$isTypeSu : false;
|
1174
1175
|
}
|
1175
1176
|
function mimeTypeForCodec(codec, type) {
|
1176
1177
|
return type + "/mp4;codecs=" + codec;
|
@@ -1193,7 +1194,7 @@
|
|
1193
1194
|
}
|
1194
1195
|
var CODEC_COMPATIBLE_NAMES = {};
|
1195
1196
|
function getCodecCompatibleNameLower(lowerCaseCodec, preferManagedMediaSource) {
|
1196
|
-
if (preferManagedMediaSource ===
|
1197
|
+
if (preferManagedMediaSource === undefined) {
|
1197
1198
|
preferManagedMediaSource = true;
|
1198
1199
|
}
|
1199
1200
|
if (CODEC_COMPATIBLE_NAMES[lowerCaseCodec]) {
|
@@ -1222,7 +1223,7 @@
|
|
1222
1223
|
}
|
1223
1224
|
var AUDIO_CODEC_REGEXP = /flac|opus|mp4a\.40\.34/i;
|
1224
1225
|
function getCodecCompatibleName(codec, preferManagedMediaSource) {
|
1225
|
-
if (preferManagedMediaSource ===
|
1226
|
+
if (preferManagedMediaSource === undefined) {
|
1226
1227
|
preferManagedMediaSource = true;
|
1227
1228
|
}
|
1228
1229
|
return codec.replace(AUDIO_CODEC_REGEXP, function (m) {
|
@@ -1321,9 +1322,9 @@
|
|
1321
1322
|
}
|
1322
1323
|
var HlsUrlParameters = /*#__PURE__*/function () {
|
1323
1324
|
function HlsUrlParameters(msn, part, skip) {
|
1324
|
-
this.msn =
|
1325
|
-
this.part =
|
1326
|
-
this.skip =
|
1325
|
+
this.msn = undefined;
|
1326
|
+
this.part = undefined;
|
1327
|
+
this.skip = undefined;
|
1327
1328
|
this.msn = msn;
|
1328
1329
|
this.part = part;
|
1329
1330
|
this.skip = skip;
|
@@ -1346,27 +1347,27 @@
|
|
1346
1347
|
}();
|
1347
1348
|
var Level = /*#__PURE__*/function () {
|
1348
1349
|
function Level(data) {
|
1349
|
-
this._attrs =
|
1350
|
-
this.audioCodec =
|
1351
|
-
this.bitrate =
|
1352
|
-
this.codecSet =
|
1353
|
-
this.url =
|
1354
|
-
this.frameRate =
|
1355
|
-
this.height =
|
1356
|
-
this.id =
|
1357
|
-
this.name =
|
1358
|
-
this.videoCodec =
|
1359
|
-
this.width =
|
1360
|
-
this.details =
|
1350
|
+
this._attrs = undefined;
|
1351
|
+
this.audioCodec = undefined;
|
1352
|
+
this.bitrate = undefined;
|
1353
|
+
this.codecSet = undefined;
|
1354
|
+
this.url = undefined;
|
1355
|
+
this.frameRate = undefined;
|
1356
|
+
this.height = undefined;
|
1357
|
+
this.id = undefined;
|
1358
|
+
this.name = undefined;
|
1359
|
+
this.videoCodec = undefined;
|
1360
|
+
this.width = undefined;
|
1361
|
+
this.details = undefined;
|
1361
1362
|
this.fragmentError = 0;
|
1362
1363
|
this.loadError = 0;
|
1363
|
-
this.loaded =
|
1364
|
+
this.loaded = undefined;
|
1364
1365
|
this.realBitrate = 0;
|
1365
|
-
this.supportedPromise =
|
1366
|
-
this.supportedResult =
|
1366
|
+
this.supportedPromise = undefined;
|
1367
|
+
this.supportedResult = undefined;
|
1367
1368
|
this._avgBitrate = 0;
|
1368
|
-
this._audioGroups =
|
1369
|
-
this._subtitleGroups =
|
1369
|
+
this._audioGroups = undefined;
|
1370
|
+
this._subtitleGroups = undefined;
|
1370
1371
|
// Deprecated (retained for backwards compatibility)
|
1371
1372
|
this._urlId = 0;
|
1372
1373
|
this.url = [data.url];
|
@@ -1494,13 +1495,13 @@
|
|
1494
1495
|
key: "audioGroupId",
|
1495
1496
|
get: function get() {
|
1496
1497
|
var _this$audioGroups;
|
1497
|
-
return (_this$audioGroups = this.audioGroups) == null ?
|
1498
|
+
return (_this$audioGroups = this.audioGroups) == null ? undefined : _this$audioGroups[0];
|
1498
1499
|
}
|
1499
1500
|
}, {
|
1500
1501
|
key: "textGroupId",
|
1501
1502
|
get: function get() {
|
1502
1503
|
var _this$subtitleGroups;
|
1503
|
-
return (_this$subtitleGroups = this.subtitleGroups) == null ?
|
1504
|
+
return (_this$subtitleGroups = this.subtitleGroups) == null ? undefined : _this$subtitleGroups[0];
|
1504
1505
|
}
|
1505
1506
|
}]);
|
1506
1507
|
}();
|
@@ -1567,9 +1568,9 @@
|
|
1567
1568
|
|
1568
1569
|
function getStartCodecTier(codecTiers, currentVideoRange, currentBw, audioPreference, videoPreference) {
|
1569
1570
|
var codecSets = Object.keys(codecTiers);
|
1570
|
-
var channelsPreference = audioPreference == null ?
|
1571
|
-
var audioCodecPreference = audioPreference == null ?
|
1572
|
-
var videoCodecPreference = videoPreference == null ?
|
1571
|
+
var channelsPreference = audioPreference == null ? undefined : audioPreference.channels;
|
1572
|
+
var audioCodecPreference = audioPreference == null ? undefined : audioPreference.audioCodec;
|
1573
|
+
var videoCodecPreference = videoPreference == null ? undefined : videoPreference.videoCodec;
|
1573
1574
|
var preferStereo = channelsPreference && parseInt(channelsPreference) === 2;
|
1574
1575
|
// Use first level set to determine stereo, and minimum resolution and framerate
|
1575
1576
|
var hasStereo = false;
|
@@ -1752,14 +1753,14 @@
|
|
1752
1753
|
}
|
1753
1754
|
function useAlternateAudio(audioTrackUrl, hls) {
|
1754
1755
|
var _hls$levels$hls$loadL;
|
1755
|
-
return !!audioTrackUrl && audioTrackUrl !== ((_hls$levels$hls$loadL = hls.levels[hls.loadLevel]) == null ?
|
1756
|
+
return !!audioTrackUrl && audioTrackUrl !== ((_hls$levels$hls$loadL = hls.levels[hls.loadLevel]) == null ? undefined : _hls$levels$hls$loadL.uri);
|
1756
1757
|
}
|
1757
1758
|
|
1758
1759
|
var AbrController = /*#__PURE__*/function (_Logger) {
|
1759
1760
|
function AbrController(_hls) {
|
1760
1761
|
var _this;
|
1761
1762
|
_this = _Logger.call(this, 'abr', _hls.logger) || this;
|
1762
|
-
_this.hls =
|
1763
|
+
_this.hls = undefined;
|
1763
1764
|
_this.lastLevelLoadSec = 0;
|
1764
1765
|
_this.lastLoadedFragLevel = -1;
|
1765
1766
|
_this.firstSelection = -1;
|
@@ -1771,7 +1772,7 @@
|
|
1771
1772
|
_this.fragCurrent = null;
|
1772
1773
|
_this.partCurrent = null;
|
1773
1774
|
_this.bitrateTestDelay = 0;
|
1774
|
-
_this.bwEstimator =
|
1775
|
+
_this.bwEstimator = undefined;
|
1775
1776
|
/*
|
1776
1777
|
This method monitors the download rate of the current fragment, and will downswitch if that fragment will not load
|
1777
1778
|
quickly enough to prevent underbuffering
|
@@ -1836,7 +1837,7 @@
|
|
1836
1837
|
return;
|
1837
1838
|
}
|
1838
1839
|
var bwe = loadRate ? loadRate * 8 : bwEstimate;
|
1839
|
-
var live = ((_this$hls$latestLevel = _this.hls.latestLevelDetails) == null ?
|
1840
|
+
var live = ((_this$hls$latestLevel = _this.hls.latestLevelDetails) == null ? undefined : _this$hls$latestLevel.live) === true;
|
1840
1841
|
var abrBandWidthUpFactor = _this.hls.config.abrBandWidthUpFactor;
|
1841
1842
|
var fragLevelNextLoadedDelay = Number.POSITIVE_INFINITY;
|
1842
1843
|
var nextLoadLevel;
|
@@ -2173,7 +2174,7 @@
|
|
2173
2174
|
// If no matching level found, see if min auto level would be a better option
|
2174
2175
|
var minLevel = hls.levels[minAutoLevel];
|
2175
2176
|
var autoLevel = hls.levels[hls.loadLevel];
|
2176
|
-
if ((minLevel == null ?
|
2177
|
+
if ((minLevel == null ? undefined : minLevel.bitrate) < (autoLevel == null ? undefined : autoLevel.bitrate)) {
|
2177
2178
|
return minAutoLevel;
|
2178
2179
|
}
|
2179
2180
|
// or if bitrate is not lower, continue to use loadLevel
|
@@ -2215,7 +2216,7 @@
|
|
2215
2216
|
var firstSelection = loadLevel === -1 || lastLoadedFragLevel === -1;
|
2216
2217
|
var currentCodecSet;
|
2217
2218
|
var currentVideoRange = 'SDR';
|
2218
|
-
var currentFrameRate = (level == null ?
|
2219
|
+
var currentFrameRate = (level == null ? undefined : level.frameRate) || 0;
|
2219
2220
|
var audioPreference = config.audioPreference,
|
2220
2221
|
videoPreference = config.videoPreference;
|
2221
2222
|
var audioTracksByGroup = this.audioTracksByGroup || (this.audioTracksByGroup = getAudioTracksByGroup(allAudioTracks));
|
@@ -2239,8 +2240,8 @@
|
|
2239
2240
|
currentBw = Math.max(currentBw, minBitrate);
|
2240
2241
|
this.log("picked start tier " + JSON.stringify(startTier));
|
2241
2242
|
} else {
|
2242
|
-
currentCodecSet = level == null ?
|
2243
|
-
currentVideoRange = level == null ?
|
2243
|
+
currentCodecSet = level == null ? undefined : level.codecSet;
|
2244
|
+
currentVideoRange = level == null ? undefined : level.videoRange;
|
2244
2245
|
}
|
2245
2246
|
var currentFragDuration = partCurrent ? partCurrent.duration : fragCurrent ? fragCurrent.duration : 0;
|
2246
2247
|
var ttfbEstimateSec = this.bwEstimator.getEstimateTTFB() / 1000;
|
@@ -2262,7 +2263,7 @@
|
|
2262
2263
|
}
|
2263
2264
|
}
|
2264
2265
|
var levelDetails = levelInfo.details;
|
2265
|
-
var avgDuration = (partCurrent ? levelDetails == null ?
|
2266
|
+
var avgDuration = (partCurrent ? levelDetails == null ? undefined : levelDetails.partTarget : levelDetails == null ? undefined : levelDetails.averagetargetduration) || currentFragDuration;
|
2266
2267
|
var adjustedbw;
|
2267
2268
|
// follow algorithm captured from stagefright :
|
2268
2269
|
// https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/httplive/LiveSession.cpp
|
@@ -2384,7 +2385,7 @@
|
|
2384
2385
|
|
2385
2386
|
var BufferOperationQueue = /*#__PURE__*/function () {
|
2386
2387
|
function BufferOperationQueue(sourceBufferReference) {
|
2387
|
-
this.tracks =
|
2388
|
+
this.tracks = undefined;
|
2388
2389
|
this.queues = {
|
2389
2390
|
video: [],
|
2390
2391
|
audio: [],
|
@@ -2440,7 +2441,7 @@
|
|
2440
2441
|
}
|
2441
2442
|
[this.queues.video, this.queues.audio, this.queues.audiovideo].forEach(function (queue) {
|
2442
2443
|
var _queue$;
|
2443
|
-
var label = (_queue$ = queue[0]) == null ?
|
2444
|
+
var label = (_queue$ = queue[0]) == null ? undefined : _queue$.label;
|
2444
2445
|
if (label === 'async-blocker' || label === 'async-blocker-prepend') {
|
2445
2446
|
queue[0].execute();
|
2446
2447
|
queue.splice(0, 1);
|
@@ -2475,7 +2476,7 @@
|
|
2475
2476
|
}
|
2476
2477
|
|
2477
2478
|
// Only shift the current operation off, otherwise the updateend handler will do this for us
|
2478
|
-
var sb = (_this$tracks$type = this.tracks[type]) == null ?
|
2479
|
+
var sb = (_this$tracks$type = this.tracks[type]) == null ? undefined : _this$tracks$type.buffer;
|
2479
2480
|
if (!(sb != null && sb.updating)) {
|
2480
2481
|
this.shiftAndExecuteNext(type);
|
2481
2482
|
}
|
@@ -2491,7 +2492,7 @@
|
|
2491
2492
|
};
|
2492
2493
|
_proto.current = function current(type) {
|
2493
2494
|
var _this$queues;
|
2494
|
-
return ((_this$queues = this.queues) == null ?
|
2495
|
+
return ((_this$queues = this.queues) == null ? undefined : _this$queues[type][0]) || null;
|
2495
2496
|
};
|
2496
2497
|
_proto.toString = function toString() {
|
2497
2498
|
var queues = this.queues,
|
@@ -2507,8 +2508,8 @@
|
|
2507
2508
|
};
|
2508
2509
|
_proto.listSbInfo = function listSbInfo(type) {
|
2509
2510
|
var _this$tracks2;
|
2510
|
-
var track = (_this$tracks2 = this.tracks) == null ?
|
2511
|
-
var sb = track == null ?
|
2511
|
+
var track = (_this$tracks2 = this.tracks) == null ? undefined : _this$tracks2[type];
|
2512
|
+
var sb = track == null ? undefined : track.buffer;
|
2512
2513
|
if (!sb) {
|
2513
2514
|
return 'none';
|
2514
2515
|
}
|
@@ -2516,7 +2517,7 @@
|
|
2516
2517
|
};
|
2517
2518
|
_proto.listOps = function listOps(type) {
|
2518
2519
|
var _this$queues3;
|
2519
|
-
return ((_this$queues3 = this.queues) == null ?
|
2520
|
+
return ((_this$queues3 = this.queues) == null ? undefined : _this$queues3[type].map(function (op) {
|
2520
2521
|
return op.label;
|
2521
2522
|
}).join(', ')) || '';
|
2522
2523
|
};
|
@@ -2601,13 +2602,13 @@
|
|
2601
2602
|
* @returns a matching fragment or null
|
2602
2603
|
*/
|
2603
2604
|
function findFragmentByPTS(fragPrevious, fragments, bufferEnd, maxFragLookUpTolerance, nextFragLookupTolerance) {
|
2604
|
-
if (bufferEnd ===
|
2605
|
+
if (bufferEnd === undefined) {
|
2605
2606
|
bufferEnd = 0;
|
2606
2607
|
}
|
2607
|
-
if (maxFragLookUpTolerance ===
|
2608
|
+
if (maxFragLookUpTolerance === undefined) {
|
2608
2609
|
maxFragLookUpTolerance = 0;
|
2609
2610
|
}
|
2610
|
-
if (nextFragLookupTolerance ===
|
2611
|
+
if (nextFragLookupTolerance === undefined) {
|
2611
2612
|
nextFragLookupTolerance = 0.005;
|
2612
2613
|
}
|
2613
2614
|
var fragNext = null;
|
@@ -2657,10 +2658,10 @@
|
|
2657
2658
|
* @returns 0 if it matches, 1 if too low, -1 if too high
|
2658
2659
|
*/
|
2659
2660
|
function fragmentWithinToleranceTest(bufferEnd, maxFragLookUpTolerance, candidate) {
|
2660
|
-
if (bufferEnd ===
|
2661
|
+
if (bufferEnd === undefined) {
|
2661
2662
|
bufferEnd = 0;
|
2662
2663
|
}
|
2663
|
-
if (maxFragLookUpTolerance ===
|
2664
|
+
if (maxFragLookUpTolerance === undefined) {
|
2664
2665
|
maxFragLookUpTolerance = 0;
|
2665
2666
|
}
|
2666
2667
|
// eagerly accept an accurate match (no tolerance)
|
@@ -2747,7 +2748,7 @@
|
|
2747
2748
|
if (!retryConfig) {
|
2748
2749
|
return false;
|
2749
2750
|
}
|
2750
|
-
var httpStatus = loaderResponse == null ?
|
2751
|
+
var httpStatus = loaderResponse == null ? undefined : loaderResponse.code;
|
2751
2752
|
var retry = retryCount < retryConfig.maxNumRetry && (retryForHttpStatus(httpStatus) || !!isTimeout);
|
2752
2753
|
return retryConfig.shouldRetry ? retryConfig.shouldRetry(retryConfig, retryCount, isTimeout, loaderResponse, retry) : retry;
|
2753
2754
|
}
|
@@ -2774,7 +2775,7 @@
|
|
2774
2775
|
function ErrorController(hls) {
|
2775
2776
|
var _this;
|
2776
2777
|
_this = _Logger.call(this, 'error-controller', hls.logger) || this;
|
2777
|
-
_this.hls =
|
2778
|
+
_this.hls = undefined;
|
2778
2779
|
_this.playlistError = 0;
|
2779
2780
|
_this.penalizedRenditions = {};
|
2780
2781
|
_this.hls = hls;
|
@@ -2810,7 +2811,7 @@
|
|
2810
2811
|
this.playlistError = 0;
|
2811
2812
|
};
|
2812
2813
|
_proto.getVariantLevelIndex = function getVariantLevelIndex(frag) {
|
2813
|
-
return (frag == null ?
|
2814
|
+
return (frag == null ? undefined : frag.type) === PlaylistLevelType.MAIN ? frag.level : this.hls.loadLevel;
|
2814
2815
|
};
|
2815
2816
|
_proto.onManifestLoading = function onManifestLoading() {
|
2816
2817
|
this.playlistError = 0;
|
@@ -2865,7 +2866,7 @@
|
|
2865
2866
|
return;
|
2866
2867
|
case ErrorDetails.LEVEL_LOAD_ERROR:
|
2867
2868
|
case ErrorDetails.LEVEL_LOAD_TIMEOUT:
|
2868
|
-
if (typeof (context == null ?
|
2869
|
+
if (typeof (context == null ? undefined : context.level) === 'number') {
|
2869
2870
|
data.errorAction = this.getPlaylistRetryOrSwitchAction(data, context.level);
|
2870
2871
|
}
|
2871
2872
|
return;
|
@@ -2888,7 +2889,7 @@
|
|
2888
2889
|
case ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:
|
2889
2890
|
{
|
2890
2891
|
var _level = hls.levels[hls.loadLevel];
|
2891
|
-
var restrictedHdcpLevel = _level == null ?
|
2892
|
+
var restrictedHdcpLevel = _level == null ? undefined : _level.attrs['HDCP-LEVEL'];
|
2892
2893
|
if (restrictedHdcpLevel) {
|
2893
2894
|
data.errorAction = {
|
2894
2895
|
action: NetworkErrorAction.SendAlternateToPenaltyBox,
|
@@ -3009,7 +3010,7 @@
|
|
3009
3010
|
if (!hls.autoLevelEnabled) {
|
3010
3011
|
hls.loadLevel = -1;
|
3011
3012
|
}
|
3012
|
-
var fragErrorType = (_data$frag2 = data.frag) == null ?
|
3013
|
+
var fragErrorType = (_data$frag2 = data.frag) == null ? undefined : _data$frag2.type;
|
3013
3014
|
// Find alternate audio codec if available on audio codec error
|
3014
3015
|
var isAudioCodecError = fragErrorType === PlaylistLevelType.AUDIO && errorDetails === ErrorDetails.FRAG_PARSING_ERROR || data.sourceBufferName === 'audio' && (errorDetails === ErrorDetails.BUFFER_ADD_CODEC_ERROR || errorDetails === ErrorDetails.BUFFER_APPEND_ERROR);
|
3015
3016
|
var findAudioCodecAlternate = isAudioCodecError && levels.some(function (_ref) {
|
@@ -3080,7 +3081,7 @@
|
|
3080
3081
|
};
|
3081
3082
|
_proto.onErrorOut = function onErrorOut(event, data) {
|
3082
3083
|
var _data$errorAction;
|
3083
|
-
switch ((_data$errorAction = data.errorAction) == null ?
|
3084
|
+
switch ((_data$errorAction = data.errorAction) == null ? undefined : _data$errorAction.action) {
|
3084
3085
|
case NetworkErrorAction.DoNothing:
|
3085
3086
|
break;
|
3086
3087
|
case NetworkErrorAction.SendAlternateToPenaltyBox:
|
@@ -3181,9 +3182,9 @@
|
|
3181
3182
|
this._stats = null;
|
3182
3183
|
this._streams = null;
|
3183
3184
|
// baseurl is the URL to the playlist
|
3184
|
-
this.base =
|
3185
|
+
this.base = undefined;
|
3185
3186
|
// relurl is the portion of the URL that comes from inside the playlist.
|
3186
|
-
this.relurl =
|
3187
|
+
this.relurl = undefined;
|
3187
3188
|
if (typeof base === 'string') {
|
3188
3189
|
base = {
|
3189
3190
|
url: base
|
@@ -3198,7 +3199,7 @@
|
|
3198
3199
|
var params = value.split('@', 2);
|
3199
3200
|
var start;
|
3200
3201
|
if (params.length === 1) {
|
3201
|
-
start = (previous == null ?
|
3202
|
+
start = (previous == null ? undefined : previous.byteRangeEndOffset) || 0;
|
3202
3203
|
} else {
|
3203
3204
|
start = parseInt(params[1]);
|
3204
3205
|
}
|
@@ -3296,7 +3297,7 @@
|
|
3296
3297
|
_this._programDateTime = null;
|
3297
3298
|
_this._ref = null;
|
3298
3299
|
// Approximate bit rate of the fragment expressed in bits per second (bps) as indicated by the last EXT-X-BITRATE (kbps) tag
|
3299
|
-
_this._bitrate =
|
3300
|
+
_this._bitrate = undefined;
|
3300
3301
|
_this.rawProgramDateTime = null;
|
3301
3302
|
_this.tagList = [];
|
3302
3303
|
// EXTINF has to be present for a m3u8 to be considered valid
|
@@ -3306,9 +3307,9 @@
|
|
3306
3307
|
// levelkeys are the EXT-X-KEY tags that apply to this segment for decryption
|
3307
3308
|
// core difference from the private field _decryptdata is the lack of the initialized IV
|
3308
3309
|
// _decryptdata will set the IV for this segment based on the segment number in the fragment
|
3309
|
-
_this.levelkeys =
|
3310
|
+
_this.levelkeys = undefined;
|
3310
3311
|
// A string representing the fragment type
|
3311
|
-
_this.type =
|
3312
|
+
_this.type = undefined;
|
3312
3313
|
// A reference to the loader. Set while the fragment is loading, and removed afterwards. Used to abort fragment loading
|
3313
3314
|
_this.loader = null;
|
3314
3315
|
// A reference to the key loader. Set while the key is loading, and removed afterwards. Used to abort key loading
|
@@ -3318,25 +3319,25 @@
|
|
3318
3319
|
// The continuity counter of the fragment
|
3319
3320
|
_this.cc = 0;
|
3320
3321
|
// The starting Presentation Time Stamp (PTS) of the fragment. Set after transmux complete.
|
3321
|
-
_this.startPTS =
|
3322
|
+
_this.startPTS = undefined;
|
3322
3323
|
// The ending Presentation Time Stamp (PTS) of the fragment. Set after transmux complete.
|
3323
|
-
_this.endPTS =
|
3324
|
+
_this.endPTS = undefined;
|
3324
3325
|
// The starting Decode Time Stamp (DTS) of the fragment. Set after transmux complete.
|
3325
|
-
_this.startDTS =
|
3326
|
+
_this.startDTS = undefined;
|
3326
3327
|
// The ending Decode Time Stamp (DTS) of the fragment. Set after transmux complete.
|
3327
|
-
_this.endDTS =
|
3328
|
+
_this.endDTS = undefined;
|
3328
3329
|
// The start time of the fragment, as listed in the manifest. Updated after transmux complete.
|
3329
3330
|
_this.start = 0;
|
3330
3331
|
// The offset time (seconds) of the fragment from the start of the Playlist
|
3331
3332
|
_this.playlistOffset = 0;
|
3332
3333
|
// Set by `updateFragPTSDTS` in level-helper
|
3333
|
-
_this.deltaPTS =
|
3334
|
+
_this.deltaPTS = undefined;
|
3334
3335
|
// The maximum starting Presentation Time Stamp (audio/video PTS) of the fragment. Set after transmux complete.
|
3335
|
-
_this.maxStartPTS =
|
3336
|
+
_this.maxStartPTS = undefined;
|
3336
3337
|
// The minimum ending Presentation Time Stamp (audio/video PTS) of the fragment. Set after transmux complete.
|
3337
|
-
_this.minEndPTS =
|
3338
|
+
_this.minEndPTS = undefined;
|
3338
3339
|
// Init Segment bytes (unset for media segments)
|
3339
|
-
_this.data =
|
3340
|
+
_this.data = undefined;
|
3340
3341
|
// A flag indicating whether the segment was downloaded in order to test bitrate, and was not buffered
|
3341
3342
|
_this.bitrateTest = false;
|
3342
3343
|
// #EXTINF segment title
|
@@ -3344,9 +3345,9 @@
|
|
3344
3345
|
// The Media Initialization Section for this segment
|
3345
3346
|
_this.initSegment = null;
|
3346
3347
|
// Fragment is the last fragment in the media playlist
|
3347
|
-
_this.endList =
|
3348
|
+
_this.endList = undefined;
|
3348
3349
|
// Fragment is marked by an EXT-X-GAP tag indicating that it does not contain media data and should not be loaded
|
3349
|
-
_this.gap =
|
3350
|
+
_this.gap = undefined;
|
3350
3351
|
// Deprecated
|
3351
3352
|
_this.urlId = 0;
|
3352
3353
|
_this.type = type;
|
@@ -3379,11 +3380,11 @@
|
|
3379
3380
|
};
|
3380
3381
|
_proto2.abortRequests = function abortRequests() {
|
3381
3382
|
var _this$loader, _this$keyLoader;
|
3382
|
-
(_this$loader = this.loader) == null ?
|
3383
|
-
(_this$keyLoader = this.keyLoader) == null ?
|
3383
|
+
(_this$loader = this.loader) == null ? undefined : _this$loader.abort();
|
3384
|
+
(_this$keyLoader = this.keyLoader) == null ? undefined : _this$keyLoader.abort();
|
3384
3385
|
};
|
3385
3386
|
_proto2.setElementaryStreamInfo = function setElementaryStreamInfo(type, startPTS, endPTS, startDTS, endDTS, partial) {
|
3386
|
-
if (partial ===
|
3387
|
+
if (partial === undefined) {
|
3387
3388
|
partial = false;
|
3388
3389
|
}
|
3389
3390
|
var elementaryStreams = this.elementaryStreams;
|
@@ -3533,9 +3534,9 @@
|
|
3533
3534
|
_this2.duration = 0;
|
3534
3535
|
_this2.gap = false;
|
3535
3536
|
_this2.independent = false;
|
3536
|
-
_this2.relurl =
|
3537
|
-
_this2.fragment =
|
3538
|
-
_this2.index =
|
3537
|
+
_this2.relurl = undefined;
|
3538
|
+
_this2.fragment = undefined;
|
3539
|
+
_this2.index = undefined;
|
3539
3540
|
_this2.duration = partAttrs.decimalFloatingPoint('DURATION');
|
3540
3541
|
_this2.gap = partAttrs.bool('GAP');
|
3541
3542
|
_this2.independent = partAttrs.bool('INDEPENDENT');
|
@@ -3621,8 +3622,7 @@
|
|
3621
3622
|
return {
|
3622
3623
|
len: 0,
|
3623
3624
|
start: pos,
|
3624
|
-
end: pos
|
3625
|
-
nextStart: undefined
|
3625
|
+
end: pos
|
3626
3626
|
};
|
3627
3627
|
};
|
3628
3628
|
BufferHelper.bufferedInfo = function bufferedInfo(buffered, pos, maxHoleDuration) {
|
@@ -3687,7 +3687,8 @@
|
|
3687
3687
|
len: bufferLen,
|
3688
3688
|
start: bufferStart || 0,
|
3689
3689
|
end: bufferEnd || 0,
|
3690
|
-
nextStart: bufferStartNext
|
3690
|
+
nextStart: bufferStartNext,
|
3691
|
+
buffered: buffered
|
3691
3692
|
};
|
3692
3693
|
}
|
3693
3694
|
|
@@ -3722,8 +3723,8 @@
|
|
3722
3723
|
function BufferController(hls, fragmentTracker) {
|
3723
3724
|
var _this2;
|
3724
3725
|
_this2 = _Logger.call(this, 'buffer-controller', hls.logger) || this;
|
3725
|
-
_this2.hls =
|
3726
|
-
_this2.fragmentTracker =
|
3726
|
+
_this2.hls = undefined;
|
3727
|
+
_this2.fragmentTracker = undefined;
|
3727
3728
|
// The level details used to determine duration, target-duration and live
|
3728
3729
|
_this2.details = null;
|
3729
3730
|
// cache the self generated object url to detect hijack of video tag
|
@@ -3743,11 +3744,11 @@
|
|
3743
3744
|
// Keep track of video append position for unblocking audio
|
3744
3745
|
_this2.lastVideoAppendEnd = 0;
|
3745
3746
|
// Whether or not to use ManagedMediaSource API and append source element to media element.
|
3746
|
-
_this2.appendSource =
|
3747
|
+
_this2.appendSource = undefined;
|
3747
3748
|
// Transferred MediaSource information used to detmerine if duration end endstream may be appended
|
3748
|
-
_this2.transferData =
|
3749
|
+
_this2.transferData = undefined;
|
3749
3750
|
// Directives used to override default MediaSource handling
|
3750
|
-
_this2.overrides =
|
3751
|
+
_this2.overrides = undefined;
|
3751
3752
|
// Error counters
|
3752
3753
|
_this2.appendErrors = {
|
3753
3754
|
audio: 0,
|
@@ -3763,7 +3764,7 @@
|
|
3763
3764
|
if (!_this2.hls) {
|
3764
3765
|
return;
|
3765
3766
|
}
|
3766
|
-
if (((_this2$mediaSource = _this2.mediaSource) == null ?
|
3767
|
+
if (((_this2$mediaSource = _this2.mediaSource) == null ? undefined : _this2$mediaSource.readyState) !== 'open') {
|
3767
3768
|
return;
|
3768
3769
|
}
|
3769
3770
|
_this2.hls.pauseBuffering();
|
@@ -3932,7 +3933,7 @@
|
|
3932
3933
|
// in case alt audio is not used, only one BUFFER_CODEC event will be fired from main stream controller
|
3933
3934
|
// it will contain the expected nb of source buffers, no need to compute it
|
3934
3935
|
var codecEvents = 2;
|
3935
|
-
if (data.audio && !data.video || !data.altAudio ||
|
3936
|
+
if (data.audio && !data.video || !data.altAudio || true) {
|
3936
3937
|
codecEvents = 1;
|
3937
3938
|
}
|
3938
3939
|
this.bufferCodecEventsTotal = codecEvents;
|
@@ -3981,7 +3982,7 @@
|
|
3981
3982
|
};
|
3982
3983
|
_proto.assignMediaSource = function assignMediaSource(ms) {
|
3983
3984
|
var _this$transferData2, _ms$constructor;
|
3984
|
-
this.log((((_this$transferData2 = this.transferData) == null ?
|
3985
|
+
this.log((((_this$transferData2 = this.transferData) == null ? undefined : _this$transferData2.mediaSource) === ms ? 'transferred' : 'created') + " media source: " + ((_ms$constructor = ms.constructor) == null ? undefined : _ms$constructor.name));
|
3985
3986
|
// MediaSource listeners are arrow functions with a lexical scope, and do not need to be bound
|
3986
3987
|
ms.addEventListener('sourceopen', this._onMediaSourceOpen);
|
3987
3988
|
ms.addEventListener('sourceended', this._onMediaSourceEnded);
|
@@ -4025,7 +4026,7 @@
|
|
4025
4026
|
data.tracks = undefined;
|
4026
4027
|
var currentTime = media.currentTime;
|
4027
4028
|
var details = this.details;
|
4028
|
-
var startTime = Math.max(currentTime, (details == null ?
|
4029
|
+
var startTime = Math.max(currentTime, (details == null ? undefined : details.fragments[0].start) || 0);
|
4029
4030
|
if (startTime - currentTime > 1) {
|
4030
4031
|
this.log("attachTransferred: waiting for playback to reach new tracks start time " + currentTime + " -> " + startTime);
|
4031
4032
|
return;
|
@@ -4162,7 +4163,7 @@
|
|
4162
4163
|
};
|
4163
4164
|
_proto.resetBuffer = function resetBuffer(type) {
|
4164
4165
|
var _this$tracks$type;
|
4165
|
-
var sb = (_this$tracks$type = this.tracks[type]) == null ?
|
4166
|
+
var sb = (_this$tracks$type = this.tracks[type]) == null ? undefined : _this$tracks$type.buffer;
|
4166
4167
|
this.removeBuffer(type);
|
4167
4168
|
if (sb) {
|
4168
4169
|
try {
|
@@ -4215,10 +4216,10 @@
|
|
4215
4216
|
container = parsedTrack.container,
|
4216
4217
|
metadata = parsedTrack.metadata;
|
4217
4218
|
var track = tracks[trackName];
|
4218
|
-
var transferredTrack = (_this9$transferData = _this9.transferData) == null ?
|
4219
|
+
var transferredTrack = (_this9$transferData = _this9.transferData) == null ? undefined : (_this9$transferData$t = _this9$transferData.tracks) == null ? undefined : _this9$transferData$t[trackName];
|
4219
4220
|
var sbTrack = transferredTrack != null && transferredTrack.buffer ? transferredTrack : track;
|
4220
|
-
var sbCodec = (sbTrack == null ?
|
4221
|
-
var trackLevelCodec = sbTrack == null ?
|
4221
|
+
var sbCodec = (sbTrack == null ? undefined : sbTrack.pendingCodec) || (sbTrack == null ? undefined : sbTrack.codec);
|
4222
|
+
var trackLevelCodec = sbTrack == null ? undefined : sbTrack.levelCodec;
|
4222
4223
|
var forceChangeType = !sbTrack || !!_this9.hls.config.assetPlayerId;
|
4223
4224
|
if (!track) {
|
4224
4225
|
track = tracks[trackName] = {
|
@@ -4233,9 +4234,9 @@
|
|
4233
4234
|
}
|
4234
4235
|
// check if SourceBuffer codec needs to change
|
4235
4236
|
var currentCodecFull = pickMostCompleteCodecName(sbCodec, trackLevelCodec);
|
4236
|
-
var currentCodec = currentCodecFull == null ?
|
4237
|
+
var currentCodec = currentCodecFull == null ? undefined : currentCodecFull.replace(VIDEO_CODEC_PROFILE_REPLACE, '$1');
|
4237
4238
|
var trackCodec = pickMostCompleteCodecName(codec, levelCodec);
|
4238
|
-
var nextCodec = (_trackCodec = trackCodec) == null ?
|
4239
|
+
var nextCodec = (_trackCodec = trackCodec) == null ? undefined : _trackCodec.replace(VIDEO_CODEC_PROFILE_REPLACE, '$1');
|
4239
4240
|
if (trackCodec && (currentCodec !== nextCodec || forceChangeType)) {
|
4240
4241
|
if (trackName.slice(0, 5) === 'audio') {
|
4241
4242
|
trackCodec = getCodecCompatibleName(trackCodec, _this9.appendSource);
|
@@ -4291,7 +4292,7 @@
|
|
4291
4292
|
_this11 = this;
|
4292
4293
|
var pStart = partOrFrag.start;
|
4293
4294
|
var pTime = pStart + partOrFrag.duration * 0.05;
|
4294
|
-
var atGap = ((_this$fragmentTracker = this.fragmentTracker.getAppendedFrag(pStart, PlaylistLevelType.MAIN)) == null ?
|
4295
|
+
var atGap = ((_this$fragmentTracker = this.fragmentTracker.getAppendedFrag(pStart, PlaylistLevelType.MAIN)) == null ? undefined : _this$fragmentTracker.gap) === true;
|
4295
4296
|
if (atGap) {
|
4296
4297
|
return;
|
4297
4298
|
}
|
@@ -4300,7 +4301,7 @@
|
|
4300
4301
|
execute: function execute() {
|
4301
4302
|
var _this11$fragmentTrack;
|
4302
4303
|
var videoTrack = _this11.tracks.video;
|
4303
|
-
if (_this11.lastVideoAppendEnd > pTime || videoTrack != null && videoTrack.buffer && BufferHelper.isBuffered(videoTrack.buffer, pTime) || ((_this11$fragmentTrack = _this11.fragmentTracker.getAppendedFrag(pTime, PlaylistLevelType.MAIN)) == null ?
|
4304
|
+
if (_this11.lastVideoAppendEnd > pTime || videoTrack != null && videoTrack.buffer && BufferHelper.isBuffered(videoTrack.buffer, pTime) || ((_this11$fragmentTrack = _this11.fragmentTracker.getAppendedFrag(pTime, PlaylistLevelType.MAIN)) == null ? undefined : _this11$fragmentTrack.gap) === true) {
|
4304
4305
|
_this11.blockedAudioAppend = null;
|
4305
4306
|
_this11.shiftAndExecuteNext('audio');
|
4306
4307
|
}
|
@@ -4354,14 +4355,14 @@
|
|
4354
4355
|
// More info here: https://github.com/video-dev/hls.js/issues/332#issuecomment-257986486
|
4355
4356
|
var audioTrack = tracks.audio;
|
4356
4357
|
var checkTimestampOffset = false;
|
4357
|
-
if (type === 'audio' && (audioTrack == null ?
|
4358
|
+
if (type === 'audio' && (audioTrack == null ? undefined : audioTrack.container) === 'audio/mpeg') {
|
4358
4359
|
checkTimestampOffset = !this.lastMpegAudioChunk || chunkMeta.id === 1 || this.lastMpegAudioChunk.sn !== chunkMeta.sn;
|
4359
4360
|
this.lastMpegAudioChunk = chunkMeta;
|
4360
4361
|
}
|
4361
4362
|
|
4362
4363
|
// Block audio append until overlapping video append
|
4363
4364
|
var videoTrack = this.tracks.video;
|
4364
|
-
var videoSb = videoTrack == null ?
|
4365
|
+
var videoSb = videoTrack == null ? undefined : videoTrack.buffer;
|
4365
4366
|
if (videoSb && sn !== 'initSegment') {
|
4366
4367
|
var partOrFrag = part || frag;
|
4367
4368
|
var blockedAudioAppend = this.blockedAudioAppend;
|
@@ -4583,7 +4584,7 @@
|
|
4583
4584
|
}
|
4584
4585
|
}
|
4585
4586
|
});
|
4586
|
-
var allowEndOfStream = ((_this$overrides = this.overrides) == null ?
|
4587
|
+
var allowEndOfStream = ((_this$overrides = this.overrides) == null ? undefined : _this$overrides.endOfStream) !== false;
|
4587
4588
|
var allTracksEnding = this.sourceBufferCount > 0 && !this.sourceBuffers.some(function (_ref6) {
|
4588
4589
|
var _this16$tracks$type;
|
4589
4590
|
var type = _ref6[0];
|
@@ -4638,7 +4639,7 @@
|
|
4638
4639
|
_proto.onError = function onError(event, data) {
|
4639
4640
|
if (data.details === ErrorDetails.BUFFER_APPEND_ERROR && data.frag) {
|
4640
4641
|
var _data$errorAction;
|
4641
|
-
var nextAutoLevel = (_data$errorAction = data.errorAction) == null ?
|
4642
|
+
var nextAutoLevel = (_data$errorAction = data.errorAction) == null ? undefined : _data$errorAction.nextAutoLevel;
|
4642
4643
|
if (isFiniteNumber(nextAutoLevel) && nextAutoLevel !== data.frag.level) {
|
4643
4644
|
this.resetAppendErrors();
|
4644
4645
|
}
|
@@ -4748,7 +4749,7 @@
|
|
4748
4749
|
var _this$overrides2;
|
4749
4750
|
var details = this.details,
|
4750
4751
|
mediaSource = this.mediaSource;
|
4751
|
-
if (!details || !this.media || (mediaSource == null ?
|
4752
|
+
if (!details || !this.media || (mediaSource == null ? undefined : mediaSource.readyState) !== 'open') {
|
4752
4753
|
return null;
|
4753
4754
|
}
|
4754
4755
|
var playlistEnd = details.edge;
|
@@ -4769,7 +4770,7 @@
|
|
4769
4770
|
duration: Infinity
|
4770
4771
|
};
|
4771
4772
|
}
|
4772
|
-
var overrideDuration = (_this$overrides2 = this.overrides) == null ?
|
4773
|
+
var overrideDuration = (_this$overrides2 = this.overrides) == null ? undefined : _this$overrides2.duration;
|
4773
4774
|
if (overrideDuration) {
|
4774
4775
|
return {
|
4775
4776
|
duration: overrideDuration
|
@@ -4814,7 +4815,7 @@
|
|
4814
4815
|
// 2 tracks is the max (one for audio, one for video). If we've reach this max go ahead and create the buffers.
|
4815
4816
|
if (this.tracksReady) {
|
4816
4817
|
var _this$transferData3;
|
4817
|
-
var transferredTracks = (_this$transferData3 = this.transferData) == null ?
|
4818
|
+
var transferredTracks = (_this$transferData3 = this.transferData) == null ? undefined : _this$transferData3.tracks;
|
4818
4819
|
if (transferredTracks && Object.keys(transferredTracks).length) {
|
4819
4820
|
this.attachTransferred();
|
4820
4821
|
} else {
|
@@ -4950,7 +4951,7 @@
|
|
4950
4951
|
};
|
4951
4952
|
_proto.onSBUpdateEnd = function onSBUpdateEnd(type) {
|
4952
4953
|
var _this$mediaSource2;
|
4953
|
-
if (((_this$mediaSource2 = this.mediaSource) == null ?
|
4954
|
+
if (((_this$mediaSource2 = this.mediaSource) == null ? undefined : _this$mediaSource2.readyState) === 'closed') {
|
4954
4955
|
this.resetBuffer(type);
|
4955
4956
|
return;
|
4956
4957
|
}
|
@@ -4963,7 +4964,7 @@
|
|
4963
4964
|
};
|
4964
4965
|
_proto.onSBUpdateError = function onSBUpdateError(type, event) {
|
4965
4966
|
var _this$mediaSource3;
|
4966
|
-
var error = new Error(type + " SourceBuffer error. MediaSource readyState: " + ((_this$mediaSource3 = this.mediaSource) == null ?
|
4967
|
+
var error = new Error(type + " SourceBuffer error. MediaSource readyState: " + ((_this$mediaSource3 = this.mediaSource) == null ? undefined : _this$mediaSource3.readyState));
|
4967
4968
|
this.error("" + error, event);
|
4968
4969
|
// according to http://www.w3.org/TR/media-source/#sourcebuffer-append-error
|
4969
4970
|
// SourceBuffer errors are not necessarily fatal; if so, the HTMLMediaElement will fire an error event
|
@@ -4987,7 +4988,7 @@
|
|
4987
4988
|
var media = this.media,
|
4988
4989
|
mediaSource = this.mediaSource;
|
4989
4990
|
var track = this.tracks[type];
|
4990
|
-
var sb = track == null ?
|
4991
|
+
var sb = track == null ? undefined : track.buffer;
|
4991
4992
|
if (!media || !mediaSource || !sb) {
|
4992
4993
|
this.warn("Attempting to remove from the " + type + " SourceBuffer, but it does not exist");
|
4993
4994
|
this.shiftAndExecuteNext(type);
|
@@ -5011,7 +5012,7 @@
|
|
5011
5012
|
;
|
5012
5013
|
_proto.appendExecutor = function appendExecutor(data, type) {
|
5013
5014
|
var track = this.tracks[type];
|
5014
|
-
var sb = track == null ?
|
5015
|
+
var sb = track == null ? undefined : track.buffer;
|
5015
5016
|
if (!sb) {
|
5016
5017
|
throw new HlsJsTrackRemovedError("Attempting to append to the " + type + " SourceBuffer, but it does not exist");
|
5017
5018
|
}
|
@@ -5050,7 +5051,7 @@
|
|
5050
5051
|
;
|
5051
5052
|
_proto.blockBuffers = function blockBuffers(onUnblocked, bufferNames) {
|
5052
5053
|
var _this23 = this;
|
5053
|
-
if (bufferNames ===
|
5054
|
+
if (bufferNames === undefined) {
|
5054
5055
|
bufferNames = this.sourceBufferTypes;
|
5055
5056
|
}
|
5056
5057
|
if (!bufferNames.length) {
|
@@ -5081,7 +5082,7 @@
|
|
5081
5082
|
var _this24 = this;
|
5082
5083
|
bufferNames.forEach(function (type) {
|
5083
5084
|
var _this24$tracks$type;
|
5084
|
-
var sb = (_this24$tracks$type = _this24.tracks[type]) == null ?
|
5085
|
+
var sb = (_this24$tracks$type = _this24.tracks[type]) == null ? undefined : _this24$tracks$type.buffer;
|
5085
5086
|
// Only cycle the queue if the SB is not updating. There's a bug in Chrome which sets the SB updating flag to
|
5086
5087
|
// true when changing the MediaSource duration (https://bugs.chromium.org/p/chromium/issues/detail?id=959359&can=2&q=mediasource%20duration)
|
5087
5088
|
// While this is a workaround, it's probably useful to have around
|
@@ -5151,7 +5152,7 @@
|
|
5151
5152
|
key: "mediaSourceOpenOrEnded",
|
5152
5153
|
get: function get() {
|
5153
5154
|
var _this$mediaSource4;
|
5154
|
-
var readyState = (_this$mediaSource4 = this.mediaSource) == null ?
|
5155
|
+
var readyState = (_this$mediaSource4 = this.mediaSource) == null ? undefined : _this$mediaSource4.readyState;
|
5155
5156
|
return readyState === 'open' || readyState === 'ended';
|
5156
5157
|
}
|
5157
5158
|
}, {
|
@@ -5176,7 +5177,7 @@
|
|
5176
5177
|
return this.sourceBufferCount > 0 && !this.sourceBuffers.some(function (_ref16) {
|
5177
5178
|
var _this26$tracks$type, _this26$tracks$type2;
|
5178
5179
|
var type = _ref16[0];
|
5179
|
-
return type && (!((_this26$tracks$type = _this26.tracks[type]) != null && _this26$tracks$type.ended) || ((_this26$tracks$type2 = _this26.tracks[type]) == null ?
|
5180
|
+
return type && (!((_this26$tracks$type = _this26.tracks[type]) != null && _this26$tracks$type.ended) || ((_this26$tracks$type2 = _this26.tracks[type]) == null ? undefined : _this26$tracks$type2.ending));
|
5180
5181
|
});
|
5181
5182
|
}
|
5182
5183
|
}, {
|
@@ -5189,8 +5190,8 @@
|
|
5189
5190
|
key: "mediaSrc",
|
5190
5191
|
get: function get() {
|
5191
5192
|
var _this$media, _this$media$querySele;
|
5192
|
-
var media = ((_this$media = this.media) == null ?
|
5193
|
-
return media == null ?
|
5193
|
+
var media = ((_this$media = this.media) == null ? undefined : (_this$media$querySele = _this$media.querySelector) == null ? undefined : _this$media$querySele.call(_this$media, 'source')) || this.media;
|
5194
|
+
return media == null ? undefined : media.src;
|
5194
5195
|
}
|
5195
5196
|
}, {
|
5196
5197
|
key: "pendingTrackCount",
|
@@ -5238,14 +5239,14 @@
|
|
5238
5239
|
|
5239
5240
|
var CapLevelController = /*#__PURE__*/function () {
|
5240
5241
|
function CapLevelController(hls) {
|
5241
|
-
this.hls =
|
5242
|
-
this.autoLevelCapping =
|
5243
|
-
this.firstLevel =
|
5244
|
-
this.media =
|
5245
|
-
this.restrictedLevels =
|
5246
|
-
this.timer =
|
5247
|
-
this.clientRect =
|
5248
|
-
this.streamController =
|
5242
|
+
this.hls = undefined;
|
5243
|
+
this.autoLevelCapping = undefined;
|
5244
|
+
this.firstLevel = undefined;
|
5245
|
+
this.media = undefined;
|
5246
|
+
this.restrictedLevels = undefined;
|
5247
|
+
this.timer = undefined;
|
5248
|
+
this.clientRect = undefined;
|
5249
|
+
this.streamController = undefined;
|
5249
5250
|
this.hls = hls;
|
5250
5251
|
this.autoLevelCapping = Number.POSITIVE_INFINITY;
|
5251
5252
|
this.firstLevel = -1;
|
@@ -5637,19 +5638,19 @@
|
|
5637
5638
|
var DateRange = /*#__PURE__*/function () {
|
5638
5639
|
function DateRange(dateRangeAttr, dateRangeWithSameId, tagCount) {
|
5639
5640
|
var _dateRangeWithSameId$;
|
5640
|
-
if (tagCount ===
|
5641
|
+
if (tagCount === undefined) {
|
5641
5642
|
tagCount = 0;
|
5642
5643
|
}
|
5643
|
-
this.attr =
|
5644
|
-
this.tagAnchor =
|
5645
|
-
this.tagOrder =
|
5646
|
-
this._startDate =
|
5647
|
-
this._endDate =
|
5648
|
-
this._dateAtEnd =
|
5649
|
-
this._cue =
|
5650
|
-
this._badValueForSameId =
|
5651
|
-
this.tagAnchor = (dateRangeWithSameId == null ?
|
5652
|
-
this.tagOrder = (_dateRangeWithSameId$ = dateRangeWithSameId == null ?
|
5644
|
+
this.attr = undefined;
|
5645
|
+
this.tagAnchor = undefined;
|
5646
|
+
this.tagOrder = undefined;
|
5647
|
+
this._startDate = undefined;
|
5648
|
+
this._endDate = undefined;
|
5649
|
+
this._dateAtEnd = undefined;
|
5650
|
+
this._cue = undefined;
|
5651
|
+
this._badValueForSameId = undefined;
|
5652
|
+
this.tagAnchor = (dateRangeWithSameId == null ? undefined : dateRangeWithSameId.tagAnchor) || null;
|
5653
|
+
this.tagOrder = (_dateRangeWithSameId$ = dateRangeWithSameId == null ? undefined : dateRangeWithSameId.tagOrder) != null ? _dateRangeWithSameId$ : tagCount;
|
5653
5654
|
if (dateRangeWithSameId) {
|
5654
5655
|
var previousAttr = dateRangeWithSameId.attr;
|
5655
5656
|
for (var key in previousAttr) {
|
@@ -5672,7 +5673,7 @@
|
|
5672
5673
|
this._startDate = new Date(dateRangeAttr["START-DATE"]);
|
5673
5674
|
}
|
5674
5675
|
if ("END-DATE" in this.attr) {
|
5675
|
-
var endDate = (dateRangeWithSameId == null ?
|
5676
|
+
var endDate = (dateRangeWithSameId == null ? undefined : dateRangeWithSameId.endDate) || new Date(this.attr["END-DATE"]);
|
5676
5677
|
if (isFiniteNumber(endDate.getTime())) {
|
5677
5678
|
this._endDate = endDate;
|
5678
5679
|
}
|
@@ -5778,21 +5779,21 @@
|
|
5778
5779
|
function LevelDetails(baseUrl) {
|
5779
5780
|
this.PTSKnown = false;
|
5780
5781
|
this.alignedSliding = false;
|
5781
|
-
this.averagetargetduration =
|
5782
|
+
this.averagetargetduration = undefined;
|
5782
5783
|
this.endCC = 0;
|
5783
5784
|
this.endSN = 0;
|
5784
|
-
this.fragments =
|
5785
|
-
this.fragmentHint =
|
5785
|
+
this.fragments = undefined;
|
5786
|
+
this.fragmentHint = undefined;
|
5786
5787
|
this.partList = null;
|
5787
|
-
this.dateRanges =
|
5788
|
+
this.dateRanges = undefined;
|
5788
5789
|
this.dateRangeTagCount = 0;
|
5789
5790
|
this.live = true;
|
5790
5791
|
this.requestScheduled = -1;
|
5791
5792
|
this.ageHeader = 0;
|
5792
|
-
this.advancedDateTime =
|
5793
|
+
this.advancedDateTime = undefined;
|
5793
5794
|
this.updated = true;
|
5794
5795
|
this.advanced = true;
|
5795
|
-
this.availabilityDelay =
|
5796
|
+
this.availabilityDelay = undefined;
|
5796
5797
|
// Manifest reload synchronization
|
5797
5798
|
this.misses = 0;
|
5798
5799
|
this.startCC = 0;
|
@@ -5801,30 +5802,30 @@
|
|
5801
5802
|
this.targetduration = 0;
|
5802
5803
|
this.totalduration = 0;
|
5803
5804
|
this.type = null;
|
5804
|
-
this.url =
|
5805
|
+
this.url = undefined;
|
5805
5806
|
this.m3u8 = '';
|
5806
5807
|
this.version = null;
|
5807
5808
|
this.canBlockReload = false;
|
5808
5809
|
this.canSkipUntil = 0;
|
5809
5810
|
this.canSkipDateRanges = false;
|
5810
5811
|
this.skippedSegments = 0;
|
5811
|
-
this.recentlyRemovedDateranges =
|
5812
|
+
this.recentlyRemovedDateranges = undefined;
|
5812
5813
|
this.partHoldBack = 0;
|
5813
5814
|
this.holdBack = 0;
|
5814
5815
|
this.partTarget = 0;
|
5815
|
-
this.preloadHint =
|
5816
|
-
this.renditionReports =
|
5816
|
+
this.preloadHint = undefined;
|
5817
|
+
this.renditionReports = undefined;
|
5817
5818
|
this.tuneInGoal = 0;
|
5818
|
-
this.deltaUpdateFailed =
|
5819
|
+
this.deltaUpdateFailed = undefined;
|
5819
5820
|
this.driftStartTime = 0;
|
5820
5821
|
this.driftEndTime = 0;
|
5821
5822
|
this.driftStart = 0;
|
5822
5823
|
this.driftEnd = 0;
|
5823
|
-
this.encryptedFragments =
|
5824
|
+
this.encryptedFragments = undefined;
|
5824
5825
|
this.playlistParsingError = null;
|
5825
5826
|
this.variableList = null;
|
5826
5827
|
this.hasVariableRefs = false;
|
5827
|
-
this.appliedTimelineOffset =
|
5828
|
+
this.appliedTimelineOffset = undefined;
|
5828
5829
|
this.fragments = [];
|
5829
5830
|
this.encryptedFragments = [];
|
5830
5831
|
this.dateRanges = {};
|
@@ -5999,7 +6000,7 @@
|
|
5999
6000
|
* @beta
|
6000
6001
|
*/
|
6001
6002
|
function utf8ArrayToStr(array, exitOnNull) {
|
6002
|
-
if (exitOnNull ===
|
6003
|
+
if (exitOnNull === undefined) {
|
6003
6004
|
exitOnNull = false;
|
6004
6005
|
}
|
6005
6006
|
if (typeof TextDecoder !== 'undefined') {
|
@@ -6605,8 +6606,8 @@
|
|
6605
6606
|
continue;
|
6606
6607
|
}
|
6607
6608
|
var trackDefault = track.default;
|
6608
|
-
var tfhdFlags = readUint32(tfhd, 0) | (trackDefault == null ?
|
6609
|
-
var sampleDuration = trackDefault == null ?
|
6609
|
+
var tfhdFlags = readUint32(tfhd, 0) | (trackDefault == null ? undefined : trackDefault.flags);
|
6610
|
+
var sampleDuration = trackDefault == null ? undefined : trackDefault.duration;
|
6610
6611
|
if (tfhdFlags & 0x000008) {
|
6611
6612
|
// 0x000008 indicates the presence of the default_sample_duration field
|
6612
6613
|
if (tfhdFlags & 0x000002) {
|
@@ -7136,18 +7137,18 @@
|
|
7136
7137
|
|
7137
7138
|
var LevelKey = /*#__PURE__*/function () {
|
7138
7139
|
function LevelKey(method, uri, format, formatversions, iv) {
|
7139
|
-
if (formatversions ===
|
7140
|
+
if (formatversions === undefined) {
|
7140
7141
|
formatversions = [1];
|
7141
7142
|
}
|
7142
|
-
if (iv ===
|
7143
|
+
if (iv === undefined) {
|
7143
7144
|
iv = null;
|
7144
7145
|
}
|
7145
|
-
this.uri =
|
7146
|
-
this.method =
|
7147
|
-
this.keyFormat =
|
7148
|
-
this.keyFormatVersions =
|
7149
|
-
this.encrypted =
|
7150
|
-
this.isCommonEncryption =
|
7146
|
+
this.uri = undefined;
|
7147
|
+
this.method = undefined;
|
7148
|
+
this.keyFormat = undefined;
|
7149
|
+
this.keyFormatVersions = undefined;
|
7150
|
+
this.encrypted = undefined;
|
7151
|
+
this.isCommonEncryption = undefined;
|
7151
7152
|
this.iv = null;
|
7152
7153
|
this.key = null;
|
7153
7154
|
this.keyId = null;
|
@@ -7789,7 +7790,7 @@
|
|
7789
7790
|
var pdtStart = pdtFragment.programDateTime;
|
7790
7791
|
if (startDateTime >= pdtStart || index === 0) {
|
7791
7792
|
var _programDateTimes;
|
7792
|
-
var durationBetweenPdt = (((_programDateTimes = programDateTimes[index + 1]) == null ?
|
7793
|
+
var durationBetweenPdt = (((_programDateTimes = programDateTimes[index + 1]) == null ? undefined : _programDateTimes.start) || endTime) - pdtFragment.start;
|
7793
7794
|
if (startDateTime <= pdtStart + durationBetweenPdt * 1000) {
|
7794
7795
|
// map to fragment with date-time range
|
7795
7796
|
var startIndex = programDateTimes[index].sn - details.startSN;
|
@@ -8060,7 +8061,7 @@
|
|
8060
8061
|
if (currentInitSegment) {
|
8061
8062
|
fragmentsToCheck.forEach(function (frag) {
|
8062
8063
|
var _currentInitSegment;
|
8063
|
-
if (frag && (!frag.initSegment || frag.initSegment.relurl === ((_currentInitSegment = currentInitSegment) == null ?
|
8064
|
+
if (frag && (!frag.initSegment || frag.initSegment.relurl === ((_currentInitSegment = currentInitSegment) == null ? undefined : _currentInitSegment.relurl))) {
|
8064
8065
|
frag.initSegment = currentInitSegment;
|
8065
8066
|
}
|
8066
8067
|
});
|
@@ -8205,7 +8206,7 @@
|
|
8205
8206
|
}
|
8206
8207
|
}
|
8207
8208
|
function adjustSliding(oldDetails, newDetails, matchingStableVariantOrRendition) {
|
8208
|
-
if (matchingStableVariantOrRendition ===
|
8209
|
+
if (matchingStableVariantOrRendition === undefined) {
|
8209
8210
|
matchingStableVariantOrRendition = true;
|
8210
8211
|
}
|
8211
8212
|
var delta = newDetails.startSN + newDetails.skippedSegments - oldDetails.startSN;
|
@@ -8240,7 +8241,7 @@
|
|
8240
8241
|
}
|
8241
8242
|
}
|
8242
8243
|
function computeReloadInterval(newDetails, distanceToLiveEdgeMs) {
|
8243
|
-
if (distanceToLiveEdgeMs ===
|
8244
|
+
if (distanceToLiveEdgeMs === undefined) {
|
8244
8245
|
distanceToLiveEdgeMs = Infinity;
|
8245
8246
|
}
|
8246
8247
|
var reloadInterval = 1000 * newDetails.targetduration;
|
@@ -8300,7 +8301,7 @@
|
|
8300
8301
|
function reassignFragmentLevelIndexes(levels) {
|
8301
8302
|
levels.forEach(function (level, index) {
|
8302
8303
|
var _level$details;
|
8303
|
-
var fragments = (_level$details = level.details) == null ?
|
8304
|
+
var fragments = (_level$details = level.details) == null ? undefined : _level$details.fragments;
|
8304
8305
|
if (fragments) {
|
8305
8306
|
fragments.forEach(function (fragment) {
|
8306
8307
|
fragment.level = index;
|
@@ -8317,7 +8318,7 @@
|
|
8317
8318
|
function ContentSteeringController(hls) {
|
8318
8319
|
var _this;
|
8319
8320
|
_this = _Logger.call(this, 'content-steering', hls.logger) || this;
|
8320
|
-
_this.hls =
|
8321
|
+
_this.hls = undefined;
|
8321
8322
|
_this.loader = null;
|
8322
8323
|
_this.uri = null;
|
8323
8324
|
_this.pathwayId = '.';
|
@@ -8431,7 +8432,7 @@
|
|
8431
8432
|
};
|
8432
8433
|
_proto.onError = function onError(event, data) {
|
8433
8434
|
var errorAction = data.errorAction;
|
8434
|
-
if ((errorAction == null ?
|
8435
|
+
if ((errorAction == null ? undefined : errorAction.action) === NetworkErrorAction.SendAlternateToPenaltyBox && errorAction.flags === ErrorActionFlags.MoveAllAlternatesMatchingHost) {
|
8435
8436
|
var levels = this.levels;
|
8436
8437
|
var pathwayPriority = this._pathwayPriority;
|
8437
8438
|
var errorPathway = this.pathwayId;
|
@@ -8632,7 +8633,7 @@
|
|
8632
8633
|
onSuccess: function onSuccess(response, stats, context, networkDetails) {
|
8633
8634
|
_this3.log("Loaded steering manifest: \"" + url + "\"");
|
8634
8635
|
var steeringData = response.data;
|
8635
|
-
if ((steeringData == null ?
|
8636
|
+
if ((steeringData == null ? undefined : steeringData.VERSION) !== 1) {
|
8636
8637
|
_this3.log("Steering VERSION " + steeringData.VERSION + " not supported!");
|
8637
8638
|
return;
|
8638
8639
|
}
|
@@ -8674,7 +8675,7 @@
|
|
8674
8675
|
var ttl = _this3.timeToLoad * 1000;
|
8675
8676
|
if (error.code === 429) {
|
8676
8677
|
var loader = _this3.loader;
|
8677
|
-
if (typeof (loader == null ?
|
8678
|
+
if (typeof (loader == null ? undefined : loader.getResponseHeader) === 'function') {
|
8678
8679
|
var retryAfter = loader.getResponseHeader('Retry-After');
|
8679
8680
|
if (retryAfter) {
|
8680
8681
|
ttl = parseFloat(retryAfter) * 1000;
|
@@ -8695,13 +8696,13 @@
|
|
8695
8696
|
};
|
8696
8697
|
_proto.scheduleRefresh = function scheduleRefresh(uri, ttlMs) {
|
8697
8698
|
var _this4 = this;
|
8698
|
-
if (ttlMs ===
|
8699
|
+
if (ttlMs === undefined) {
|
8699
8700
|
ttlMs = this.timeToLoad * 1000;
|
8700
8701
|
}
|
8701
8702
|
this.clearTimeout();
|
8702
8703
|
this.reloadTimer = self.setTimeout(function () {
|
8703
8704
|
var _this4$hls;
|
8704
|
-
var media = (_this4$hls = _this4.hls) == null ?
|
8705
|
+
var media = (_this4$hls = _this4.hls) == null ? undefined : _this4$hls.media;
|
8705
8706
|
if (media && !media.ended) {
|
8706
8707
|
_this4.loadSteeringManifest(uri);
|
8707
8708
|
return;
|
@@ -8744,7 +8745,7 @@
|
|
8744
8745
|
perOptionUris = uriReplacement[perOptionKey];
|
8745
8746
|
var perVariantUri;
|
8746
8747
|
if (stableId) {
|
8747
|
-
perVariantUri = perOptionUris == null ?
|
8748
|
+
perVariantUri = perOptionUris == null ? undefined : perOptionUris[stableId];
|
8748
8749
|
if (perVariantUri) {
|
8749
8750
|
uri = perVariantUri;
|
8750
8751
|
}
|
@@ -8765,15 +8766,15 @@
|
|
8765
8766
|
|
8766
8767
|
var FPSController = /*#__PURE__*/function () {
|
8767
8768
|
function FPSController(hls) {
|
8768
|
-
this.hls =
|
8769
|
+
this.hls = undefined;
|
8769
8770
|
this.isVideoPlaybackQualityAvailable = false;
|
8770
|
-
this.timer =
|
8771
|
+
this.timer = undefined;
|
8771
8772
|
this.media = null;
|
8772
|
-
this.lastTime =
|
8773
|
+
this.lastTime = undefined;
|
8773
8774
|
this.lastDroppedFrames = 0;
|
8774
8775
|
this.lastDecodedFrames = 0;
|
8775
8776
|
// stream controller must be provided as a dependency!
|
8776
|
-
this.streamController =
|
8777
|
+
this.streamController = undefined;
|
8777
8778
|
this.hls = hls;
|
8778
8779
|
this.registerListeners();
|
8779
8780
|
}
|
@@ -9345,10 +9346,10 @@
|
|
9345
9346
|
}
|
9346
9347
|
|
9347
9348
|
function toUint8(data, offset, length) {
|
9348
|
-
if (offset ===
|
9349
|
+
if (offset === undefined) {
|
9349
9350
|
offset = 0;
|
9350
9351
|
}
|
9351
|
-
if (length ===
|
9352
|
+
if (length === undefined) {
|
9352
9353
|
length = Infinity;
|
9353
9354
|
}
|
9354
9355
|
return view(data, offset, length, Uint8Array);
|
@@ -9600,10 +9601,10 @@
|
|
9600
9601
|
}({});
|
9601
9602
|
|
9602
9603
|
function dummyTrack(type, inputTimeScale) {
|
9603
|
-
if (type ===
|
9604
|
+
if (type === undefined) {
|
9604
9605
|
type = '';
|
9605
9606
|
}
|
9606
|
-
if (inputTimeScale ===
|
9607
|
+
if (inputTimeScale === undefined) {
|
9607
9608
|
inputTimeScale = 90000;
|
9608
9609
|
}
|
9609
9610
|
return {
|
@@ -9619,8 +9620,8 @@
|
|
9619
9620
|
|
9620
9621
|
var BaseAudioDemuxer = /*#__PURE__*/function () {
|
9621
9622
|
function BaseAudioDemuxer() {
|
9622
|
-
this._audioTrack =
|
9623
|
-
this._id3Track =
|
9623
|
+
this._audioTrack = undefined;
|
9624
|
+
this._id3Track = undefined;
|
9624
9625
|
this.frameIndex = 0;
|
9625
9626
|
this.cachedData = null;
|
9626
9627
|
this.basePTS = null;
|
@@ -9912,8 +9913,8 @@
|
|
9912
9913
|
function AACDemuxer(observer, config) {
|
9913
9914
|
var _this;
|
9914
9915
|
_this = _BaseAudioDemuxer.call(this) || this;
|
9915
|
-
_this.observer =
|
9916
|
-
_this.config =
|
9916
|
+
_this.observer = undefined;
|
9917
|
+
_this.config = undefined;
|
9917
9918
|
_this.observer = observer;
|
9918
9919
|
_this.config = config;
|
9919
9920
|
return _this;
|
@@ -9949,7 +9950,7 @@
|
|
9949
9950
|
// Layer bits (position 14 and 15) in header should be always 0 for ADTS
|
9950
9951
|
// More info https://wiki.multimedia.cx/index.php?title=ADTS
|
9951
9952
|
var id3Data = getId3Data(data, 0);
|
9952
|
-
var offset = (id3Data == null ?
|
9953
|
+
var offset = (id3Data == null ? undefined : id3Data.length) || 0;
|
9953
9954
|
if (probe(data, offset)) {
|
9954
9955
|
return false;
|
9955
9956
|
}
|
@@ -10028,7 +10029,7 @@
|
|
10028
10029
|
// Layer bits (position 14 and 15) in header should be always different from 0 (Layer I or Layer II or Layer III)
|
10029
10030
|
// More info http://www.mp3-tech.org/programmer/frame_header.html
|
10030
10031
|
var id3Data = getId3Data(data, 0);
|
10031
|
-
var offset = (id3Data == null ?
|
10032
|
+
var offset = (id3Data == null ? undefined : id3Data.length) || 0;
|
10032
10033
|
|
10033
10034
|
// Check for ac-3|ec-3 sync bytes and return false if present
|
10034
10035
|
if (id3Data && data[offset] === 0x0b && data[offset + 1] === 0x77 && getId3Timestamp(id3Data) !== undefined &&
|
@@ -10058,9 +10059,9 @@
|
|
10058
10059
|
|
10059
10060
|
var AESCrypto = /*#__PURE__*/function () {
|
10060
10061
|
function AESCrypto(subtle, iv, aesMode) {
|
10061
|
-
this.subtle =
|
10062
|
-
this.aesIV =
|
10063
|
-
this.aesMode =
|
10062
|
+
this.subtle = undefined;
|
10063
|
+
this.aesIV = undefined;
|
10064
|
+
this.aesMode = undefined;
|
10064
10065
|
this.subtle = subtle;
|
10065
10066
|
this.aesIV = iv;
|
10066
10067
|
this.aesMode = aesMode;
|
@@ -10107,8 +10108,8 @@
|
|
10107
10108
|
this.key = new Uint32Array(0);
|
10108
10109
|
this.ksRows = 0;
|
10109
10110
|
this.keySize = 0;
|
10110
|
-
this.keySchedule =
|
10111
|
-
this.invKeySchedule =
|
10111
|
+
this.keySchedule = undefined;
|
10112
|
+
this.invKeySchedule = undefined;
|
10112
10113
|
this.initTable();
|
10113
10114
|
}
|
10114
10115
|
|
@@ -10325,9 +10326,9 @@
|
|
10325
10326
|
|
10326
10327
|
var FastAESKey = /*#__PURE__*/function () {
|
10327
10328
|
function FastAESKey(subtle, key, aesMode) {
|
10328
|
-
this.subtle =
|
10329
|
-
this.key =
|
10330
|
-
this.aesMode =
|
10329
|
+
this.subtle = undefined;
|
10330
|
+
this.key = undefined;
|
10331
|
+
this.aesMode = undefined;
|
10331
10332
|
this.subtle = subtle;
|
10332
10333
|
this.key = key;
|
10333
10334
|
this.aesMode = aesMode;
|
@@ -10355,11 +10356,11 @@
|
|
10355
10356
|
var CHUNK_SIZE = 16; // 16 bytes, 128 bits
|
10356
10357
|
var Decrypter = /*#__PURE__*/function () {
|
10357
10358
|
function Decrypter(config, _temp) {
|
10358
|
-
var _ref = _temp ===
|
10359
|
+
var _ref = _temp === undefined ? {} : _temp,
|
10359
10360
|
_ref$removePKCS7Paddi = _ref.removePKCS7Padding,
|
10360
|
-
removePKCS7Padding = _ref$removePKCS7Paddi ===
|
10361
|
+
removePKCS7Padding = _ref$removePKCS7Paddi === undefined ? true : _ref$removePKCS7Paddi;
|
10361
10362
|
this.logEnabled = true;
|
10362
|
-
this.removePKCS7Padding =
|
10363
|
+
this.removePKCS7Padding = undefined;
|
10363
10364
|
this.subtle = null;
|
10364
10365
|
this.softwareDecrypter = null;
|
10365
10366
|
this.key = null;
|
@@ -10367,8 +10368,8 @@
|
|
10367
10368
|
this.remainderData = null;
|
10368
10369
|
this.currentIV = null;
|
10369
10370
|
this.currentResult = null;
|
10370
|
-
this.useSoftware =
|
10371
|
-
this.enableSoftwareAES =
|
10371
|
+
this.useSoftware = undefined;
|
10372
|
+
this.enableSoftwareAES = undefined;
|
10372
10373
|
this.enableSoftwareAES = config.enableSoftwareAES;
|
10373
10374
|
this.removePKCS7Padding = removePKCS7Padding;
|
10374
10375
|
// built in decryptor expects PKCS7 padding
|
@@ -10538,11 +10539,11 @@
|
|
10538
10539
|
function MP4Demuxer(observer, config) {
|
10539
10540
|
this.remainderData = null;
|
10540
10541
|
this.timeOffset = 0;
|
10541
|
-
this.config =
|
10542
|
-
this.videoTrack =
|
10543
|
-
this.audioTrack =
|
10544
|
-
this.id3Track =
|
10545
|
-
this.txtTrack =
|
10542
|
+
this.config = undefined;
|
10543
|
+
this.videoTrack = undefined;
|
10544
|
+
this.audioTrack = undefined;
|
10545
|
+
this.id3Track = undefined;
|
10546
|
+
this.txtTrack = undefined;
|
10546
10547
|
this.config = config;
|
10547
10548
|
}
|
10548
10549
|
var _proto = MP4Demuxer.prototype;
|
@@ -10689,8 +10690,8 @@
|
|
10689
10690
|
|
10690
10691
|
var SampleAesDecrypter = /*#__PURE__*/function () {
|
10691
10692
|
function SampleAesDecrypter(observer, config, keyData) {
|
10692
|
-
this.keyData =
|
10693
|
-
this.decrypter =
|
10693
|
+
this.keyData = undefined;
|
10694
|
+
this.decrypter = undefined;
|
10694
10695
|
this.keyData = keyData;
|
10695
10696
|
this.decrypter = new Decrypter(config, {
|
10696
10697
|
removePKCS7Padding: false
|
@@ -10956,10 +10957,10 @@
|
|
10956
10957
|
|
10957
10958
|
var ExpGolomb = /*#__PURE__*/function () {
|
10958
10959
|
function ExpGolomb(data) {
|
10959
|
-
this.data =
|
10960
|
-
this.bytesAvailable =
|
10961
|
-
this.word =
|
10962
|
-
this.bitsAvailable =
|
10960
|
+
this.data = undefined;
|
10961
|
+
this.bytesAvailable = undefined;
|
10962
|
+
this.word = undefined;
|
10963
|
+
this.bitsAvailable = undefined;
|
10963
10964
|
this.data = data;
|
10964
10965
|
// the number of bytes left to examine in this.data
|
10965
10966
|
this.bytesAvailable = data.byteLength;
|
@@ -11193,7 +11194,7 @@
|
|
11193
11194
|
spsfound = true;
|
11194
11195
|
var sps = unit.data;
|
11195
11196
|
var config = _this.readSPS(sps);
|
11196
|
-
if (!track.sps || track.width !== config.width || track.height !== config.height || ((_track$pixelRatio = track.pixelRatio) == null ?
|
11197
|
+
if (!track.sps || track.width !== config.width || track.height !== config.height || ((_track$pixelRatio = track.pixelRatio) == null ? undefined : _track$pixelRatio[0]) !== config.pixelRatio[0] || ((_track$pixelRatio2 = track.pixelRatio) == null ? undefined : _track$pixelRatio2[1]) !== config.pixelRatio[1]) {
|
11197
11198
|
track.width = config.width;
|
11198
11199
|
track.height = config.height;
|
11199
11200
|
track.pixelRatio = config.pixelRatio;
|
@@ -11440,22 +11441,22 @@
|
|
11440
11441
|
var PACKET_LENGTH = 188;
|
11441
11442
|
var TSDemuxer = /*#__PURE__*/function () {
|
11442
11443
|
function TSDemuxer(observer, config, typeSupported, logger) {
|
11443
|
-
this.logger =
|
11444
|
-
this.observer =
|
11445
|
-
this.config =
|
11446
|
-
this.typeSupported =
|
11444
|
+
this.logger = undefined;
|
11445
|
+
this.observer = undefined;
|
11446
|
+
this.config = undefined;
|
11447
|
+
this.typeSupported = undefined;
|
11447
11448
|
this.sampleAes = null;
|
11448
11449
|
this.pmtParsed = false;
|
11449
|
-
this.audioCodec =
|
11450
|
-
this.videoCodec =
|
11450
|
+
this.audioCodec = undefined;
|
11451
|
+
this.videoCodec = undefined;
|
11451
11452
|
this._pmtId = -1;
|
11452
|
-
this._videoTrack =
|
11453
|
-
this._audioTrack =
|
11454
|
-
this._id3Track =
|
11455
|
-
this._txtTrack =
|
11453
|
+
this._videoTrack = undefined;
|
11454
|
+
this._audioTrack = undefined;
|
11455
|
+
this._id3Track = undefined;
|
11456
|
+
this._txtTrack = undefined;
|
11456
11457
|
this.aacOverFlow = null;
|
11457
11458
|
this.remainderData = null;
|
11458
|
-
this.videoParser =
|
11459
|
+
this.videoParser = undefined;
|
11459
11460
|
this.observer = observer;
|
11460
11461
|
this.config = config;
|
11461
11462
|
this.typeSupported = typeSupported;
|
@@ -11563,10 +11564,10 @@
|
|
11563
11564
|
this.remainderData = null;
|
11564
11565
|
};
|
11565
11566
|
_proto.demux = function demux(data, timeOffset, isSampleAes, flush) {
|
11566
|
-
if (isSampleAes ===
|
11567
|
+
if (isSampleAes === undefined) {
|
11567
11568
|
isSampleAes = false;
|
11568
11569
|
}
|
11569
|
-
if (flush ===
|
11570
|
+
if (flush === undefined) {
|
11570
11571
|
flush = false;
|
11571
11572
|
}
|
11572
11573
|
if (!isSampleAes) {
|
@@ -11616,7 +11617,7 @@
|
|
11616
11617
|
var atf = (data[start + 3] & 0x30) >> 4;
|
11617
11618
|
|
11618
11619
|
// if an adaption field is present, its length is specified by the fifth byte of the TS packet header.
|
11619
|
-
var offset =
|
11620
|
+
var offset = undefined;
|
11620
11621
|
if (atf > 1) {
|
11621
11622
|
offset = start + 5 + data[start + 4];
|
11622
11623
|
// continue if there is only adaptation field
|
@@ -12866,21 +12867,21 @@
|
|
12866
12867
|
};
|
12867
12868
|
return MP4;
|
12868
12869
|
}();
|
12869
|
-
MP4.types =
|
12870
|
-
MP4.HDLR_TYPES =
|
12871
|
-
MP4.STTS =
|
12872
|
-
MP4.STSC =
|
12873
|
-
MP4.STCO =
|
12874
|
-
MP4.STSZ =
|
12875
|
-
MP4.VMHD =
|
12876
|
-
MP4.SMHD =
|
12877
|
-
MP4.STSD =
|
12878
|
-
MP4.FTYP =
|
12879
|
-
MP4.DINF =
|
12870
|
+
MP4.types = undefined;
|
12871
|
+
MP4.HDLR_TYPES = undefined;
|
12872
|
+
MP4.STTS = undefined;
|
12873
|
+
MP4.STSC = undefined;
|
12874
|
+
MP4.STCO = undefined;
|
12875
|
+
MP4.STSZ = undefined;
|
12876
|
+
MP4.VMHD = undefined;
|
12877
|
+
MP4.SMHD = undefined;
|
12878
|
+
MP4.STSD = undefined;
|
12879
|
+
MP4.FTYP = undefined;
|
12880
|
+
MP4.DINF = undefined;
|
12880
12881
|
|
12881
12882
|
var MPEG_TS_CLOCK_FREQ_HZ = 90000;
|
12882
12883
|
function toTimescaleFromBase(baseTime, destScale, srcBase, round) {
|
12883
|
-
if (round ===
|
12884
|
+
if (round === undefined) {
|
12884
12885
|
round = false;
|
12885
12886
|
}
|
12886
12887
|
var result = baseTime * destScale * srcBase; // equivalent to `(value * scale) / (1 / base)`
|
@@ -12913,10 +12914,10 @@
|
|
12913
12914
|
}
|
12914
12915
|
var MP4Remuxer = /*#__PURE__*/function () {
|
12915
12916
|
function MP4Remuxer(observer, config, typeSupported, logger) {
|
12916
|
-
this.logger =
|
12917
|
-
this.observer =
|
12918
|
-
this.config =
|
12919
|
-
this.typeSupported =
|
12917
|
+
this.logger = undefined;
|
12918
|
+
this.observer = undefined;
|
12919
|
+
this.config = undefined;
|
12920
|
+
this.typeSupported = undefined;
|
12920
12921
|
this.ISGenerated = false;
|
12921
12922
|
this._initPTS = null;
|
12922
12923
|
this._initDTS = null;
|
@@ -12925,7 +12926,7 @@
|
|
12925
12926
|
this.videoSampleDuration = null;
|
12926
12927
|
this.isAudioContiguous = false;
|
12927
12928
|
this.isVideoContiguous = false;
|
12928
|
-
this.videoTrackConfig =
|
12929
|
+
this.videoTrackConfig = undefined;
|
12929
12930
|
this.observer = observer;
|
12930
12931
|
this.config = config;
|
12931
12932
|
this.typeSupported = typeSupported;
|
@@ -13008,7 +13009,7 @@
|
|
13008
13009
|
if (this.ISGenerated) {
|
13009
13010
|
var _videoTrack$pixelRati, _config$pixelRatio, _videoTrack$pixelRati2, _config$pixelRatio2;
|
13010
13011
|
var config = this.videoTrackConfig;
|
13011
|
-
if (config && (videoTrack.width !== config.width || videoTrack.height !== config.height || ((_videoTrack$pixelRati = videoTrack.pixelRatio) == null ?
|
13012
|
+
if (config && (videoTrack.width !== config.width || videoTrack.height !== config.height || ((_videoTrack$pixelRati = videoTrack.pixelRatio) == null ? undefined : _videoTrack$pixelRati[0]) !== ((_config$pixelRatio = config.pixelRatio) == null ? undefined : _config$pixelRatio[0]) || ((_videoTrack$pixelRati2 = videoTrack.pixelRatio) == null ? undefined : _videoTrack$pixelRati2[1]) !== ((_config$pixelRatio2 = config.pixelRatio) == null ? undefined : _config$pixelRatio2[1])) || !config && enoughVideoSamples || this.nextAudioPts === null && enoughAudioSamples) {
|
13012
13013
|
this.resetInitSegment();
|
13013
13014
|
}
|
13014
13015
|
}
|
@@ -13372,7 +13373,7 @@
|
|
13372
13373
|
}
|
13373
13374
|
|
13374
13375
|
// expected sample duration is the Decoding Timestamp diff of consecutive samples
|
13375
|
-
var ptsDelta =
|
13376
|
+
var ptsDelta = undefined;
|
13376
13377
|
if (_i3 < nbSamples - 1) {
|
13377
13378
|
mp4SampleDuration = inputSamples[_i3 + 1].dts - VideoSample.dts;
|
13378
13379
|
ptsDelta = inputSamples[_i3 + 1].pts - VideoSample.pts;
|
@@ -13763,13 +13764,13 @@
|
|
13763
13764
|
|
13764
13765
|
var PassThroughRemuxer = /*#__PURE__*/function () {
|
13765
13766
|
function PassThroughRemuxer(observer, config, typeSupported, logger) {
|
13766
|
-
this.logger =
|
13767
|
+
this.logger = undefined;
|
13767
13768
|
this.emitInitSegment = false;
|
13768
|
-
this.audioCodec =
|
13769
|
-
this.videoCodec =
|
13770
|
-
this.initData =
|
13769
|
+
this.audioCodec = undefined;
|
13770
|
+
this.videoCodec = undefined;
|
13771
|
+
this.initData = undefined;
|
13771
13772
|
this.initPTS = null;
|
13772
|
-
this.initTracks =
|
13773
|
+
this.initTracks = undefined;
|
13773
13774
|
this.lastEndTime = null;
|
13774
13775
|
this.logger = logger;
|
13775
13776
|
}
|
@@ -13939,7 +13940,7 @@
|
|
13939
13940
|
return Math.abs(startTime - timeOffset) > minDuration;
|
13940
13941
|
}
|
13941
13942
|
function getParsedTrackCodec(track, type) {
|
13942
|
-
var parsedCodec = track == null ?
|
13943
|
+
var parsedCodec = track == null ? undefined : track.codec;
|
13943
13944
|
if (parsedCodec && parsedCodec.length > 4) {
|
13944
13945
|
return parsedCodec;
|
13945
13946
|
}
|
@@ -13984,18 +13985,18 @@
|
|
13984
13985
|
var Transmuxer = /*#__PURE__*/function () {
|
13985
13986
|
function Transmuxer(observer, typeSupported, config, vendor, id, logger) {
|
13986
13987
|
this.asyncResult = false;
|
13987
|
-
this.logger =
|
13988
|
-
this.observer =
|
13989
|
-
this.typeSupported =
|
13990
|
-
this.config =
|
13991
|
-
this.id =
|
13992
|
-
this.demuxer =
|
13993
|
-
this.remuxer =
|
13994
|
-
this.decrypter =
|
13995
|
-
this.probe =
|
13988
|
+
this.logger = undefined;
|
13989
|
+
this.observer = undefined;
|
13990
|
+
this.typeSupported = undefined;
|
13991
|
+
this.config = undefined;
|
13992
|
+
this.id = undefined;
|
13993
|
+
this.demuxer = undefined;
|
13994
|
+
this.remuxer = undefined;
|
13995
|
+
this.decrypter = undefined;
|
13996
|
+
this.probe = undefined;
|
13996
13997
|
this.decryptionPromise = null;
|
13997
|
-
this.transmuxConfig =
|
13998
|
-
this.currentTransmuxState =
|
13998
|
+
this.transmuxConfig = undefined;
|
13999
|
+
this.currentTransmuxState = undefined;
|
13999
14000
|
this.observer = observer;
|
14000
14001
|
this.typeSupported = typeSupported;
|
14001
14002
|
this.config = config;
|
@@ -14283,7 +14284,7 @@
|
|
14283
14284
|
}();
|
14284
14285
|
function getEncryptionType(data, decryptData) {
|
14285
14286
|
var encryptionType = null;
|
14286
|
-
if (data.byteLength > 0 && (decryptData == null ?
|
14287
|
+
if (data.byteLength > 0 && (decryptData == null ? undefined : decryptData.key) != null && decryptData.iv !== null && decryptData.method != null) {
|
14287
14288
|
encryptionType = decryptData;
|
14288
14289
|
}
|
14289
14290
|
return encryptionType;
|
@@ -14298,11 +14299,11 @@
|
|
14298
14299
|
return 'then' in p && p.then instanceof Function;
|
14299
14300
|
}
|
14300
14301
|
var TransmuxConfig = function TransmuxConfig(audioCodec, videoCodec, initSegmentData, duration, defaultInitPts) {
|
14301
|
-
this.audioCodec =
|
14302
|
-
this.videoCodec =
|
14303
|
-
this.initSegmentData =
|
14304
|
-
this.duration =
|
14305
|
-
this.defaultInitPts =
|
14302
|
+
this.audioCodec = undefined;
|
14303
|
+
this.videoCodec = undefined;
|
14304
|
+
this.initSegmentData = undefined;
|
14305
|
+
this.duration = undefined;
|
14306
|
+
this.defaultInitPts = undefined;
|
14306
14307
|
this.audioCodec = audioCodec;
|
14307
14308
|
this.videoCodec = videoCodec;
|
14308
14309
|
this.initSegmentData = initSegmentData;
|
@@ -14310,12 +14311,12 @@
|
|
14310
14311
|
this.defaultInitPts = defaultInitPts || null;
|
14311
14312
|
};
|
14312
14313
|
var TransmuxState = function TransmuxState(discontinuity, contiguous, accurateTimeOffset, trackSwitch, timeOffset, initSegmentChange) {
|
14313
|
-
this.discontinuity =
|
14314
|
-
this.contiguous =
|
14315
|
-
this.accurateTimeOffset =
|
14316
|
-
this.trackSwitch =
|
14317
|
-
this.timeOffset =
|
14318
|
-
this.initSegmentChange =
|
14314
|
+
this.discontinuity = undefined;
|
14315
|
+
this.contiguous = undefined;
|
14316
|
+
this.accurateTimeOffset = undefined;
|
14317
|
+
this.trackSwitch = undefined;
|
14318
|
+
this.timeOffset = undefined;
|
14319
|
+
this.initSegmentChange = undefined;
|
14319
14320
|
this.discontinuity = discontinuity;
|
14320
14321
|
this.contiguous = contiguous;
|
14321
14322
|
this.accurateTimeOffset = accurateTimeOffset;
|
@@ -14340,15 +14341,15 @@
|
|
14340
14341
|
var BYTERANGE = /(\d+)-(\d+)\/(\d+)/;
|
14341
14342
|
var FetchLoader = /*#__PURE__*/function () {
|
14342
14343
|
function FetchLoader(config) {
|
14343
|
-
this.fetchSetup =
|
14344
|
-
this.requestTimeout =
|
14344
|
+
this.fetchSetup = undefined;
|
14345
|
+
this.requestTimeout = undefined;
|
14345
14346
|
this.request = null;
|
14346
14347
|
this.response = null;
|
14347
|
-
this.controller =
|
14348
|
+
this.controller = undefined;
|
14348
14349
|
this.context = null;
|
14349
14350
|
this.config = null;
|
14350
14351
|
this.callbacks = null;
|
14351
|
-
this.stats =
|
14352
|
+
this.stats = undefined;
|
14352
14353
|
this.loader = null;
|
14353
14354
|
this.fetchSetup = config.fetchSetup || getRequest;
|
14354
14355
|
this.controller = new self.AbortController();
|
@@ -14420,7 +14421,7 @@
|
|
14420
14421
|
}
|
14421
14422
|
stats.loading.first = first;
|
14422
14423
|
stats.total = getContentLength(response.headers) || stats.total;
|
14423
|
-
var onProgress = (_this$callbacks2 = _this.callbacks) == null ?
|
14424
|
+
var onProgress = (_this$callbacks2 = _this.callbacks) == null ? undefined : _this$callbacks2.onProgress;
|
14424
14425
|
if (onProgress && isFiniteNumber(config.highWaterMark)) {
|
14425
14426
|
return _this.loadProgressively(response, stats, context, config.highWaterMark, onProgress);
|
14426
14427
|
}
|
@@ -14448,11 +14449,11 @@
|
|
14448
14449
|
data: responseData,
|
14449
14450
|
code: response.status
|
14450
14451
|
};
|
14451
|
-
var onProgress = (_this$callbacks3 = _this.callbacks) == null ?
|
14452
|
+
var onProgress = (_this$callbacks3 = _this.callbacks) == null ? undefined : _this$callbacks3.onProgress;
|
14452
14453
|
if (onProgress && !isFiniteNumber(config.highWaterMark)) {
|
14453
14454
|
onProgress(stats, context, responseData, response);
|
14454
14455
|
}
|
14455
|
-
(_this$callbacks4 = _this.callbacks) == null ?
|
14456
|
+
(_this$callbacks4 = _this.callbacks) == null ? undefined : _this$callbacks4.onSuccess(loaderResponse, stats, context, response);
|
14456
14457
|
}).catch(function (error) {
|
14457
14458
|
var _this$callbacks5;
|
14458
14459
|
self.clearTimeout(_this.requestTimeout);
|
@@ -14463,7 +14464,7 @@
|
|
14463
14464
|
// when destroying, 'error' itself can be undefined
|
14464
14465
|
var code = !error ? 0 : error.code || 0;
|
14465
14466
|
var text = !error ? null : error.message;
|
14466
|
-
(_this$callbacks5 = _this.callbacks) == null ?
|
14467
|
+
(_this$callbacks5 = _this.callbacks) == null ? undefined : _this$callbacks5.onError({
|
14467
14468
|
code: code,
|
14468
14469
|
text: text
|
14469
14470
|
}, context, error ? error.details : null, stats);
|
@@ -14481,7 +14482,7 @@
|
|
14481
14482
|
return this.response ? this.response.headers.get(name) : null;
|
14482
14483
|
};
|
14483
14484
|
_proto.loadProgressively = function loadProgressively(response, stats, context, highWaterMark, onProgress) {
|
14484
|
-
if (highWaterMark ===
|
14485
|
+
if (highWaterMark === undefined) {
|
14485
14486
|
highWaterMark = 0;
|
14486
14487
|
}
|
14487
14488
|
var chunkCache = new ChunkCache();
|
@@ -14559,8 +14560,8 @@
|
|
14559
14560
|
function FetchError(message, code, details) {
|
14560
14561
|
var _this2;
|
14561
14562
|
_this2 = _Error.call(this, message) || this;
|
14562
|
-
_this2.code =
|
14563
|
-
_this2.details =
|
14563
|
+
_this2.code = undefined;
|
14564
|
+
_this2.details = undefined;
|
14564
14565
|
_this2.code = code;
|
14565
14566
|
_this2.details = details;
|
14566
14567
|
return _this2;
|
@@ -14572,15 +14573,15 @@
|
|
14572
14573
|
var AGE_HEADER_LINE_REGEX = /^age:\s*[\d.]+\s*$/im;
|
14573
14574
|
var XhrLoader = /*#__PURE__*/function () {
|
14574
14575
|
function XhrLoader(config) {
|
14575
|
-
this.xhrSetup =
|
14576
|
-
this.requestTimeout =
|
14577
|
-
this.retryTimeout =
|
14578
|
-
this.retryDelay =
|
14576
|
+
this.xhrSetup = undefined;
|
14577
|
+
this.requestTimeout = undefined;
|
14578
|
+
this.retryTimeout = undefined;
|
14579
|
+
this.retryDelay = undefined;
|
14579
14580
|
this.config = null;
|
14580
14581
|
this.callbacks = null;
|
14581
14582
|
this.context = null;
|
14582
14583
|
this.loader = null;
|
14583
|
-
this.stats =
|
14584
|
+
this.stats = undefined;
|
14584
14585
|
this.xhrSetup = config ? config.xhrSetup || null : null;
|
14585
14586
|
this.stats = new LoadStats();
|
14586
14587
|
this.retryDelay = 0;
|
@@ -14651,7 +14652,7 @@
|
|
14651
14652
|
}).catch(function (error) {
|
14652
14653
|
var _this$callbacks2;
|
14653
14654
|
// IE11 throws an exception on xhr.open if attempting to access an HTTP resource over HTTPS
|
14654
|
-
(_this$callbacks2 = _this.callbacks) == null ?
|
14655
|
+
(_this$callbacks2 = _this.callbacks) == null ? undefined : _this$callbacks2.onError({
|
14655
14656
|
code: xhr.status,
|
14656
14657
|
text: error.message
|
14657
14658
|
}, context, xhr, stats);
|
@@ -14727,7 +14728,7 @@
|
|
14727
14728
|
var len = xhr.responseType === 'arraybuffer' ? data.byteLength : data.length;
|
14728
14729
|
stats.loaded = stats.total = len;
|
14729
14730
|
stats.bwEstimate = stats.total * 8000 / (stats.loading.end - stats.loading.first);
|
14730
|
-
var onProgress = (_this$callbacks3 = this.callbacks) == null ?
|
14731
|
+
var onProgress = (_this$callbacks3 = this.callbacks) == null ? undefined : _this$callbacks3.onProgress;
|
14731
14732
|
if (onProgress) {
|
14732
14733
|
onProgress(stats, context, data, xhr);
|
14733
14734
|
}
|
@@ -14736,7 +14737,7 @@
|
|
14736
14737
|
data: data,
|
14737
14738
|
code: _status
|
14738
14739
|
};
|
14739
|
-
(_this$callbacks4 = this.callbacks) == null ?
|
14740
|
+
(_this$callbacks4 = this.callbacks) == null ? undefined : _this$callbacks4.onSuccess(_response, stats, context, xhr);
|
14740
14741
|
return;
|
14741
14742
|
}
|
14742
14743
|
}
|
@@ -14755,7 +14756,7 @@
|
|
14755
14756
|
} else {
|
14756
14757
|
var _this$callbacks5;
|
14757
14758
|
logger.error(_status + " while loading " + context.url);
|
14758
|
-
(_this$callbacks5 = this.callbacks) == null ?
|
14759
|
+
(_this$callbacks5 = this.callbacks) == null ? undefined : _this$callbacks5.onError({
|
14759
14760
|
code: _status,
|
14760
14761
|
text: xhr.statusText
|
14761
14762
|
}, context, xhr, stats);
|
@@ -14771,7 +14772,7 @@
|
|
14771
14772
|
this.retry(retryConfig);
|
14772
14773
|
} else {
|
14773
14774
|
var _this$context;
|
14774
|
-
logger.warn("timeout while loading " + ((_this$context = this.context) == null ?
|
14775
|
+
logger.warn("timeout while loading " + ((_this$context = this.context) == null ? undefined : _this$context.url));
|
14775
14776
|
var callbacks = this.callbacks;
|
14776
14777
|
if (callbacks) {
|
14777
14778
|
this.abortInternal();
|
@@ -14784,7 +14785,7 @@
|
|
14784
14785
|
stats = this.stats;
|
14785
14786
|
this.retryDelay = getRetryDelay(retryConfig, stats.retry);
|
14786
14787
|
stats.retry++;
|
14787
|
-
logger.warn((status ? 'HTTP Status ' + status : 'Timeout') + " while loading " + (context == null ?
|
14788
|
+
logger.warn((status ? 'HTTP Status ' + status : 'Timeout') + " while loading " + (context == null ? undefined : context.url) + ", retrying " + stats.retry + "/" + retryConfig.maxNumRetry + " in " + this.retryDelay + "ms");
|
14788
14789
|
// abort and reset internal state
|
14789
14790
|
this.abortInternal();
|
14790
14791
|
this.loader = null;
|
@@ -14972,6 +14973,7 @@
|
|
14972
14973
|
progressive: false,
|
14973
14974
|
lowLatencyMode: true,
|
14974
14975
|
cmcd: undefined,
|
14976
|
+
detectStallWithCurrentTimeMs: 1250,
|
14975
14977
|
enableDateRangeMetadataCues: true,
|
14976
14978
|
enableEmsgMetadataCues: true,
|
14977
14979
|
enableEmsgKLVMetadata: false,
|
@@ -15226,7 +15228,7 @@
|
|
15226
15228
|
this.fragments = Object.create(null);
|
15227
15229
|
this.timeRanges = Object.create(null);
|
15228
15230
|
this.bufferPadding = 0.2;
|
15229
|
-
this.hls =
|
15231
|
+
this.hls = undefined;
|
15230
15232
|
this.hasGaps = false;
|
15231
15233
|
this.hls = hls;
|
15232
15234
|
this._registerListeners();
|
@@ -15290,7 +15292,7 @@
|
|
15290
15292
|
var keys = Object.keys(fragments);
|
15291
15293
|
for (var i = keys.length; i--;) {
|
15292
15294
|
var fragmentEntity = fragments[keys[i]];
|
15293
|
-
if ((fragmentEntity == null ?
|
15295
|
+
if ((fragmentEntity == null ? undefined : fragmentEntity.body.type) === levelType && (!buffered || fragmentEntity.buffered)) {
|
15294
15296
|
var frag = fragmentEntity.body;
|
15295
15297
|
if (frag.start <= position && position <= frag.end) {
|
15296
15298
|
return frag;
|
@@ -15312,7 +15314,7 @@
|
|
15312
15314
|
}
|
15313
15315
|
// Check if any flagged fragments have been unloaded
|
15314
15316
|
// excluding anything newer than appendedPartSn
|
15315
|
-
var appendedPartSn = (appendedPart == null ?
|
15317
|
+
var appendedPartSn = (appendedPart == null ? undefined : appendedPart.fragment.sn) || -1;
|
15316
15318
|
Object.keys(this.fragments).forEach(function (key) {
|
15317
15319
|
var fragmentEntity = _this.fragments[key];
|
15318
15320
|
if (!fragmentEntity) {
|
@@ -15579,7 +15581,7 @@
|
|
15579
15581
|
}
|
15580
15582
|
for (var i = keys.length; i--;) {
|
15581
15583
|
var fragmentEntity = fragments[keys[i]];
|
15582
|
-
if ((fragmentEntity == null ?
|
15584
|
+
if ((fragmentEntity == null ? undefined : fragmentEntity.body.type) === type) {
|
15583
15585
|
return true;
|
15584
15586
|
}
|
15585
15587
|
}
|
@@ -15630,7 +15632,7 @@
|
|
15630
15632
|
this.endListFragments = Object.create(null);
|
15631
15633
|
this.activePartLists = Object.create(null);
|
15632
15634
|
this.hasGaps = false;
|
15633
|
-
var partlist = (_this$hls = this.hls) == null ?
|
15635
|
+
var partlist = (_this$hls = this.hls) == null ? undefined : (_this$hls$latestLevel = _this$hls.latestLevelDetails) == null ? undefined : _this$hls$latestLevel.partList;
|
15634
15636
|
if (partlist) {
|
15635
15637
|
partlist.forEach(function (part) {
|
15636
15638
|
return part.clearElementaryStreamInfo();
|
@@ -15641,7 +15643,7 @@
|
|
15641
15643
|
}();
|
15642
15644
|
function isPartial(fragmentEntity) {
|
15643
15645
|
var _fragmentEntity$range, _fragmentEntity$range2, _fragmentEntity$range3;
|
15644
|
-
return fragmentEntity.buffered && (fragmentEntity.body.gap || ((_fragmentEntity$range = fragmentEntity.range.video) == null ?
|
15646
|
+
return fragmentEntity.buffered && (fragmentEntity.body.gap || ((_fragmentEntity$range = fragmentEntity.range.video) == null ? undefined : _fragmentEntity$range.partial) || ((_fragmentEntity$range2 = fragmentEntity.range.audio) == null ? undefined : _fragmentEntity$range2.partial) || ((_fragmentEntity$range3 = fragmentEntity.range.audiovideo) == null ? undefined : _fragmentEntity$range3.partial));
|
15645
15647
|
}
|
15646
15648
|
function getFragmentKey(fragment) {
|
15647
15649
|
return fragment.type + "_" + fragment.level + "_" + fragment.sn;
|
@@ -15779,7 +15781,7 @@
|
|
15779
15781
|
var ID3TrackController = /*#__PURE__*/function () {
|
15780
15782
|
function ID3TrackController(hls) {
|
15781
15783
|
var _this = this;
|
15782
|
-
this.hls =
|
15784
|
+
this.hls = undefined;
|
15783
15785
|
this.id3Track = null;
|
15784
15786
|
this.media = null;
|
15785
15787
|
this.dateRangeCuesAppended = {};
|
@@ -15828,7 +15830,7 @@
|
|
15828
15830
|
_proto.onMediaAttaching = function onMediaAttaching(event, data) {
|
15829
15831
|
var _data$overrides;
|
15830
15832
|
this.media = data.media;
|
15831
|
-
if (((_data$overrides = data.overrides) == null ?
|
15833
|
+
if (((_data$overrides = data.overrides) == null ? undefined : _data$overrides.cueRemoval) === false) {
|
15832
15834
|
this.removeCues = false;
|
15833
15835
|
}
|
15834
15836
|
};
|
@@ -15928,7 +15930,7 @@
|
|
15928
15930
|
};
|
15929
15931
|
_proto.updateId3CueEnds = function updateId3CueEnds(startTime, type) {
|
15930
15932
|
var _this$id3Track;
|
15931
|
-
var cues = (_this$id3Track = this.id3Track) == null ?
|
15933
|
+
var cues = (_this$id3Track = this.id3Track) == null ? undefined : _this$id3Track.cues;
|
15932
15934
|
if (cues) {
|
15933
15935
|
for (var i = cues.length; i--;) {
|
15934
15936
|
var cue = cues[i];
|
@@ -16016,7 +16018,7 @@
|
|
16016
16018
|
}
|
16017
16019
|
// Exit if the playlist does not have Date Ranges or does not have Program Date Time
|
16018
16020
|
var lastFragment = details.fragments[details.fragments.length - 1];
|
16019
|
-
if (ids.length === 0 || !isFiniteNumber(lastFragment == null ?
|
16021
|
+
if (ids.length === 0 || !isFiniteNumber(lastFragment == null ? undefined : lastFragment.programDateTime)) {
|
16020
16022
|
return;
|
16021
16023
|
}
|
16022
16024
|
if (!this.id3Track) {
|
@@ -16030,8 +16032,8 @@
|
|
16030
16032
|
|
16031
16033
|
// Process DateRanges to determine end-time (known DURATION, END-DATE, or END-ON-NEXT)
|
16032
16034
|
var appendedDateRangeCues = dateRangeCuesAppended[id];
|
16033
|
-
var cues = (appendedDateRangeCues == null ?
|
16034
|
-
var durationKnown = (appendedDateRangeCues == null ?
|
16035
|
+
var cues = (appendedDateRangeCues == null ? undefined : appendedDateRangeCues.cues) || {};
|
16036
|
+
var durationKnown = (appendedDateRangeCues == null ? undefined : appendedDateRangeCues.durationKnown) || false;
|
16035
16037
|
var endTime = MAX_CUE_ENDTIME;
|
16036
16038
|
var duration = dateRange.duration,
|
16037
16039
|
endDate = dateRange.endDate;
|
@@ -16105,8 +16107,8 @@
|
|
16105
16107
|
var LatencyController = /*#__PURE__*/function () {
|
16106
16108
|
function LatencyController(hls) {
|
16107
16109
|
var _this = this;
|
16108
|
-
this.hls =
|
16109
|
-
this.config =
|
16110
|
+
this.hls = undefined;
|
16111
|
+
this.config = undefined;
|
16110
16112
|
this.media = null;
|
16111
16113
|
this.currentTime = 0;
|
16112
16114
|
this.stallCount = 0;
|
@@ -16235,7 +16237,7 @@
|
|
16235
16237
|
if (config.liveMaxLatencyDuration !== undefined) {
|
16236
16238
|
return config.liveMaxLatencyDuration;
|
16237
16239
|
}
|
16238
|
-
var levelDetails = (_this$hls = this.hls) == null ?
|
16240
|
+
var levelDetails = (_this$hls = this.hls) == null ? undefined : _this$hls.latestLevelDetails;
|
16239
16241
|
return levelDetails ? config.liveMaxLatencyDurationCount * levelDetails.targetduration : 0;
|
16240
16242
|
}
|
16241
16243
|
}, {
|
@@ -16320,7 +16322,7 @@
|
|
16320
16322
|
function BasePlaylistController(hls, logPrefix) {
|
16321
16323
|
var _this;
|
16322
16324
|
_this = _Logger.call(this, logPrefix, hls.logger) || this;
|
16323
|
-
_this.hls =
|
16325
|
+
_this.hls = undefined;
|
16324
16326
|
_this.canLoad = false;
|
16325
16327
|
_this.timer = -1;
|
16326
16328
|
_this.hls = hls;
|
@@ -16348,12 +16350,12 @@
|
|
16348
16350
|
this.clearTimer();
|
16349
16351
|
};
|
16350
16352
|
_proto.switchParams = function switchParams(playlistUri, previous, current) {
|
16351
|
-
var renditionReports = previous == null ?
|
16353
|
+
var renditionReports = previous == null ? undefined : previous.renditionReports;
|
16352
16354
|
if (renditionReports) {
|
16353
16355
|
var foundIndex = -1;
|
16354
16356
|
for (var i = 0; i < renditionReports.length; i++) {
|
16355
16357
|
var attr = renditionReports[i];
|
16356
|
-
var uri =
|
16358
|
+
var uri = undefined;
|
16357
16359
|
try {
|
16358
16360
|
uri = new self.URL(attr.URI, previous.url).href;
|
16359
16361
|
} catch (error) {
|
@@ -16371,8 +16373,8 @@
|
|
16371
16373
|
}
|
16372
16374
|
if (foundIndex !== -1) {
|
16373
16375
|
var _attr = renditionReports[foundIndex];
|
16374
|
-
var msn = parseInt(_attr['LAST-MSN']) || (previous == null ?
|
16375
|
-
var part = parseInt(_attr['LAST-PART']) || (previous == null ?
|
16376
|
+
var msn = parseInt(_attr['LAST-MSN']) || (previous == null ? undefined : previous.lastPartSn);
|
16377
|
+
var part = parseInt(_attr['LAST-PART']) || (previous == null ? undefined : previous.lastPartIndex);
|
16376
16378
|
if (this.hls.config.lowLatencyMode) {
|
16377
16379
|
var currentGoal = Math.min(previous.age - previous.partTarget, previous.targetduration);
|
16378
16380
|
if (part >= 0 && currentGoal > previous.partTarget) {
|
@@ -16552,7 +16554,7 @@
|
|
16552
16554
|
var _ref = errorAction || {},
|
16553
16555
|
action = _ref.action,
|
16554
16556
|
_ref$retryCount = _ref.retryCount,
|
16555
|
-
retryCount = _ref$retryCount ===
|
16557
|
+
retryCount = _ref$retryCount === undefined ? 0 : _ref$retryCount,
|
16556
16558
|
retryConfig = _ref.retryConfig;
|
16557
16559
|
var retry = !!errorAction && !!retryConfig && (action === NetworkErrorAction.RetryRequest || !errorAction.resolved && action === NetworkErrorAction.SendAlternateToPenaltyBox);
|
16558
16560
|
if (retry) {
|
@@ -16589,12 +16591,12 @@
|
|
16589
16591
|
_this._levels = [];
|
16590
16592
|
_this._firstLevel = -1;
|
16591
16593
|
_this._maxAutoLevel = -1;
|
16592
|
-
_this._startLevel =
|
16594
|
+
_this._startLevel = undefined;
|
16593
16595
|
_this.currentLevel = null;
|
16594
16596
|
_this.currentLevelIndex = -1;
|
16595
16597
|
_this.manualLevelIndex = -1;
|
16596
|
-
_this.steering =
|
16597
|
-
_this.onParsedComplete =
|
16598
|
+
_this.steering = undefined;
|
16599
|
+
_this.onParsedComplete = undefined;
|
16598
16600
|
_this.steering = contentSteeringController;
|
16599
16601
|
_this._registerListeners();
|
16600
16602
|
return _this;
|
@@ -16664,7 +16666,7 @@
|
|
16664
16666
|
// Returns empty and set to undefined for 'mp4a.40.34' with fallback to 'audio/mpeg' SourceBuffer
|
16665
16667
|
levelParsed.audioCodec = audioCodec = getCodecCompatibleName(audioCodec, preferManagedMediaSource) || undefined;
|
16666
16668
|
}
|
16667
|
-
if (((_videoCodec = videoCodec) == null ?
|
16669
|
+
if (((_videoCodec = videoCodec) == null ? undefined : _videoCodec.indexOf('avc1')) === 0) {
|
16668
16670
|
videoCodec = levelParsed.videoCodec = convertAVC1ToAVCOTI(videoCodec);
|
16669
16671
|
}
|
16670
16672
|
|
@@ -16835,7 +16837,7 @@
|
|
16835
16837
|
var bandwidthEstimate = this.hls.bandwidthEstimate;
|
16836
16838
|
this.log("manifest loaded, " + levels.length + " level(s) found, first bitrate: " + firstLevelBitrate);
|
16837
16839
|
// Update default bwe to first variant bitrate as long it has not been configured or set
|
16838
|
-
if (((_this$hls$userConfig = this.hls.userConfig) == null ?
|
16840
|
+
if (((_this$hls$userConfig = this.hls.userConfig) == null ? undefined : _this$hls$userConfig.abrEwmaDefaultEstimate) === undefined) {
|
16839
16841
|
var startingBwEstimate = Math.min(firstLevelBitrate, this.hls.config.abrEwmaDefaultEstimateMax);
|
16840
16842
|
if (startingBwEstimate > bandwidthEstimate && bandwidthEstimate === this.hls.abrEwmaDefaultEstimate) {
|
16841
16843
|
this.hls.bandwidthEstimate = startingBwEstimate;
|
@@ -16934,8 +16936,8 @@
|
|
16934
16936
|
var currentLevelIndex = this.currentLevelIndex;
|
16935
16937
|
var pathwayId = currentLevel.attrs['PATHWAY-ID'];
|
16936
16938
|
var details = currentLevel.details;
|
16937
|
-
var age = details == null ?
|
16938
|
-
this.log("Loading level index " + currentLevelIndex + ((hlsUrlParameters == null ?
|
16939
|
+
var age = details == null ? undefined : details.age;
|
16940
|
+
this.log("Loading level index " + currentLevelIndex + ((hlsUrlParameters == null ? undefined : hlsUrlParameters.msn) !== undefined ? ' at sn ' + hlsUrlParameters.msn + ' part ' + hlsUrlParameters.part : '') + (pathwayId ? ' Pathway ' + pathwayId : '') + (age && details.live ? ' age ' + age.toFixed(1) + (details.type ? ' ' + details.type || '' : '') : '') + " " + url);
|
16939
16941
|
this.hls.trigger(Events.LEVEL_LOADING, {
|
16940
16942
|
url: url,
|
16941
16943
|
level: currentLevelIndex,
|
@@ -17085,7 +17087,7 @@
|
|
17085
17087
|
var levelDetails = level.details;
|
17086
17088
|
if (!levelDetails || levelDetails.live) {
|
17087
17089
|
// level not retrieved yet, or live playlist we need to (re)load it
|
17088
|
-
var hlsUrlParameters = this.switchParams(level.uri, lastLevel == null ?
|
17090
|
+
var hlsUrlParameters = this.switchParams(level.uri, lastLevel == null ? undefined : lastLevel.details, levelDetails);
|
17089
17091
|
this.loadPlaylist(hlsUrlParameters);
|
17090
17092
|
}
|
17091
17093
|
}
|
@@ -17177,7 +17179,7 @@
|
|
17177
17179
|
var MIN_CHUNK_SIZE = Math.pow(2, 17); // 128kb
|
17178
17180
|
var FragmentLoader = /*#__PURE__*/function () {
|
17179
17181
|
function FragmentLoader(config) {
|
17180
|
-
this.config =
|
17182
|
+
this.config = undefined;
|
17181
17183
|
this.loader = null;
|
17182
17184
|
this.partLoadTimeout = -1;
|
17183
17185
|
this.config = config;
|
@@ -17435,7 +17437,7 @@
|
|
17435
17437
|
return FragmentLoader;
|
17436
17438
|
}();
|
17437
17439
|
function createLoaderContext(frag, part) {
|
17438
|
-
if (part ===
|
17440
|
+
if (part === undefined) {
|
17439
17441
|
part = null;
|
17440
17442
|
}
|
17441
17443
|
var segment = part || frag;
|
@@ -17454,7 +17456,7 @@
|
|
17454
17456
|
var _frag$decryptdata;
|
17455
17457
|
var byteRangeStart = start;
|
17456
17458
|
var byteRangeEnd = end;
|
17457
|
-
if (frag.sn === 'initSegment' && isMethodFullSegmentAesCbc((_frag$decryptdata = frag.decryptdata) == null ?
|
17459
|
+
if (frag.sn === 'initSegment' && isMethodFullSegmentAesCbc((_frag$decryptdata = frag.decryptdata) == null ? undefined : _frag$decryptdata.method)) {
|
17458
17460
|
// MAP segment encrypted with method 'AES-128' or 'AES-256' (cbc), when served with HTTP Range,
|
17459
17461
|
// has the unencrypted size specified in the range.
|
17460
17462
|
// Ref: https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-08#section-6.3.6
|
@@ -17495,7 +17497,7 @@
|
|
17495
17497
|
function LoadError(data) {
|
17496
17498
|
var _this3;
|
17497
17499
|
_this3 = _Error.call(this, data.error.message) || this;
|
17498
|
-
_this3.data =
|
17500
|
+
_this3.data = undefined;
|
17499
17501
|
_this3.data = data;
|
17500
17502
|
return _this3;
|
17501
17503
|
}
|
@@ -17536,7 +17538,7 @@
|
|
17536
17538
|
function TaskLoop(label, logger) {
|
17537
17539
|
var _this;
|
17538
17540
|
_this = _Logger.call(this, label, logger) || this;
|
17539
|
-
_this._boundTick =
|
17541
|
+
_this._boundTick = undefined;
|
17540
17542
|
_this._tickTimer = null;
|
17541
17543
|
_this._tickInterval = null;
|
17542
17544
|
_this._tickCallCount = 0;
|
@@ -17631,21 +17633,21 @@
|
|
17631
17633
|
}(Logger);
|
17632
17634
|
|
17633
17635
|
var ChunkMetadata = function ChunkMetadata(level, sn, id, size, part, partial) {
|
17634
|
-
if (size ===
|
17636
|
+
if (size === undefined) {
|
17635
17637
|
size = 0;
|
17636
17638
|
}
|
17637
|
-
if (part ===
|
17639
|
+
if (part === undefined) {
|
17638
17640
|
part = -1;
|
17639
17641
|
}
|
17640
|
-
if (partial ===
|
17642
|
+
if (partial === undefined) {
|
17641
17643
|
partial = false;
|
17642
17644
|
}
|
17643
|
-
this.level =
|
17644
|
-
this.sn =
|
17645
|
-
this.part =
|
17646
|
-
this.id =
|
17647
|
-
this.size =
|
17648
|
-
this.partial =
|
17645
|
+
this.level = undefined;
|
17646
|
+
this.sn = undefined;
|
17647
|
+
this.part = undefined;
|
17648
|
+
this.id = undefined;
|
17649
|
+
this.size = undefined;
|
17650
|
+
this.partial = undefined;
|
17649
17651
|
this.transmuxing = getNewPerformanceTiming();
|
17650
17652
|
this.buffering = {
|
17651
17653
|
audio: getNewPerformanceTiming(),
|
@@ -17671,7 +17673,7 @@
|
|
17671
17673
|
function findFirstFragWithCC(fragments, cc) {
|
17672
17674
|
for (var i = 0, len = fragments.length; i < len; i++) {
|
17673
17675
|
var _fragments$i;
|
17674
|
-
if (((_fragments$i = fragments[i]) == null ?
|
17676
|
+
if (((_fragments$i = fragments[i]) == null ? undefined : _fragments$i.cc) === cc) {
|
17675
17677
|
return fragments[i];
|
17676
17678
|
}
|
17677
17679
|
}
|
@@ -17833,16 +17835,16 @@
|
|
17833
17835
|
function BaseStreamController(hls, fragmentTracker, keyLoader, logPrefix, playlistType) {
|
17834
17836
|
var _this;
|
17835
17837
|
_this = _TaskLoop.call(this, logPrefix, hls.logger) || this;
|
17836
|
-
_this.hls =
|
17838
|
+
_this.hls = undefined;
|
17837
17839
|
_this.fragPrevious = null;
|
17838
17840
|
_this.fragCurrent = null;
|
17839
|
-
_this.fragmentTracker =
|
17841
|
+
_this.fragmentTracker = undefined;
|
17840
17842
|
_this.transmuxer = null;
|
17841
17843
|
_this._state = State.STOPPED;
|
17842
|
-
_this.playlistType =
|
17844
|
+
_this.playlistType = undefined;
|
17843
17845
|
_this.media = null;
|
17844
17846
|
_this.mediaBuffer = null;
|
17845
|
-
_this.config =
|
17847
|
+
_this.config = undefined;
|
17846
17848
|
_this.bitrateTest = false;
|
17847
17849
|
_this.lastCurrentTime = 0;
|
17848
17850
|
_this.nextLoadPosition = 0;
|
@@ -17850,15 +17852,15 @@
|
|
17850
17852
|
_this.startTimeOffset = null;
|
17851
17853
|
_this.retryDate = 0;
|
17852
17854
|
_this.levels = null;
|
17853
|
-
_this.fragmentLoader =
|
17854
|
-
_this.keyLoader =
|
17855
|
+
_this.fragmentLoader = undefined;
|
17856
|
+
_this.keyLoader = undefined;
|
17855
17857
|
_this.levelLastLoaded = null;
|
17856
17858
|
_this.startFragRequested = false;
|
17857
|
-
_this.decrypter =
|
17859
|
+
_this.decrypter = undefined;
|
17858
17860
|
_this.initPTS = [];
|
17859
17861
|
_this.buffering = true;
|
17860
17862
|
_this.loadingParts = false;
|
17861
|
-
_this.loopSn =
|
17863
|
+
_this.loopSn = undefined;
|
17862
17864
|
_this.onMediaSeeking = function () {
|
17863
17865
|
var _this2 = _this,
|
17864
17866
|
config = _this2.config,
|
@@ -18019,7 +18021,7 @@
|
|
18019
18021
|
_proto.getLevelDetails = function getLevelDetails() {
|
18020
18022
|
if (this.levels && this.levelLastLoaded !== null) {
|
18021
18023
|
var _this$levelLastLoaded;
|
18022
|
-
return (_this$levelLastLoaded = this.levelLastLoaded) == null ?
|
18024
|
+
return (_this$levelLastLoaded = this.levelLastLoaded) == null ? undefined : _this$levelLastLoaded.details;
|
18023
18025
|
}
|
18024
18026
|
};
|
18025
18027
|
_proto.onMediaAttached = function onMediaAttached(event, data) {
|
@@ -18139,7 +18141,7 @@
|
|
18139
18141
|
if (_this3.state === State.STOPPED || _this3.state === State.ERROR) {
|
18140
18142
|
return;
|
18141
18143
|
}
|
18142
|
-
_this3.warn("Frag error: " + ((reason == null ?
|
18144
|
+
_this3.warn("Frag error: " + ((reason == null ? undefined : reason.message) || reason));
|
18143
18145
|
_this3.resetFragmentLoading(fragment);
|
18144
18146
|
});
|
18145
18147
|
};
|
@@ -18158,7 +18160,7 @@
|
|
18158
18160
|
if (backtracked === 1 || this.reduceMaxBufferLength(minForwardBufferLength, frag.duration)) {
|
18159
18161
|
fragmentTracker.removeFragment(frag);
|
18160
18162
|
}
|
18161
|
-
} else if (((_this$mediaBuffer = this.mediaBuffer) == null ?
|
18163
|
+
} else if (((_this$mediaBuffer = this.mediaBuffer) == null ? undefined : _this$mediaBuffer.buffered.length) === 0) {
|
18162
18164
|
// Stop gap for bad tracker / buffer flush behavior
|
18163
18165
|
fragmentTracker.removeAllFragments();
|
18164
18166
|
} else if (fragmentTracker.hasParts(frag.type)) {
|
@@ -18191,10 +18193,10 @@
|
|
18191
18193
|
};
|
18192
18194
|
_proto.waitForLive = function waitForLive(levelInfo) {
|
18193
18195
|
var details = levelInfo.details;
|
18194
|
-
return (details == null ?
|
18196
|
+
return (details == null ? undefined : details.live) && details.type !== 'EVENT' && (this.levelLastLoaded !== levelInfo || details.expired);
|
18195
18197
|
};
|
18196
18198
|
_proto.flushMainBuffer = function flushMainBuffer(startOffset, endOffset, type) {
|
18197
|
-
if (type ===
|
18199
|
+
if (type === undefined) {
|
18198
18200
|
type = null;
|
18199
18201
|
}
|
18200
18202
|
if (!(startOffset - endOffset)) {
|
@@ -18212,7 +18214,7 @@
|
|
18212
18214
|
_proto._loadInitSegment = function _loadInitSegment(fragment, level) {
|
18213
18215
|
var _this4 = this;
|
18214
18216
|
this._doFragLoad(fragment, level).then(function (data) {
|
18215
|
-
var frag = data == null ?
|
18217
|
+
var frag = data == null ? undefined : data.frag;
|
18216
18218
|
if (!frag || _this4.fragContextChanged(frag) || !_this4.levels) {
|
18217
18219
|
throw new Error('init load aborted');
|
18218
18220
|
}
|
@@ -18293,7 +18295,7 @@
|
|
18293
18295
|
return;
|
18294
18296
|
}
|
18295
18297
|
}
|
18296
|
-
var level = (_this$levels = this.levels) == null ?
|
18298
|
+
var level = (_this$levels = this.levels) == null ? undefined : _this$levels[frag.level];
|
18297
18299
|
if (level != null && level.fragmentError) {
|
18298
18300
|
this.log("Resetting level fragment error count of " + level.fragmentError + " on frag buffered");
|
18299
18301
|
level.fragmentError = 0;
|
@@ -18323,11 +18325,11 @@
|
|
18323
18325
|
_proto._doFragLoad = function _doFragLoad(frag, level, targetBufferTime, progressCallback) {
|
18324
18326
|
var _frag$decryptdata,
|
18325
18327
|
_this5 = this;
|
18326
|
-
if (targetBufferTime ===
|
18328
|
+
if (targetBufferTime === undefined) {
|
18327
18329
|
targetBufferTime = null;
|
18328
18330
|
}
|
18329
18331
|
this.fragCurrent = frag;
|
18330
|
-
var details = level == null ?
|
18332
|
+
var details = level == null ? undefined : level.details;
|
18331
18333
|
if (!this.levels || !details) {
|
18332
18334
|
throw new Error("frag load aborted, missing level" + (details ? '' : ' detail') + "s");
|
18333
18335
|
}
|
@@ -18358,7 +18360,7 @@
|
|
18358
18360
|
if (isMediaFragment(frag) && (!fragPrevious || frag.sn !== fragPrevious.sn)) {
|
18359
18361
|
var shouldLoadParts = this.shouldLoadParts(level.details, frag.end);
|
18360
18362
|
if (shouldLoadParts !== this.loadingParts) {
|
18361
|
-
this.log("LL-Part loading " + (shouldLoadParts ? 'ON' : 'OFF') + " loading sn " + (fragPrevious == null ?
|
18363
|
+
this.log("LL-Part loading " + (shouldLoadParts ? 'ON' : 'OFF') + " loading sn " + (fragPrevious == null ? undefined : fragPrevious.sn) + "->" + frag.sn);
|
18362
18364
|
this.loadingParts = shouldLoadParts;
|
18363
18365
|
}
|
18364
18366
|
}
|
@@ -18425,7 +18427,7 @@
|
|
18425
18427
|
var result;
|
18426
18428
|
if (dataOnProgress && keyLoadingPromise) {
|
18427
18429
|
result = keyLoadingPromise.then(function (keyLoadedData) {
|
18428
|
-
if (!keyLoadedData || _this5.fragContextChanged(keyLoadedData == null ?
|
18430
|
+
if (!keyLoadedData || _this5.fragContextChanged(keyLoadedData == null ? undefined : keyLoadedData.frag)) {
|
18429
18431
|
return null;
|
18430
18432
|
}
|
18431
18433
|
return _this5.fragmentLoader.load(frag, progressCallback);
|
@@ -18459,7 +18461,7 @@
|
|
18459
18461
|
return new Promise(function (resolve, reject) {
|
18460
18462
|
var _level$details2;
|
18461
18463
|
var partsLoaded = [];
|
18462
|
-
var initialPartList = (_level$details2 = level.details) == null ?
|
18464
|
+
var initialPartList = (_level$details2 = level.details) == null ? undefined : _level$details2.partList;
|
18463
18465
|
var _loadPart = function loadPart(part) {
|
18464
18466
|
_this6.fragmentLoader.loadPart(frag, part, progressCallback).then(function (partLoadedData) {
|
18465
18467
|
partsLoaded[part.index] = partLoadedData;
|
@@ -18535,10 +18537,10 @@
|
|
18535
18537
|
// Buffer must be ahead of first part + duration of parts after last segment
|
18536
18538
|
// and playback must be at or past segment adjacent to part list
|
18537
18539
|
var firstPart = details.partList[0];
|
18538
|
-
var safePartStart = firstPart.end + (((_details$fragmentHint = details.fragmentHint) == null ?
|
18540
|
+
var safePartStart = firstPart.end + (((_details$fragmentHint = details.fragmentHint) == null ? undefined : _details$fragmentHint.duration) || 0);
|
18539
18541
|
if (bufferEnd >= safePartStart) {
|
18540
18542
|
var _this$media;
|
18541
|
-
var playhead = this.hls.hasEnoughToStart ? ((_this$media = this.media) == null ?
|
18543
|
+
var playhead = this.hls.hasEnoughToStart ? ((_this$media = this.media) == null ? undefined : _this$media.currentTime) || this.lastCurrentTime : this.getLoadPosition();
|
18542
18544
|
if (playhead > firstPart.start - firstPart.fragment.duration) {
|
18543
18545
|
return true;
|
18544
18546
|
}
|
@@ -18670,10 +18672,10 @@
|
|
18670
18672
|
};
|
18671
18673
|
_proto.getAppendedFrag = function getAppendedFrag(position, playlistType) {
|
18672
18674
|
var _this$fragmentTracker;
|
18673
|
-
if (playlistType ===
|
18675
|
+
if (playlistType === undefined) {
|
18674
18676
|
playlistType = PlaylistLevelType.MAIN;
|
18675
18677
|
}
|
18676
|
-
var fragOrPart = (_this$fragmentTracker = this.fragmentTracker) == null ?
|
18678
|
+
var fragOrPart = (_this$fragmentTracker = this.fragmentTracker) == null ? undefined : _this$fragmentTracker.getAppendedFrag(position, playlistType);
|
18677
18679
|
if (fragOrPart && 'fragment' in fragOrPart) {
|
18678
18680
|
return fragOrPart.fragment;
|
18679
18681
|
}
|
@@ -18711,7 +18713,7 @@
|
|
18711
18713
|
var mainStart = this.hls.startPosition;
|
18712
18714
|
var liveSyncPosition = this.hls.liveSyncPosition;
|
18713
18715
|
var startPosition = frag ? (mainStart !== -1 && mainStart >= start ? mainStart : liveSyncPosition) || frag.start : pos;
|
18714
|
-
this.log("Setting startPosition to " + startPosition + " to match initial live edge. mainStart: " + mainStart + " liveSyncPosition: " + liveSyncPosition + " frag.start: " + ((_frag = frag) == null ?
|
18716
|
+
this.log("Setting startPosition to " + startPosition + " to match initial live edge. mainStart: " + mainStart + " liveSyncPosition: " + liveSyncPosition + " frag.start: " + ((_frag = frag) == null ? undefined : _frag.start));
|
18715
18717
|
this.startPosition = this.nextLoadPosition = startPosition;
|
18716
18718
|
}
|
18717
18719
|
} else if (pos <= start) {
|
@@ -18973,7 +18975,7 @@
|
|
18973
18975
|
}
|
18974
18976
|
if (this.fragContextChanged(frag)) {
|
18975
18977
|
var _this$fragCurrent;
|
18976
|
-
this.warn("Frag load error must match current frag to retry " + frag.url + " > " + ((_this$fragCurrent = this.fragCurrent) == null ?
|
18978
|
+
this.warn("Frag load error must match current frag to retry " + frag.url + " > " + ((_this$fragCurrent = this.fragCurrent) == null ? undefined : _this$fragCurrent.url));
|
18977
18979
|
return;
|
18978
18980
|
}
|
18979
18981
|
var gapTagEncountered = data.details === ErrorDetails.FRAG_GAP;
|
@@ -18986,7 +18988,7 @@
|
|
18986
18988
|
action = _ref2.action,
|
18987
18989
|
flags = _ref2.flags,
|
18988
18990
|
_ref2$retryCount = _ref2.retryCount,
|
18989
|
-
retryCount = _ref2$retryCount ===
|
18991
|
+
retryCount = _ref2$retryCount === undefined ? 0 : _ref2$retryCount,
|
18990
18992
|
retryConfig = _ref2.retryConfig;
|
18991
18993
|
var couldRetry = !!errorAction && !!retryConfig;
|
18992
18994
|
var retry = couldRetry && action === NetworkErrorAction.RetryRequest;
|
@@ -19031,7 +19033,7 @@
|
|
19031
19033
|
// reduce max buf len if current position is buffered
|
19032
19034
|
var buffered = bufferedInfo && bufferedInfo.len > 0.5;
|
19033
19035
|
if (buffered) {
|
19034
|
-
this.reduceMaxBufferLength(bufferedInfo.len, (frag == null ?
|
19036
|
+
this.reduceMaxBufferLength(bufferedInfo.len, (frag == null ? undefined : frag.duration) || 10);
|
19035
19037
|
}
|
19036
19038
|
var flushBuffer = !buffered;
|
19037
19039
|
if (flushBuffer) {
|
@@ -19107,7 +19109,7 @@
|
|
19107
19109
|
this.resetLoadingState();
|
19108
19110
|
};
|
19109
19111
|
_proto.removeUnbufferedFrags = function removeUnbufferedFrags(start) {
|
19110
|
-
if (start ===
|
19112
|
+
if (start === undefined) {
|
19111
19113
|
start = 0;
|
19112
19114
|
}
|
19113
19115
|
this.fragmentTracker.removeFragmentsInRange(start, Infinity, this.playlistType, false, true);
|
@@ -19145,7 +19147,7 @@
|
|
19145
19147
|
}
|
19146
19148
|
return result;
|
19147
19149
|
}, false);
|
19148
|
-
if (!parsed && ((_this$transmuxer = this.transmuxer) == null ?
|
19150
|
+
if (!parsed && ((_this$transmuxer = this.transmuxer) == null ? undefined : _this$transmuxer.error) === null) {
|
19149
19151
|
var error = new Error("Found no media in fragment " + frag.sn + " of " + this.playlistLabel() + " " + frag.level + " resetting transmuxer to fallback to playlist timing");
|
19150
19152
|
if (level.fragmentError === 0) {
|
19151
19153
|
// Mark and track the odd empty segment as a gap to avoid reloading
|
@@ -19178,7 +19180,7 @@
|
|
19178
19180
|
};
|
19179
19181
|
_proto.fragInfo = function fragInfo(frag, pts, part) {
|
19180
19182
|
var _ref3, _ref4;
|
19181
|
-
if (pts ===
|
19183
|
+
if (pts === undefined) {
|
19182
19184
|
pts = true;
|
19183
19185
|
}
|
19184
19186
|
return this.playlistLabel() + " " + frag.level + " (" + (part ? 'part' : 'frag') + ":[" + ((_ref3 = pts && !part ? frag.startPTS : (part || frag).start) != null ? _ref3 : NaN).toFixed(3) + "-" + ((_ref4 = pts && !part ? frag.endPTS : (part || frag).end) != null ? _ref4 : NaN).toFixed(3) + "]" + (part && frag.type === 'main' ? 'INDEPENDENT=' + (part.independent ? 'YES' : 'NO') : '');
|
@@ -19193,7 +19195,7 @@
|
|
19193
19195
|
};
|
19194
19196
|
_proto.resetTransmuxer = function resetTransmuxer() {
|
19195
19197
|
var _this$transmuxer2;
|
19196
|
-
(_this$transmuxer2 = this.transmuxer) == null ?
|
19198
|
+
(_this$transmuxer2 = this.transmuxer) == null ? undefined : _this$transmuxer2.reset();
|
19197
19199
|
};
|
19198
19200
|
_proto.recoverWorkerError = function recoverWorkerError(data) {
|
19199
19201
|
if (data.event === 'demuxerWorker') {
|
@@ -19236,25 +19238,23 @@
|
|
19236
19238
|
}]);
|
19237
19239
|
}(TaskLoop);
|
19238
19240
|
|
19239
|
-
var STALL_MINIMUM_DURATION_MS = 250;
|
19240
19241
|
var MAX_START_GAP_JUMP = 2.0;
|
19241
19242
|
var SKIP_BUFFER_HOLE_STEP_SECONDS = 0.1;
|
19242
19243
|
var SKIP_BUFFER_RANGE_START = 0.05;
|
19243
19244
|
var GapController = /*#__PURE__*/function (_Logger) {
|
19244
|
-
function GapController(
|
19245
|
+
function GapController(media, fragmentTracker, hls) {
|
19245
19246
|
var _this;
|
19246
19247
|
_this = _Logger.call(this, 'gap-controller', hls.logger) || this;
|
19247
|
-
_this.config = void 0;
|
19248
19248
|
_this.media = null;
|
19249
|
-
_this.fragmentTracker =
|
19250
|
-
_this.hls =
|
19249
|
+
_this.fragmentTracker = null;
|
19250
|
+
_this.hls = null;
|
19251
19251
|
_this.nudgeRetry = 0;
|
19252
19252
|
_this.stallReported = false;
|
19253
19253
|
_this.stalled = null;
|
19254
19254
|
_this.moved = false;
|
19255
19255
|
_this.seeking = false;
|
19256
19256
|
_this.ended = 0;
|
19257
|
-
_this.
|
19257
|
+
_this.waiting = 0;
|
19258
19258
|
_this.media = media;
|
19259
19259
|
_this.fragmentTracker = fragmentTracker;
|
19260
19260
|
_this.hls = hls;
|
@@ -19263,9 +19263,7 @@
|
|
19263
19263
|
_inheritsLoose(GapController, _Logger);
|
19264
19264
|
var _proto = GapController.prototype;
|
19265
19265
|
_proto.destroy = function destroy() {
|
19266
|
-
this.media = null;
|
19267
|
-
// @ts-ignore
|
19268
|
-
this.hls = this.fragmentTracker = null;
|
19266
|
+
this.media = this.hls = this.fragmentTracker = null;
|
19269
19267
|
}
|
19270
19268
|
|
19271
19269
|
/**
|
@@ -19275,10 +19273,10 @@
|
|
19275
19273
|
* @param lastCurrentTime - Previously read playhead position
|
19276
19274
|
*/;
|
19277
19275
|
_proto.poll = function poll(lastCurrentTime, activeFrag, levelDetails, state) {
|
19278
|
-
var
|
19279
|
-
|
19276
|
+
var _this$hls;
|
19277
|
+
var media = this.media,
|
19280
19278
|
stalled = this.stalled;
|
19281
|
-
if (media
|
19279
|
+
if (!media) {
|
19282
19280
|
return;
|
19283
19281
|
}
|
19284
19282
|
var currentTime = media.currentTime,
|
@@ -19296,43 +19294,45 @@
|
|
19296
19294
|
if (!seeking) {
|
19297
19295
|
this.nudgeRetry = 0;
|
19298
19296
|
}
|
19299
|
-
if (
|
19300
|
-
|
19301
|
-
if (this.stallReported) {
|
19302
|
-
var _stalledDuration = self.performance.now() - stalled;
|
19303
|
-
this.warn("playback not stuck anymore @" + currentTime + ", after " + Math.round(_stalledDuration) + "ms");
|
19304
|
-
this.stallReported = false;
|
19305
|
-
}
|
19306
|
-
this.stalled = null;
|
19297
|
+
if (this.waiting === 0) {
|
19298
|
+
this.stallResolved(currentTime);
|
19307
19299
|
}
|
19308
19300
|
return;
|
19309
19301
|
}
|
19310
19302
|
|
19311
19303
|
// Clear stalled state when beginning or finishing seeking so that we don't report stalls coming out of a seek
|
19312
19304
|
if (beginSeek || seeked) {
|
19313
|
-
|
19305
|
+
if (seeked) {
|
19306
|
+
this.stallResolved(currentTime);
|
19307
|
+
}
|
19314
19308
|
return;
|
19315
19309
|
}
|
19316
19310
|
|
19317
19311
|
// The playhead should not be moving
|
19318
|
-
if (media.paused && !seeking || media.ended || media.playbackRate === 0
|
19312
|
+
if (media.paused && !seeking || media.ended || media.playbackRate === 0) {
|
19313
|
+
this.nudgeRetry = 0;
|
19314
|
+
this.stallResolved(currentTime);
|
19319
19315
|
// Fire MEDIA_ENDED to workaround event not being dispatched by browser
|
19320
|
-
if (!this.ended && media.ended) {
|
19316
|
+
if (!this.ended && media.ended && this.hls) {
|
19321
19317
|
this.ended = currentTime || 1;
|
19322
19318
|
this.hls.trigger(Events.MEDIA_ENDED, {
|
19323
19319
|
stalled: false
|
19324
19320
|
});
|
19325
19321
|
}
|
19322
|
+
return;
|
19323
|
+
}
|
19324
|
+
if (!BufferHelper.getBuffered(media).length) {
|
19326
19325
|
this.nudgeRetry = 0;
|
19327
19326
|
return;
|
19328
19327
|
}
|
19329
19328
|
var bufferInfo = BufferHelper.bufferInfo(media, currentTime, 0);
|
19330
19329
|
var nextStart = bufferInfo.nextStart || 0;
|
19331
|
-
|
19330
|
+
var fragmentTracker = this.fragmentTracker;
|
19331
|
+
if (seeking && fragmentTracker) {
|
19332
19332
|
// Waiting for seeking in a buffered range to complete
|
19333
19333
|
var hasEnoughBuffer = bufferInfo.len > MAX_START_GAP_JUMP;
|
19334
19334
|
// Next buffered range is too far ahead to jump to while still seeking
|
19335
|
-
var noBufferGap = !nextStart || activeFrag && activeFrag.start <= currentTime || nextStart - currentTime > MAX_START_GAP_JUMP && !
|
19335
|
+
var noBufferGap = !nextStart || activeFrag && activeFrag.start <= currentTime || nextStart - currentTime > MAX_START_GAP_JUMP && !fragmentTracker.getPartialFragment(currentTime);
|
19336
19336
|
if (hasEnoughBuffer || noBufferGap) {
|
19337
19337
|
return;
|
19338
19338
|
}
|
@@ -19342,7 +19342,7 @@
|
|
19342
19342
|
|
19343
19343
|
// Skip start gaps if we haven't played, but the last poll detected the start of a stall
|
19344
19344
|
// The addition poll gives the browser a chance to jump the gap for us
|
19345
|
-
if (!this.moved && this.stalled !== null) {
|
19345
|
+
if (!this.moved && this.stalled !== null && fragmentTracker) {
|
19346
19346
|
// There is no playable buffer (seeked, waiting for buffer)
|
19347
19347
|
var isBuffered = bufferInfo.len > 0;
|
19348
19348
|
if (!isBuffered && !nextStart) {
|
@@ -19356,7 +19356,7 @@
|
|
19356
19356
|
// that begins over 1 target duration after the video start position.
|
19357
19357
|
var isLive = !!(levelDetails != null && levelDetails.live);
|
19358
19358
|
var maxStartGapJump = isLive ? levelDetails.targetduration * 2 : MAX_START_GAP_JUMP;
|
19359
|
-
var partialOrGap =
|
19359
|
+
var partialOrGap = fragmentTracker.getPartialFragment(currentTime);
|
19360
19360
|
if (startJump > 0 && (startJump <= maxStartGapJump || partialOrGap)) {
|
19361
19361
|
if (!media.paused) {
|
19362
19362
|
this._trySkipBufferHole(partialOrGap);
|
@@ -19366,16 +19366,27 @@
|
|
19366
19366
|
}
|
19367
19367
|
|
19368
19368
|
// Start tracking stall time
|
19369
|
+
var config = (_this$hls = this.hls) == null ? undefined : _this$hls.config;
|
19370
|
+
if (!config) {
|
19371
|
+
return;
|
19372
|
+
}
|
19373
|
+
var detectStallWithCurrentTimeMs = config.detectStallWithCurrentTimeMs;
|
19369
19374
|
var tnow = self.performance.now();
|
19375
|
+
var tWaiting = this.waiting;
|
19370
19376
|
if (stalled === null) {
|
19371
|
-
|
19377
|
+
// Use time of recent "waiting" event
|
19378
|
+
if (tWaiting > 0 && tnow - tWaiting < detectStallWithCurrentTimeMs) {
|
19379
|
+
this.stalled = tWaiting;
|
19380
|
+
} else {
|
19381
|
+
this.stalled = tnow;
|
19382
|
+
}
|
19372
19383
|
return;
|
19373
19384
|
}
|
19374
19385
|
var stalledDuration = tnow - stalled;
|
19375
|
-
if (!seeking && stalledDuration >=
|
19386
|
+
if (!seeking && (stalledDuration >= detectStallWithCurrentTimeMs || tWaiting) && this.hls) {
|
19376
19387
|
// Dispatch MEDIA_ENDED when media.ended/ended event is not signalled at end of stream
|
19377
|
-
if (state === State.ENDED && !(levelDetails != null && levelDetails.live) && Math.abs(currentTime - ((levelDetails == null ?
|
19378
|
-
if (
|
19388
|
+
if (state === State.ENDED && !(levelDetails != null && levelDetails.live) && Math.abs(currentTime - ((levelDetails == null ? undefined : levelDetails.edge) || 0)) < 1) {
|
19389
|
+
if (this.ended) {
|
19379
19390
|
return;
|
19380
19391
|
}
|
19381
19392
|
this.ended = currentTime || 1;
|
@@ -19386,12 +19397,26 @@
|
|
19386
19397
|
}
|
19387
19398
|
// Report stalling after trying to fix
|
19388
19399
|
this._reportStall(bufferInfo);
|
19389
|
-
if (!this.media) {
|
19400
|
+
if (!this.media || !this.hls) {
|
19390
19401
|
return;
|
19391
19402
|
}
|
19392
19403
|
}
|
19393
19404
|
var bufferedWithHoles = BufferHelper.bufferInfo(media, currentTime, config.maxBufferHole);
|
19394
19405
|
this._tryFixBufferStall(bufferedWithHoles, stalledDuration);
|
19406
|
+
};
|
19407
|
+
_proto.stallResolved = function stallResolved(currentTime) {
|
19408
|
+
var stalled = this.stalled;
|
19409
|
+
if (stalled && this.hls) {
|
19410
|
+
this.stalled = null;
|
19411
|
+
// The playhead is now moving, but was previously stalled
|
19412
|
+
if (this.stallReported) {
|
19413
|
+
var stalledDuration = self.performance.now() - stalled;
|
19414
|
+
this.warn("playback not stuck anymore @" + currentTime + ", after " + Math.round(stalledDuration) + "ms");
|
19415
|
+
this.stallReported = false;
|
19416
|
+
this.waiting = 0;
|
19417
|
+
this.hls.trigger(Events.STALL_RESOLVED, {});
|
19418
|
+
}
|
19419
|
+
}
|
19395
19420
|
}
|
19396
19421
|
|
19397
19422
|
/**
|
@@ -19401,10 +19426,11 @@
|
|
19401
19426
|
* @private
|
19402
19427
|
*/;
|
19403
19428
|
_proto._tryFixBufferStall = function _tryFixBufferStall(bufferInfo, stalledDurationMs) {
|
19404
|
-
var
|
19405
|
-
|
19429
|
+
var _this$hls2;
|
19430
|
+
var fragmentTracker = this.fragmentTracker,
|
19406
19431
|
media = this.media;
|
19407
|
-
|
19432
|
+
var config = (_this$hls2 = this.hls) == null ? undefined : _this$hls2.config;
|
19433
|
+
if (!media || !fragmentTracker || !config) {
|
19408
19434
|
return;
|
19409
19435
|
}
|
19410
19436
|
var currentTime = media.currentTime;
|
@@ -19424,13 +19450,12 @@
|
|
19424
19450
|
// we may just have to "nudge" the playlist as the browser decoding/rendering engine
|
19425
19451
|
// needs to cross some sort of threshold covering all source-buffers content
|
19426
19452
|
// to start playing properly.
|
19427
|
-
|
19453
|
+
var bufferedRanges = bufferInfo.buffered;
|
19454
|
+
if ((bufferedRanges && bufferedRanges.length > 1 && bufferInfo.len > config.maxBufferHole || bufferInfo.nextStart && bufferInfo.nextStart - currentTime < config.maxBufferHole) && stalledDurationMs > config.highBufferWatchdogPeriod * 1000) {
|
19428
19455
|
this.warn('Trying to nudge playhead over buffer-hole');
|
19429
19456
|
// Try to nudge currentTime over a buffer hole if we've been stalling for the configured amount of seconds
|
19430
19457
|
// We only try to jump the hole if it's under the configured size
|
19431
|
-
|
19432
|
-
this.stalled = null;
|
19433
|
-
this._tryNudgeBuffer();
|
19458
|
+
this._tryNudgeBuffer(bufferInfo);
|
19434
19459
|
}
|
19435
19460
|
}
|
19436
19461
|
|
@@ -19442,8 +19467,9 @@
|
|
19442
19467
|
_proto._reportStall = function _reportStall(bufferInfo) {
|
19443
19468
|
var hls = this.hls,
|
19444
19469
|
media = this.media,
|
19445
|
-
stallReported = this.stallReported
|
19446
|
-
|
19470
|
+
stallReported = this.stallReported,
|
19471
|
+
stalled = this.stalled;
|
19472
|
+
if (!stallReported && stalled !== null && media && hls) {
|
19447
19473
|
// Report stalled error once
|
19448
19474
|
this.stallReported = true;
|
19449
19475
|
var error = new Error("Playback stalling at @" + media.currentTime + " due to low buffer (" + JSON.stringify(bufferInfo) + ")");
|
@@ -19453,7 +19479,11 @@
|
|
19453
19479
|
details: ErrorDetails.BUFFER_STALLED_ERROR,
|
19454
19480
|
fatal: false,
|
19455
19481
|
error: error,
|
19456
|
-
buffer: bufferInfo.len
|
19482
|
+
buffer: bufferInfo.len,
|
19483
|
+
bufferInfo: bufferInfo,
|
19484
|
+
stalled: {
|
19485
|
+
start: stalled
|
19486
|
+
}
|
19457
19487
|
});
|
19458
19488
|
}
|
19459
19489
|
}
|
@@ -19464,10 +19494,11 @@
|
|
19464
19494
|
* @private
|
19465
19495
|
*/;
|
19466
19496
|
_proto._trySkipBufferHole = function _trySkipBufferHole(partial) {
|
19467
|
-
var
|
19468
|
-
|
19497
|
+
var _this$hls3;
|
19498
|
+
var fragmentTracker = this.fragmentTracker,
|
19469
19499
|
media = this.media;
|
19470
|
-
|
19500
|
+
var config = (_this$hls3 = this.hls) == null ? undefined : _this$hls3.config;
|
19501
|
+
if (!media || !fragmentTracker || !config) {
|
19471
19502
|
return 0;
|
19472
19503
|
}
|
19473
19504
|
|
@@ -19482,7 +19513,6 @@
|
|
19482
19513
|
if (gapLength > 0 && (bufferStarved || waiting)) {
|
19483
19514
|
// Only allow large gaps to be skipped if it is a start gap, or all fragments in skip range are partial
|
19484
19515
|
if (gapLength > config.maxBufferHole) {
|
19485
|
-
var fragmentTracker = this.fragmentTracker;
|
19486
19516
|
var startGap = false;
|
19487
19517
|
if (currentTime === 0) {
|
19488
19518
|
var startFrag = fragmentTracker.getAppendedFrag(0, PlaylistLevelType.MAIN);
|
@@ -19513,17 +19543,18 @@
|
|
19513
19543
|
var targetTime = Math.max(startTime + SKIP_BUFFER_RANGE_START, currentTime + SKIP_BUFFER_HOLE_STEP_SECONDS);
|
19514
19544
|
this.warn("skipping hole, adjusting currentTime from " + currentTime + " to " + targetTime);
|
19515
19545
|
this.moved = true;
|
19516
|
-
this.stalled = null;
|
19517
19546
|
media.currentTime = targetTime;
|
19518
|
-
if (partial && !partial.gap) {
|
19547
|
+
if (partial && !partial.gap && this.hls) {
|
19519
19548
|
var error = new Error("fragment loaded with buffer holes, seeking from " + currentTime + " to " + targetTime);
|
19520
|
-
hls.trigger(Events.ERROR, {
|
19549
|
+
this.hls.trigger(Events.ERROR, {
|
19521
19550
|
type: ErrorTypes.MEDIA_ERROR,
|
19522
19551
|
details: ErrorDetails.BUFFER_SEEK_OVER_HOLE,
|
19523
19552
|
fatal: false,
|
19524
19553
|
error: error,
|
19525
19554
|
reason: error.message,
|
19526
|
-
frag: partial
|
19555
|
+
frag: partial,
|
19556
|
+
buffer: bufferInfo.len,
|
19557
|
+
bufferInfo: bufferInfo
|
19527
19558
|
});
|
19528
19559
|
}
|
19529
19560
|
return targetTime;
|
@@ -19536,13 +19567,13 @@
|
|
19536
19567
|
* Attempts to fix buffer stalls by advancing the mediaElement's current time by a small amount.
|
19537
19568
|
* @private
|
19538
19569
|
*/;
|
19539
|
-
_proto._tryNudgeBuffer = function _tryNudgeBuffer() {
|
19540
|
-
var
|
19541
|
-
hls = this.hls,
|
19570
|
+
_proto._tryNudgeBuffer = function _tryNudgeBuffer(bufferInfo) {
|
19571
|
+
var hls = this.hls,
|
19542
19572
|
media = this.media,
|
19543
19573
|
nudgeRetry = this.nudgeRetry;
|
19544
|
-
|
19545
|
-
|
19574
|
+
var config = hls == null ? undefined : hls.config;
|
19575
|
+
if (!media || !config) {
|
19576
|
+
return 0;
|
19546
19577
|
}
|
19547
19578
|
var currentTime = media.currentTime;
|
19548
19579
|
this.nudgeRetry++;
|
@@ -19556,7 +19587,9 @@
|
|
19556
19587
|
type: ErrorTypes.MEDIA_ERROR,
|
19557
19588
|
details: ErrorDetails.BUFFER_NUDGE_ON_STALL,
|
19558
19589
|
error: error,
|
19559
|
-
fatal: false
|
19590
|
+
fatal: false,
|
19591
|
+
buffer: bufferInfo.len,
|
19592
|
+
bufferInfo: bufferInfo
|
19560
19593
|
});
|
19561
19594
|
} else {
|
19562
19595
|
var _error = new Error("Playhead still not moving while enough data buffered @" + currentTime + " after " + config.nudgeMaxRetry + " nudges");
|
@@ -19565,7 +19598,9 @@
|
|
19565
19598
|
type: ErrorTypes.MEDIA_ERROR,
|
19566
19599
|
details: ErrorDetails.BUFFER_STALLED_ERROR,
|
19567
19600
|
error: _error,
|
19568
|
-
fatal: true
|
19601
|
+
fatal: true,
|
19602
|
+
buffer: bufferInfo.len,
|
19603
|
+
bufferInfo: bufferInfo
|
19569
19604
|
});
|
19570
19605
|
}
|
19571
19606
|
};
|
@@ -19735,7 +19770,7 @@
|
|
19735
19770
|
return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
|
19736
19771
|
}
|
19737
19772
|
|
19738
|
-
var version = "1.6.0-beta.2.0.canary.
|
19773
|
+
var version = "1.6.0-beta.2.0.canary.10883";
|
19739
19774
|
|
19740
19775
|
// ensure the worker ends up in the bundle
|
19741
19776
|
// If the worker should not be included this gets aliased to empty.js
|
@@ -19800,17 +19835,17 @@
|
|
19800
19835
|
function TransmuxerInterface(_hls, id, onTransmuxComplete, onFlush) {
|
19801
19836
|
var _this = this;
|
19802
19837
|
this.error = null;
|
19803
|
-
this.hls =
|
19804
|
-
this.id =
|
19838
|
+
this.hls = undefined;
|
19839
|
+
this.id = undefined;
|
19805
19840
|
this.instanceNo = transmuxerInstanceCount++;
|
19806
|
-
this.observer =
|
19841
|
+
this.observer = undefined;
|
19807
19842
|
this.frag = null;
|
19808
19843
|
this.part = null;
|
19809
|
-
this.useWorker =
|
19844
|
+
this.useWorker = undefined;
|
19810
19845
|
this.workerContext = null;
|
19811
19846
|
this.transmuxer = null;
|
19812
|
-
this.onTransmuxComplete =
|
19813
|
-
this.onFlush =
|
19847
|
+
this.onTransmuxComplete = undefined;
|
19848
|
+
this.onFlush = undefined;
|
19814
19849
|
this.onWorkerMessage = function (event) {
|
19815
19850
|
var data = event.data;
|
19816
19851
|
var hls = _this.hls;
|
@@ -19821,7 +19856,7 @@
|
|
19821
19856
|
case 'init':
|
19822
19857
|
{
|
19823
19858
|
var _this$workerContext;
|
19824
|
-
var objectURL = (_this$workerContext = _this.workerContext) == null ?
|
19859
|
+
var objectURL = (_this$workerContext = _this.workerContext) == null ? undefined : _this$workerContext.objectURL;
|
19825
19860
|
if (objectURL) {
|
19826
19861
|
// revoke the Object URL that was used to create transmuxer worker, so as not to leak it
|
19827
19862
|
self.URL.revokeObjectURL(objectURL);
|
@@ -19995,7 +20030,7 @@
|
|
19995
20030
|
var trackSwitch = !(lastFrag && chunkMeta.level === lastFrag.level);
|
19996
20031
|
var snDiff = lastFrag ? chunkMeta.sn - lastFrag.sn : -1;
|
19997
20032
|
var partDiff = this.part ? chunkMeta.part - this.part.index : -1;
|
19998
|
-
var progressive = snDiff === 0 && chunkMeta.id > 1 && chunkMeta.id === (lastFrag == null ?
|
20033
|
+
var progressive = snDiff === 0 && chunkMeta.id > 1 && chunkMeta.id === (lastFrag == null ? undefined : lastFrag.stats.chunkCount);
|
19999
20034
|
var contiguous = !trackSwitch && (snDiff === 1 || snDiff === 0 && (partDiff === 1 || progressive && partDiff <= 0));
|
20000
20035
|
var now = self.performance.now();
|
20001
20036
|
if (trackSwitch || snDiff || frag.stats.parsing.start === 0) {
|
@@ -20004,7 +20039,7 @@
|
|
20004
20039
|
if (part && (partDiff || !contiguous)) {
|
20005
20040
|
part.stats.parsing.start = now;
|
20006
20041
|
}
|
20007
|
-
var initSegmentChange = !(lastFrag && ((_frag$initSegment = frag.initSegment) == null ?
|
20042
|
+
var initSegmentChange = !(lastFrag && ((_frag$initSegment = frag.initSegment) == null ? undefined : _frag$initSegment.url) === ((_lastFrag$initSegment = lastFrag.initSegment) == null ? undefined : _lastFrag$initSegment.url));
|
20008
20043
|
var state = new TransmuxState(discontinuity, contiguous, accurateTimeOffset, trackSwitch, timeOffset, initSegmentChange);
|
20009
20044
|
if (!contiguous || discontinuity || initSegmentChange) {
|
20010
20045
|
this.hls.logger.log("[transmuxer-interface]: Starting new transmux session for " + frag.type + " sn: " + chunkMeta.sn + (chunkMeta.part > -1 ? ' part: ' + chunkMeta.part : '') + " " + (this.id === PlaylistLevelType.MAIN ? 'level' : 'track') + ": " + chunkMeta.level + " id: " + chunkMeta.id + "\n discontinuity: " + discontinuity + "\n trackSwitch: " + trackSwitch + "\n contiguous: " + contiguous + "\n accurateTimeOffset: " + accurateTimeOffset + "\n timeOffset: " + timeOffset + "\n initSegmentChange: " + initSegmentChange);
|
@@ -20125,7 +20160,7 @@
|
|
20125
20160
|
return false;
|
20126
20161
|
}
|
20127
20162
|
var mediaSource = getMediaSource();
|
20128
|
-
return typeof (mediaSource == null ?
|
20163
|
+
return typeof (mediaSource == null ? undefined : mediaSource.isTypeSupported) === 'function' && (['avc1.42E01E,mp4a.40.2', 'av01.0.01M.08', 'vp09.00.50.08'].some(function (codecsForVideoContainer) {
|
20129
20164
|
return mediaSource.isTypeSupported(mimeTypeForCodec(codecsForVideoContainer, 'video'));
|
20130
20165
|
}) || ['mp4a.40.2', 'fLaC'].some(function (codecForAudioContainer) {
|
20131
20166
|
return mediaSource.isTypeSupported(mimeTypeForCodec(codecForAudioContainer, 'audio'));
|
@@ -20134,7 +20169,7 @@
|
|
20134
20169
|
function changeTypeSupported() {
|
20135
20170
|
var _sourceBuffer$prototy;
|
20136
20171
|
var sourceBuffer = getSourceBuffer();
|
20137
|
-
return typeof (sourceBuffer == null ?
|
20172
|
+
return typeof (sourceBuffer == null ? undefined : (_sourceBuffer$prototy = sourceBuffer.prototype) == null ? undefined : _sourceBuffer$prototy.changeType) === 'function';
|
20138
20173
|
}
|
20139
20174
|
|
20140
20175
|
var TICK_INTERVAL = 100; // how often to tick in ms
|
@@ -20155,11 +20190,18 @@
|
|
20155
20190
|
_this.backtrackFragment = null;
|
20156
20191
|
_this.audioCodecSwitch = false;
|
20157
20192
|
_this.videoBuffer = null;
|
20193
|
+
_this.onMediaWaiting = function () {
|
20194
|
+
var gapController = _this.gapController;
|
20195
|
+
if (gapController) {
|
20196
|
+
gapController.waiting = self.performance.now();
|
20197
|
+
}
|
20198
|
+
};
|
20158
20199
|
_this.onMediaPlaying = function () {
|
20159
20200
|
// tick to speed up FRAG_CHANGED triggering
|
20160
20201
|
var gapController = _this.gapController;
|
20161
20202
|
if (gapController) {
|
20162
20203
|
gapController.ended = 0;
|
20204
|
+
gapController.waiting = 0;
|
20163
20205
|
}
|
20164
20206
|
_this.tick();
|
20165
20207
|
};
|
@@ -20214,7 +20256,7 @@
|
|
20214
20256
|
};
|
20215
20257
|
_proto.onHandlerDestroying = function onHandlerDestroying() {
|
20216
20258
|
// @ts-ignore
|
20217
|
-
this.onMediaPlaying = this.onMediaSeeked = null;
|
20259
|
+
this.onMediaPlaying = this.onMediaSeeked = this.onMediaWaiting = null;
|
20218
20260
|
this.unregisterListeners();
|
20219
20261
|
_BaseStreamController.prototype.onHandlerDestroying.call(this);
|
20220
20262
|
};
|
@@ -20267,8 +20309,8 @@
|
|
20267
20309
|
{
|
20268
20310
|
var levels = this.levels,
|
20269
20311
|
level = this.level;
|
20270
|
-
var currentLevel = levels == null ?
|
20271
|
-
var details = currentLevel == null ?
|
20312
|
+
var currentLevel = levels == null ? undefined : levels[level];
|
20313
|
+
var details = currentLevel == null ? undefined : currentLevel.details;
|
20272
20314
|
if (details && (!details.live || this.levelLastLoaded === currentLevel && !this.waitForLive(currentLevel))) {
|
20273
20315
|
if (this.waitForCdnTuneIn(details)) {
|
20274
20316
|
break;
|
@@ -20290,7 +20332,7 @@
|
|
20290
20332
|
if (!retryDate || now >= retryDate || (_this$media = this.media) != null && _this$media.seeking) {
|
20291
20333
|
var _levels = this.levels,
|
20292
20334
|
_level = this.level;
|
20293
|
-
var _currentLevel = _levels == null ?
|
20335
|
+
var _currentLevel = _levels == null ? undefined : _levels[_level];
|
20294
20336
|
this.resetStartWhenNotLoaded(_currentLevel || null);
|
20295
20337
|
this.state = State.IDLE;
|
20296
20338
|
}
|
@@ -20535,15 +20577,18 @@
|
|
20535
20577
|
var media = data.media;
|
20536
20578
|
media.removeEventListener('playing', this.onMediaPlaying);
|
20537
20579
|
media.removeEventListener('seeked', this.onMediaSeeked);
|
20580
|
+
media.removeEventListener('waiting', this.onMediaWaiting);
|
20538
20581
|
media.addEventListener('playing', this.onMediaPlaying);
|
20539
20582
|
media.addEventListener('seeked', this.onMediaSeeked);
|
20540
|
-
|
20583
|
+
media.addEventListener('waiting', this.onMediaWaiting);
|
20584
|
+
this.gapController = new GapController(media, this.fragmentTracker, this.hls);
|
20541
20585
|
};
|
20542
20586
|
_proto.onMediaDetaching = function onMediaDetaching(event, data) {
|
20543
20587
|
var media = this.media;
|
20544
20588
|
if (media) {
|
20545
20589
|
media.removeEventListener('playing', this.onMediaPlaying);
|
20546
20590
|
media.removeEventListener('seeked', this.onMediaSeeked);
|
20591
|
+
media.removeEventListener('waiting', this.onMediaWaiting);
|
20547
20592
|
}
|
20548
20593
|
this.videoBuffer = null;
|
20549
20594
|
this.fragPlaying = null;
|
@@ -20565,7 +20610,7 @@
|
|
20565
20610
|
if (gapController.ended) {
|
20566
20611
|
return;
|
20567
20612
|
}
|
20568
|
-
gapController.ended = ((_this$media2 = this.media) == null ?
|
20613
|
+
gapController.ended = ((_this$media2 = this.media) == null ? undefined : _this$media2.currentTime) || 1;
|
20569
20614
|
}
|
20570
20615
|
this.hls.trigger(Events.MEDIA_ENDED, {
|
20571
20616
|
stalled: false
|
@@ -20636,7 +20681,7 @@
|
|
20636
20681
|
if (newDetails.deltaUpdateFailed) {
|
20637
20682
|
return;
|
20638
20683
|
}
|
20639
|
-
sliding = this.alignPlaylists(newDetails, curLevel.details, (_this$levelLastLoaded = this.levelLastLoaded) == null ?
|
20684
|
+
sliding = this.alignPlaylists(newDetails, curLevel.details, (_this$levelLastLoaded = this.levelLastLoaded) == null ? undefined : _this$levelLastLoaded.details);
|
20640
20685
|
}
|
20641
20686
|
// override level info
|
20642
20687
|
curLevel.details = newDetails;
|
@@ -20716,7 +20761,7 @@
|
|
20716
20761
|
|
20717
20762
|
// time Offset is accurate if level PTS is known, or if playlist is not sliding (not live)
|
20718
20763
|
var accurateTimeOffset = details.PTSKnown || !details.live;
|
20719
|
-
var initSegmentData = (_frag$initSegment = frag.initSegment) == null ?
|
20764
|
+
var initSegmentData = (_frag$initSegment = frag.initSegment) == null ? undefined : _frag$initSegment.data;
|
20720
20765
|
var audioCodec = this._getAudioCodec(currentLevel);
|
20721
20766
|
|
20722
20767
|
// transmux the MPEG-TS data to ISO-BMFF segments
|
@@ -20761,7 +20806,7 @@
|
|
20761
20806
|
this.fragmentTracker.removeAllFragments();
|
20762
20807
|
hls.once(Events.BUFFER_FLUSHED, function () {
|
20763
20808
|
var _this2$hls;
|
20764
|
-
(_this2$hls = _this2.hls) == null ?
|
20809
|
+
(_this2$hls = _this2.hls) == null ? undefined : _this2$hls.trigger(Events.AUDIO_TRACK_SWITCHED, data);
|
20765
20810
|
});
|
20766
20811
|
hls.trigger(Events.BUFFER_FLUSHING, {
|
20767
20812
|
startOffset: 0,
|
@@ -20869,7 +20914,7 @@
|
|
20869
20914
|
case ErrorDetails.LEVEL_LOAD_TIMEOUT:
|
20870
20915
|
case ErrorDetails.LEVEL_PARSING_ERROR:
|
20871
20916
|
// in case of non fatal error while loading level, if level controller is not retrying to load level, switch back to IDLE
|
20872
|
-
if (!data.levelRetry && this.state === State.WAITING_LEVEL && ((_data$context = data.context) == null ?
|
20917
|
+
if (!data.levelRetry && this.state === State.WAITING_LEVEL && ((_data$context = data.context) == null ? undefined : _data$context.type) === PlaylistContextType.LEVEL) {
|
20873
20918
|
this.state = State.IDLE;
|
20874
20919
|
}
|
20875
20920
|
break;
|
@@ -20953,7 +20998,7 @@
|
|
20953
20998
|
var startPosition = this.startPosition;
|
20954
20999
|
// only adjust currentTime if different from startPosition or if startPosition not buffered
|
20955
21000
|
// at that stage, there should be only one buffered range, as we reach that code after first fragment has been buffered
|
20956
|
-
if (startPosition >= 0) {
|
21001
|
+
if (startPosition >= 0 && currentTime < startPosition) {
|
20957
21002
|
if (media.seeking) {
|
20958
21003
|
this.log("could not seek to " + startPosition + ", already seeking at " + currentTime);
|
20959
21004
|
return;
|
@@ -20963,13 +21008,13 @@
|
|
20963
21008
|
var details = this.getLevelDetails();
|
20964
21009
|
var configuredTimelineOffset = this.config.timelineOffset;
|
20965
21010
|
if (configuredTimelineOffset && startPosition) {
|
20966
|
-
startPosition += (details == null ?
|
21011
|
+
startPosition += (details == null ? undefined : details.appliedTimelineOffset) || configuredTimelineOffset;
|
20967
21012
|
}
|
20968
21013
|
var buffered = BufferHelper.getBuffered(media);
|
20969
21014
|
var bufferStart = buffered.length ? buffered.start(0) : 0;
|
20970
21015
|
var delta = bufferStart - startPosition;
|
20971
21016
|
var skipTolerance = Math.max(this.config.maxBufferHole, this.config.maxFragLookUpTolerance);
|
20972
|
-
if (delta > 0 && (delta < skipTolerance || this.loadingParts && delta < 2 * ((details == null ?
|
21017
|
+
if (delta > 0 && (delta < skipTolerance || this.loadingParts && delta < 2 * ((details == null ? undefined : details.partTarget) || 0))) {
|
20973
21018
|
this.log("adjusting start position by " + delta + " to match buffer start");
|
20974
21019
|
startPosition += delta;
|
20975
21020
|
this.startPosition = startPosition;
|
@@ -20997,7 +21042,7 @@
|
|
20997
21042
|
fragment.bitrateTest = true;
|
20998
21043
|
this._doFragLoad(fragment, level).then(function (data) {
|
20999
21044
|
var hls = _this3.hls;
|
21000
|
-
var frag = data == null ?
|
21045
|
+
var frag = data == null ? undefined : data.frag;
|
21001
21046
|
if (!frag || _this3.fragContextChanged(frag)) {
|
21002
21047
|
return;
|
21003
21048
|
}
|
@@ -21216,7 +21261,7 @@
|
|
21216
21261
|
video.levelCodec = currentLevel.videoCodec;
|
21217
21262
|
video.id = 'main';
|
21218
21263
|
var parsedVideoCodec = video.codec;
|
21219
|
-
if ((parsedVideoCodec == null ?
|
21264
|
+
if ((parsedVideoCodec == null ? undefined : parsedVideoCodec.length) === 4) {
|
21220
21265
|
// Make up for passthrough-remuxer not being able to parse full codec
|
21221
21266
|
// (logger warning "Unhandled video codec...")
|
21222
21267
|
switch (parsedVideoCodec) {
|
@@ -21330,7 +21375,7 @@
|
|
21330
21375
|
get: function get() {
|
21331
21376
|
var levels = this.levels,
|
21332
21377
|
level = this.level;
|
21333
|
-
var levelInfo = levels == null ?
|
21378
|
+
var levelInfo = levels == null ? undefined : levels[level];
|
21334
21379
|
if (!levelInfo) {
|
21335
21380
|
return this.config.maxBufferLength;
|
21336
21381
|
}
|
@@ -21352,7 +21397,7 @@
|
|
21352
21397
|
if (this.fragPlaying) {
|
21353
21398
|
return this.fragPlaying;
|
21354
21399
|
}
|
21355
|
-
var currentTime = ((_this$media3 = this.media) == null ?
|
21400
|
+
var currentTime = ((_this$media3 = this.media) == null ? undefined : _this$media3.currentTime) || this.lastCurrentTime;
|
21356
21401
|
if (isFiniteNumber(currentTime)) {
|
21357
21402
|
return this.getAppendedFrag(currentTime);
|
21358
21403
|
}
|
@@ -21362,7 +21407,7 @@
|
|
21362
21407
|
key: "currentProgramDateTime",
|
21363
21408
|
get: function get() {
|
21364
21409
|
var _this$media4;
|
21365
|
-
var currentTime = ((_this$media4 = this.media) == null ?
|
21410
|
+
var currentTime = ((_this$media4 = this.media) == null ? undefined : _this$media4.currentTime) || this.lastCurrentTime;
|
21366
21411
|
if (isFiniteNumber(currentTime)) {
|
21367
21412
|
var details = this.getLevelDetails();
|
21368
21413
|
var frag = this.currentFrag || (details ? findFragmentByPTS(null, details.fragments, currentTime) : null);
|
@@ -21404,7 +21449,7 @@
|
|
21404
21449
|
|
21405
21450
|
var KeyLoader = /*#__PURE__*/function () {
|
21406
21451
|
function KeyLoader(config) {
|
21407
|
-
this.config =
|
21452
|
+
this.config = undefined;
|
21408
21453
|
this.keyUriToKeyInfo = {};
|
21409
21454
|
this.emeController = null;
|
21410
21455
|
this.config = config;
|
@@ -21415,7 +21460,7 @@
|
|
21415
21460
|
var loader = this.keyUriToKeyInfo[uri].loader;
|
21416
21461
|
if (loader) {
|
21417
21462
|
var _loader$context;
|
21418
|
-
if (type && type !== ((_loader$context = loader.context) == null ?
|
21463
|
+
if (type && type !== ((_loader$context = loader.context) == null ? undefined : _loader$context.frag.type)) {
|
21419
21464
|
return;
|
21420
21465
|
}
|
21421
21466
|
loader.abort();
|
@@ -21442,7 +21487,7 @@
|
|
21442
21487
|
this.keyUriToKeyInfo = {};
|
21443
21488
|
};
|
21444
21489
|
_proto.createKeyLoadError = function createKeyLoadError(frag, details, error, networkDetails, response) {
|
21445
|
-
if (details ===
|
21490
|
+
if (details === undefined) {
|
21446
21491
|
details = ErrorDetails.KEY_LOAD_ERROR;
|
21447
21492
|
}
|
21448
21493
|
return new LoadError({
|
@@ -21510,7 +21555,7 @@
|
|
21510
21555
|
// Return key load promise as long as it does not have a mediakey session with an unusable key status
|
21511
21556
|
if ((_keyInfo2 = keyInfo) != null && _keyInfo2.keyLoadPromise) {
|
21512
21557
|
var _keyInfo$mediaKeySess;
|
21513
|
-
switch ((_keyInfo$mediaKeySess = keyInfo.mediaKeySessionContext) == null ?
|
21558
|
+
switch ((_keyInfo$mediaKeySess = keyInfo.mediaKeySessionContext) == null ? undefined : _keyInfo$mediaKeySess.keyStatus) {
|
21514
21559
|
case undefined:
|
21515
21560
|
case 'status-pending':
|
21516
21561
|
case 'usable':
|
@@ -21675,7 +21720,7 @@
|
|
21675
21720
|
}
|
21676
21721
|
var PlaylistLoader = /*#__PURE__*/function () {
|
21677
21722
|
function PlaylistLoader(hls) {
|
21678
|
-
this.hls =
|
21723
|
+
this.hls = undefined;
|
21679
21724
|
this.loaders = Object.create(null);
|
21680
21725
|
this.variableList = null;
|
21681
21726
|
this.onManifestLoaded = this.checkAutostartLoad;
|
@@ -21860,7 +21905,7 @@
|
|
21860
21905
|
|
21861
21906
|
// Override level/track timeout for LL-HLS requests
|
21862
21907
|
// (the default of 10000ms is counter productive to blocking playlist reload requests)
|
21863
|
-
if (isFiniteNumber((_context$deliveryDire = context.deliveryDirectives) == null ?
|
21908
|
+
if (isFiniteNumber((_context$deliveryDire = context.deliveryDirectives) == null ? undefined : _context$deliveryDire.part)) {
|
21864
21909
|
var levelDetails;
|
21865
21910
|
if (context.type === PlaylistContextType.LEVEL && context.level !== null) {
|
21866
21911
|
levelDetails = this.hls.levels[context.level].details;
|
@@ -21951,7 +21996,7 @@
|
|
21951
21996
|
this.variableList = variableList;
|
21952
21997
|
var _M3U8Parser$parseMast = M3U8Parser.parseMasterPlaylistMedia(string, url, parsedResult),
|
21953
21998
|
_M3U8Parser$parseMast2 = _M3U8Parser$parseMast.AUDIO,
|
21954
|
-
audioTracks = _M3U8Parser$parseMast2 ===
|
21999
|
+
audioTracks = _M3U8Parser$parseMast2 === undefined ? [] : _M3U8Parser$parseMast2,
|
21955
22000
|
subtitles = _M3U8Parser$parseMast.SUBTITLES,
|
21956
22001
|
captions = _M3U8Parser$parseMast['CLOSED-CAPTIONS'];
|
21957
22002
|
if (audioTracks.length) {
|
@@ -22055,7 +22100,7 @@
|
|
22055
22100
|
});
|
22056
22101
|
};
|
22057
22102
|
_proto.handleNetworkError = function handleNetworkError(context, networkDetails, timeout, response, stats) {
|
22058
|
-
if (timeout ===
|
22103
|
+
if (timeout === undefined) {
|
22059
22104
|
timeout = false;
|
22060
22105
|
}
|
22061
22106
|
var message = "A network " + (timeout ? 'timeout' : 'error' + (response ? ' (status ' + response.code + ')' : '')) + " occurred while loading " + context.type;
|
@@ -22102,7 +22147,7 @@
|
|
22102
22147
|
stats: stats
|
22103
22148
|
};
|
22104
22149
|
if (response) {
|
22105
|
-
var url = (networkDetails == null ?
|
22150
|
+
var url = (networkDetails == null ? undefined : networkDetails.url) || context.url;
|
22106
22151
|
errorData.response = _objectSpread2({
|
22107
22152
|
url: url,
|
22108
22153
|
data: undefined
|
@@ -22252,7 +22297,7 @@
|
|
22252
22297
|
if (!audioGroupId) {
|
22253
22298
|
return;
|
22254
22299
|
}
|
22255
|
-
(_audioTracksByGroup$g = audioTracksByGroup.groups[audioGroupId]) == null ?
|
22300
|
+
(_audioTracksByGroup$g = audioTracksByGroup.groups[audioGroupId]) == null ? undefined : _audioTracksByGroup$g.tracks.forEach(function (audioTrack) {
|
22256
22301
|
if (audioTrack.groupId === audioGroupId) {
|
22257
22302
|
var channels = audioTrack.channels || '';
|
22258
22303
|
var channelsNumber = parseFloat(channels);
|
@@ -22320,41 +22365,41 @@
|
|
22320
22365
|
* @param userConfig - Configuration options applied over `Hls.DefaultConfig`
|
22321
22366
|
*/
|
22322
22367
|
function Hls(userConfig) {
|
22323
|
-
if (userConfig ===
|
22368
|
+
if (userConfig === undefined) {
|
22324
22369
|
userConfig = {};
|
22325
22370
|
}
|
22326
22371
|
/**
|
22327
22372
|
* The runtime configuration used by the player. At instantiation this is combination of `hls.userConfig` merged over `Hls.DefaultConfig`.
|
22328
22373
|
*/
|
22329
|
-
this.config =
|
22374
|
+
this.config = undefined;
|
22330
22375
|
/**
|
22331
22376
|
* The configuration object provided on player instantiation.
|
22332
22377
|
*/
|
22333
|
-
this.userConfig =
|
22378
|
+
this.userConfig = undefined;
|
22334
22379
|
/**
|
22335
22380
|
* The logger functions used by this player instance, configured on player instantiation.
|
22336
22381
|
*/
|
22337
|
-
this.logger =
|
22338
|
-
this.coreComponents =
|
22339
|
-
this.networkControllers =
|
22382
|
+
this.logger = undefined;
|
22383
|
+
this.coreComponents = undefined;
|
22384
|
+
this.networkControllers = undefined;
|
22340
22385
|
this._emitter = new EventEmitter();
|
22341
22386
|
this._autoLevelCapping = -1;
|
22342
22387
|
this._maxHdcpLevel = null;
|
22343
|
-
this.abrController =
|
22344
|
-
this.bufferController =
|
22345
|
-
this.capLevelController =
|
22346
|
-
this.latencyController =
|
22347
|
-
this.levelController =
|
22348
|
-
this.streamController =
|
22349
|
-
this.audioTrackController =
|
22350
|
-
this.subtitleTrackController =
|
22351
|
-
this.interstitialsController =
|
22352
|
-
this.emeController =
|
22353
|
-
this.cmcdController =
|
22388
|
+
this.abrController = undefined;
|
22389
|
+
this.bufferController = undefined;
|
22390
|
+
this.capLevelController = undefined;
|
22391
|
+
this.latencyController = undefined;
|
22392
|
+
this.levelController = undefined;
|
22393
|
+
this.streamController = undefined;
|
22394
|
+
this.audioTrackController = undefined;
|
22395
|
+
this.subtitleTrackController = undefined;
|
22396
|
+
this.interstitialsController = undefined;
|
22397
|
+
this.emeController = undefined;
|
22398
|
+
this.cmcdController = undefined;
|
22354
22399
|
this._media = null;
|
22355
22400
|
this._url = null;
|
22356
|
-
this._sessionId =
|
22357
|
-
this.triggeringException =
|
22401
|
+
this._sessionId = undefined;
|
22402
|
+
this.triggeringException = undefined;
|
22358
22403
|
this.started = false;
|
22359
22404
|
var logger = this.logger = enableLogs(userConfig.debug || false, 'Hls instance', userConfig.assetPlayerId);
|
22360
22405
|
var config = this.config = mergeConfig(Hls.DefaultConfig, userConfig, logger);
|
@@ -22462,13 +22507,13 @@
|
|
22462
22507
|
// Delegate the EventEmitter through the public API of Hls.js
|
22463
22508
|
;
|
22464
22509
|
_proto.on = function on(event, listener, context) {
|
22465
|
-
if (context ===
|
22510
|
+
if (context === undefined) {
|
22466
22511
|
context = this;
|
22467
22512
|
}
|
22468
22513
|
this._emitter.on(event, listener, context);
|
22469
22514
|
};
|
22470
22515
|
_proto.once = function once(event, listener, context) {
|
22471
|
-
if (context ===
|
22516
|
+
if (context === undefined) {
|
22472
22517
|
context = this;
|
22473
22518
|
}
|
22474
22519
|
this._emitter.once(event, listener, context);
|
@@ -22477,7 +22522,7 @@
|
|
22477
22522
|
this._emitter.removeAllListeners(event);
|
22478
22523
|
};
|
22479
22524
|
_proto.off = function off(event, listener, context, once) {
|
22480
|
-
if (context ===
|
22525
|
+
if (context === undefined) {
|
22481
22526
|
context = this;
|
22482
22527
|
}
|
22483
22528
|
this._emitter.off(event, listener, context, once);
|
@@ -22626,7 +22671,7 @@
|
|
22626
22671
|
* Defaults to -1 (None: starts from earliest point)
|
22627
22672
|
*/
|
22628
22673
|
_proto.startLoad = function startLoad(startPosition, skipSeekToStartPosition) {
|
22629
|
-
if (startPosition ===
|
22674
|
+
if (startPosition === undefined) {
|
22630
22675
|
startPosition = -1;
|
22631
22676
|
}
|
22632
22677
|
this.logger.log("startLoad(" + (startPosition + (skipSeekToStartPosition ? ', <skip seek to start>' : '')) + ")");
|
@@ -22703,7 +22748,7 @@
|
|
22703
22748
|
_proto.recoverMediaError = function recoverMediaError() {
|
22704
22749
|
this.logger.log('recoverMediaError');
|
22705
22750
|
var media = this._media;
|
22706
|
-
var time = media == null ?
|
22751
|
+
var time = media == null ? undefined : media.currentTime;
|
22707
22752
|
this.detachMedia();
|
22708
22753
|
if (media) {
|
22709
22754
|
this.attachMedia(media);
|
@@ -22725,7 +22770,7 @@
|
|
22725
22770
|
*/
|
22726
22771
|
_proto.setAudioOption = function setAudioOption(audioOption) {
|
22727
22772
|
var _this$audioTrackContr;
|
22728
|
-
return ((_this$audioTrackContr = this.audioTrackController) == null ?
|
22773
|
+
return ((_this$audioTrackContr = this.audioTrackController) == null ? undefined : _this$audioTrackContr.setAudioOption(audioOption)) || null;
|
22729
22774
|
}
|
22730
22775
|
/**
|
22731
22776
|
* Find and select the best matching subtitle track, making a level switch when a Group change is necessary.
|
@@ -22733,7 +22778,7 @@
|
|
22733
22778
|
*/;
|
22734
22779
|
_proto.setSubtitleOption = function setSubtitleOption(subtitleOption) {
|
22735
22780
|
var _this$subtitleTrackCo;
|
22736
|
-
return ((_this$subtitleTrackCo = this.subtitleTrackController) == null ?
|
22781
|
+
return ((_this$subtitleTrackCo = this.subtitleTrackController) == null ? undefined : _this$subtitleTrackCo.setSubtitleOption(subtitleOption)) || null;
|
22737
22782
|
}
|
22738
22783
|
|
22739
22784
|
/**
|
@@ -22743,7 +22788,7 @@
|
|
22743
22788
|
* returns mediaCapabilities.decodingInfo for a variant/rendition
|
22744
22789
|
*/
|
22745
22790
|
_proto.getMediaDecodingInfo = function getMediaDecodingInfo(level, audioTracks) {
|
22746
|
-
if (audioTracks ===
|
22791
|
+
if (audioTracks === undefined) {
|
22747
22792
|
audioTracks = this.allAudioTracks;
|
22748
22793
|
}
|
22749
22794
|
var audioTracksByGroup = getAudioTracksByGroup(audioTracks);
|
@@ -23346,7 +23391,7 @@
|
|
23346
23391
|
key: "interstitialsManager",
|
23347
23392
|
get: function get() {
|
23348
23393
|
var _this$interstitialsCo;
|
23349
|
-
return ((_this$interstitialsCo = this.interstitialsController) == null ?
|
23394
|
+
return ((_this$interstitialsCo = this.interstitialsController) == null ? undefined : _this$interstitialsCo.interstitialsManager) || null;
|
23350
23395
|
}
|
23351
23396
|
}], [{
|
23352
23397
|
key: "version",
|
@@ -23398,7 +23443,7 @@
|
|
23398
23443
|
}
|
23399
23444
|
}]);
|
23400
23445
|
}();
|
23401
|
-
Hls.defaultConfig =
|
23446
|
+
Hls.defaultConfig = undefined;
|
23402
23447
|
|
23403
23448
|
return Hls;
|
23404
23449
|
|