hls.js 1.6.0-beta.2.0.canary.10878 → 1.6.0-beta.2.0.canary.10882
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.js +653 -653
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +473 -473
- 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 +411 -411
- 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 +570 -570
- 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/dist/hls.js
CHANGED
@@ -20,12 +20,12 @@
|
|
20
20
|
function _defineProperties(e, r) {
|
21
21
|
for (var t = 0; t < r.length; t++) {
|
22
22
|
var o = r[t];
|
23
|
-
o.enumerable = o.enumerable ||
|
23
|
+
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
24
24
|
}
|
25
25
|
}
|
26
26
|
function _createClass(e, r, t) {
|
27
27
|
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
28
|
-
writable:
|
28
|
+
writable: false
|
29
29
|
}), e;
|
30
30
|
}
|
31
31
|
function _createForOfIteratorHelperLoose(r, e) {
|
@@ -36,9 +36,9 @@
|
|
36
36
|
var o = 0;
|
37
37
|
return function () {
|
38
38
|
return o >= r.length ? {
|
39
|
-
done:
|
39
|
+
done: true
|
40
40
|
} : {
|
41
|
-
done:
|
41
|
+
done: false,
|
42
42
|
value: r[o++]
|
43
43
|
};
|
44
44
|
};
|
@@ -48,9 +48,9 @@
|
|
48
48
|
function _defineProperty(e, r, t) {
|
49
49
|
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
50
50
|
value: t,
|
51
|
-
enumerable:
|
52
|
-
configurable:
|
53
|
-
writable:
|
51
|
+
enumerable: true,
|
52
|
+
configurable: true,
|
53
|
+
writable: true
|
54
54
|
}) : e[r] = t, e;
|
55
55
|
}
|
56
56
|
function _extends() {
|
@@ -98,7 +98,7 @@
|
|
98
98
|
function _objectSpread2(e) {
|
99
99
|
for (var r = 1; r < arguments.length; r++) {
|
100
100
|
var t = null != arguments[r] ? arguments[r] : {};
|
101
|
-
r % 2 ? ownKeys(Object(t),
|
101
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
102
102
|
_defineProperty(e, r, t[r]);
|
103
103
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
104
104
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
@@ -114,7 +114,7 @@
|
|
114
114
|
function _toPrimitive(t, r) {
|
115
115
|
if ("object" != typeof t || !t) return t;
|
116
116
|
var e = t[Symbol.toPrimitive];
|
117
|
-
if (
|
117
|
+
if (undefined !== e) {
|
118
118
|
var i = e.call(t, r || "default");
|
119
119
|
if ("object" != typeof i) return i;
|
120
120
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
@@ -129,15 +129,15 @@
|
|
129
129
|
if (r) {
|
130
130
|
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
131
131
|
var t = {}.toString.call(r).slice(8, -1);
|
132
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) :
|
132
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : undefined;
|
133
133
|
}
|
134
134
|
}
|
135
135
|
function _wrapNativeSuper(t) {
|
136
|
-
var r = "function" == typeof Map ? new Map() :
|
136
|
+
var r = "function" == typeof Map ? new Map() : undefined;
|
137
137
|
return _wrapNativeSuper = function (t) {
|
138
138
|
if (null === t || !_isNativeFunction(t)) return t;
|
139
139
|
if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
|
140
|
-
if (
|
140
|
+
if (undefined !== r) {
|
141
141
|
if (r.has(t)) return r.get(t);
|
142
142
|
r.set(t, Wrapper);
|
143
143
|
}
|
@@ -147,9 +147,9 @@
|
|
147
147
|
return Wrapper.prototype = Object.create(t.prototype, {
|
148
148
|
constructor: {
|
149
149
|
value: Wrapper,
|
150
|
-
enumerable:
|
151
|
-
writable:
|
152
|
-
configurable:
|
150
|
+
enumerable: false,
|
151
|
+
writable: true,
|
152
|
+
configurable: true
|
153
153
|
}
|
154
154
|
}), _setPrototypeOf(Wrapper, t);
|
155
155
|
}, _wrapNativeSuper(t);
|
@@ -880,16 +880,16 @@
|
|
880
880
|
var EWMA = /*#__PURE__*/function () {
|
881
881
|
// About half of the estimated value will be from the last |halfLife| samples by weight.
|
882
882
|
function EWMA(halfLife, estimate, weight) {
|
883
|
-
if (estimate ===
|
883
|
+
if (estimate === undefined) {
|
884
884
|
estimate = 0;
|
885
885
|
}
|
886
|
-
if (weight ===
|
886
|
+
if (weight === undefined) {
|
887
887
|
weight = 0;
|
888
888
|
}
|
889
|
-
this.halfLife =
|
890
|
-
this.alpha_ =
|
891
|
-
this.estimate_ =
|
892
|
-
this.totalWeight_ =
|
889
|
+
this.halfLife = undefined;
|
890
|
+
this.alpha_ = undefined;
|
891
|
+
this.estimate_ = undefined;
|
892
|
+
this.totalWeight_ = undefined;
|
893
893
|
this.halfLife = halfLife;
|
894
894
|
// Larger values of alpha expire historical data more slowly.
|
895
895
|
this.alpha_ = halfLife ? Math.exp(Math.log(0.5) / halfLife) : 0;
|
@@ -919,16 +919,16 @@
|
|
919
919
|
|
920
920
|
var EwmaBandWidthEstimator = /*#__PURE__*/function () {
|
921
921
|
function EwmaBandWidthEstimator(slow, fast, defaultEstimate, defaultTTFB) {
|
922
|
-
if (defaultTTFB ===
|
922
|
+
if (defaultTTFB === undefined) {
|
923
923
|
defaultTTFB = 100;
|
924
924
|
}
|
925
|
-
this.defaultEstimate_ =
|
926
|
-
this.minWeight_ =
|
927
|
-
this.minDelayMs_ =
|
928
|
-
this.slow_ =
|
929
|
-
this.fast_ =
|
930
|
-
this.defaultTTFB_ =
|
931
|
-
this.ttfb_ =
|
925
|
+
this.defaultEstimate_ = undefined;
|
926
|
+
this.minWeight_ = undefined;
|
927
|
+
this.minDelayMs_ = undefined;
|
928
|
+
this.slow_ = undefined;
|
929
|
+
this.fast_ = undefined;
|
930
|
+
this.defaultTTFB_ = undefined;
|
931
|
+
this.ttfb_ = undefined;
|
932
932
|
this.defaultEstimate_ = defaultEstimate;
|
933
933
|
this.minWeight_ = 0.001;
|
934
934
|
this.minDelayMs_ = 50;
|
@@ -1000,12 +1000,12 @@
|
|
1000
1000
|
}();
|
1001
1001
|
|
1002
1002
|
var Logger = function Logger(label, logger) {
|
1003
|
-
this.trace =
|
1004
|
-
this.debug =
|
1005
|
-
this.log =
|
1006
|
-
this.warn =
|
1007
|
-
this.info =
|
1008
|
-
this.error =
|
1003
|
+
this.trace = undefined;
|
1004
|
+
this.debug = undefined;
|
1005
|
+
this.log = undefined;
|
1006
|
+
this.warn = undefined;
|
1007
|
+
this.info = undefined;
|
1008
|
+
this.error = undefined;
|
1009
1009
|
var lb = "[" + label + "]:";
|
1010
1010
|
this.trace = noop;
|
1011
1011
|
this.debug = logger.debug.bind(null, lb);
|
@@ -1058,7 +1058,7 @@
|
|
1058
1058
|
// Some browsers don't allow to use bind on console object anyway
|
1059
1059
|
// fallback to default if needed
|
1060
1060
|
try {
|
1061
|
-
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.2.0.canary.
|
1061
|
+
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.2.0.canary.10882");
|
1062
1062
|
} catch (e) {
|
1063
1063
|
/* log fn threw an exception. All logger methods are no-ops. */
|
1064
1064
|
return createLogger();
|
@@ -1076,7 +1076,7 @@
|
|
1076
1076
|
var logger = exportedLogger;
|
1077
1077
|
|
1078
1078
|
function getMediaSource(preferManagedMediaSource) {
|
1079
|
-
if (preferManagedMediaSource ===
|
1079
|
+
if (preferManagedMediaSource === undefined) {
|
1080
1080
|
preferManagedMediaSource = true;
|
1081
1081
|
}
|
1082
1082
|
if (typeof self === 'undefined') return undefined;
|
@@ -1181,7 +1181,7 @@
|
|
1181
1181
|
return !!typeCodes && !!typeCodes[codec.slice(0, 4)];
|
1182
1182
|
}
|
1183
1183
|
function areCodecsMediaSourceSupported(codecs, type, preferManagedMediaSource) {
|
1184
|
-
if (preferManagedMediaSource ===
|
1184
|
+
if (preferManagedMediaSource === undefined) {
|
1185
1185
|
preferManagedMediaSource = true;
|
1186
1186
|
}
|
1187
1187
|
return !codecs.split(',').some(function (codec) {
|
@@ -1190,11 +1190,11 @@
|
|
1190
1190
|
}
|
1191
1191
|
function isCodecMediaSourceSupported(codec, type, preferManagedMediaSource) {
|
1192
1192
|
var _MediaSource$isTypeSu;
|
1193
|
-
if (preferManagedMediaSource ===
|
1193
|
+
if (preferManagedMediaSource === undefined) {
|
1194
1194
|
preferManagedMediaSource = true;
|
1195
1195
|
}
|
1196
1196
|
var MediaSource = getMediaSource(preferManagedMediaSource);
|
1197
|
-
return (_MediaSource$isTypeSu = MediaSource == null ?
|
1197
|
+
return (_MediaSource$isTypeSu = MediaSource == null ? undefined : MediaSource.isTypeSupported(mimeTypeForCodec(codec, type))) != null ? _MediaSource$isTypeSu : false;
|
1198
1198
|
}
|
1199
1199
|
function mimeTypeForCodec(codec, type) {
|
1200
1200
|
return type + "/mp4;codecs=" + codec;
|
@@ -1217,7 +1217,7 @@
|
|
1217
1217
|
}
|
1218
1218
|
var CODEC_COMPATIBLE_NAMES = {};
|
1219
1219
|
function getCodecCompatibleNameLower(lowerCaseCodec, preferManagedMediaSource) {
|
1220
|
-
if (preferManagedMediaSource ===
|
1220
|
+
if (preferManagedMediaSource === undefined) {
|
1221
1221
|
preferManagedMediaSource = true;
|
1222
1222
|
}
|
1223
1223
|
if (CODEC_COMPATIBLE_NAMES[lowerCaseCodec]) {
|
@@ -1246,7 +1246,7 @@
|
|
1246
1246
|
}
|
1247
1247
|
var AUDIO_CODEC_REGEXP = /flac|opus|mp4a\.40\.34/i;
|
1248
1248
|
function getCodecCompatibleName(codec, preferManagedMediaSource) {
|
1249
|
-
if (preferManagedMediaSource ===
|
1249
|
+
if (preferManagedMediaSource === undefined) {
|
1250
1250
|
preferManagedMediaSource = true;
|
1251
1251
|
}
|
1252
1252
|
return codec.replace(AUDIO_CODEC_REGEXP, function (m) {
|
@@ -1327,8 +1327,8 @@
|
|
1327
1327
|
function requiresMediaCapabilitiesDecodingInfo(level, audioTracksByGroup, currentVideoRange, currentFrameRate, currentBw, audioPreference) {
|
1328
1328
|
// Only test support when configuration is exceeds minimum options
|
1329
1329
|
var audioGroups = level.audioCodec ? level.audioGroups : null;
|
1330
|
-
var audioCodecPreference = audioPreference == null ?
|
1331
|
-
var channelsPreference = audioPreference == null ?
|
1330
|
+
var audioCodecPreference = audioPreference == null ? undefined : audioPreference.audioCodec;
|
1331
|
+
var channelsPreference = audioPreference == null ? undefined : audioPreference.channels;
|
1332
1332
|
var maxChannels = channelsPreference ? parseInt(channelsPreference) : audioCodecPreference ? Infinity : 2;
|
1333
1333
|
var audioChannels = null;
|
1334
1334
|
if (audioGroups != null && audioGroups.length) {
|
@@ -1394,7 +1394,7 @@
|
|
1394
1394
|
if (!audioGroupId) {
|
1395
1395
|
return;
|
1396
1396
|
}
|
1397
|
-
(_audioTracksByGroup$g = audioTracksByGroup.groups[audioGroupId]) == null ?
|
1397
|
+
(_audioTracksByGroup$g = audioTracksByGroup.groups[audioGroupId]) == null ? undefined : _audioTracksByGroup$g.tracks.forEach(function (audioTrack) {
|
1398
1398
|
if (audioTrack.groupId === audioGroupId) {
|
1399
1399
|
var channels = audioTrack.channels || '';
|
1400
1400
|
var channelsNumber = parseFloat(channels);
|
@@ -1483,9 +1483,9 @@
|
|
1483
1483
|
}
|
1484
1484
|
var HlsUrlParameters = /*#__PURE__*/function () {
|
1485
1485
|
function HlsUrlParameters(msn, part, skip) {
|
1486
|
-
this.msn =
|
1487
|
-
this.part =
|
1488
|
-
this.skip =
|
1486
|
+
this.msn = undefined;
|
1487
|
+
this.part = undefined;
|
1488
|
+
this.skip = undefined;
|
1489
1489
|
this.msn = msn;
|
1490
1490
|
this.part = part;
|
1491
1491
|
this.skip = skip;
|
@@ -1508,27 +1508,27 @@
|
|
1508
1508
|
}();
|
1509
1509
|
var Level = /*#__PURE__*/function () {
|
1510
1510
|
function Level(data) {
|
1511
|
-
this._attrs =
|
1512
|
-
this.audioCodec =
|
1513
|
-
this.bitrate =
|
1514
|
-
this.codecSet =
|
1515
|
-
this.url =
|
1516
|
-
this.frameRate =
|
1517
|
-
this.height =
|
1518
|
-
this.id =
|
1519
|
-
this.name =
|
1520
|
-
this.videoCodec =
|
1521
|
-
this.width =
|
1522
|
-
this.details =
|
1511
|
+
this._attrs = undefined;
|
1512
|
+
this.audioCodec = undefined;
|
1513
|
+
this.bitrate = undefined;
|
1514
|
+
this.codecSet = undefined;
|
1515
|
+
this.url = undefined;
|
1516
|
+
this.frameRate = undefined;
|
1517
|
+
this.height = undefined;
|
1518
|
+
this.id = undefined;
|
1519
|
+
this.name = undefined;
|
1520
|
+
this.videoCodec = undefined;
|
1521
|
+
this.width = undefined;
|
1522
|
+
this.details = undefined;
|
1523
1523
|
this.fragmentError = 0;
|
1524
1524
|
this.loadError = 0;
|
1525
|
-
this.loaded =
|
1525
|
+
this.loaded = undefined;
|
1526
1526
|
this.realBitrate = 0;
|
1527
|
-
this.supportedPromise =
|
1528
|
-
this.supportedResult =
|
1527
|
+
this.supportedPromise = undefined;
|
1528
|
+
this.supportedResult = undefined;
|
1529
1529
|
this._avgBitrate = 0;
|
1530
|
-
this._audioGroups =
|
1531
|
-
this._subtitleGroups =
|
1530
|
+
this._audioGroups = undefined;
|
1531
|
+
this._subtitleGroups = undefined;
|
1532
1532
|
// Deprecated (retained for backwards compatibility)
|
1533
1533
|
this._urlId = 0;
|
1534
1534
|
this.url = [data.url];
|
@@ -1656,13 +1656,13 @@
|
|
1656
1656
|
key: "audioGroupId",
|
1657
1657
|
get: function get() {
|
1658
1658
|
var _this$audioGroups;
|
1659
|
-
return (_this$audioGroups = this.audioGroups) == null ?
|
1659
|
+
return (_this$audioGroups = this.audioGroups) == null ? undefined : _this$audioGroups[0];
|
1660
1660
|
}
|
1661
1661
|
}, {
|
1662
1662
|
key: "textGroupId",
|
1663
1663
|
get: function get() {
|
1664
1664
|
var _this$subtitleGroups;
|
1665
|
-
return (_this$subtitleGroups = this.subtitleGroups) == null ?
|
1665
|
+
return (_this$subtitleGroups = this.subtitleGroups) == null ? undefined : _this$subtitleGroups[0];
|
1666
1666
|
}
|
1667
1667
|
}]);
|
1668
1668
|
}();
|
@@ -1729,9 +1729,9 @@
|
|
1729
1729
|
|
1730
1730
|
function getStartCodecTier(codecTiers, currentVideoRange, currentBw, audioPreference, videoPreference) {
|
1731
1731
|
var codecSets = Object.keys(codecTiers);
|
1732
|
-
var channelsPreference = audioPreference == null ?
|
1733
|
-
var audioCodecPreference = audioPreference == null ?
|
1734
|
-
var videoCodecPreference = videoPreference == null ?
|
1732
|
+
var channelsPreference = audioPreference == null ? undefined : audioPreference.channels;
|
1733
|
+
var audioCodecPreference = audioPreference == null ? undefined : audioPreference.audioCodec;
|
1734
|
+
var videoCodecPreference = videoPreference == null ? undefined : videoPreference.videoCodec;
|
1735
1735
|
var preferStereo = channelsPreference && parseInt(channelsPreference) === 2;
|
1736
1736
|
// Use first level set to determine stereo, and minimum resolution and framerate
|
1737
1737
|
var hasStereo = false;
|
@@ -1972,7 +1972,7 @@
|
|
1972
1972
|
return (groupId === undefined || track.groupId === groupId) && (name === undefined || track.name === name) && (lang === undefined || languagesMatch(lang, track.lang)) && (lang === undefined || track.assocLang === assocLang) && (isDefault === undefined || track.default === isDefault) && (forced === undefined || track.forced === forced) && (characteristics === undefined || characteristicsMatch(characteristics, track.characteristics)) && (matchPredicate === undefined || matchPredicate(option, track));
|
1973
1973
|
}
|
1974
1974
|
function languagesMatch(languageA, languageB) {
|
1975
|
-
if (languageB ===
|
1975
|
+
if (languageB === undefined) {
|
1976
1976
|
languageB = '--';
|
1977
1977
|
}
|
1978
1978
|
if (languageA.length === languageB.length) {
|
@@ -1981,7 +1981,7 @@
|
|
1981
1981
|
return languageA.startsWith(languageB) || languageB.startsWith(languageA);
|
1982
1982
|
}
|
1983
1983
|
function characteristicsMatch(characteristicsA, characteristicsB) {
|
1984
|
-
if (characteristicsB ===
|
1984
|
+
if (characteristicsB === undefined) {
|
1985
1985
|
characteristicsB = '';
|
1986
1986
|
}
|
1987
1987
|
var arrA = characteristicsA.split(',');
|
@@ -2050,14 +2050,14 @@
|
|
2050
2050
|
}
|
2051
2051
|
function useAlternateAudio(audioTrackUrl, hls) {
|
2052
2052
|
var _hls$levels$hls$loadL;
|
2053
|
-
return !!audioTrackUrl && audioTrackUrl !== ((_hls$levels$hls$loadL = hls.levels[hls.loadLevel]) == null ?
|
2053
|
+
return !!audioTrackUrl && audioTrackUrl !== ((_hls$levels$hls$loadL = hls.levels[hls.loadLevel]) == null ? undefined : _hls$levels$hls$loadL.uri);
|
2054
2054
|
}
|
2055
2055
|
|
2056
2056
|
var AbrController = /*#__PURE__*/function (_Logger) {
|
2057
2057
|
function AbrController(_hls) {
|
2058
2058
|
var _this;
|
2059
2059
|
_this = _Logger.call(this, 'abr', _hls.logger) || this;
|
2060
|
-
_this.hls =
|
2060
|
+
_this.hls = undefined;
|
2061
2061
|
_this.lastLevelLoadSec = 0;
|
2062
2062
|
_this.lastLoadedFragLevel = -1;
|
2063
2063
|
_this.firstSelection = -1;
|
@@ -2069,7 +2069,7 @@
|
|
2069
2069
|
_this.fragCurrent = null;
|
2070
2070
|
_this.partCurrent = null;
|
2071
2071
|
_this.bitrateTestDelay = 0;
|
2072
|
-
_this.bwEstimator =
|
2072
|
+
_this.bwEstimator = undefined;
|
2073
2073
|
/*
|
2074
2074
|
This method monitors the download rate of the current fragment, and will downswitch if that fragment will not load
|
2075
2075
|
quickly enough to prevent underbuffering
|
@@ -2134,7 +2134,7 @@
|
|
2134
2134
|
return;
|
2135
2135
|
}
|
2136
2136
|
var bwe = loadRate ? loadRate * 8 : bwEstimate;
|
2137
|
-
var live = ((_this$hls$latestLevel = _this.hls.latestLevelDetails) == null ?
|
2137
|
+
var live = ((_this$hls$latestLevel = _this.hls.latestLevelDetails) == null ? undefined : _this$hls$latestLevel.live) === true;
|
2138
2138
|
var abrBandWidthUpFactor = _this.hls.config.abrBandWidthUpFactor;
|
2139
2139
|
var fragLevelNextLoadedDelay = Number.POSITIVE_INFINITY;
|
2140
2140
|
var nextLoadLevel;
|
@@ -2471,7 +2471,7 @@
|
|
2471
2471
|
// If no matching level found, see if min auto level would be a better option
|
2472
2472
|
var minLevel = hls.levels[minAutoLevel];
|
2473
2473
|
var autoLevel = hls.levels[hls.loadLevel];
|
2474
|
-
if ((minLevel == null ?
|
2474
|
+
if ((minLevel == null ? undefined : minLevel.bitrate) < (autoLevel == null ? undefined : autoLevel.bitrate)) {
|
2475
2475
|
return minAutoLevel;
|
2476
2476
|
}
|
2477
2477
|
// or if bitrate is not lower, continue to use loadLevel
|
@@ -2513,7 +2513,7 @@
|
|
2513
2513
|
var firstSelection = loadLevel === -1 || lastLoadedFragLevel === -1;
|
2514
2514
|
var currentCodecSet;
|
2515
2515
|
var currentVideoRange = 'SDR';
|
2516
|
-
var currentFrameRate = (level == null ?
|
2516
|
+
var currentFrameRate = (level == null ? undefined : level.frameRate) || 0;
|
2517
2517
|
var audioPreference = config.audioPreference,
|
2518
2518
|
videoPreference = config.videoPreference;
|
2519
2519
|
var audioTracksByGroup = this.audioTracksByGroup || (this.audioTracksByGroup = getAudioTracksByGroup(allAudioTracks));
|
@@ -2537,8 +2537,8 @@
|
|
2537
2537
|
currentBw = Math.max(currentBw, minBitrate);
|
2538
2538
|
this.log("picked start tier " + JSON.stringify(startTier));
|
2539
2539
|
} else {
|
2540
|
-
currentCodecSet = level == null ?
|
2541
|
-
currentVideoRange = level == null ?
|
2540
|
+
currentCodecSet = level == null ? undefined : level.codecSet;
|
2541
|
+
currentVideoRange = level == null ? undefined : level.videoRange;
|
2542
2542
|
}
|
2543
2543
|
var currentFragDuration = partCurrent ? partCurrent.duration : fragCurrent ? fragCurrent.duration : 0;
|
2544
2544
|
var ttfbEstimateSec = this.bwEstimator.getEstimateTTFB() / 1000;
|
@@ -2553,7 +2553,7 @@
|
|
2553
2553
|
if (config.useMediaCapabilities && !levelInfo.supportedResult && !levelInfo.supportedPromise) {
|
2554
2554
|
var _levelInfo$videoCodec;
|
2555
2555
|
var mediaCapabilities = navigator.mediaCapabilities;
|
2556
|
-
if (typeof (mediaCapabilities == null ?
|
2556
|
+
if (typeof (mediaCapabilities == null ? undefined : mediaCapabilities.decodingInfo) === 'function' && (requiresMediaCapabilitiesDecodingInfo(levelInfo, audioTracksByGroup, currentVideoRange, currentFrameRate, currentBw, audioPreference) || ((_levelInfo$videoCodec = levelInfo.videoCodec) == null ? undefined : _levelInfo$videoCodec.substring(0, 4)) === 'hvc1') // Force media capabilities check for HEVC to avoid failure on Windows
|
2557
2557
|
) {
|
2558
2558
|
levelInfo.supportedPromise = getMediaDecodingInfoPromise(levelInfo, audioTracksByGroup, mediaCapabilities);
|
2559
2559
|
levelInfo.supportedPromise.then(function (decodingInfo) {
|
@@ -2590,7 +2590,7 @@
|
|
2590
2590
|
}
|
2591
2591
|
}
|
2592
2592
|
var levelDetails = levelInfo.details;
|
2593
|
-
var avgDuration = (partCurrent ? levelDetails == null ?
|
2593
|
+
var avgDuration = (partCurrent ? levelDetails == null ? undefined : levelDetails.partTarget : levelDetails == null ? undefined : levelDetails.averagetargetduration) || currentFragDuration;
|
2594
2594
|
var adjustedbw;
|
2595
2595
|
// follow algorithm captured from stagefright :
|
2596
2596
|
// https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/httplive/LiveSession.cpp
|
@@ -2788,13 +2788,13 @@
|
|
2788
2788
|
* @returns a matching fragment or null
|
2789
2789
|
*/
|
2790
2790
|
function findFragmentByPTS(fragPrevious, fragments, bufferEnd, maxFragLookUpTolerance, nextFragLookupTolerance) {
|
2791
|
-
if (bufferEnd ===
|
2791
|
+
if (bufferEnd === undefined) {
|
2792
2792
|
bufferEnd = 0;
|
2793
2793
|
}
|
2794
|
-
if (maxFragLookUpTolerance ===
|
2794
|
+
if (maxFragLookUpTolerance === undefined) {
|
2795
2795
|
maxFragLookUpTolerance = 0;
|
2796
2796
|
}
|
2797
|
-
if (nextFragLookupTolerance ===
|
2797
|
+
if (nextFragLookupTolerance === undefined) {
|
2798
2798
|
nextFragLookupTolerance = 0.005;
|
2799
2799
|
}
|
2800
2800
|
var fragNext = null;
|
@@ -2844,10 +2844,10 @@
|
|
2844
2844
|
* @returns 0 if it matches, 1 if too low, -1 if too high
|
2845
2845
|
*/
|
2846
2846
|
function fragmentWithinToleranceTest(bufferEnd, maxFragLookUpTolerance, candidate) {
|
2847
|
-
if (bufferEnd ===
|
2847
|
+
if (bufferEnd === undefined) {
|
2848
2848
|
bufferEnd = 0;
|
2849
2849
|
}
|
2850
|
-
if (maxFragLookUpTolerance ===
|
2850
|
+
if (maxFragLookUpTolerance === undefined) {
|
2851
2851
|
maxFragLookUpTolerance = 0;
|
2852
2852
|
}
|
2853
2853
|
// eagerly accept an accurate match (no tolerance)
|
@@ -2959,7 +2959,7 @@
|
|
2959
2959
|
if (!retryConfig) {
|
2960
2960
|
return false;
|
2961
2961
|
}
|
2962
|
-
var httpStatus = loaderResponse == null ?
|
2962
|
+
var httpStatus = loaderResponse == null ? undefined : loaderResponse.code;
|
2963
2963
|
var retry = retryCount < retryConfig.maxNumRetry && (retryForHttpStatus(httpStatus) || !!isTimeout);
|
2964
2964
|
return retryConfig.shouldRetry ? retryConfig.shouldRetry(retryConfig, retryCount, isTimeout, loaderResponse, retry) : retry;
|
2965
2965
|
}
|
@@ -2986,7 +2986,7 @@
|
|
2986
2986
|
function ErrorController(hls) {
|
2987
2987
|
var _this;
|
2988
2988
|
_this = _Logger.call(this, 'error-controller', hls.logger) || this;
|
2989
|
-
_this.hls =
|
2989
|
+
_this.hls = undefined;
|
2990
2990
|
_this.playlistError = 0;
|
2991
2991
|
_this.penalizedRenditions = {};
|
2992
2992
|
_this.hls = hls;
|
@@ -3022,7 +3022,7 @@
|
|
3022
3022
|
this.playlistError = 0;
|
3023
3023
|
};
|
3024
3024
|
_proto.getVariantLevelIndex = function getVariantLevelIndex(frag) {
|
3025
|
-
return (frag == null ?
|
3025
|
+
return (frag == null ? undefined : frag.type) === PlaylistLevelType.MAIN ? frag.level : this.hls.loadLevel;
|
3026
3026
|
};
|
3027
3027
|
_proto.onManifestLoading = function onManifestLoading() {
|
3028
3028
|
this.playlistError = 0;
|
@@ -3077,7 +3077,7 @@
|
|
3077
3077
|
return;
|
3078
3078
|
case ErrorDetails.LEVEL_LOAD_ERROR:
|
3079
3079
|
case ErrorDetails.LEVEL_LOAD_TIMEOUT:
|
3080
|
-
if (typeof (context == null ?
|
3080
|
+
if (typeof (context == null ? undefined : context.level) === 'number') {
|
3081
3081
|
data.errorAction = this.getPlaylistRetryOrSwitchAction(data, context.level);
|
3082
3082
|
}
|
3083
3083
|
return;
|
@@ -3100,7 +3100,7 @@
|
|
3100
3100
|
case ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:
|
3101
3101
|
{
|
3102
3102
|
var _level = hls.levels[hls.loadLevel];
|
3103
|
-
var restrictedHdcpLevel = _level == null ?
|
3103
|
+
var restrictedHdcpLevel = _level == null ? undefined : _level.attrs['HDCP-LEVEL'];
|
3104
3104
|
if (restrictedHdcpLevel) {
|
3105
3105
|
data.errorAction = {
|
3106
3106
|
action: NetworkErrorAction.SendAlternateToPenaltyBox,
|
@@ -3221,7 +3221,7 @@
|
|
3221
3221
|
if (!hls.autoLevelEnabled) {
|
3222
3222
|
hls.loadLevel = -1;
|
3223
3223
|
}
|
3224
|
-
var fragErrorType = (_data$frag2 = data.frag) == null ?
|
3224
|
+
var fragErrorType = (_data$frag2 = data.frag) == null ? undefined : _data$frag2.type;
|
3225
3225
|
// Find alternate audio codec if available on audio codec error
|
3226
3226
|
var isAudioCodecError = fragErrorType === PlaylistLevelType.AUDIO && errorDetails === ErrorDetails.FRAG_PARSING_ERROR || data.sourceBufferName === 'audio' && (errorDetails === ErrorDetails.BUFFER_ADD_CODEC_ERROR || errorDetails === ErrorDetails.BUFFER_APPEND_ERROR);
|
3227
3227
|
var findAudioCodecAlternate = isAudioCodecError && levels.some(function (_ref) {
|
@@ -3292,7 +3292,7 @@
|
|
3292
3292
|
};
|
3293
3293
|
_proto.onErrorOut = function onErrorOut(event, data) {
|
3294
3294
|
var _data$errorAction;
|
3295
|
-
switch ((_data$errorAction = data.errorAction) == null ?
|
3295
|
+
switch ((_data$errorAction = data.errorAction) == null ? undefined : _data$errorAction.action) {
|
3296
3296
|
case NetworkErrorAction.DoNothing:
|
3297
3297
|
break;
|
3298
3298
|
case NetworkErrorAction.SendAlternateToPenaltyBox:
|
@@ -3371,7 +3371,7 @@
|
|
3371
3371
|
this.fragments = Object.create(null);
|
3372
3372
|
this.timeRanges = Object.create(null);
|
3373
3373
|
this.bufferPadding = 0.2;
|
3374
|
-
this.hls =
|
3374
|
+
this.hls = undefined;
|
3375
3375
|
this.hasGaps = false;
|
3376
3376
|
this.hls = hls;
|
3377
3377
|
this._registerListeners();
|
@@ -3435,7 +3435,7 @@
|
|
3435
3435
|
var keys = Object.keys(fragments);
|
3436
3436
|
for (var i = keys.length; i--;) {
|
3437
3437
|
var fragmentEntity = fragments[keys[i]];
|
3438
|
-
if ((fragmentEntity == null ?
|
3438
|
+
if ((fragmentEntity == null ? undefined : fragmentEntity.body.type) === levelType && (!buffered || fragmentEntity.buffered)) {
|
3439
3439
|
var frag = fragmentEntity.body;
|
3440
3440
|
if (frag.start <= position && position <= frag.end) {
|
3441
3441
|
return frag;
|
@@ -3457,7 +3457,7 @@
|
|
3457
3457
|
}
|
3458
3458
|
// Check if any flagged fragments have been unloaded
|
3459
3459
|
// excluding anything newer than appendedPartSn
|
3460
|
-
var appendedPartSn = (appendedPart == null ?
|
3460
|
+
var appendedPartSn = (appendedPart == null ? undefined : appendedPart.fragment.sn) || -1;
|
3461
3461
|
Object.keys(this.fragments).forEach(function (key) {
|
3462
3462
|
var fragmentEntity = _this.fragments[key];
|
3463
3463
|
if (!fragmentEntity) {
|
@@ -3724,7 +3724,7 @@
|
|
3724
3724
|
}
|
3725
3725
|
for (var i = keys.length; i--;) {
|
3726
3726
|
var fragmentEntity = fragments[keys[i]];
|
3727
|
-
if ((fragmentEntity == null ?
|
3727
|
+
if ((fragmentEntity == null ? undefined : fragmentEntity.body.type) === type) {
|
3728
3728
|
return true;
|
3729
3729
|
}
|
3730
3730
|
}
|
@@ -3775,7 +3775,7 @@
|
|
3775
3775
|
this.endListFragments = Object.create(null);
|
3776
3776
|
this.activePartLists = Object.create(null);
|
3777
3777
|
this.hasGaps = false;
|
3778
|
-
var partlist = (_this$hls = this.hls) == null ?
|
3778
|
+
var partlist = (_this$hls = this.hls) == null ? undefined : (_this$hls$latestLevel = _this$hls.latestLevelDetails) == null ? undefined : _this$hls$latestLevel.partList;
|
3779
3779
|
if (partlist) {
|
3780
3780
|
partlist.forEach(function (part) {
|
3781
3781
|
return part.clearElementaryStreamInfo();
|
@@ -3786,7 +3786,7 @@
|
|
3786
3786
|
}();
|
3787
3787
|
function isPartial(fragmentEntity) {
|
3788
3788
|
var _fragmentEntity$range, _fragmentEntity$range2, _fragmentEntity$range3;
|
3789
|
-
return fragmentEntity.buffered && (fragmentEntity.body.gap || ((_fragmentEntity$range = fragmentEntity.range.video) == null ?
|
3789
|
+
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));
|
3790
3790
|
}
|
3791
3791
|
function getFragmentKey(fragment) {
|
3792
3792
|
return fragment.type + "_" + fragment.level + "_" + fragment.sn;
|
@@ -3799,9 +3799,9 @@
|
|
3799
3799
|
|
3800
3800
|
var AESCrypto = /*#__PURE__*/function () {
|
3801
3801
|
function AESCrypto(subtle, iv, aesMode) {
|
3802
|
-
this.subtle =
|
3803
|
-
this.aesIV =
|
3804
|
-
this.aesMode =
|
3802
|
+
this.subtle = undefined;
|
3803
|
+
this.aesIV = undefined;
|
3804
|
+
this.aesMode = undefined;
|
3805
3805
|
this.subtle = subtle;
|
3806
3806
|
this.aesIV = iv;
|
3807
3807
|
this.aesMode = aesMode;
|
@@ -3854,8 +3854,8 @@
|
|
3854
3854
|
this.key = new Uint32Array(0);
|
3855
3855
|
this.ksRows = 0;
|
3856
3856
|
this.keySize = 0;
|
3857
|
-
this.keySchedule =
|
3858
|
-
this.invKeySchedule =
|
3857
|
+
this.keySchedule = undefined;
|
3858
|
+
this.invKeySchedule = undefined;
|
3859
3859
|
this.initTable();
|
3860
3860
|
}
|
3861
3861
|
|
@@ -4072,9 +4072,9 @@
|
|
4072
4072
|
|
4073
4073
|
var FastAESKey = /*#__PURE__*/function () {
|
4074
4074
|
function FastAESKey(subtle, key, aesMode) {
|
4075
|
-
this.subtle =
|
4076
|
-
this.key =
|
4077
|
-
this.aesMode =
|
4075
|
+
this.subtle = undefined;
|
4076
|
+
this.key = undefined;
|
4077
|
+
this.aesMode = undefined;
|
4078
4078
|
this.subtle = subtle;
|
4079
4079
|
this.key = key;
|
4080
4080
|
this.aesMode = aesMode;
|
@@ -4120,7 +4120,7 @@
|
|
4120
4120
|
* @beta
|
4121
4121
|
*/
|
4122
4122
|
function utf8ArrayToStr(array, exitOnNull) {
|
4123
|
-
if (exitOnNull ===
|
4123
|
+
if (exitOnNull === undefined) {
|
4124
4124
|
exitOnNull = false;
|
4125
4125
|
}
|
4126
4126
|
if (typeof TextDecoder !== 'undefined') {
|
@@ -4230,9 +4230,9 @@
|
|
4230
4230
|
this._stats = null;
|
4231
4231
|
this._streams = null;
|
4232
4232
|
// baseurl is the URL to the playlist
|
4233
|
-
this.base =
|
4233
|
+
this.base = undefined;
|
4234
4234
|
// relurl is the portion of the URL that comes from inside the playlist.
|
4235
|
-
this.relurl =
|
4235
|
+
this.relurl = undefined;
|
4236
4236
|
if (typeof base === 'string') {
|
4237
4237
|
base = {
|
4238
4238
|
url: base
|
@@ -4247,7 +4247,7 @@
|
|
4247
4247
|
var params = value.split('@', 2);
|
4248
4248
|
var start;
|
4249
4249
|
if (params.length === 1) {
|
4250
|
-
start = (previous == null ?
|
4250
|
+
start = (previous == null ? undefined : previous.byteRangeEndOffset) || 0;
|
4251
4251
|
} else {
|
4252
4252
|
start = parseInt(params[1]);
|
4253
4253
|
}
|
@@ -4345,7 +4345,7 @@
|
|
4345
4345
|
_this._programDateTime = null;
|
4346
4346
|
_this._ref = null;
|
4347
4347
|
// Approximate bit rate of the fragment expressed in bits per second (bps) as indicated by the last EXT-X-BITRATE (kbps) tag
|
4348
|
-
_this._bitrate =
|
4348
|
+
_this._bitrate = undefined;
|
4349
4349
|
_this.rawProgramDateTime = null;
|
4350
4350
|
_this.tagList = [];
|
4351
4351
|
// EXTINF has to be present for a m3u8 to be considered valid
|
@@ -4355,9 +4355,9 @@
|
|
4355
4355
|
// levelkeys are the EXT-X-KEY tags that apply to this segment for decryption
|
4356
4356
|
// core difference from the private field _decryptdata is the lack of the initialized IV
|
4357
4357
|
// _decryptdata will set the IV for this segment based on the segment number in the fragment
|
4358
|
-
_this.levelkeys =
|
4358
|
+
_this.levelkeys = undefined;
|
4359
4359
|
// A string representing the fragment type
|
4360
|
-
_this.type =
|
4360
|
+
_this.type = undefined;
|
4361
4361
|
// A reference to the loader. Set while the fragment is loading, and removed afterwards. Used to abort fragment loading
|
4362
4362
|
_this.loader = null;
|
4363
4363
|
// A reference to the key loader. Set while the key is loading, and removed afterwards. Used to abort key loading
|
@@ -4367,25 +4367,25 @@
|
|
4367
4367
|
// The continuity counter of the fragment
|
4368
4368
|
_this.cc = 0;
|
4369
4369
|
// The starting Presentation Time Stamp (PTS) of the fragment. Set after transmux complete.
|
4370
|
-
_this.startPTS =
|
4370
|
+
_this.startPTS = undefined;
|
4371
4371
|
// The ending Presentation Time Stamp (PTS) of the fragment. Set after transmux complete.
|
4372
|
-
_this.endPTS =
|
4372
|
+
_this.endPTS = undefined;
|
4373
4373
|
// The starting Decode Time Stamp (DTS) of the fragment. Set after transmux complete.
|
4374
|
-
_this.startDTS =
|
4374
|
+
_this.startDTS = undefined;
|
4375
4375
|
// The ending Decode Time Stamp (DTS) of the fragment. Set after transmux complete.
|
4376
|
-
_this.endDTS =
|
4376
|
+
_this.endDTS = undefined;
|
4377
4377
|
// The start time of the fragment, as listed in the manifest. Updated after transmux complete.
|
4378
4378
|
_this.start = 0;
|
4379
4379
|
// The offset time (seconds) of the fragment from the start of the Playlist
|
4380
4380
|
_this.playlistOffset = 0;
|
4381
4381
|
// Set by `updateFragPTSDTS` in level-helper
|
4382
|
-
_this.deltaPTS =
|
4382
|
+
_this.deltaPTS = undefined;
|
4383
4383
|
// The maximum starting Presentation Time Stamp (audio/video PTS) of the fragment. Set after transmux complete.
|
4384
|
-
_this.maxStartPTS =
|
4384
|
+
_this.maxStartPTS = undefined;
|
4385
4385
|
// The minimum ending Presentation Time Stamp (audio/video PTS) of the fragment. Set after transmux complete.
|
4386
|
-
_this.minEndPTS =
|
4386
|
+
_this.minEndPTS = undefined;
|
4387
4387
|
// Init Segment bytes (unset for media segments)
|
4388
|
-
_this.data =
|
4388
|
+
_this.data = undefined;
|
4389
4389
|
// A flag indicating whether the segment was downloaded in order to test bitrate, and was not buffered
|
4390
4390
|
_this.bitrateTest = false;
|
4391
4391
|
// #EXTINF segment title
|
@@ -4393,9 +4393,9 @@
|
|
4393
4393
|
// The Media Initialization Section for this segment
|
4394
4394
|
_this.initSegment = null;
|
4395
4395
|
// Fragment is the last fragment in the media playlist
|
4396
|
-
_this.endList =
|
4396
|
+
_this.endList = undefined;
|
4397
4397
|
// Fragment is marked by an EXT-X-GAP tag indicating that it does not contain media data and should not be loaded
|
4398
|
-
_this.gap =
|
4398
|
+
_this.gap = undefined;
|
4399
4399
|
// Deprecated
|
4400
4400
|
_this.urlId = 0;
|
4401
4401
|
_this.type = type;
|
@@ -4428,11 +4428,11 @@
|
|
4428
4428
|
};
|
4429
4429
|
_proto2.abortRequests = function abortRequests() {
|
4430
4430
|
var _this$loader, _this$keyLoader;
|
4431
|
-
(_this$loader = this.loader) == null ?
|
4432
|
-
(_this$keyLoader = this.keyLoader) == null ?
|
4431
|
+
(_this$loader = this.loader) == null ? undefined : _this$loader.abort();
|
4432
|
+
(_this$keyLoader = this.keyLoader) == null ? undefined : _this$keyLoader.abort();
|
4433
4433
|
};
|
4434
4434
|
_proto2.setElementaryStreamInfo = function setElementaryStreamInfo(type, startPTS, endPTS, startDTS, endDTS, partial) {
|
4435
|
-
if (partial ===
|
4435
|
+
if (partial === undefined) {
|
4436
4436
|
partial = false;
|
4437
4437
|
}
|
4438
4438
|
var elementaryStreams = this.elementaryStreams;
|
@@ -4582,9 +4582,9 @@
|
|
4582
4582
|
_this2.duration = 0;
|
4583
4583
|
_this2.gap = false;
|
4584
4584
|
_this2.independent = false;
|
4585
|
-
_this2.relurl =
|
4586
|
-
_this2.fragment =
|
4587
|
-
_this2.index =
|
4585
|
+
_this2.relurl = undefined;
|
4586
|
+
_this2.fragment = undefined;
|
4587
|
+
_this2.index = undefined;
|
4588
4588
|
_this2.duration = partAttrs.decimalFloatingPoint('DURATION');
|
4589
4589
|
_this2.gap = partAttrs.bool('GAP');
|
4590
4590
|
_this2.independent = partAttrs.bool('INDEPENDENT');
|
@@ -5145,8 +5145,8 @@
|
|
5145
5145
|
continue;
|
5146
5146
|
}
|
5147
5147
|
var trackDefault = track.default;
|
5148
|
-
var tfhdFlags = readUint32(tfhd, 0) | (trackDefault == null ?
|
5149
|
-
var sampleDuration = trackDefault == null ?
|
5148
|
+
var tfhdFlags = readUint32(tfhd, 0) | (trackDefault == null ? undefined : trackDefault.flags);
|
5149
|
+
var sampleDuration = trackDefault == null ? undefined : trackDefault.duration;
|
5150
5150
|
if (tfhdFlags & 0x000008) {
|
5151
5151
|
// 0x000008 indicates the presence of the default_sample_duration field
|
5152
5152
|
if (tfhdFlags & 0x000002) {
|
@@ -5799,11 +5799,11 @@
|
|
5799
5799
|
var CHUNK_SIZE = 16; // 16 bytes, 128 bits
|
5800
5800
|
var Decrypter = /*#__PURE__*/function () {
|
5801
5801
|
function Decrypter(config, _temp) {
|
5802
|
-
var _ref = _temp ===
|
5802
|
+
var _ref = _temp === undefined ? {} : _temp,
|
5803
5803
|
_ref$removePKCS7Paddi = _ref.removePKCS7Padding,
|
5804
|
-
removePKCS7Padding = _ref$removePKCS7Paddi ===
|
5804
|
+
removePKCS7Padding = _ref$removePKCS7Paddi === undefined ? true : _ref$removePKCS7Paddi;
|
5805
5805
|
this.logEnabled = true;
|
5806
|
-
this.removePKCS7Padding =
|
5806
|
+
this.removePKCS7Padding = undefined;
|
5807
5807
|
this.subtle = null;
|
5808
5808
|
this.softwareDecrypter = null;
|
5809
5809
|
this.key = null;
|
@@ -5811,8 +5811,8 @@
|
|
5811
5811
|
this.remainderData = null;
|
5812
5812
|
this.currentIV = null;
|
5813
5813
|
this.currentResult = null;
|
5814
|
-
this.useSoftware =
|
5815
|
-
this.enableSoftwareAES =
|
5814
|
+
this.useSoftware = undefined;
|
5815
|
+
this.enableSoftwareAES = undefined;
|
5816
5816
|
this.enableSoftwareAES = config.enableSoftwareAES;
|
5817
5817
|
this.removePKCS7Padding = removePKCS7Padding;
|
5818
5818
|
// built in decryptor expects PKCS7 padding
|
@@ -5980,7 +5980,7 @@
|
|
5980
5980
|
var MIN_CHUNK_SIZE = Math.pow(2, 17); // 128kb
|
5981
5981
|
var FragmentLoader = /*#__PURE__*/function () {
|
5982
5982
|
function FragmentLoader(config) {
|
5983
|
-
this.config =
|
5983
|
+
this.config = undefined;
|
5984
5984
|
this.loader = null;
|
5985
5985
|
this.partLoadTimeout = -1;
|
5986
5986
|
this.config = config;
|
@@ -6238,7 +6238,7 @@
|
|
6238
6238
|
return FragmentLoader;
|
6239
6239
|
}();
|
6240
6240
|
function createLoaderContext(frag, part) {
|
6241
|
-
if (part ===
|
6241
|
+
if (part === undefined) {
|
6242
6242
|
part = null;
|
6243
6243
|
}
|
6244
6244
|
var segment = part || frag;
|
@@ -6257,7 +6257,7 @@
|
|
6257
6257
|
var _frag$decryptdata;
|
6258
6258
|
var byteRangeStart = start;
|
6259
6259
|
var byteRangeEnd = end;
|
6260
|
-
if (frag.sn === 'initSegment' && isMethodFullSegmentAesCbc((_frag$decryptdata = frag.decryptdata) == null ?
|
6260
|
+
if (frag.sn === 'initSegment' && isMethodFullSegmentAesCbc((_frag$decryptdata = frag.decryptdata) == null ? undefined : _frag$decryptdata.method)) {
|
6261
6261
|
// MAP segment encrypted with method 'AES-128' or 'AES-256' (cbc), when served with HTTP Range,
|
6262
6262
|
// has the unencrypted size specified in the range.
|
6263
6263
|
// Ref: https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-08#section-6.3.6
|
@@ -6298,7 +6298,7 @@
|
|
6298
6298
|
function LoadError(data) {
|
6299
6299
|
var _this3;
|
6300
6300
|
_this3 = _Error.call(this, data.error.message) || this;
|
6301
|
-
_this3.data =
|
6301
|
+
_this3.data = undefined;
|
6302
6302
|
_this3.data = data;
|
6303
6303
|
return _this3;
|
6304
6304
|
}
|
@@ -6339,7 +6339,7 @@
|
|
6339
6339
|
function TaskLoop(label, logger) {
|
6340
6340
|
var _this;
|
6341
6341
|
_this = _Logger.call(this, label, logger) || this;
|
6342
|
-
_this._boundTick =
|
6342
|
+
_this._boundTick = undefined;
|
6343
6343
|
_this._tickTimer = null;
|
6344
6344
|
_this._tickInterval = null;
|
6345
6345
|
_this._tickCallCount = 0;
|
@@ -6434,21 +6434,21 @@
|
|
6434
6434
|
}(Logger);
|
6435
6435
|
|
6436
6436
|
var ChunkMetadata = function ChunkMetadata(level, sn, id, size, part, partial) {
|
6437
|
-
if (size ===
|
6437
|
+
if (size === undefined) {
|
6438
6438
|
size = 0;
|
6439
6439
|
}
|
6440
|
-
if (part ===
|
6440
|
+
if (part === undefined) {
|
6441
6441
|
part = -1;
|
6442
6442
|
}
|
6443
|
-
if (partial ===
|
6443
|
+
if (partial === undefined) {
|
6444
6444
|
partial = false;
|
6445
6445
|
}
|
6446
|
-
this.level =
|
6447
|
-
this.sn =
|
6448
|
-
this.part =
|
6449
|
-
this.id =
|
6450
|
-
this.size =
|
6451
|
-
this.partial =
|
6446
|
+
this.level = undefined;
|
6447
|
+
this.sn = undefined;
|
6448
|
+
this.part = undefined;
|
6449
|
+
this.id = undefined;
|
6450
|
+
this.size = undefined;
|
6451
|
+
this.partial = undefined;
|
6452
6452
|
this.transmuxing = getNewPerformanceTiming();
|
6453
6453
|
this.buffering = {
|
6454
6454
|
audio: getNewPerformanceTiming(),
|
@@ -6615,7 +6615,7 @@
|
|
6615
6615
|
var variableList = parsed.variableList;
|
6616
6616
|
return value.replace(VARIABLE_REPLACEMENT_REGEX, function (variableReference) {
|
6617
6617
|
var variableName = variableReference.substring(2, variableReference.length - 1);
|
6618
|
-
var variableValue = variableList == null ?
|
6618
|
+
var variableValue = variableList == null ? undefined : variableList[variableName];
|
6619
6619
|
if (variableValue === undefined) {
|
6620
6620
|
parsed.playlistParsingError || (parsed.playlistParsingError = new Error("Missing preceding EXT-X-DEFINE tag for Variable Reference: \"" + variableName + "\""));
|
6621
6621
|
return variableReference;
|
@@ -6831,19 +6831,19 @@
|
|
6831
6831
|
var DateRange = /*#__PURE__*/function () {
|
6832
6832
|
function DateRange(dateRangeAttr, dateRangeWithSameId, tagCount) {
|
6833
6833
|
var _dateRangeWithSameId$;
|
6834
|
-
if (tagCount ===
|
6834
|
+
if (tagCount === undefined) {
|
6835
6835
|
tagCount = 0;
|
6836
6836
|
}
|
6837
|
-
this.attr =
|
6838
|
-
this.tagAnchor =
|
6839
|
-
this.tagOrder =
|
6840
|
-
this._startDate =
|
6841
|
-
this._endDate =
|
6842
|
-
this._dateAtEnd =
|
6843
|
-
this._cue =
|
6844
|
-
this._badValueForSameId =
|
6845
|
-
this.tagAnchor = (dateRangeWithSameId == null ?
|
6846
|
-
this.tagOrder = (_dateRangeWithSameId$ = dateRangeWithSameId == null ?
|
6837
|
+
this.attr = undefined;
|
6838
|
+
this.tagAnchor = undefined;
|
6839
|
+
this.tagOrder = undefined;
|
6840
|
+
this._startDate = undefined;
|
6841
|
+
this._endDate = undefined;
|
6842
|
+
this._dateAtEnd = undefined;
|
6843
|
+
this._cue = undefined;
|
6844
|
+
this._badValueForSameId = undefined;
|
6845
|
+
this.tagAnchor = (dateRangeWithSameId == null ? undefined : dateRangeWithSameId.tagAnchor) || null;
|
6846
|
+
this.tagOrder = (_dateRangeWithSameId$ = dateRangeWithSameId == null ? undefined : dateRangeWithSameId.tagOrder) != null ? _dateRangeWithSameId$ : tagCount;
|
6847
6847
|
if (dateRangeWithSameId) {
|
6848
6848
|
var previousAttr = dateRangeWithSameId.attr;
|
6849
6849
|
for (var key in previousAttr) {
|
@@ -6866,7 +6866,7 @@
|
|
6866
6866
|
this._startDate = new Date(dateRangeAttr["START-DATE"]);
|
6867
6867
|
}
|
6868
6868
|
if ("END-DATE" in this.attr) {
|
6869
|
-
var endDate = (dateRangeWithSameId == null ?
|
6869
|
+
var endDate = (dateRangeWithSameId == null ? undefined : dateRangeWithSameId.endDate) || new Date(this.attr["END-DATE"]);
|
6870
6870
|
if (isFiniteNumber(endDate.getTime())) {
|
6871
6871
|
this._endDate = endDate;
|
6872
6872
|
}
|
@@ -6972,21 +6972,21 @@
|
|
6972
6972
|
function LevelDetails(baseUrl) {
|
6973
6973
|
this.PTSKnown = false;
|
6974
6974
|
this.alignedSliding = false;
|
6975
|
-
this.averagetargetduration =
|
6975
|
+
this.averagetargetduration = undefined;
|
6976
6976
|
this.endCC = 0;
|
6977
6977
|
this.endSN = 0;
|
6978
|
-
this.fragments =
|
6979
|
-
this.fragmentHint =
|
6978
|
+
this.fragments = undefined;
|
6979
|
+
this.fragmentHint = undefined;
|
6980
6980
|
this.partList = null;
|
6981
|
-
this.dateRanges =
|
6981
|
+
this.dateRanges = undefined;
|
6982
6982
|
this.dateRangeTagCount = 0;
|
6983
6983
|
this.live = true;
|
6984
6984
|
this.requestScheduled = -1;
|
6985
6985
|
this.ageHeader = 0;
|
6986
|
-
this.advancedDateTime =
|
6986
|
+
this.advancedDateTime = undefined;
|
6987
6987
|
this.updated = true;
|
6988
6988
|
this.advanced = true;
|
6989
|
-
this.availabilityDelay =
|
6989
|
+
this.availabilityDelay = undefined;
|
6990
6990
|
// Manifest reload synchronization
|
6991
6991
|
this.misses = 0;
|
6992
6992
|
this.startCC = 0;
|
@@ -6995,30 +6995,30 @@
|
|
6995
6995
|
this.targetduration = 0;
|
6996
6996
|
this.totalduration = 0;
|
6997
6997
|
this.type = null;
|
6998
|
-
this.url =
|
6998
|
+
this.url = undefined;
|
6999
6999
|
this.m3u8 = '';
|
7000
7000
|
this.version = null;
|
7001
7001
|
this.canBlockReload = false;
|
7002
7002
|
this.canSkipUntil = 0;
|
7003
7003
|
this.canSkipDateRanges = false;
|
7004
7004
|
this.skippedSegments = 0;
|
7005
|
-
this.recentlyRemovedDateranges =
|
7005
|
+
this.recentlyRemovedDateranges = undefined;
|
7006
7006
|
this.partHoldBack = 0;
|
7007
7007
|
this.holdBack = 0;
|
7008
7008
|
this.partTarget = 0;
|
7009
|
-
this.preloadHint =
|
7010
|
-
this.renditionReports =
|
7009
|
+
this.preloadHint = undefined;
|
7010
|
+
this.renditionReports = undefined;
|
7011
7011
|
this.tuneInGoal = 0;
|
7012
|
-
this.deltaUpdateFailed =
|
7012
|
+
this.deltaUpdateFailed = undefined;
|
7013
7013
|
this.driftStartTime = 0;
|
7014
7014
|
this.driftEndTime = 0;
|
7015
7015
|
this.driftStart = 0;
|
7016
7016
|
this.driftEnd = 0;
|
7017
|
-
this.encryptedFragments =
|
7017
|
+
this.encryptedFragments = undefined;
|
7018
7018
|
this.playlistParsingError = null;
|
7019
7019
|
this.variableList = null;
|
7020
7020
|
this.hasVariableRefs = false;
|
7021
|
-
this.appliedTimelineOffset =
|
7021
|
+
this.appliedTimelineOffset = undefined;
|
7022
7022
|
this.fragments = [];
|
7023
7023
|
this.encryptedFragments = [];
|
7024
7024
|
this.dateRanges = {};
|
@@ -7379,18 +7379,18 @@
|
|
7379
7379
|
var keyUriToKeyIdMap = {};
|
7380
7380
|
var LevelKey = /*#__PURE__*/function () {
|
7381
7381
|
function LevelKey(method, uri, format, formatversions, iv) {
|
7382
|
-
if (formatversions ===
|
7382
|
+
if (formatversions === undefined) {
|
7383
7383
|
formatversions = [1];
|
7384
7384
|
}
|
7385
|
-
if (iv ===
|
7385
|
+
if (iv === undefined) {
|
7386
7386
|
iv = null;
|
7387
7387
|
}
|
7388
|
-
this.uri =
|
7389
|
-
this.method =
|
7390
|
-
this.keyFormat =
|
7391
|
-
this.keyFormatVersions =
|
7392
|
-
this.encrypted =
|
7393
|
-
this.isCommonEncryption =
|
7388
|
+
this.uri = undefined;
|
7389
|
+
this.method = undefined;
|
7390
|
+
this.keyFormat = undefined;
|
7391
|
+
this.keyFormatVersions = undefined;
|
7392
|
+
this.encrypted = undefined;
|
7393
|
+
this.isCommonEncryption = undefined;
|
7394
7394
|
this.iv = null;
|
7395
7395
|
this.key = null;
|
7396
7396
|
this.keyId = null;
|
@@ -8102,7 +8102,7 @@
|
|
8102
8102
|
var pdtStart = pdtFragment.programDateTime;
|
8103
8103
|
if (startDateTime >= pdtStart || index === 0) {
|
8104
8104
|
var _programDateTimes;
|
8105
|
-
var durationBetweenPdt = (((_programDateTimes = programDateTimes[index + 1]) == null ?
|
8105
|
+
var durationBetweenPdt = (((_programDateTimes = programDateTimes[index + 1]) == null ? undefined : _programDateTimes.start) || endTime) - pdtFragment.start;
|
8106
8106
|
if (startDateTime <= pdtStart + durationBetweenPdt * 1000) {
|
8107
8107
|
// map to fragment with date-time range
|
8108
8108
|
var startIndex = programDateTimes[index].sn - details.startSN;
|
@@ -8373,7 +8373,7 @@
|
|
8373
8373
|
if (currentInitSegment) {
|
8374
8374
|
fragmentsToCheck.forEach(function (frag) {
|
8375
8375
|
var _currentInitSegment;
|
8376
|
-
if (frag && (!frag.initSegment || frag.initSegment.relurl === ((_currentInitSegment = currentInitSegment) == null ?
|
8376
|
+
if (frag && (!frag.initSegment || frag.initSegment.relurl === ((_currentInitSegment = currentInitSegment) == null ? undefined : _currentInitSegment.relurl))) {
|
8377
8377
|
frag.initSegment = currentInitSegment;
|
8378
8378
|
}
|
8379
8379
|
});
|
@@ -8518,7 +8518,7 @@
|
|
8518
8518
|
}
|
8519
8519
|
}
|
8520
8520
|
function adjustSliding(oldDetails, newDetails, matchingStableVariantOrRendition) {
|
8521
|
-
if (matchingStableVariantOrRendition ===
|
8521
|
+
if (matchingStableVariantOrRendition === undefined) {
|
8522
8522
|
matchingStableVariantOrRendition = true;
|
8523
8523
|
}
|
8524
8524
|
var delta = newDetails.startSN + newDetails.skippedSegments - oldDetails.startSN;
|
@@ -8553,7 +8553,7 @@
|
|
8553
8553
|
}
|
8554
8554
|
}
|
8555
8555
|
function computeReloadInterval(newDetails, distanceToLiveEdgeMs) {
|
8556
|
-
if (distanceToLiveEdgeMs ===
|
8556
|
+
if (distanceToLiveEdgeMs === undefined) {
|
8557
8557
|
distanceToLiveEdgeMs = Infinity;
|
8558
8558
|
}
|
8559
8559
|
var reloadInterval = 1000 * newDetails.targetduration;
|
@@ -8613,7 +8613,7 @@
|
|
8613
8613
|
function reassignFragmentLevelIndexes(levels) {
|
8614
8614
|
levels.forEach(function (level, index) {
|
8615
8615
|
var _level$details;
|
8616
|
-
var fragments = (_level$details = level.details) == null ?
|
8616
|
+
var fragments = (_level$details = level.details) == null ? undefined : _level$details.fragments;
|
8617
8617
|
if (fragments) {
|
8618
8618
|
fragments.forEach(function (fragment) {
|
8619
8619
|
fragment.level = index;
|
@@ -8628,7 +8628,7 @@
|
|
8628
8628
|
function findFirstFragWithCC(fragments, cc) {
|
8629
8629
|
for (var i = 0, len = fragments.length; i < len; i++) {
|
8630
8630
|
var _fragments$i;
|
8631
|
-
if (((_fragments$i = fragments[i]) == null ?
|
8631
|
+
if (((_fragments$i = fragments[i]) == null ? undefined : _fragments$i.cc) === cc) {
|
8632
8632
|
return fragments[i];
|
8633
8633
|
}
|
8634
8634
|
}
|
@@ -8790,16 +8790,16 @@
|
|
8790
8790
|
function BaseStreamController(hls, fragmentTracker, keyLoader, logPrefix, playlistType) {
|
8791
8791
|
var _this;
|
8792
8792
|
_this = _TaskLoop.call(this, logPrefix, hls.logger) || this;
|
8793
|
-
_this.hls =
|
8793
|
+
_this.hls = undefined;
|
8794
8794
|
_this.fragPrevious = null;
|
8795
8795
|
_this.fragCurrent = null;
|
8796
|
-
_this.fragmentTracker =
|
8796
|
+
_this.fragmentTracker = undefined;
|
8797
8797
|
_this.transmuxer = null;
|
8798
8798
|
_this._state = State.STOPPED;
|
8799
|
-
_this.playlistType =
|
8799
|
+
_this.playlistType = undefined;
|
8800
8800
|
_this.media = null;
|
8801
8801
|
_this.mediaBuffer = null;
|
8802
|
-
_this.config =
|
8802
|
+
_this.config = undefined;
|
8803
8803
|
_this.bitrateTest = false;
|
8804
8804
|
_this.lastCurrentTime = 0;
|
8805
8805
|
_this.nextLoadPosition = 0;
|
@@ -8807,15 +8807,15 @@
|
|
8807
8807
|
_this.startTimeOffset = null;
|
8808
8808
|
_this.retryDate = 0;
|
8809
8809
|
_this.levels = null;
|
8810
|
-
_this.fragmentLoader =
|
8811
|
-
_this.keyLoader =
|
8810
|
+
_this.fragmentLoader = undefined;
|
8811
|
+
_this.keyLoader = undefined;
|
8812
8812
|
_this.levelLastLoaded = null;
|
8813
8813
|
_this.startFragRequested = false;
|
8814
|
-
_this.decrypter =
|
8814
|
+
_this.decrypter = undefined;
|
8815
8815
|
_this.initPTS = [];
|
8816
8816
|
_this.buffering = true;
|
8817
8817
|
_this.loadingParts = false;
|
8818
|
-
_this.loopSn =
|
8818
|
+
_this.loopSn = undefined;
|
8819
8819
|
_this.onMediaSeeking = function () {
|
8820
8820
|
var _this2 = _this,
|
8821
8821
|
config = _this2.config,
|
@@ -8976,7 +8976,7 @@
|
|
8976
8976
|
_proto.getLevelDetails = function getLevelDetails() {
|
8977
8977
|
if (this.levels && this.levelLastLoaded !== null) {
|
8978
8978
|
var _this$levelLastLoaded;
|
8979
|
-
return (_this$levelLastLoaded = this.levelLastLoaded) == null ?
|
8979
|
+
return (_this$levelLastLoaded = this.levelLastLoaded) == null ? undefined : _this$levelLastLoaded.details;
|
8980
8980
|
}
|
8981
8981
|
};
|
8982
8982
|
_proto.onMediaAttached = function onMediaAttached(event, data) {
|
@@ -9059,7 +9059,7 @@
|
|
9059
9059
|
if (config.interstitialsController && config.enableInterstitialPlayback !== false && frag.type !== PlaylistLevelType.SUBTITLE) {
|
9060
9060
|
// Do not load fragments outside the buffering schedule segment
|
9061
9061
|
var interstitials = this.hls.interstitialsManager;
|
9062
|
-
var bufferingItem = interstitials == null ?
|
9062
|
+
var bufferingItem = interstitials == null ? undefined : interstitials.bufferingItem;
|
9063
9063
|
if (bufferingItem) {
|
9064
9064
|
var bufferingInterstitial = bufferingItem.event;
|
9065
9065
|
if (bufferingInterstitial) {
|
@@ -9070,7 +9070,7 @@
|
|
9070
9070
|
} else {
|
9071
9071
|
var _level$details;
|
9072
9072
|
// Limit fragment loading to media in schedule item
|
9073
|
-
if (frag.end <= bufferingItem.start && ((_level$details = level.details) == null ?
|
9073
|
+
if (frag.end <= bufferingItem.start && ((_level$details = level.details) == null ? undefined : _level$details.live) === false) {
|
9074
9074
|
// fragment ends by schedule item start
|
9075
9075
|
return;
|
9076
9076
|
}
|
@@ -9121,7 +9121,7 @@
|
|
9121
9121
|
if (_this3.state === State.STOPPED || _this3.state === State.ERROR) {
|
9122
9122
|
return;
|
9123
9123
|
}
|
9124
|
-
_this3.warn("Frag error: " + ((reason == null ?
|
9124
|
+
_this3.warn("Frag error: " + ((reason == null ? undefined : reason.message) || reason));
|
9125
9125
|
_this3.resetFragmentLoading(fragment);
|
9126
9126
|
});
|
9127
9127
|
};
|
@@ -9140,7 +9140,7 @@
|
|
9140
9140
|
if (backtracked === 1 || this.reduceMaxBufferLength(minForwardBufferLength, frag.duration)) {
|
9141
9141
|
fragmentTracker.removeFragment(frag);
|
9142
9142
|
}
|
9143
|
-
} else if (((_this$mediaBuffer = this.mediaBuffer) == null ?
|
9143
|
+
} else if (((_this$mediaBuffer = this.mediaBuffer) == null ? undefined : _this$mediaBuffer.buffered.length) === 0) {
|
9144
9144
|
// Stop gap for bad tracker / buffer flush behavior
|
9145
9145
|
fragmentTracker.removeAllFragments();
|
9146
9146
|
} else if (fragmentTracker.hasParts(frag.type)) {
|
@@ -9173,10 +9173,10 @@
|
|
9173
9173
|
};
|
9174
9174
|
_proto.waitForLive = function waitForLive(levelInfo) {
|
9175
9175
|
var details = levelInfo.details;
|
9176
|
-
return (details == null ?
|
9176
|
+
return (details == null ? undefined : details.live) && details.type !== 'EVENT' && (this.levelLastLoaded !== levelInfo || details.expired);
|
9177
9177
|
};
|
9178
9178
|
_proto.flushMainBuffer = function flushMainBuffer(startOffset, endOffset, type) {
|
9179
|
-
if (type ===
|
9179
|
+
if (type === undefined) {
|
9180
9180
|
type = null;
|
9181
9181
|
}
|
9182
9182
|
if (!(startOffset - endOffset)) {
|
@@ -9194,7 +9194,7 @@
|
|
9194
9194
|
_proto._loadInitSegment = function _loadInitSegment(fragment, level) {
|
9195
9195
|
var _this4 = this;
|
9196
9196
|
this._doFragLoad(fragment, level).then(function (data) {
|
9197
|
-
var frag = data == null ?
|
9197
|
+
var frag = data == null ? undefined : data.frag;
|
9198
9198
|
if (!frag || _this4.fragContextChanged(frag) || !_this4.levels) {
|
9199
9199
|
throw new Error('init load aborted');
|
9200
9200
|
}
|
@@ -9275,7 +9275,7 @@
|
|
9275
9275
|
return;
|
9276
9276
|
}
|
9277
9277
|
}
|
9278
|
-
var level = (_this$levels = this.levels) == null ?
|
9278
|
+
var level = (_this$levels = this.levels) == null ? undefined : _this$levels[frag.level];
|
9279
9279
|
if (level != null && level.fragmentError) {
|
9280
9280
|
this.log("Resetting level fragment error count of " + level.fragmentError + " on frag buffered");
|
9281
9281
|
level.fragmentError = 0;
|
@@ -9305,11 +9305,11 @@
|
|
9305
9305
|
_proto._doFragLoad = function _doFragLoad(frag, level, targetBufferTime, progressCallback) {
|
9306
9306
|
var _frag$decryptdata,
|
9307
9307
|
_this5 = this;
|
9308
|
-
if (targetBufferTime ===
|
9308
|
+
if (targetBufferTime === undefined) {
|
9309
9309
|
targetBufferTime = null;
|
9310
9310
|
}
|
9311
9311
|
this.fragCurrent = frag;
|
9312
|
-
var details = level == null ?
|
9312
|
+
var details = level == null ? undefined : level.details;
|
9313
9313
|
if (!this.levels || !details) {
|
9314
9314
|
throw new Error("frag load aborted, missing level" + (details ? '' : ' detail') + "s");
|
9315
9315
|
}
|
@@ -9340,7 +9340,7 @@
|
|
9340
9340
|
if (isMediaFragment(frag) && (!fragPrevious || frag.sn !== fragPrevious.sn)) {
|
9341
9341
|
var shouldLoadParts = this.shouldLoadParts(level.details, frag.end);
|
9342
9342
|
if (shouldLoadParts !== this.loadingParts) {
|
9343
|
-
this.log("LL-Part loading " + (shouldLoadParts ? 'ON' : 'OFF') + " loading sn " + (fragPrevious == null ?
|
9343
|
+
this.log("LL-Part loading " + (shouldLoadParts ? 'ON' : 'OFF') + " loading sn " + (fragPrevious == null ? undefined : fragPrevious.sn) + "->" + frag.sn);
|
9344
9344
|
this.loadingParts = shouldLoadParts;
|
9345
9345
|
}
|
9346
9346
|
}
|
@@ -9407,7 +9407,7 @@
|
|
9407
9407
|
var result;
|
9408
9408
|
if (dataOnProgress && keyLoadingPromise) {
|
9409
9409
|
result = keyLoadingPromise.then(function (keyLoadedData) {
|
9410
|
-
if (!keyLoadedData || _this5.fragContextChanged(keyLoadedData == null ?
|
9410
|
+
if (!keyLoadedData || _this5.fragContextChanged(keyLoadedData == null ? undefined : keyLoadedData.frag)) {
|
9411
9411
|
return null;
|
9412
9412
|
}
|
9413
9413
|
return _this5.fragmentLoader.load(frag, progressCallback);
|
@@ -9441,7 +9441,7 @@
|
|
9441
9441
|
return new Promise(function (resolve, reject) {
|
9442
9442
|
var _level$details2;
|
9443
9443
|
var partsLoaded = [];
|
9444
|
-
var initialPartList = (_level$details2 = level.details) == null ?
|
9444
|
+
var initialPartList = (_level$details2 = level.details) == null ? undefined : _level$details2.partList;
|
9445
9445
|
var _loadPart = function loadPart(part) {
|
9446
9446
|
_this6.fragmentLoader.loadPart(frag, part, progressCallback).then(function (partLoadedData) {
|
9447
9447
|
partsLoaded[part.index] = partLoadedData;
|
@@ -9517,10 +9517,10 @@
|
|
9517
9517
|
// Buffer must be ahead of first part + duration of parts after last segment
|
9518
9518
|
// and playback must be at or past segment adjacent to part list
|
9519
9519
|
var firstPart = details.partList[0];
|
9520
|
-
var safePartStart = firstPart.end + (((_details$fragmentHint = details.fragmentHint) == null ?
|
9520
|
+
var safePartStart = firstPart.end + (((_details$fragmentHint = details.fragmentHint) == null ? undefined : _details$fragmentHint.duration) || 0);
|
9521
9521
|
if (bufferEnd >= safePartStart) {
|
9522
9522
|
var _this$media;
|
9523
|
-
var playhead = this.hls.hasEnoughToStart ? ((_this$media = this.media) == null ?
|
9523
|
+
var playhead = this.hls.hasEnoughToStart ? ((_this$media = this.media) == null ? undefined : _this$media.currentTime) || this.lastCurrentTime : this.getLoadPosition();
|
9524
9524
|
if (playhead > firstPart.start - firstPart.fragment.duration) {
|
9525
9525
|
return true;
|
9526
9526
|
}
|
@@ -9652,10 +9652,10 @@
|
|
9652
9652
|
};
|
9653
9653
|
_proto.getAppendedFrag = function getAppendedFrag(position, playlistType) {
|
9654
9654
|
var _this$fragmentTracker;
|
9655
|
-
if (playlistType ===
|
9655
|
+
if (playlistType === undefined) {
|
9656
9656
|
playlistType = PlaylistLevelType.MAIN;
|
9657
9657
|
}
|
9658
|
-
var fragOrPart = (_this$fragmentTracker = this.fragmentTracker) == null ?
|
9658
|
+
var fragOrPart = (_this$fragmentTracker = this.fragmentTracker) == null ? undefined : _this$fragmentTracker.getAppendedFrag(position, playlistType);
|
9659
9659
|
if (fragOrPart && 'fragment' in fragOrPart) {
|
9660
9660
|
return fragOrPart.fragment;
|
9661
9661
|
}
|
@@ -9693,7 +9693,7 @@
|
|
9693
9693
|
var mainStart = this.hls.startPosition;
|
9694
9694
|
var liveSyncPosition = this.hls.liveSyncPosition;
|
9695
9695
|
var startPosition = frag ? (mainStart !== -1 && mainStart >= start ? mainStart : liveSyncPosition) || frag.start : pos;
|
9696
|
-
this.log("Setting startPosition to " + startPosition + " to match initial live edge. mainStart: " + mainStart + " liveSyncPosition: " + liveSyncPosition + " frag.start: " + ((_frag = frag) == null ?
|
9696
|
+
this.log("Setting startPosition to " + startPosition + " to match initial live edge. mainStart: " + mainStart + " liveSyncPosition: " + liveSyncPosition + " frag.start: " + ((_frag = frag) == null ? undefined : _frag.start));
|
9697
9697
|
this.startPosition = this.nextLoadPosition = startPosition;
|
9698
9698
|
}
|
9699
9699
|
} else if (pos <= start) {
|
@@ -9955,7 +9955,7 @@
|
|
9955
9955
|
}
|
9956
9956
|
if (this.fragContextChanged(frag)) {
|
9957
9957
|
var _this$fragCurrent;
|
9958
|
-
this.warn("Frag load error must match current frag to retry " + frag.url + " > " + ((_this$fragCurrent = this.fragCurrent) == null ?
|
9958
|
+
this.warn("Frag load error must match current frag to retry " + frag.url + " > " + ((_this$fragCurrent = this.fragCurrent) == null ? undefined : _this$fragCurrent.url));
|
9959
9959
|
return;
|
9960
9960
|
}
|
9961
9961
|
var gapTagEncountered = data.details === ErrorDetails.FRAG_GAP;
|
@@ -9968,7 +9968,7 @@
|
|
9968
9968
|
action = _ref2.action,
|
9969
9969
|
flags = _ref2.flags,
|
9970
9970
|
_ref2$retryCount = _ref2.retryCount,
|
9971
|
-
retryCount = _ref2$retryCount ===
|
9971
|
+
retryCount = _ref2$retryCount === undefined ? 0 : _ref2$retryCount,
|
9972
9972
|
retryConfig = _ref2.retryConfig;
|
9973
9973
|
var couldRetry = !!errorAction && !!retryConfig;
|
9974
9974
|
var retry = couldRetry && action === NetworkErrorAction.RetryRequest;
|
@@ -10013,7 +10013,7 @@
|
|
10013
10013
|
// reduce max buf len if current position is buffered
|
10014
10014
|
var buffered = bufferedInfo && bufferedInfo.len > 0.5;
|
10015
10015
|
if (buffered) {
|
10016
|
-
this.reduceMaxBufferLength(bufferedInfo.len, (frag == null ?
|
10016
|
+
this.reduceMaxBufferLength(bufferedInfo.len, (frag == null ? undefined : frag.duration) || 10);
|
10017
10017
|
}
|
10018
10018
|
var flushBuffer = !buffered;
|
10019
10019
|
if (flushBuffer) {
|
@@ -10089,7 +10089,7 @@
|
|
10089
10089
|
this.resetLoadingState();
|
10090
10090
|
};
|
10091
10091
|
_proto.removeUnbufferedFrags = function removeUnbufferedFrags(start) {
|
10092
|
-
if (start ===
|
10092
|
+
if (start === undefined) {
|
10093
10093
|
start = 0;
|
10094
10094
|
}
|
10095
10095
|
this.fragmentTracker.removeFragmentsInRange(start, Infinity, this.playlistType, false, true);
|
@@ -10127,7 +10127,7 @@
|
|
10127
10127
|
}
|
10128
10128
|
return result;
|
10129
10129
|
}, false);
|
10130
|
-
if (!parsed && ((_this$transmuxer = this.transmuxer) == null ?
|
10130
|
+
if (!parsed && ((_this$transmuxer = this.transmuxer) == null ? undefined : _this$transmuxer.error) === null) {
|
10131
10131
|
var error = new Error("Found no media in fragment " + frag.sn + " of " + this.playlistLabel() + " " + frag.level + " resetting transmuxer to fallback to playlist timing");
|
10132
10132
|
if (level.fragmentError === 0) {
|
10133
10133
|
// Mark and track the odd empty segment as a gap to avoid reloading
|
@@ -10160,7 +10160,7 @@
|
|
10160
10160
|
};
|
10161
10161
|
_proto.fragInfo = function fragInfo(frag, pts, part) {
|
10162
10162
|
var _ref3, _ref4;
|
10163
|
-
if (pts ===
|
10163
|
+
if (pts === undefined) {
|
10164
10164
|
pts = true;
|
10165
10165
|
}
|
10166
10166
|
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') : '');
|
@@ -10175,7 +10175,7 @@
|
|
10175
10175
|
};
|
10176
10176
|
_proto.resetTransmuxer = function resetTransmuxer() {
|
10177
10177
|
var _this$transmuxer2;
|
10178
|
-
(_this$transmuxer2 = this.transmuxer) == null ?
|
10178
|
+
(_this$transmuxer2 = this.transmuxer) == null ? undefined : _this$transmuxer2.reset();
|
10179
10179
|
};
|
10180
10180
|
_proto.recoverWorkerError = function recoverWorkerError(data) {
|
10181
10181
|
if (data.event === 'demuxerWorker') {
|
@@ -10700,10 +10700,10 @@
|
|
10700
10700
|
}
|
10701
10701
|
|
10702
10702
|
function toUint8(data, offset, length) {
|
10703
|
-
if (offset ===
|
10703
|
+
if (offset === undefined) {
|
10704
10704
|
offset = 0;
|
10705
10705
|
}
|
10706
|
-
if (length ===
|
10706
|
+
if (length === undefined) {
|
10707
10707
|
length = Infinity;
|
10708
10708
|
}
|
10709
10709
|
return view(data, offset, length, Uint8Array);
|
@@ -11029,10 +11029,10 @@
|
|
11029
11029
|
}({});
|
11030
11030
|
|
11031
11031
|
function dummyTrack(type, inputTimeScale) {
|
11032
|
-
if (type ===
|
11032
|
+
if (type === undefined) {
|
11033
11033
|
type = '';
|
11034
11034
|
}
|
11035
|
-
if (inputTimeScale ===
|
11035
|
+
if (inputTimeScale === undefined) {
|
11036
11036
|
inputTimeScale = 90000;
|
11037
11037
|
}
|
11038
11038
|
return {
|
@@ -11048,8 +11048,8 @@
|
|
11048
11048
|
|
11049
11049
|
var BaseAudioDemuxer = /*#__PURE__*/function () {
|
11050
11050
|
function BaseAudioDemuxer() {
|
11051
|
-
this._audioTrack =
|
11052
|
-
this._id3Track =
|
11051
|
+
this._audioTrack = undefined;
|
11052
|
+
this._id3Track = undefined;
|
11053
11053
|
this.frameIndex = 0;
|
11054
11054
|
this.cachedData = null;
|
11055
11055
|
this.basePTS = null;
|
@@ -11341,8 +11341,8 @@
|
|
11341
11341
|
function AACDemuxer(observer, config) {
|
11342
11342
|
var _this;
|
11343
11343
|
_this = _BaseAudioDemuxer.call(this) || this;
|
11344
|
-
_this.observer =
|
11345
|
-
_this.config =
|
11344
|
+
_this.observer = undefined;
|
11345
|
+
_this.config = undefined;
|
11346
11346
|
_this.observer = observer;
|
11347
11347
|
_this.config = config;
|
11348
11348
|
return _this;
|
@@ -11378,7 +11378,7 @@
|
|
11378
11378
|
// Layer bits (position 14 and 15) in header should be always 0 for ADTS
|
11379
11379
|
// More info https://wiki.multimedia.cx/index.php?title=ADTS
|
11380
11380
|
var id3Data = getId3Data(data, 0);
|
11381
|
-
var offset = (id3Data == null ?
|
11381
|
+
var offset = (id3Data == null ? undefined : id3Data.length) || 0;
|
11382
11382
|
if (probe(data, offset)) {
|
11383
11383
|
return false;
|
11384
11384
|
}
|
@@ -11429,7 +11429,7 @@
|
|
11429
11429
|
function AC3Demuxer(observer) {
|
11430
11430
|
var _this;
|
11431
11431
|
_this = _BaseAudioDemuxer.call(this) || this;
|
11432
|
-
_this.observer =
|
11432
|
+
_this.observer = undefined;
|
11433
11433
|
_this.observer = observer;
|
11434
11434
|
return _this;
|
11435
11435
|
}
|
@@ -11575,7 +11575,7 @@
|
|
11575
11575
|
// Layer bits (position 14 and 15) in header should be always different from 0 (Layer I or Layer II or Layer III)
|
11576
11576
|
// More info http://www.mp3-tech.org/programmer/frame_header.html
|
11577
11577
|
var id3Data = getId3Data(data, 0);
|
11578
|
-
var offset = (id3Data == null ?
|
11578
|
+
var offset = (id3Data == null ? undefined : id3Data.length) || 0;
|
11579
11579
|
|
11580
11580
|
// Check for ac-3|ec-3 sync bytes and return false if present
|
11581
11581
|
if (id3Data && data[offset] === 0x0b && data[offset + 1] === 0x77 && getId3Timestamp(id3Data) !== undefined &&
|
@@ -11608,11 +11608,11 @@
|
|
11608
11608
|
function MP4Demuxer(observer, config) {
|
11609
11609
|
this.remainderData = null;
|
11610
11610
|
this.timeOffset = 0;
|
11611
|
-
this.config =
|
11612
|
-
this.videoTrack =
|
11613
|
-
this.audioTrack =
|
11614
|
-
this.id3Track =
|
11615
|
-
this.txtTrack =
|
11611
|
+
this.config = undefined;
|
11612
|
+
this.videoTrack = undefined;
|
11613
|
+
this.audioTrack = undefined;
|
11614
|
+
this.id3Track = undefined;
|
11615
|
+
this.txtTrack = undefined;
|
11616
11616
|
this.config = config;
|
11617
11617
|
}
|
11618
11618
|
var _proto = MP4Demuxer.prototype;
|
@@ -11759,8 +11759,8 @@
|
|
11759
11759
|
|
11760
11760
|
var SampleAesDecrypter = /*#__PURE__*/function () {
|
11761
11761
|
function SampleAesDecrypter(observer, config, keyData) {
|
11762
|
-
this.keyData =
|
11763
|
-
this.decrypter =
|
11762
|
+
this.keyData = undefined;
|
11763
|
+
this.decrypter = undefined;
|
11764
11764
|
this.keyData = keyData;
|
11765
11765
|
this.decrypter = new Decrypter(config, {
|
11766
11766
|
removePKCS7Padding: false
|
@@ -12026,10 +12026,10 @@
|
|
12026
12026
|
|
12027
12027
|
var ExpGolomb = /*#__PURE__*/function () {
|
12028
12028
|
function ExpGolomb(data) {
|
12029
|
-
this.data =
|
12030
|
-
this.bytesAvailable =
|
12031
|
-
this.word =
|
12032
|
-
this.bitsAvailable =
|
12029
|
+
this.data = undefined;
|
12030
|
+
this.bytesAvailable = undefined;
|
12031
|
+
this.word = undefined;
|
12032
|
+
this.bitsAvailable = undefined;
|
12033
12033
|
this.data = data;
|
12034
12034
|
// the number of bytes left to examine in this.data
|
12035
12035
|
this.bytesAvailable = data.byteLength;
|
@@ -12263,7 +12263,7 @@
|
|
12263
12263
|
spsfound = true;
|
12264
12264
|
var sps = unit.data;
|
12265
12265
|
var config = _this.readSPS(sps);
|
12266
|
-
if (!track.sps || track.width !== config.width || track.height !== config.height || ((_track$pixelRatio = track.pixelRatio) == null ?
|
12266
|
+
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]) {
|
12267
12267
|
track.width = config.width;
|
12268
12268
|
track.height = config.height;
|
12269
12269
|
track.pixelRatio = config.pixelRatio;
|
@@ -13121,22 +13121,22 @@
|
|
13121
13121
|
var PACKET_LENGTH = 188;
|
13122
13122
|
var TSDemuxer = /*#__PURE__*/function () {
|
13123
13123
|
function TSDemuxer(observer, config, typeSupported, logger) {
|
13124
|
-
this.logger =
|
13125
|
-
this.observer =
|
13126
|
-
this.config =
|
13127
|
-
this.typeSupported =
|
13124
|
+
this.logger = undefined;
|
13125
|
+
this.observer = undefined;
|
13126
|
+
this.config = undefined;
|
13127
|
+
this.typeSupported = undefined;
|
13128
13128
|
this.sampleAes = null;
|
13129
13129
|
this.pmtParsed = false;
|
13130
|
-
this.audioCodec =
|
13131
|
-
this.videoCodec =
|
13130
|
+
this.audioCodec = undefined;
|
13131
|
+
this.videoCodec = undefined;
|
13132
13132
|
this._pmtId = -1;
|
13133
|
-
this._videoTrack =
|
13134
|
-
this._audioTrack =
|
13135
|
-
this._id3Track =
|
13136
|
-
this._txtTrack =
|
13133
|
+
this._videoTrack = undefined;
|
13134
|
+
this._audioTrack = undefined;
|
13135
|
+
this._id3Track = undefined;
|
13136
|
+
this._txtTrack = undefined;
|
13137
13137
|
this.aacOverFlow = null;
|
13138
13138
|
this.remainderData = null;
|
13139
|
-
this.videoParser =
|
13139
|
+
this.videoParser = undefined;
|
13140
13140
|
this.observer = observer;
|
13141
13141
|
this.config = config;
|
13142
13142
|
this.typeSupported = typeSupported;
|
@@ -13244,10 +13244,10 @@
|
|
13244
13244
|
this.remainderData = null;
|
13245
13245
|
};
|
13246
13246
|
_proto.demux = function demux(data, timeOffset, isSampleAes, flush) {
|
13247
|
-
if (isSampleAes ===
|
13247
|
+
if (isSampleAes === undefined) {
|
13248
13248
|
isSampleAes = false;
|
13249
13249
|
}
|
13250
|
-
if (flush ===
|
13250
|
+
if (flush === undefined) {
|
13251
13251
|
flush = false;
|
13252
13252
|
}
|
13253
13253
|
if (!isSampleAes) {
|
@@ -13297,7 +13297,7 @@
|
|
13297
13297
|
var atf = (data[start + 3] & 0x30) >> 4;
|
13298
13298
|
|
13299
13299
|
// if an adaption field is present, its length is specified by the fifth byte of the TS packet header.
|
13300
|
-
var offset =
|
13300
|
+
var offset = undefined;
|
13301
13301
|
if (atf > 1) {
|
13302
13302
|
offset = start + 5 + data[start + 4];
|
13303
13303
|
// continue if there is only adaptation field
|
@@ -14675,34 +14675,34 @@
|
|
14675
14675
|
};
|
14676
14676
|
return MP4;
|
14677
14677
|
}();
|
14678
|
-
MP4.types =
|
14679
|
-
MP4.HDLR_TYPES =
|
14680
|
-
MP4.STTS =
|
14681
|
-
MP4.STSC =
|
14682
|
-
MP4.STCO =
|
14683
|
-
MP4.STSZ =
|
14684
|
-
MP4.VMHD =
|
14685
|
-
MP4.SMHD =
|
14686
|
-
MP4.STSD =
|
14687
|
-
MP4.FTYP =
|
14688
|
-
MP4.DINF =
|
14678
|
+
MP4.types = undefined;
|
14679
|
+
MP4.HDLR_TYPES = undefined;
|
14680
|
+
MP4.STTS = undefined;
|
14681
|
+
MP4.STSC = undefined;
|
14682
|
+
MP4.STCO = undefined;
|
14683
|
+
MP4.STSZ = undefined;
|
14684
|
+
MP4.VMHD = undefined;
|
14685
|
+
MP4.SMHD = undefined;
|
14686
|
+
MP4.STSD = undefined;
|
14687
|
+
MP4.FTYP = undefined;
|
14688
|
+
MP4.DINF = undefined;
|
14689
14689
|
|
14690
14690
|
var MPEG_TS_CLOCK_FREQ_HZ = 90000;
|
14691
14691
|
function toTimescaleFromBase(baseTime, destScale, srcBase, round) {
|
14692
|
-
if (srcBase ===
|
14692
|
+
if (srcBase === undefined) {
|
14693
14693
|
srcBase = 1;
|
14694
14694
|
}
|
14695
|
-
if (round ===
|
14695
|
+
if (round === undefined) {
|
14696
14696
|
round = false;
|
14697
14697
|
}
|
14698
14698
|
var result = baseTime * destScale * srcBase; // equivalent to `(value * scale) / (1 / base)`
|
14699
14699
|
return round ? Math.round(result) : result;
|
14700
14700
|
}
|
14701
14701
|
function toTimescaleFromScale(baseTime, destScale, srcScale, round) {
|
14702
|
-
if (srcScale ===
|
14702
|
+
if (srcScale === undefined) {
|
14703
14703
|
srcScale = 1;
|
14704
14704
|
}
|
14705
|
-
if (round ===
|
14705
|
+
if (round === undefined) {
|
14706
14706
|
round = false;
|
14707
14707
|
}
|
14708
14708
|
return toTimescaleFromBase(baseTime, destScale, 1 / srcScale, round);
|
@@ -14711,7 +14711,7 @@
|
|
14711
14711
|
return toTimescaleFromBase(baseTime, 1000, 1 / MPEG_TS_CLOCK_FREQ_HZ, round);
|
14712
14712
|
}
|
14713
14713
|
function toMpegTsClockFromTimescale(baseTime, srcScale) {
|
14714
|
-
if (srcScale ===
|
14714
|
+
if (srcScale === undefined) {
|
14715
14715
|
srcScale = 1;
|
14716
14716
|
}
|
14717
14717
|
return toTimescaleFromBase(baseTime, MPEG_TS_CLOCK_FREQ_HZ, 1 / srcScale);
|
@@ -14740,10 +14740,10 @@
|
|
14740
14740
|
}
|
14741
14741
|
var MP4Remuxer = /*#__PURE__*/function () {
|
14742
14742
|
function MP4Remuxer(observer, config, typeSupported, logger) {
|
14743
|
-
this.logger =
|
14744
|
-
this.observer =
|
14745
|
-
this.config =
|
14746
|
-
this.typeSupported =
|
14743
|
+
this.logger = undefined;
|
14744
|
+
this.observer = undefined;
|
14745
|
+
this.config = undefined;
|
14746
|
+
this.typeSupported = undefined;
|
14747
14747
|
this.ISGenerated = false;
|
14748
14748
|
this._initPTS = null;
|
14749
14749
|
this._initDTS = null;
|
@@ -14752,7 +14752,7 @@
|
|
14752
14752
|
this.videoSampleDuration = null;
|
14753
14753
|
this.isAudioContiguous = false;
|
14754
14754
|
this.isVideoContiguous = false;
|
14755
|
-
this.videoTrackConfig =
|
14755
|
+
this.videoTrackConfig = undefined;
|
14756
14756
|
this.observer = observer;
|
14757
14757
|
this.config = config;
|
14758
14758
|
this.typeSupported = typeSupported;
|
@@ -14835,7 +14835,7 @@
|
|
14835
14835
|
if (this.ISGenerated) {
|
14836
14836
|
var _videoTrack$pixelRati, _config$pixelRatio, _videoTrack$pixelRati2, _config$pixelRatio2;
|
14837
14837
|
var config = this.videoTrackConfig;
|
14838
|
-
if (config && (videoTrack.width !== config.width || videoTrack.height !== config.height || ((_videoTrack$pixelRati = videoTrack.pixelRatio) == null ?
|
14838
|
+
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) {
|
14839
14839
|
this.resetInitSegment();
|
14840
14840
|
}
|
14841
14841
|
}
|
@@ -15199,7 +15199,7 @@
|
|
15199
15199
|
}
|
15200
15200
|
|
15201
15201
|
// expected sample duration is the Decoding Timestamp diff of consecutive samples
|
15202
|
-
var ptsDelta =
|
15202
|
+
var ptsDelta = undefined;
|
15203
15203
|
if (_i3 < nbSamples - 1) {
|
15204
15204
|
mp4SampleDuration = inputSamples[_i3 + 1].dts - VideoSample.dts;
|
15205
15205
|
ptsDelta = inputSamples[_i3 + 1].pts - VideoSample.pts;
|
@@ -15590,13 +15590,13 @@
|
|
15590
15590
|
|
15591
15591
|
var PassThroughRemuxer = /*#__PURE__*/function () {
|
15592
15592
|
function PassThroughRemuxer(observer, config, typeSupported, logger) {
|
15593
|
-
this.logger =
|
15593
|
+
this.logger = undefined;
|
15594
15594
|
this.emitInitSegment = false;
|
15595
|
-
this.audioCodec =
|
15596
|
-
this.videoCodec =
|
15597
|
-
this.initData =
|
15595
|
+
this.audioCodec = undefined;
|
15596
|
+
this.videoCodec = undefined;
|
15597
|
+
this.initData = undefined;
|
15598
15598
|
this.initPTS = null;
|
15599
|
-
this.initTracks =
|
15599
|
+
this.initTracks = undefined;
|
15600
15600
|
this.lastEndTime = null;
|
15601
15601
|
this.logger = logger;
|
15602
15602
|
}
|
@@ -15766,7 +15766,7 @@
|
|
15766
15766
|
return Math.abs(startTime - timeOffset) > minDuration;
|
15767
15767
|
}
|
15768
15768
|
function getParsedTrackCodec(track, type) {
|
15769
|
-
var parsedCodec = track == null ?
|
15769
|
+
var parsedCodec = track == null ? undefined : track.codec;
|
15770
15770
|
if (parsedCodec && parsedCodec.length > 4) {
|
15771
15771
|
return parsedCodec;
|
15772
15772
|
}
|
@@ -15817,18 +15817,18 @@
|
|
15817
15817
|
var Transmuxer = /*#__PURE__*/function () {
|
15818
15818
|
function Transmuxer(observer, typeSupported, config, vendor, id, logger) {
|
15819
15819
|
this.asyncResult = false;
|
15820
|
-
this.logger =
|
15821
|
-
this.observer =
|
15822
|
-
this.typeSupported =
|
15823
|
-
this.config =
|
15824
|
-
this.id =
|
15825
|
-
this.demuxer =
|
15826
|
-
this.remuxer =
|
15827
|
-
this.decrypter =
|
15828
|
-
this.probe =
|
15820
|
+
this.logger = undefined;
|
15821
|
+
this.observer = undefined;
|
15822
|
+
this.typeSupported = undefined;
|
15823
|
+
this.config = undefined;
|
15824
|
+
this.id = undefined;
|
15825
|
+
this.demuxer = undefined;
|
15826
|
+
this.remuxer = undefined;
|
15827
|
+
this.decrypter = undefined;
|
15828
|
+
this.probe = undefined;
|
15829
15829
|
this.decryptionPromise = null;
|
15830
|
-
this.transmuxConfig =
|
15831
|
-
this.currentTransmuxState =
|
15830
|
+
this.transmuxConfig = undefined;
|
15831
|
+
this.currentTransmuxState = undefined;
|
15832
15832
|
this.observer = observer;
|
15833
15833
|
this.typeSupported = typeSupported;
|
15834
15834
|
this.config = config;
|
@@ -16116,7 +16116,7 @@
|
|
16116
16116
|
}();
|
16117
16117
|
function getEncryptionType(data, decryptData) {
|
16118
16118
|
var encryptionType = null;
|
16119
|
-
if (data.byteLength > 0 && (decryptData == null ?
|
16119
|
+
if (data.byteLength > 0 && (decryptData == null ? undefined : decryptData.key) != null && decryptData.iv !== null && decryptData.method != null) {
|
16120
16120
|
encryptionType = decryptData;
|
16121
16121
|
}
|
16122
16122
|
return encryptionType;
|
@@ -16131,11 +16131,11 @@
|
|
16131
16131
|
return 'then' in p && p.then instanceof Function;
|
16132
16132
|
}
|
16133
16133
|
var TransmuxConfig = function TransmuxConfig(audioCodec, videoCodec, initSegmentData, duration, defaultInitPts) {
|
16134
|
-
this.audioCodec =
|
16135
|
-
this.videoCodec =
|
16136
|
-
this.initSegmentData =
|
16137
|
-
this.duration =
|
16138
|
-
this.defaultInitPts =
|
16134
|
+
this.audioCodec = undefined;
|
16135
|
+
this.videoCodec = undefined;
|
16136
|
+
this.initSegmentData = undefined;
|
16137
|
+
this.duration = undefined;
|
16138
|
+
this.defaultInitPts = undefined;
|
16139
16139
|
this.audioCodec = audioCodec;
|
16140
16140
|
this.videoCodec = videoCodec;
|
16141
16141
|
this.initSegmentData = initSegmentData;
|
@@ -16143,12 +16143,12 @@
|
|
16143
16143
|
this.defaultInitPts = defaultInitPts || null;
|
16144
16144
|
};
|
16145
16145
|
var TransmuxState = function TransmuxState(discontinuity, contiguous, accurateTimeOffset, trackSwitch, timeOffset, initSegmentChange) {
|
16146
|
-
this.discontinuity =
|
16147
|
-
this.contiguous =
|
16148
|
-
this.accurateTimeOffset =
|
16149
|
-
this.trackSwitch =
|
16150
|
-
this.timeOffset =
|
16151
|
-
this.initSegmentChange =
|
16146
|
+
this.discontinuity = undefined;
|
16147
|
+
this.contiguous = undefined;
|
16148
|
+
this.accurateTimeOffset = undefined;
|
16149
|
+
this.trackSwitch = undefined;
|
16150
|
+
this.timeOffset = undefined;
|
16151
|
+
this.initSegmentChange = undefined;
|
16152
16152
|
this.discontinuity = discontinuity;
|
16153
16153
|
this.contiguous = contiguous;
|
16154
16154
|
this.accurateTimeOffset = accurateTimeOffset;
|
@@ -16320,7 +16320,7 @@
|
|
16320
16320
|
return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
|
16321
16321
|
}
|
16322
16322
|
|
16323
|
-
var version = "1.6.0-beta.2.0.canary.
|
16323
|
+
var version = "1.6.0-beta.2.0.canary.10882";
|
16324
16324
|
|
16325
16325
|
// ensure the worker ends up in the bundle
|
16326
16326
|
// If the worker should not be included this gets aliased to empty.js
|
@@ -16385,17 +16385,17 @@
|
|
16385
16385
|
function TransmuxerInterface(_hls, id, onTransmuxComplete, onFlush) {
|
16386
16386
|
var _this = this;
|
16387
16387
|
this.error = null;
|
16388
|
-
this.hls =
|
16389
|
-
this.id =
|
16388
|
+
this.hls = undefined;
|
16389
|
+
this.id = undefined;
|
16390
16390
|
this.instanceNo = transmuxerInstanceCount++;
|
16391
|
-
this.observer =
|
16391
|
+
this.observer = undefined;
|
16392
16392
|
this.frag = null;
|
16393
16393
|
this.part = null;
|
16394
|
-
this.useWorker =
|
16394
|
+
this.useWorker = undefined;
|
16395
16395
|
this.workerContext = null;
|
16396
16396
|
this.transmuxer = null;
|
16397
|
-
this.onTransmuxComplete =
|
16398
|
-
this.onFlush =
|
16397
|
+
this.onTransmuxComplete = undefined;
|
16398
|
+
this.onFlush = undefined;
|
16399
16399
|
this.onWorkerMessage = function (event) {
|
16400
16400
|
var data = event.data;
|
16401
16401
|
var hls = _this.hls;
|
@@ -16406,7 +16406,7 @@
|
|
16406
16406
|
case 'init':
|
16407
16407
|
{
|
16408
16408
|
var _this$workerContext;
|
16409
|
-
var objectURL = (_this$workerContext = _this.workerContext) == null ?
|
16409
|
+
var objectURL = (_this$workerContext = _this.workerContext) == null ? undefined : _this$workerContext.objectURL;
|
16410
16410
|
if (objectURL) {
|
16411
16411
|
// revoke the Object URL that was used to create transmuxer worker, so as not to leak it
|
16412
16412
|
self.URL.revokeObjectURL(objectURL);
|
@@ -16580,7 +16580,7 @@
|
|
16580
16580
|
var trackSwitch = !(lastFrag && chunkMeta.level === lastFrag.level);
|
16581
16581
|
var snDiff = lastFrag ? chunkMeta.sn - lastFrag.sn : -1;
|
16582
16582
|
var partDiff = this.part ? chunkMeta.part - this.part.index : -1;
|
16583
|
-
var progressive = snDiff === 0 && chunkMeta.id > 1 && chunkMeta.id === (lastFrag == null ?
|
16583
|
+
var progressive = snDiff === 0 && chunkMeta.id > 1 && chunkMeta.id === (lastFrag == null ? undefined : lastFrag.stats.chunkCount);
|
16584
16584
|
var contiguous = !trackSwitch && (snDiff === 1 || snDiff === 0 && (partDiff === 1 || progressive && partDiff <= 0));
|
16585
16585
|
var now = self.performance.now();
|
16586
16586
|
if (trackSwitch || snDiff || frag.stats.parsing.start === 0) {
|
@@ -16589,7 +16589,7 @@
|
|
16589
16589
|
if (part && (partDiff || !contiguous)) {
|
16590
16590
|
part.stats.parsing.start = now;
|
16591
16591
|
}
|
16592
|
-
var initSegmentChange = !(lastFrag && ((_frag$initSegment = frag.initSegment) == null ?
|
16592
|
+
var initSegmentChange = !(lastFrag && ((_frag$initSegment = frag.initSegment) == null ? undefined : _frag$initSegment.url) === ((_lastFrag$initSegment = lastFrag.initSegment) == null ? undefined : _lastFrag$initSegment.url));
|
16593
16593
|
var state = new TransmuxState(discontinuity, contiguous, accurateTimeOffset, trackSwitch, timeOffset, initSegmentChange);
|
16594
16594
|
if (!contiguous || discontinuity || initSegmentChange) {
|
16595
16595
|
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);
|
@@ -16848,8 +16848,8 @@
|
|
16848
16848
|
{
|
16849
16849
|
var levels = this.levels,
|
16850
16850
|
trackId = this.trackId;
|
16851
|
-
var currenTrack = levels == null ?
|
16852
|
-
var details = currenTrack == null ?
|
16851
|
+
var currenTrack = levels == null ? undefined : levels[trackId];
|
16852
|
+
var details = currenTrack == null ? undefined : currenTrack.details;
|
16853
16853
|
if (details && !this.waitForLive(currenTrack)) {
|
16854
16854
|
if (this.waitForCdnTuneIn(details)) {
|
16855
16855
|
break;
|
@@ -16868,7 +16868,7 @@
|
|
16868
16868
|
var _levels = this.levels,
|
16869
16869
|
_trackId = this.trackId;
|
16870
16870
|
this.log('RetryDate reached, switch back to IDLE state');
|
16871
|
-
this.resetStartWhenNotLoaded((_levels == null ?
|
16871
|
+
this.resetStartWhenNotLoaded((_levels == null ? undefined : _levels[_trackId]) || null);
|
16872
16872
|
this.state = State.IDLE;
|
16873
16873
|
}
|
16874
16874
|
break;
|
@@ -17015,7 +17015,7 @@
|
|
17015
17015
|
}
|
17016
17016
|
|
17017
17017
|
// Request audio segments up to one fragment ahead of main stream-controller
|
17018
|
-
var mainFragLoading = (_this$mainFragLoading = this.mainFragLoading) == null ?
|
17018
|
+
var mainFragLoading = (_this$mainFragLoading = this.mainFragLoading) == null ? undefined : _this$mainFragLoading.frag;
|
17019
17019
|
if (!this.audioOnly && this.startFragRequested && mainFragLoading && isMediaFragment(mainFragLoading) && isMediaFragment(frag) && !frag.endList && (!trackDetails.live || !this.loadingParts && targetBufferTime < this.hls.liveSyncPosition)) {
|
17020
17020
|
var mainFrag = mainFragLoading;
|
17021
17021
|
if (frag.start > mainFrag.end) {
|
@@ -17122,7 +17122,7 @@
|
|
17122
17122
|
}
|
17123
17123
|
if (trackLevel.details) {
|
17124
17124
|
var _this$levelLastLoaded;
|
17125
|
-
sliding = this.alignPlaylists(newDetails, trackLevel.details, (_this$levelLastLoaded = this.levelLastLoaded) == null ?
|
17125
|
+
sliding = this.alignPlaylists(newDetails, trackLevel.details, (_this$levelLastLoaded = this.levelLastLoaded) == null ? undefined : _this$levelLastLoaded.details);
|
17126
17126
|
}
|
17127
17127
|
if (!newDetails.alignedSliding) {
|
17128
17128
|
// Align audio rendition with the "main" playlist on discontinuity change
|
@@ -17187,7 +17187,7 @@
|
|
17187
17187
|
// Check if we have video initPTS
|
17188
17188
|
// If not we need to wait for it
|
17189
17189
|
var initPTS = this.initPTS[frag.cc];
|
17190
|
-
var initSegmentData = (_frag$initSegment = frag.initSegment) == null ?
|
17190
|
+
var initSegmentData = (_frag$initSegment = frag.initSegment) == null ? undefined : _frag$initSegment.data;
|
17191
17191
|
if (initPTS !== undefined) {
|
17192
17192
|
// this.log(`Transmuxing ${sn} of [${details.startSN} ,${details.endSN}],track ${trackId}`);
|
17193
17193
|
// time Offset is accurate if level PTS is known, or if playlist is not sliding (not live)
|
@@ -17288,7 +17288,7 @@
|
|
17288
17288
|
case ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:
|
17289
17289
|
case ErrorDetails.LEVEL_PARSING_ERROR:
|
17290
17290
|
// in case of non fatal error while loading track, if not retrying to load track, switch back to IDLE
|
17291
|
-
if (!data.levelRetry && this.state === State.WAITING_TRACK && ((_data$context = data.context) == null ?
|
17291
|
+
if (!data.levelRetry && this.state === State.WAITING_TRACK && ((_data$context = data.context) == null ? undefined : _data$context.type) === PlaylistContextType.AUDIO_TRACK) {
|
17292
17292
|
this.state = State.IDLE;
|
17293
17293
|
}
|
17294
17294
|
break;
|
@@ -17471,7 +17471,7 @@
|
|
17471
17471
|
_proto.flushAudioIfNeeded = function flushAudioIfNeeded(switchingTrack) {
|
17472
17472
|
var media = this.media,
|
17473
17473
|
bufferedTrack = this.bufferedTrack;
|
17474
|
-
var bufferedAttributes = bufferedTrack == null ?
|
17474
|
+
var bufferedAttributes = bufferedTrack == null ? undefined : bufferedTrack.attrs;
|
17475
17475
|
var switchAttributes = switchingTrack.attrs;
|
17476
17476
|
if (media && bufferedAttributes && (bufferedAttributes.CHANNELS !== switchAttributes.CHANNELS || bufferedTrack.name !== switchingTrack.name || bufferedTrack.lang !== switchingTrack.lang)) {
|
17477
17477
|
if (useAlternateAudio(switchingTrack.url, this.hls)) {
|
@@ -17498,7 +17498,7 @@
|
|
17498
17498
|
function BasePlaylistController(hls, logPrefix) {
|
17499
17499
|
var _this;
|
17500
17500
|
_this = _Logger.call(this, logPrefix, hls.logger) || this;
|
17501
|
-
_this.hls =
|
17501
|
+
_this.hls = undefined;
|
17502
17502
|
_this.canLoad = false;
|
17503
17503
|
_this.timer = -1;
|
17504
17504
|
_this.hls = hls;
|
@@ -17526,12 +17526,12 @@
|
|
17526
17526
|
this.clearTimer();
|
17527
17527
|
};
|
17528
17528
|
_proto.switchParams = function switchParams(playlistUri, previous, current) {
|
17529
|
-
var renditionReports = previous == null ?
|
17529
|
+
var renditionReports = previous == null ? undefined : previous.renditionReports;
|
17530
17530
|
if (renditionReports) {
|
17531
17531
|
var foundIndex = -1;
|
17532
17532
|
for (var i = 0; i < renditionReports.length; i++) {
|
17533
17533
|
var attr = renditionReports[i];
|
17534
|
-
var uri =
|
17534
|
+
var uri = undefined;
|
17535
17535
|
try {
|
17536
17536
|
uri = new self.URL(attr.URI, previous.url).href;
|
17537
17537
|
} catch (error) {
|
@@ -17549,8 +17549,8 @@
|
|
17549
17549
|
}
|
17550
17550
|
if (foundIndex !== -1) {
|
17551
17551
|
var _attr = renditionReports[foundIndex];
|
17552
|
-
var msn = parseInt(_attr['LAST-MSN']) || (previous == null ?
|
17553
|
-
var part = parseInt(_attr['LAST-PART']) || (previous == null ?
|
17552
|
+
var msn = parseInt(_attr['LAST-MSN']) || (previous == null ? undefined : previous.lastPartSn);
|
17553
|
+
var part = parseInt(_attr['LAST-PART']) || (previous == null ? undefined : previous.lastPartIndex);
|
17554
17554
|
if (this.hls.config.lowLatencyMode) {
|
17555
17555
|
var currentGoal = Math.min(previous.age - previous.partTarget, previous.targetduration);
|
17556
17556
|
if (part >= 0 && currentGoal > previous.partTarget) {
|
@@ -17730,7 +17730,7 @@
|
|
17730
17730
|
var _ref = errorAction || {},
|
17731
17731
|
action = _ref.action,
|
17732
17732
|
_ref$retryCount = _ref.retryCount,
|
17733
|
-
retryCount = _ref$retryCount ===
|
17733
|
+
retryCount = _ref$retryCount === undefined ? 0 : _ref$retryCount,
|
17734
17734
|
retryConfig = _ref.retryConfig;
|
17735
17735
|
var retry = !!errorAction && !!retryConfig && (action === NetworkErrorAction.RetryRequest || !errorAction.resolved && action === NetworkErrorAction.SendAlternateToPenaltyBox);
|
17736
17736
|
if (retry) {
|
@@ -17817,7 +17817,7 @@
|
|
17817
17817
|
details = data.details;
|
17818
17818
|
var trackInActiveGroup = this.tracksInGroup[id];
|
17819
17819
|
if (!trackInActiveGroup || trackInActiveGroup.groupId !== groupId) {
|
17820
|
-
this.warn("Audio track with id:" + id + " and group:" + groupId + " not found in active group " + (trackInActiveGroup == null ?
|
17820
|
+
this.warn("Audio track with id:" + id + " and group:" + groupId + " not found in active group " + (trackInActiveGroup == null ? undefined : trackInActiveGroup.groupId));
|
17821
17821
|
return;
|
17822
17822
|
}
|
17823
17823
|
var curDetails = trackInActiveGroup.details;
|
@@ -17841,8 +17841,8 @@
|
|
17841
17841
|
var audioGroups = levelInfo.audioGroups || null;
|
17842
17842
|
var currentGroups = this.groupIds;
|
17843
17843
|
var currentTrack = this.currentTrack;
|
17844
|
-
if (!audioGroups || (currentGroups == null ?
|
17845
|
-
return (currentGroups == null ?
|
17844
|
+
if (!audioGroups || (currentGroups == null ? undefined : currentGroups.length) !== (audioGroups == null ? undefined : audioGroups.length) || audioGroups != null && audioGroups.some(function (groupId) {
|
17845
|
+
return (currentGroups == null ? undefined : currentGroups.indexOf(groupId)) === -1;
|
17846
17846
|
})) {
|
17847
17847
|
this.groupIds = audioGroups;
|
17848
17848
|
this.trackId = -1;
|
@@ -17889,14 +17889,14 @@
|
|
17889
17889
|
var audioTracksUpdated = {
|
17890
17890
|
audioTracks: audioTracks
|
17891
17891
|
};
|
17892
|
-
this.log("Updating audio tracks, " + audioTracks.length + " track(s) found in group(s): " + (audioGroups == null ?
|
17892
|
+
this.log("Updating audio tracks, " + audioTracks.length + " track(s) found in group(s): " + (audioGroups == null ? undefined : audioGroups.join(',')));
|
17893
17893
|
this.hls.trigger(Events.AUDIO_TRACKS_UPDATED, audioTracksUpdated);
|
17894
17894
|
var selectedTrackId = this.trackId;
|
17895
17895
|
if (trackId !== -1 && selectedTrackId === -1) {
|
17896
17896
|
this.setAudioTrack(trackId);
|
17897
17897
|
} else if (audioTracks.length && selectedTrackId === -1) {
|
17898
17898
|
var _this$groupIds;
|
17899
|
-
var error = new Error("No audio track selected for current audio group-ID(s): " + ((_this$groupIds = this.groupIds) == null ?
|
17899
|
+
var error = new Error("No audio track selected for current audio group-ID(s): " + ((_this$groupIds = this.groupIds) == null ? undefined : _this$groupIds.join(',')) + " track count: " + audioTracks.length);
|
17900
17900
|
this.warn(error.message);
|
17901
17901
|
this.hls.trigger(Events.ERROR, {
|
17902
17902
|
type: ErrorTypes.MEDIA_ERROR,
|
@@ -17982,7 +17982,7 @@
|
|
17982
17982
|
if (trackLoaded) {
|
17983
17983
|
return;
|
17984
17984
|
}
|
17985
|
-
var hlsUrlParameters = this.switchParams(track.url, lastTrack == null ?
|
17985
|
+
var hlsUrlParameters = this.switchParams(track.url, lastTrack == null ? undefined : lastTrack.details, track.details);
|
17986
17986
|
this.loadPlaylist(hlsUrlParameters);
|
17987
17987
|
};
|
17988
17988
|
_proto.findTrackId = function findTrackId(currentTrack) {
|
@@ -18048,8 +18048,8 @@
|
|
18048
18048
|
var groupId = audioTrack.groupId;
|
18049
18049
|
var url = this.getUrlWithDirectives(audioTrack.url, hlsUrlParameters);
|
18050
18050
|
var details = audioTrack.details;
|
18051
|
-
var age = details == null ?
|
18052
|
-
this.log("Loading audio-track " + id + " \"" + audioTrack.name + "\" lang:" + audioTrack.lang + " group:" + groupId + ((hlsUrlParameters == null ?
|
18051
|
+
var age = details == null ? undefined : details.age;
|
18052
|
+
this.log("Loading audio-track " + id + " \"" + audioTrack.name + "\" lang:" + audioTrack.lang + " group:" + groupId + ((hlsUrlParameters == null ? undefined : hlsUrlParameters.msn) !== undefined ? ' at sn ' + hlsUrlParameters.msn + ' part ' + hlsUrlParameters.part : '') + (age && details.live ? ' age ' + age.toFixed(1) + (details.type ? ' ' + details.type || '' : '') : '') + " " + url);
|
18053
18053
|
this.hls.trigger(Events.AUDIO_TRACK_LOADING, {
|
18054
18054
|
url: url,
|
18055
18055
|
id: id,
|
@@ -18083,7 +18083,7 @@
|
|
18083
18083
|
|
18084
18084
|
var BufferOperationQueue = /*#__PURE__*/function () {
|
18085
18085
|
function BufferOperationQueue(sourceBufferReference) {
|
18086
|
-
this.tracks =
|
18086
|
+
this.tracks = undefined;
|
18087
18087
|
this.queues = {
|
18088
18088
|
video: [],
|
18089
18089
|
audio: [],
|
@@ -18139,7 +18139,7 @@
|
|
18139
18139
|
}
|
18140
18140
|
[this.queues.video, this.queues.audio, this.queues.audiovideo].forEach(function (queue) {
|
18141
18141
|
var _queue$;
|
18142
|
-
var label = (_queue$ = queue[0]) == null ?
|
18142
|
+
var label = (_queue$ = queue[0]) == null ? undefined : _queue$.label;
|
18143
18143
|
if (label === 'async-blocker' || label === 'async-blocker-prepend') {
|
18144
18144
|
queue[0].execute();
|
18145
18145
|
queue.splice(0, 1);
|
@@ -18174,7 +18174,7 @@
|
|
18174
18174
|
}
|
18175
18175
|
|
18176
18176
|
// Only shift the current operation off, otherwise the updateend handler will do this for us
|
18177
|
-
var sb = (_this$tracks$type = this.tracks[type]) == null ?
|
18177
|
+
var sb = (_this$tracks$type = this.tracks[type]) == null ? undefined : _this$tracks$type.buffer;
|
18178
18178
|
if (!(sb != null && sb.updating)) {
|
18179
18179
|
this.shiftAndExecuteNext(type);
|
18180
18180
|
}
|
@@ -18190,7 +18190,7 @@
|
|
18190
18190
|
};
|
18191
18191
|
_proto.current = function current(type) {
|
18192
18192
|
var _this$queues;
|
18193
|
-
return ((_this$queues = this.queues) == null ?
|
18193
|
+
return ((_this$queues = this.queues) == null ? undefined : _this$queues[type][0]) || null;
|
18194
18194
|
};
|
18195
18195
|
_proto.toString = function toString() {
|
18196
18196
|
var queues = this.queues,
|
@@ -18206,8 +18206,8 @@
|
|
18206
18206
|
};
|
18207
18207
|
_proto.listSbInfo = function listSbInfo(type) {
|
18208
18208
|
var _this$tracks2;
|
18209
|
-
var track = (_this$tracks2 = this.tracks) == null ?
|
18210
|
-
var sb = track == null ?
|
18209
|
+
var track = (_this$tracks2 = this.tracks) == null ? undefined : _this$tracks2[type];
|
18210
|
+
var sb = track == null ? undefined : track.buffer;
|
18211
18211
|
if (!sb) {
|
18212
18212
|
return 'none';
|
18213
18213
|
}
|
@@ -18215,7 +18215,7 @@
|
|
18215
18215
|
};
|
18216
18216
|
_proto.listOps = function listOps(type) {
|
18217
18217
|
var _this$queues3;
|
18218
|
-
return ((_this$queues3 = this.queues) == null ?
|
18218
|
+
return ((_this$queues3 = this.queues) == null ? undefined : _this$queues3[type].map(function (op) {
|
18219
18219
|
return op.label;
|
18220
18220
|
}).join(', ')) || '';
|
18221
18221
|
};
|
@@ -18238,8 +18238,8 @@
|
|
18238
18238
|
function BufferController(hls, fragmentTracker) {
|
18239
18239
|
var _this2;
|
18240
18240
|
_this2 = _Logger.call(this, 'buffer-controller', hls.logger) || this;
|
18241
|
-
_this2.hls =
|
18242
|
-
_this2.fragmentTracker =
|
18241
|
+
_this2.hls = undefined;
|
18242
|
+
_this2.fragmentTracker = undefined;
|
18243
18243
|
// The level details used to determine duration, target-duration and live
|
18244
18244
|
_this2.details = null;
|
18245
18245
|
// cache the self generated object url to detect hijack of video tag
|
@@ -18259,11 +18259,11 @@
|
|
18259
18259
|
// Keep track of video append position for unblocking audio
|
18260
18260
|
_this2.lastVideoAppendEnd = 0;
|
18261
18261
|
// Whether or not to use ManagedMediaSource API and append source element to media element.
|
18262
|
-
_this2.appendSource =
|
18262
|
+
_this2.appendSource = undefined;
|
18263
18263
|
// Transferred MediaSource information used to detmerine if duration end endstream may be appended
|
18264
|
-
_this2.transferData =
|
18264
|
+
_this2.transferData = undefined;
|
18265
18265
|
// Directives used to override default MediaSource handling
|
18266
|
-
_this2.overrides =
|
18266
|
+
_this2.overrides = undefined;
|
18267
18267
|
// Error counters
|
18268
18268
|
_this2.appendErrors = {
|
18269
18269
|
audio: 0,
|
@@ -18279,7 +18279,7 @@
|
|
18279
18279
|
if (!_this2.hls) {
|
18280
18280
|
return;
|
18281
18281
|
}
|
18282
|
-
if (((_this2$mediaSource = _this2.mediaSource) == null ?
|
18282
|
+
if (((_this2$mediaSource = _this2.mediaSource) == null ? undefined : _this2$mediaSource.readyState) !== 'open') {
|
18283
18283
|
return;
|
18284
18284
|
}
|
18285
18285
|
_this2.hls.pauseBuffering();
|
@@ -18448,7 +18448,7 @@
|
|
18448
18448
|
// in case alt audio is not used, only one BUFFER_CODEC event will be fired from main stream controller
|
18449
18449
|
// it will contain the expected nb of source buffers, no need to compute it
|
18450
18450
|
var codecEvents = 2;
|
18451
|
-
if (data.audio && !data.video || !data.altAudio ||
|
18451
|
+
if (data.audio && !data.video || !data.altAudio || false) {
|
18452
18452
|
codecEvents = 1;
|
18453
18453
|
}
|
18454
18454
|
this.bufferCodecEventsTotal = codecEvents;
|
@@ -18497,7 +18497,7 @@
|
|
18497
18497
|
};
|
18498
18498
|
_proto.assignMediaSource = function assignMediaSource(ms) {
|
18499
18499
|
var _this$transferData2, _ms$constructor;
|
18500
|
-
this.log((((_this$transferData2 = this.transferData) == null ?
|
18500
|
+
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));
|
18501
18501
|
// MediaSource listeners are arrow functions with a lexical scope, and do not need to be bound
|
18502
18502
|
ms.addEventListener('sourceopen', this._onMediaSourceOpen);
|
18503
18503
|
ms.addEventListener('sourceended', this._onMediaSourceEnded);
|
@@ -18541,7 +18541,7 @@
|
|
18541
18541
|
data.tracks = undefined;
|
18542
18542
|
var currentTime = media.currentTime;
|
18543
18543
|
var details = this.details;
|
18544
|
-
var startTime = Math.max(currentTime, (details == null ?
|
18544
|
+
var startTime = Math.max(currentTime, (details == null ? undefined : details.fragments[0].start) || 0);
|
18545
18545
|
if (startTime - currentTime > 1) {
|
18546
18546
|
this.log("attachTransferred: waiting for playback to reach new tracks start time " + currentTime + " -> " + startTime);
|
18547
18547
|
return;
|
@@ -18678,7 +18678,7 @@
|
|
18678
18678
|
};
|
18679
18679
|
_proto.resetBuffer = function resetBuffer(type) {
|
18680
18680
|
var _this$tracks$type;
|
18681
|
-
var sb = (_this$tracks$type = this.tracks[type]) == null ?
|
18681
|
+
var sb = (_this$tracks$type = this.tracks[type]) == null ? undefined : _this$tracks$type.buffer;
|
18682
18682
|
this.removeBuffer(type);
|
18683
18683
|
if (sb) {
|
18684
18684
|
try {
|
@@ -18731,10 +18731,10 @@
|
|
18731
18731
|
container = parsedTrack.container,
|
18732
18732
|
metadata = parsedTrack.metadata;
|
18733
18733
|
var track = tracks[trackName];
|
18734
|
-
var transferredTrack = (_this9$transferData = _this9.transferData) == null ?
|
18734
|
+
var transferredTrack = (_this9$transferData = _this9.transferData) == null ? undefined : (_this9$transferData$t = _this9$transferData.tracks) == null ? undefined : _this9$transferData$t[trackName];
|
18735
18735
|
var sbTrack = transferredTrack != null && transferredTrack.buffer ? transferredTrack : track;
|
18736
|
-
var sbCodec = (sbTrack == null ?
|
18737
|
-
var trackLevelCodec = sbTrack == null ?
|
18736
|
+
var sbCodec = (sbTrack == null ? undefined : sbTrack.pendingCodec) || (sbTrack == null ? undefined : sbTrack.codec);
|
18737
|
+
var trackLevelCodec = sbTrack == null ? undefined : sbTrack.levelCodec;
|
18738
18738
|
var forceChangeType = !sbTrack || !!_this9.hls.config.assetPlayerId;
|
18739
18739
|
if (!track) {
|
18740
18740
|
track = tracks[trackName] = {
|
@@ -18749,9 +18749,9 @@
|
|
18749
18749
|
}
|
18750
18750
|
// check if SourceBuffer codec needs to change
|
18751
18751
|
var currentCodecFull = pickMostCompleteCodecName(sbCodec, trackLevelCodec);
|
18752
|
-
var currentCodec = currentCodecFull == null ?
|
18752
|
+
var currentCodec = currentCodecFull == null ? undefined : currentCodecFull.replace(VIDEO_CODEC_PROFILE_REPLACE, '$1');
|
18753
18753
|
var trackCodec = pickMostCompleteCodecName(codec, levelCodec);
|
18754
|
-
var nextCodec = (_trackCodec = trackCodec) == null ?
|
18754
|
+
var nextCodec = (_trackCodec = trackCodec) == null ? undefined : _trackCodec.replace(VIDEO_CODEC_PROFILE_REPLACE, '$1');
|
18755
18755
|
if (trackCodec && (currentCodec !== nextCodec || forceChangeType)) {
|
18756
18756
|
if (trackName.slice(0, 5) === 'audio') {
|
18757
18757
|
trackCodec = getCodecCompatibleName(trackCodec, _this9.appendSource);
|
@@ -18807,7 +18807,7 @@
|
|
18807
18807
|
_this11 = this;
|
18808
18808
|
var pStart = partOrFrag.start;
|
18809
18809
|
var pTime = pStart + partOrFrag.duration * 0.05;
|
18810
|
-
var atGap = ((_this$fragmentTracker = this.fragmentTracker.getAppendedFrag(pStart, PlaylistLevelType.MAIN)) == null ?
|
18810
|
+
var atGap = ((_this$fragmentTracker = this.fragmentTracker.getAppendedFrag(pStart, PlaylistLevelType.MAIN)) == null ? undefined : _this$fragmentTracker.gap) === true;
|
18811
18811
|
if (atGap) {
|
18812
18812
|
return;
|
18813
18813
|
}
|
@@ -18816,7 +18816,7 @@
|
|
18816
18816
|
execute: function execute() {
|
18817
18817
|
var _this11$fragmentTrack;
|
18818
18818
|
var videoTrack = _this11.tracks.video;
|
18819
|
-
if (_this11.lastVideoAppendEnd > pTime || videoTrack != null && videoTrack.buffer && BufferHelper.isBuffered(videoTrack.buffer, pTime) || ((_this11$fragmentTrack = _this11.fragmentTracker.getAppendedFrag(pTime, PlaylistLevelType.MAIN)) == null ?
|
18819
|
+
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) {
|
18820
18820
|
_this11.blockedAudioAppend = null;
|
18821
18821
|
_this11.shiftAndExecuteNext('audio');
|
18822
18822
|
}
|
@@ -18870,14 +18870,14 @@
|
|
18870
18870
|
// More info here: https://github.com/video-dev/hls.js/issues/332#issuecomment-257986486
|
18871
18871
|
var audioTrack = tracks.audio;
|
18872
18872
|
var checkTimestampOffset = false;
|
18873
|
-
if (type === 'audio' && (audioTrack == null ?
|
18873
|
+
if (type === 'audio' && (audioTrack == null ? undefined : audioTrack.container) === 'audio/mpeg') {
|
18874
18874
|
checkTimestampOffset = !this.lastMpegAudioChunk || chunkMeta.id === 1 || this.lastMpegAudioChunk.sn !== chunkMeta.sn;
|
18875
18875
|
this.lastMpegAudioChunk = chunkMeta;
|
18876
18876
|
}
|
18877
18877
|
|
18878
18878
|
// Block audio append until overlapping video append
|
18879
18879
|
var videoTrack = this.tracks.video;
|
18880
|
-
var videoSb = videoTrack == null ?
|
18880
|
+
var videoSb = videoTrack == null ? undefined : videoTrack.buffer;
|
18881
18881
|
if (videoSb && sn !== 'initSegment') {
|
18882
18882
|
var partOrFrag = part || frag;
|
18883
18883
|
var blockedAudioAppend = this.blockedAudioAppend;
|
@@ -19099,7 +19099,7 @@
|
|
19099
19099
|
}
|
19100
19100
|
}
|
19101
19101
|
});
|
19102
|
-
var allowEndOfStream = ((_this$overrides = this.overrides) == null ?
|
19102
|
+
var allowEndOfStream = ((_this$overrides = this.overrides) == null ? undefined : _this$overrides.endOfStream) !== false;
|
19103
19103
|
var allTracksEnding = this.sourceBufferCount > 0 && !this.sourceBuffers.some(function (_ref6) {
|
19104
19104
|
var _this16$tracks$type;
|
19105
19105
|
var type = _ref6[0];
|
@@ -19154,7 +19154,7 @@
|
|
19154
19154
|
_proto.onError = function onError(event, data) {
|
19155
19155
|
if (data.details === ErrorDetails.BUFFER_APPEND_ERROR && data.frag) {
|
19156
19156
|
var _data$errorAction;
|
19157
|
-
var nextAutoLevel = (_data$errorAction = data.errorAction) == null ?
|
19157
|
+
var nextAutoLevel = (_data$errorAction = data.errorAction) == null ? undefined : _data$errorAction.nextAutoLevel;
|
19158
19158
|
if (isFiniteNumber(nextAutoLevel) && nextAutoLevel !== data.frag.level) {
|
19159
19159
|
this.resetAppendErrors();
|
19160
19160
|
}
|
@@ -19264,7 +19264,7 @@
|
|
19264
19264
|
var _this$overrides2;
|
19265
19265
|
var details = this.details,
|
19266
19266
|
mediaSource = this.mediaSource;
|
19267
|
-
if (!details || !this.media || (mediaSource == null ?
|
19267
|
+
if (!details || !this.media || (mediaSource == null ? undefined : mediaSource.readyState) !== 'open') {
|
19268
19268
|
return null;
|
19269
19269
|
}
|
19270
19270
|
var playlistEnd = details.edge;
|
@@ -19285,7 +19285,7 @@
|
|
19285
19285
|
duration: Infinity
|
19286
19286
|
};
|
19287
19287
|
}
|
19288
|
-
var overrideDuration = (_this$overrides2 = this.overrides) == null ?
|
19288
|
+
var overrideDuration = (_this$overrides2 = this.overrides) == null ? undefined : _this$overrides2.duration;
|
19289
19289
|
if (overrideDuration) {
|
19290
19290
|
return {
|
19291
19291
|
duration: overrideDuration
|
@@ -19330,7 +19330,7 @@
|
|
19330
19330
|
// 2 tracks is the max (one for audio, one for video). If we've reach this max go ahead and create the buffers.
|
19331
19331
|
if (this.tracksReady) {
|
19332
19332
|
var _this$transferData3;
|
19333
|
-
var transferredTracks = (_this$transferData3 = this.transferData) == null ?
|
19333
|
+
var transferredTracks = (_this$transferData3 = this.transferData) == null ? undefined : _this$transferData3.tracks;
|
19334
19334
|
if (transferredTracks && Object.keys(transferredTracks).length) {
|
19335
19335
|
this.attachTransferred();
|
19336
19336
|
} else {
|
@@ -19466,7 +19466,7 @@
|
|
19466
19466
|
};
|
19467
19467
|
_proto.onSBUpdateEnd = function onSBUpdateEnd(type) {
|
19468
19468
|
var _this$mediaSource2;
|
19469
|
-
if (((_this$mediaSource2 = this.mediaSource) == null ?
|
19469
|
+
if (((_this$mediaSource2 = this.mediaSource) == null ? undefined : _this$mediaSource2.readyState) === 'closed') {
|
19470
19470
|
this.resetBuffer(type);
|
19471
19471
|
return;
|
19472
19472
|
}
|
@@ -19479,7 +19479,7 @@
|
|
19479
19479
|
};
|
19480
19480
|
_proto.onSBUpdateError = function onSBUpdateError(type, event) {
|
19481
19481
|
var _this$mediaSource3;
|
19482
|
-
var error = new Error(type + " SourceBuffer error. MediaSource readyState: " + ((_this$mediaSource3 = this.mediaSource) == null ?
|
19482
|
+
var error = new Error(type + " SourceBuffer error. MediaSource readyState: " + ((_this$mediaSource3 = this.mediaSource) == null ? undefined : _this$mediaSource3.readyState));
|
19483
19483
|
this.error("" + error, event);
|
19484
19484
|
// according to http://www.w3.org/TR/media-source/#sourcebuffer-append-error
|
19485
19485
|
// SourceBuffer errors are not necessarily fatal; if so, the HTMLMediaElement will fire an error event
|
@@ -19503,7 +19503,7 @@
|
|
19503
19503
|
var media = this.media,
|
19504
19504
|
mediaSource = this.mediaSource;
|
19505
19505
|
var track = this.tracks[type];
|
19506
|
-
var sb = track == null ?
|
19506
|
+
var sb = track == null ? undefined : track.buffer;
|
19507
19507
|
if (!media || !mediaSource || !sb) {
|
19508
19508
|
this.warn("Attempting to remove from the " + type + " SourceBuffer, but it does not exist");
|
19509
19509
|
this.shiftAndExecuteNext(type);
|
@@ -19527,7 +19527,7 @@
|
|
19527
19527
|
;
|
19528
19528
|
_proto.appendExecutor = function appendExecutor(data, type) {
|
19529
19529
|
var track = this.tracks[type];
|
19530
|
-
var sb = track == null ?
|
19530
|
+
var sb = track == null ? undefined : track.buffer;
|
19531
19531
|
if (!sb) {
|
19532
19532
|
throw new HlsJsTrackRemovedError("Attempting to append to the " + type + " SourceBuffer, but it does not exist");
|
19533
19533
|
}
|
@@ -19566,7 +19566,7 @@
|
|
19566
19566
|
;
|
19567
19567
|
_proto.blockBuffers = function blockBuffers(onUnblocked, bufferNames) {
|
19568
19568
|
var _this23 = this;
|
19569
|
-
if (bufferNames ===
|
19569
|
+
if (bufferNames === undefined) {
|
19570
19570
|
bufferNames = this.sourceBufferTypes;
|
19571
19571
|
}
|
19572
19572
|
if (!bufferNames.length) {
|
@@ -19597,7 +19597,7 @@
|
|
19597
19597
|
var _this24 = this;
|
19598
19598
|
bufferNames.forEach(function (type) {
|
19599
19599
|
var _this24$tracks$type;
|
19600
|
-
var sb = (_this24$tracks$type = _this24.tracks[type]) == null ?
|
19600
|
+
var sb = (_this24$tracks$type = _this24.tracks[type]) == null ? undefined : _this24$tracks$type.buffer;
|
19601
19601
|
// Only cycle the queue if the SB is not updating. There's a bug in Chrome which sets the SB updating flag to
|
19602
19602
|
// true when changing the MediaSource duration (https://bugs.chromium.org/p/chromium/issues/detail?id=959359&can=2&q=mediasource%20duration)
|
19603
19603
|
// While this is a workaround, it's probably useful to have around
|
@@ -19667,7 +19667,7 @@
|
|
19667
19667
|
key: "mediaSourceOpenOrEnded",
|
19668
19668
|
get: function get() {
|
19669
19669
|
var _this$mediaSource4;
|
19670
|
-
var readyState = (_this$mediaSource4 = this.mediaSource) == null ?
|
19670
|
+
var readyState = (_this$mediaSource4 = this.mediaSource) == null ? undefined : _this$mediaSource4.readyState;
|
19671
19671
|
return readyState === 'open' || readyState === 'ended';
|
19672
19672
|
}
|
19673
19673
|
}, {
|
@@ -19692,7 +19692,7 @@
|
|
19692
19692
|
return this.sourceBufferCount > 0 && !this.sourceBuffers.some(function (_ref16) {
|
19693
19693
|
var _this26$tracks$type, _this26$tracks$type2;
|
19694
19694
|
var type = _ref16[0];
|
19695
|
-
return type && (!((_this26$tracks$type = _this26.tracks[type]) != null && _this26$tracks$type.ended) || ((_this26$tracks$type2 = _this26.tracks[type]) == null ?
|
19695
|
+
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));
|
19696
19696
|
});
|
19697
19697
|
}
|
19698
19698
|
}, {
|
@@ -19705,8 +19705,8 @@
|
|
19705
19705
|
key: "mediaSrc",
|
19706
19706
|
get: function get() {
|
19707
19707
|
var _this$media, _this$media$querySele;
|
19708
|
-
var media = ((_this$media = this.media) == null ?
|
19709
|
-
return media == null ?
|
19708
|
+
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;
|
19709
|
+
return media == null ? undefined : media.src;
|
19710
19710
|
}
|
19711
19711
|
}, {
|
19712
19712
|
key: "pendingTrackCount",
|
@@ -19754,14 +19754,14 @@
|
|
19754
19754
|
|
19755
19755
|
var CapLevelController = /*#__PURE__*/function () {
|
19756
19756
|
function CapLevelController(hls) {
|
19757
|
-
this.hls =
|
19758
|
-
this.autoLevelCapping =
|
19759
|
-
this.firstLevel =
|
19760
|
-
this.media =
|
19761
|
-
this.restrictedLevels =
|
19762
|
-
this.timer =
|
19763
|
-
this.clientRect =
|
19764
|
-
this.streamController =
|
19757
|
+
this.hls = undefined;
|
19758
|
+
this.autoLevelCapping = undefined;
|
19759
|
+
this.firstLevel = undefined;
|
19760
|
+
this.media = undefined;
|
19761
|
+
this.restrictedLevels = undefined;
|
19762
|
+
this.timer = undefined;
|
19763
|
+
this.clientRect = undefined;
|
19764
|
+
this.streamController = undefined;
|
19765
19765
|
this.hls = hls;
|
19766
19766
|
this.autoLevelCapping = Number.POSITIVE_INFINITY;
|
19767
19767
|
this.firstLevel = -1;
|
@@ -20630,7 +20630,7 @@
|
|
20630
20630
|
//
|
20631
20631
|
// 3. Return output.
|
20632
20632
|
function serializeDict(dict, options) {
|
20633
|
-
if (options ===
|
20633
|
+
if (options === undefined) {
|
20634
20634
|
options = {
|
20635
20635
|
whitespace: true
|
20636
20636
|
};
|
@@ -20639,7 +20639,7 @@
|
|
20639
20639
|
throw serializeError(dict, DICT);
|
20640
20640
|
}
|
20641
20641
|
var entries = dict instanceof Map ? dict.entries() : Object.entries(dict);
|
20642
|
-
var optionalWhiteSpace = (options === null || options ===
|
20642
|
+
var optionalWhiteSpace = (options === null || options === undefined ? undefined : options.whitespace) ? ' ' : '';
|
20643
20643
|
return Array.from(entries).map(function (_ref) {
|
20644
20644
|
var key = _ref[0],
|
20645
20645
|
item = _ref[1];
|
@@ -20710,7 +20710,7 @@
|
|
20710
20710
|
return Math.round(value);
|
20711
20711
|
};
|
20712
20712
|
var toUrlSafe = function toUrlSafe(value, options) {
|
20713
|
-
if (options === null || options ===
|
20713
|
+
if (options === null || options === undefined ? undefined : options.baseUrl) {
|
20714
20714
|
value = urlToRelativePath(value, options.baseUrl);
|
20715
20715
|
}
|
20716
20716
|
return encodeURIComponent(value);
|
@@ -20777,10 +20777,10 @@
|
|
20777
20777
|
return results;
|
20778
20778
|
}
|
20779
20779
|
var keys = Object.keys(obj).sort();
|
20780
|
-
var formatters = _extends({}, CmcdFormatters, options === null || options ===
|
20781
|
-
var filter = options === null || options ===
|
20780
|
+
var formatters = _extends({}, CmcdFormatters, options === null || options === undefined ? undefined : options.formatters);
|
20781
|
+
var filter = options === null || options === undefined ? undefined : options.filter;
|
20782
20782
|
keys.forEach(function (key) {
|
20783
|
-
if (filter === null || filter ===
|
20783
|
+
if (filter === null || filter === undefined ? undefined : filter(key)) {
|
20784
20784
|
return;
|
20785
20785
|
}
|
20786
20786
|
var value = obj[key];
|
@@ -20821,7 +20821,7 @@
|
|
20821
20821
|
* @beta
|
20822
20822
|
*/
|
20823
20823
|
function encodeCmcd(cmcd, options) {
|
20824
|
-
if (options ===
|
20824
|
+
if (options === undefined) {
|
20825
20825
|
options = {};
|
20826
20826
|
}
|
20827
20827
|
if (!cmcd) {
|
@@ -20845,7 +20845,7 @@
|
|
20845
20845
|
* @beta
|
20846
20846
|
*/
|
20847
20847
|
function toCmcdHeaders(cmcd, options) {
|
20848
|
-
if (options ===
|
20848
|
+
if (options === undefined) {
|
20849
20849
|
options = {};
|
20850
20850
|
}
|
20851
20851
|
var result = {};
|
@@ -20853,15 +20853,15 @@
|
|
20853
20853
|
return result;
|
20854
20854
|
}
|
20855
20855
|
var entries = Object.entries(cmcd);
|
20856
|
-
var headerMap = Object.entries(CmcdHeaderMap).concat(Object.entries((options === null || options ===
|
20856
|
+
var headerMap = Object.entries(CmcdHeaderMap).concat(Object.entries((options === null || options === undefined ? undefined : options.customHeaderMap) || {}));
|
20857
20857
|
var shards = entries.reduce(function (acc, entry) {
|
20858
20858
|
var _a, _b;
|
20859
20859
|
var key = entry[0],
|
20860
20860
|
value = entry[1];
|
20861
20861
|
var field = ((_a = headerMap.find(function (entry) {
|
20862
20862
|
return entry[1].includes(key);
|
20863
|
-
})) === null || _a ===
|
20864
|
-
(_b = acc[field]) !== null && _b !==
|
20863
|
+
})) === null || _a === undefined ? undefined : _a[0]) || CmcdHeaderField.REQUEST;
|
20864
|
+
(_b = acc[field]) !== null && _b !== undefined ? _b : acc[field] = {};
|
20865
20865
|
acc[field][key] = value;
|
20866
20866
|
return acc;
|
20867
20867
|
}, {});
|
@@ -20912,7 +20912,7 @@
|
|
20912
20912
|
* @beta
|
20913
20913
|
*/
|
20914
20914
|
function toCmcdQuery(cmcd, options) {
|
20915
|
-
if (options ===
|
20915
|
+
if (options === undefined) {
|
20916
20916
|
options = {};
|
20917
20917
|
}
|
20918
20918
|
if (!cmcd) {
|
@@ -20957,18 +20957,18 @@
|
|
20957
20957
|
var CMCDController = /*#__PURE__*/function () {
|
20958
20958
|
function CMCDController(hls) {
|
20959
20959
|
var _this = this;
|
20960
|
-
this.hls =
|
20961
|
-
this.config =
|
20962
|
-
this.media =
|
20963
|
-
this.sid =
|
20964
|
-
this.cid =
|
20960
|
+
this.hls = undefined;
|
20961
|
+
this.config = undefined;
|
20962
|
+
this.media = undefined;
|
20963
|
+
this.sid = undefined;
|
20964
|
+
this.cid = undefined;
|
20965
20965
|
this.useHeaders = false;
|
20966
|
-
this.includeKeys =
|
20966
|
+
this.includeKeys = undefined;
|
20967
20967
|
this.initialized = false;
|
20968
20968
|
this.starved = false;
|
20969
20969
|
this.buffering = true;
|
20970
|
-
this.audioBuffer =
|
20971
|
-
this.videoBuffer =
|
20970
|
+
this.audioBuffer = undefined;
|
20971
|
+
this.videoBuffer = undefined;
|
20972
20972
|
this.onWaiting = function () {
|
20973
20973
|
if (_this.initialized) {
|
20974
20974
|
_this.starved = true;
|
@@ -21073,8 +21073,8 @@
|
|
21073
21073
|
};
|
21074
21074
|
_proto.onBufferCreated = function onBufferCreated(event, data) {
|
21075
21075
|
var _data$tracks$audio, _data$tracks$video;
|
21076
|
-
this.audioBuffer = (_data$tracks$audio = data.tracks.audio) == null ?
|
21077
|
-
this.videoBuffer = (_data$tracks$video = data.tracks.video) == null ?
|
21076
|
+
this.audioBuffer = (_data$tracks$audio = data.tracks.audio) == null ? undefined : _data$tracks$audio.buffer;
|
21077
|
+
this.videoBuffer = (_data$tracks$video = data.tracks.video) == null ? undefined : _data$tracks$video.buffer;
|
21078
21078
|
};
|
21079
21079
|
/**
|
21080
21080
|
* Create baseline CMCD data
|
@@ -21086,7 +21086,7 @@
|
|
21086
21086
|
sf: CmcdStreamingFormat.HLS,
|
21087
21087
|
sid: this.sid,
|
21088
21088
|
cid: this.cid,
|
21089
|
-
pr: (_this$media = this.media) == null ?
|
21089
|
+
pr: (_this$media = this.media) == null ? undefined : _this$media.playbackRate,
|
21090
21090
|
mtp: this.hls.bandwidthEstimate / 1000
|
21091
21091
|
};
|
21092
21092
|
}
|
@@ -21095,7 +21095,7 @@
|
|
21095
21095
|
* Apply CMCD data to a request.
|
21096
21096
|
*/;
|
21097
21097
|
_proto.apply = function apply(context, data) {
|
21098
|
-
if (data ===
|
21098
|
+
if (data === undefined) {
|
21099
21099
|
data = {};
|
21100
21100
|
}
|
21101
21101
|
// apply baseline data
|
@@ -21133,7 +21133,7 @@
|
|
21133
21133
|
};
|
21134
21134
|
_proto.getNextFrag = function getNextFrag(fragment) {
|
21135
21135
|
var _this$hls$levels$frag;
|
21136
|
-
var levelDetails = (_this$hls$levels$frag = this.hls.levels[fragment.level]) == null ?
|
21136
|
+
var levelDetails = (_this$hls$levels$frag = this.hls.levels[fragment.level]) == null ? undefined : _this$hls$levels$frag.details;
|
21137
21137
|
if (levelDetails) {
|
21138
21138
|
var index = fragment.sn - levelDetails.startSN;
|
21139
21139
|
return levelDetails.fragments[index + 1];
|
@@ -21144,7 +21144,7 @@
|
|
21144
21144
|
var _this$hls$levels$frag2, _this$hls$levels$frag3;
|
21145
21145
|
var index = part.index,
|
21146
21146
|
fragment = part.fragment;
|
21147
|
-
var partList = (_this$hls$levels$frag2 = this.hls.levels[fragment.level]) == null ?
|
21147
|
+
var partList = (_this$hls$levels$frag2 = this.hls.levels[fragment.level]) == null ? undefined : (_this$hls$levels$frag3 = _this$hls$levels$frag2.details) == null ? undefined : _this$hls$levels$frag3.partList;
|
21148
21148
|
if (partList) {
|
21149
21149
|
var sn = fragment.sn;
|
21150
21150
|
for (var i = partList.length - 1; i >= 0; i--) {
|
@@ -21225,7 +21225,7 @@
|
|
21225
21225
|
var Ctor = pLoader || this.config.loader;
|
21226
21226
|
return /*#__PURE__*/function () {
|
21227
21227
|
function CmcdPlaylistLoader(config) {
|
21228
|
-
this.loader =
|
21228
|
+
this.loader = undefined;
|
21229
21229
|
this.loader = new Ctor(config);
|
21230
21230
|
}
|
21231
21231
|
var _proto2 = CmcdPlaylistLoader.prototype;
|
@@ -21262,7 +21262,7 @@
|
|
21262
21262
|
var Ctor = fLoader || this.config.loader;
|
21263
21263
|
return /*#__PURE__*/function () {
|
21264
21264
|
function CmcdFragmentLoader(config) {
|
21265
|
-
this.loader =
|
21265
|
+
this.loader = undefined;
|
21266
21266
|
this.loader = new Ctor(config);
|
21267
21267
|
}
|
21268
21268
|
var _proto3 = CmcdFragmentLoader.prototype;
|
@@ -21297,7 +21297,7 @@
|
|
21297
21297
|
function ContentSteeringController(hls) {
|
21298
21298
|
var _this;
|
21299
21299
|
_this = _Logger.call(this, 'content-steering', hls.logger) || this;
|
21300
|
-
_this.hls =
|
21300
|
+
_this.hls = undefined;
|
21301
21301
|
_this.loader = null;
|
21302
21302
|
_this.uri = null;
|
21303
21303
|
_this.pathwayId = '.';
|
@@ -21411,7 +21411,7 @@
|
|
21411
21411
|
};
|
21412
21412
|
_proto.onError = function onError(event, data) {
|
21413
21413
|
var errorAction = data.errorAction;
|
21414
|
-
if ((errorAction == null ?
|
21414
|
+
if ((errorAction == null ? undefined : errorAction.action) === NetworkErrorAction.SendAlternateToPenaltyBox && errorAction.flags === ErrorActionFlags.MoveAllAlternatesMatchingHost) {
|
21415
21415
|
var levels = this.levels;
|
21416
21416
|
var pathwayPriority = this._pathwayPriority;
|
21417
21417
|
var errorPathway = this.pathwayId;
|
@@ -21612,7 +21612,7 @@
|
|
21612
21612
|
onSuccess: function onSuccess(response, stats, context, networkDetails) {
|
21613
21613
|
_this3.log("Loaded steering manifest: \"" + url + "\"");
|
21614
21614
|
var steeringData = response.data;
|
21615
|
-
if ((steeringData == null ?
|
21615
|
+
if ((steeringData == null ? undefined : steeringData.VERSION) !== 1) {
|
21616
21616
|
_this3.log("Steering VERSION " + steeringData.VERSION + " not supported!");
|
21617
21617
|
return;
|
21618
21618
|
}
|
@@ -21654,7 +21654,7 @@
|
|
21654
21654
|
var ttl = _this3.timeToLoad * 1000;
|
21655
21655
|
if (error.code === 429) {
|
21656
21656
|
var loader = _this3.loader;
|
21657
|
-
if (typeof (loader == null ?
|
21657
|
+
if (typeof (loader == null ? undefined : loader.getResponseHeader) === 'function') {
|
21658
21658
|
var retryAfter = loader.getResponseHeader('Retry-After');
|
21659
21659
|
if (retryAfter) {
|
21660
21660
|
ttl = parseFloat(retryAfter) * 1000;
|
@@ -21675,13 +21675,13 @@
|
|
21675
21675
|
};
|
21676
21676
|
_proto.scheduleRefresh = function scheduleRefresh(uri, ttlMs) {
|
21677
21677
|
var _this4 = this;
|
21678
|
-
if (ttlMs ===
|
21678
|
+
if (ttlMs === undefined) {
|
21679
21679
|
ttlMs = this.timeToLoad * 1000;
|
21680
21680
|
}
|
21681
21681
|
this.clearTimeout();
|
21682
21682
|
this.reloadTimer = self.setTimeout(function () {
|
21683
21683
|
var _this4$hls;
|
21684
|
-
var media = (_this4$hls = _this4.hls) == null ?
|
21684
|
+
var media = (_this4$hls = _this4.hls) == null ? undefined : _this4$hls.media;
|
21685
21685
|
if (media && !media.ended) {
|
21686
21686
|
_this4.loadSteeringManifest(uri);
|
21687
21687
|
return;
|
@@ -21724,7 +21724,7 @@
|
|
21724
21724
|
perOptionUris = uriReplacement[perOptionKey];
|
21725
21725
|
var perVariantUri;
|
21726
21726
|
if (stableId) {
|
21727
|
-
perVariantUri = perOptionUris == null ?
|
21727
|
+
perVariantUri = perOptionUris == null ? undefined : perOptionUris[stableId];
|
21728
21728
|
if (perVariantUri) {
|
21729
21729
|
uri = perVariantUri;
|
21730
21730
|
}
|
@@ -21754,8 +21754,8 @@
|
|
21754
21754
|
function EMEController(hls) {
|
21755
21755
|
var _this;
|
21756
21756
|
_this = _Logger.call(this, 'eme', hls.logger) || this;
|
21757
|
-
_this.hls =
|
21758
|
-
_this.config =
|
21757
|
+
_this.hls = undefined;
|
21758
|
+
_this.config = undefined;
|
21759
21759
|
_this.media = null;
|
21760
21760
|
_this.keyFormatPromise = null;
|
21761
21761
|
_this.keySystemAccessPromises = {};
|
@@ -22033,7 +22033,7 @@
|
|
22033
22033
|
// This can throw, but is caught in event handler callpath
|
22034
22034
|
var mediaKeySystemConfigs = getSupportedMediaKeySystemConfigurations(keySystem, audioCodecs, videoCodecs, this.config.drmSystemOptions);
|
22035
22035
|
var keySystemAccessPromises = this.keySystemAccessPromises[keySystem];
|
22036
|
-
var keySystemAccess = keySystemAccessPromises == null ?
|
22036
|
+
var keySystemAccess = keySystemAccessPromises == null ? undefined : keySystemAccessPromises.keySystemAccess;
|
22037
22037
|
if (!keySystemAccess) {
|
22038
22038
|
this.log("Requesting encrypted media \"" + keySystem + "\" key-system access with config: " + JSON.stringify(mediaKeySystemConfigs));
|
22039
22039
|
keySystemAccess = this.requestMediaKeySystemAccess(keySystem, mediaKeySystemConfigs);
|
@@ -22106,7 +22106,7 @@
|
|
22106
22106
|
_proto.updateKeySession = function updateKeySession(mediaKeySessionContext, data) {
|
22107
22107
|
var _mediaKeySessionConte;
|
22108
22108
|
var keySession = mediaKeySessionContext.mediaKeysSession;
|
22109
|
-
this.log("Updating key-session \"" + keySession.sessionId + "\" for keyID " + Hex.hexDump(((_mediaKeySessionConte = mediaKeySessionContext.decryptdata) == null ?
|
22109
|
+
this.log("Updating key-session \"" + keySession.sessionId + "\" for keyID " + Hex.hexDump(((_mediaKeySessionConte = mediaKeySessionContext.decryptdata) == null ? undefined : _mediaKeySessionConte.keyId) || []) + "\n } (data length: " + (data ? data.byteLength : data) + ")");
|
22110
22110
|
return keySession.update(data);
|
22111
22111
|
};
|
22112
22112
|
_proto.selectKeySystemFormat = function selectKeySystemFormat(frag) {
|
@@ -22239,7 +22239,7 @@
|
|
22239
22239
|
var _this$config$drmSyste,
|
22240
22240
|
_this$config$drmSyste2,
|
22241
22241
|
_this8 = this;
|
22242
|
-
var generateRequestFilter = (_this$config$drmSyste = this.config.drmSystems) == null ?
|
22242
|
+
var generateRequestFilter = (_this$config$drmSyste = this.config.drmSystems) == null ? undefined : (_this$config$drmSyste2 = _this$config$drmSyste[context.keySystem]) == null ? undefined : _this$config$drmSyste2.generateRequest;
|
22243
22243
|
if (generateRequestFilter) {
|
22244
22244
|
try {
|
22245
22245
|
var mappedInitData = generateRequestFilter.call(this.hls, initDataType, initData, context);
|
@@ -22332,7 +22332,7 @@
|
|
22332
22332
|
});
|
22333
22333
|
return context.mediaKeysSession.generateRequest(initDataType, initData).then(function () {
|
22334
22334
|
var _context$mediaKeysSes;
|
22335
|
-
_this8.log("Request generated for key-session \"" + ((_context$mediaKeysSes = context.mediaKeysSession) == null ?
|
22335
|
+
_this8.log("Request generated for key-session \"" + ((_context$mediaKeysSes = context.mediaKeysSession) == null ? undefined : _context$mediaKeysSes.sessionId) + "\" keyId: " + keyId);
|
22336
22336
|
}).catch(function (error) {
|
22337
22337
|
throw new EMEKeyError({
|
22338
22338
|
type: ErrorTypes.KEY_SYSTEM_ERROR,
|
@@ -22419,7 +22419,7 @@
|
|
22419
22419
|
var _this10 = this;
|
22420
22420
|
return new Promise(function (resolve, reject) {
|
22421
22421
|
mediaKeys.setServerCertificate(cert).then(function (success) {
|
22422
|
-
_this10.log("setServerCertificate " + (success ? 'success' : 'not supported by CDM') + " (" + (cert == null ?
|
22422
|
+
_this10.log("setServerCertificate " + (success ? 'success' : 'not supported by CDM') + " (" + (cert == null ? undefined : cert.byteLength) + ") on \"" + keySystem + "\"");
|
22423
22423
|
resolve(mediaKeys);
|
22424
22424
|
}).catch(function (error) {
|
22425
22425
|
reject(new EMEKeyError({
|
@@ -22467,15 +22467,15 @@
|
|
22467
22467
|
for (var i = 0, len = headers.length; i < len; i++) {
|
22468
22468
|
var _header$querySelector, _header$querySelector2;
|
22469
22469
|
header = headers[i];
|
22470
|
-
var name = (_header$querySelector = header.querySelector('name')) == null ?
|
22471
|
-
var value = (_header$querySelector2 = header.querySelector('value')) == null ?
|
22470
|
+
var name = (_header$querySelector = header.querySelector('name')) == null ? undefined : _header$querySelector.textContent;
|
22471
|
+
var value = (_header$querySelector2 = header.querySelector('value')) == null ? undefined : _header$querySelector2.textContent;
|
22472
22472
|
if (name && value) {
|
22473
22473
|
xhr.setRequestHeader(name, value);
|
22474
22474
|
}
|
22475
22475
|
}
|
22476
22476
|
}
|
22477
22477
|
var challengeElement = keyMessageXml.querySelector('Challenge');
|
22478
|
-
var challengeText = challengeElement == null ?
|
22478
|
+
var challengeText = challengeElement == null ? undefined : challengeElement.textContent;
|
22479
22479
|
if (!challengeText) {
|
22480
22480
|
throw new Error("Cannot find <Challenge> in key message");
|
22481
22481
|
}
|
@@ -22614,10 +22614,10 @@
|
|
22614
22614
|
var keySessionCount = mediaKeysList.length;
|
22615
22615
|
EMEController.CDMCleanupPromise = Promise.all(mediaKeysList.map(function (mediaKeySessionContext) {
|
22616
22616
|
return _this14.removeSession(mediaKeySessionContext);
|
22617
|
-
}).concat(media == null ?
|
22617
|
+
}).concat(media == null ? undefined : (_media$setMediaKeys = media.setMediaKeys(null)) == null ? undefined : _media$setMediaKeys.catch(function (error) {
|
22618
22618
|
var _this14$hls;
|
22619
22619
|
_this14.log("Could not clear media keys: " + error);
|
22620
|
-
(_this14$hls = _this14.hls) == null ?
|
22620
|
+
(_this14$hls = _this14.hls) == null ? undefined : _this14$hls.trigger(Events.ERROR, {
|
22621
22621
|
type: ErrorTypes.OTHER_ERROR,
|
22622
22622
|
details: ErrorDetails.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,
|
22623
22623
|
fatal: false,
|
@@ -22631,7 +22631,7 @@
|
|
22631
22631
|
}).catch(function (error) {
|
22632
22632
|
var _this14$hls2;
|
22633
22633
|
_this14.log("Could not close sessions and clear media keys: " + error);
|
22634
|
-
(_this14$hls2 = _this14.hls) == null ?
|
22634
|
+
(_this14$hls2 = _this14.hls) == null ? undefined : _this14$hls2.trigger(Events.ERROR, {
|
22635
22635
|
type: ErrorTypes.OTHER_ERROR,
|
22636
22636
|
details: ErrorDetails.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,
|
22637
22637
|
fatal: false,
|
@@ -22683,7 +22683,7 @@
|
|
22683
22683
|
return mediaKeysSession.remove().catch(function (error) {
|
22684
22684
|
var _this15$hls;
|
22685
22685
|
_this15.log("Could not remove session: " + error);
|
22686
|
-
(_this15$hls = _this15.hls) == null ?
|
22686
|
+
(_this15$hls = _this15.hls) == null ? undefined : _this15$hls.trigger(Events.ERROR, {
|
22687
22687
|
type: ErrorTypes.OTHER_ERROR,
|
22688
22688
|
details: ErrorDetails.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,
|
22689
22689
|
fatal: false,
|
@@ -22694,7 +22694,7 @@
|
|
22694
22694
|
}).catch(function (error) {
|
22695
22695
|
var _this15$hls2;
|
22696
22696
|
_this15.log("Could not close session: " + error);
|
22697
|
-
(_this15$hls2 = _this15.hls) == null ?
|
22697
|
+
(_this15$hls2 = _this15.hls) == null ? undefined : _this15$hls2.trigger(Events.ERROR, {
|
22698
22698
|
type: ErrorTypes.OTHER_ERROR,
|
22699
22699
|
details: ErrorDetails.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,
|
22700
22700
|
fatal: false,
|
@@ -22705,12 +22705,12 @@
|
|
22705
22705
|
};
|
22706
22706
|
return EMEController;
|
22707
22707
|
}(Logger);
|
22708
|
-
EMEController.CDMCleanupPromise =
|
22708
|
+
EMEController.CDMCleanupPromise = undefined;
|
22709
22709
|
var EMEKeyError = /*#__PURE__*/function (_Error) {
|
22710
22710
|
function EMEKeyError(data, message) {
|
22711
22711
|
var _this16;
|
22712
22712
|
_this16 = _Error.call(this, message) || this;
|
22713
|
-
_this16.data =
|
22713
|
+
_this16.data = undefined;
|
22714
22714
|
data.error || (data.error = new Error(message));
|
22715
22715
|
_this16.data = data;
|
22716
22716
|
data.err = data.error;
|
@@ -22722,15 +22722,15 @@
|
|
22722
22722
|
|
22723
22723
|
var FPSController = /*#__PURE__*/function () {
|
22724
22724
|
function FPSController(hls) {
|
22725
|
-
this.hls =
|
22725
|
+
this.hls = undefined;
|
22726
22726
|
this.isVideoPlaybackQualityAvailable = false;
|
22727
|
-
this.timer =
|
22727
|
+
this.timer = undefined;
|
22728
22728
|
this.media = null;
|
22729
|
-
this.lastTime =
|
22729
|
+
this.lastTime = undefined;
|
22730
22730
|
this.lastDroppedFrames = 0;
|
22731
22731
|
this.lastDecodedFrames = 0;
|
22732
22732
|
// stream controller must be provided as a dependency!
|
22733
|
-
this.streamController =
|
22733
|
+
this.streamController = undefined;
|
22734
22734
|
this.hls = hls;
|
22735
22735
|
this.registerListeners();
|
22736
22736
|
}
|
@@ -22841,12 +22841,12 @@
|
|
22841
22841
|
}
|
22842
22842
|
var InterstitialEvent = /*#__PURE__*/function () {
|
22843
22843
|
function InterstitialEvent(dateRange, base) {
|
22844
|
-
this.base =
|
22844
|
+
this.base = undefined;
|
22845
22845
|
this._duration = null;
|
22846
22846
|
this._timelineStart = null;
|
22847
|
-
this.appendInPlaceDisabled =
|
22848
|
-
this.appendInPlaceStarted =
|
22849
|
-
this.dateRange =
|
22847
|
+
this.appendInPlaceDisabled = undefined;
|
22848
|
+
this.appendInPlaceStarted = undefined;
|
22849
|
+
this.dateRange = undefined;
|
22850
22850
|
this.hasPlayed = false;
|
22851
22851
|
this.cumulativeDuration = 0;
|
22852
22852
|
this.resumeOffset = NaN;
|
@@ -22860,10 +22860,10 @@
|
|
22860
22860
|
in: false
|
22861
22861
|
};
|
22862
22862
|
this.assetList = [];
|
22863
|
-
this.assetListLoader =
|
22863
|
+
this.assetListLoader = undefined;
|
22864
22864
|
this.assetListResponse = null;
|
22865
|
-
this.resumeAnchor =
|
22866
|
-
this.error =
|
22865
|
+
this.resumeAnchor = undefined;
|
22866
|
+
this.error = undefined;
|
22867
22867
|
this.base = base;
|
22868
22868
|
this.dateRange = dateRange;
|
22869
22869
|
this.setDateRange(dateRange);
|
@@ -22878,7 +22878,7 @@
|
|
22878
22878
|
};
|
22879
22879
|
_proto.reset = function reset() {
|
22880
22880
|
var _this$assetListLoader;
|
22881
|
-
(_this$assetListLoader = this.assetListLoader) == null ?
|
22881
|
+
(_this$assetListLoader = this.assetListLoader) == null ? undefined : _this$assetListLoader.destroy();
|
22882
22882
|
this.assetListLoader = this.error = undefined;
|
22883
22883
|
};
|
22884
22884
|
_proto.isAssetPastPlayoutLimit = function isAssetPastPlayoutLimit(assetIndex) {
|
@@ -23061,9 +23061,9 @@
|
|
23061
23061
|
var HlsAssetPlayer = /*#__PURE__*/function () {
|
23062
23062
|
function HlsAssetPlayer(HlsPlayerClass, userConfig, _interstitial, assetItem) {
|
23063
23063
|
var _this = this;
|
23064
|
-
this.hls =
|
23065
|
-
this.interstitial =
|
23066
|
-
this.assetItem =
|
23064
|
+
this.hls = undefined;
|
23065
|
+
this.interstitial = undefined;
|
23066
|
+
this.assetItem = undefined;
|
23067
23067
|
this.tracks = null;
|
23068
23068
|
this.hasDetails = false;
|
23069
23069
|
this.mediaAttached = null;
|
@@ -23099,7 +23099,7 @@
|
|
23099
23099
|
var event = _this.interstitial;
|
23100
23100
|
if (event.playoutLimit) {
|
23101
23101
|
var _event$assetList$even;
|
23102
|
-
_this.playoutOffset = ((_event$assetList$even = event.assetList[event.assetList.indexOf(assetItem)]) == null ?
|
23102
|
+
_this.playoutOffset = ((_event$assetList$even = event.assetList[event.assetList.indexOf(assetItem)]) == null ? undefined : _event$assetList$even.startOffset) || 0;
|
23103
23103
|
media.addEventListener('timeupdate', _this.checkPlayout);
|
23104
23104
|
}
|
23105
23105
|
});
|
@@ -23196,7 +23196,7 @@
|
|
23196
23196
|
key: "duration",
|
23197
23197
|
get: function get() {
|
23198
23198
|
var _this$assetItem;
|
23199
|
-
var duration = (_this$assetItem = this.assetItem) == null ?
|
23199
|
+
var duration = (_this$assetItem = this.assetItem) == null ? undefined : _this$assetItem.duration;
|
23200
23200
|
if (!duration) {
|
23201
23201
|
return 0;
|
23202
23202
|
}
|
@@ -23236,7 +23236,7 @@
|
|
23236
23236
|
function InterstitialsSchedule(onScheduleUpdate, logger) {
|
23237
23237
|
var _this;
|
23238
23238
|
_this = _Logger.call(this, 'interstitials-sched', logger) || this;
|
23239
|
-
_this.onScheduleUpdate =
|
23239
|
+
_this.onScheduleUpdate = undefined;
|
23240
23240
|
_this.eventMap = {};
|
23241
23241
|
_this.events = null;
|
23242
23242
|
_this.items = null;
|
@@ -23334,7 +23334,7 @@
|
|
23334
23334
|
if (items) {
|
23335
23335
|
for (var i = items.length; i--;) {
|
23336
23336
|
var _items$i$event;
|
23337
|
-
if (((_items$i$event = items[i].event) == null ?
|
23337
|
+
if (((_items$i$event = items[i].event) == null ? undefined : _items$i$event.identifier) === identifier) {
|
23338
23338
|
return i;
|
23339
23339
|
}
|
23340
23340
|
}
|
@@ -23408,14 +23408,14 @@
|
|
23408
23408
|
this.updateSchedule(mediaSelection, removedInterstitials);
|
23409
23409
|
};
|
23410
23410
|
_proto.updateSchedule = function updateSchedule(mediaSelection, removedInterstitials) {
|
23411
|
-
if (removedInterstitials ===
|
23411
|
+
if (removedInterstitials === undefined) {
|
23412
23412
|
removedInterstitials = [];
|
23413
23413
|
}
|
23414
23414
|
var events = this.events || [];
|
23415
23415
|
if (events.length || removedInterstitials.length || this.length < 2) {
|
23416
23416
|
var currentItems = this.items;
|
23417
23417
|
var updatedItems = this.parseSchedule(events, mediaSelection);
|
23418
|
-
var updated = removedInterstitials.length || (currentItems == null ?
|
23418
|
+
var updated = removedInterstitials.length || (currentItems == null ? undefined : currentItems.length) !== updatedItems.length || updatedItems.some(function (item, i) {
|
23419
23419
|
return Math.abs(item.playout.start - currentItems[i].playout.start) > 0.005 || Math.abs(item.playout.end - currentItems[i].playout.end) > 0.005;
|
23420
23420
|
});
|
23421
23421
|
if (updated) {
|
@@ -23472,7 +23472,7 @@
|
|
23472
23472
|
var interstitialDuration = interstitial.duration;
|
23473
23473
|
var timelineDuration = interstitial.timelineOccupancy === TimelineOccupancy.Range ? interstitialDuration : 0;
|
23474
23474
|
var resumptionOffset = interstitial.resumptionOffset;
|
23475
|
-
var inSameStartTimeSequence = (previousEvent == null ?
|
23475
|
+
var inSameStartTimeSequence = (previousEvent == null ? undefined : previousEvent.startTime) === eventStart;
|
23476
23476
|
var start = eventStart + interstitial.cumulativeDuration;
|
23477
23477
|
var end = appendInPlace ? start + interstitialDuration : eventStart + resumptionOffset;
|
23478
23478
|
if (preroll || !postroll && eventStart <= 0) {
|
@@ -23570,7 +23570,7 @@
|
|
23570
23570
|
var playoutStart = playoutDuration;
|
23571
23571
|
playoutDuration += segmentDuration;
|
23572
23572
|
schedule.push({
|
23573
|
-
previousEvent: ((_schedule = schedule[schedule.length - 1]) == null ?
|
23573
|
+
previousEvent: ((_schedule = schedule[schedule.length - 1]) == null ? undefined : _schedule.event) || null,
|
23574
23574
|
nextEvent: null,
|
23575
23575
|
start: primaryPosition,
|
23576
23576
|
end: timelineStart + segmentDuration,
|
@@ -23733,7 +23733,7 @@
|
|
23733
23733
|
key: "assetIdAtEnd",
|
23734
23734
|
get: function get() {
|
23735
23735
|
var _this$items, _this$items2;
|
23736
|
-
var interstitialAtEnd = (_this$items = this.items) == null ?
|
23736
|
+
var interstitialAtEnd = (_this$items = this.items) == null ? undefined : (_this$items2 = _this$items[this.length - 1]) == null ? undefined : _this$items2.event;
|
23737
23737
|
if (interstitialAtEnd) {
|
23738
23738
|
var assetList = interstitialAtEnd.assetList;
|
23739
23739
|
var assetAtEnd = assetList[assetList.length - 1];
|
@@ -23751,7 +23751,7 @@
|
|
23751
23751
|
|
23752
23752
|
var AssetListLoader = /*#__PURE__*/function () {
|
23753
23753
|
function AssetListLoader(hls) {
|
23754
|
-
this.hls =
|
23754
|
+
this.hls = undefined;
|
23755
23755
|
this.hls = hls;
|
23756
23756
|
}
|
23757
23757
|
var _proto = AssetListLoader.prototype;
|
@@ -23794,7 +23794,7 @@
|
|
23794
23794
|
var callbacks = {
|
23795
23795
|
onSuccess: function onSuccess(response, stats, context, networkDetails) {
|
23796
23796
|
var assetListResponse = response.data;
|
23797
|
-
var assets = assetListResponse == null ?
|
23797
|
+
var assets = assetListResponse == null ? undefined : assetListResponse.ASSETS;
|
23798
23798
|
if (!Array.isArray(assets)) {
|
23799
23799
|
var _errorData = _this.assignAssetListError(interstitial, ErrorDetails.ASSET_LIST_PARSING_ERROR, new Error("Invalid interstitial asset list"), context.url, stats, networkDetails);
|
23800
23800
|
_this.hls.trigger(Events.ERROR, _errorData);
|
@@ -23839,7 +23839,7 @@
|
|
23839
23839
|
}();
|
23840
23840
|
|
23841
23841
|
function playWithCatch(media) {
|
23842
|
-
media == null ?
|
23842
|
+
media == null ? undefined : media.play().catch(function () {
|
23843
23843
|
/* no-op */
|
23844
23844
|
});
|
23845
23845
|
}
|
@@ -23847,9 +23847,9 @@
|
|
23847
23847
|
function InterstitialsController(hls, HlsPlayerClass) {
|
23848
23848
|
var _this;
|
23849
23849
|
_this = _Logger.call(this, 'interstitials', hls.logger) || this;
|
23850
|
-
_this.HlsPlayerClass =
|
23851
|
-
_this.hls =
|
23852
|
-
_this.assetListLoader =
|
23850
|
+
_this.HlsPlayerClass = undefined;
|
23851
|
+
_this.hls = undefined;
|
23852
|
+
_this.assetListLoader = undefined;
|
23853
23853
|
// Last updated LevelDetails
|
23854
23854
|
_this.mediaSelection = null;
|
23855
23855
|
_this.altSelection = null;
|
@@ -23865,7 +23865,7 @@
|
|
23865
23865
|
_this.bufferedPos = -1;
|
23866
23866
|
_this.timelinePos = -1;
|
23867
23867
|
// Schedule
|
23868
|
-
_this.schedule =
|
23868
|
+
_this.schedule = undefined;
|
23869
23869
|
// Schedule playback and buffering state
|
23870
23870
|
_this.playingItem = null;
|
23871
23871
|
_this.bufferingItem = null;
|
@@ -24249,7 +24249,7 @@
|
|
24249
24249
|
var primaryPlayer = this.hls;
|
24250
24250
|
var isAssetPlayer = player !== primaryPlayer;
|
24251
24251
|
var appendInPlace = isAssetPlayer && player.interstitial.appendInPlace;
|
24252
|
-
var detachedMediaSource = (_this$detachedData = this.detachedData) == null ?
|
24252
|
+
var detachedMediaSource = (_this$detachedData = this.detachedData) == null ? undefined : _this$detachedData.mediaSource;
|
24253
24253
|
var logFromSource;
|
24254
24254
|
if (primaryPlayer.media && appendInPlace) {
|
24255
24255
|
attachMediaSourceData = primaryPlayer.transferMedia();
|
@@ -24277,7 +24277,7 @@
|
|
24277
24277
|
};
|
24278
24278
|
}
|
24279
24279
|
}
|
24280
|
-
var transferring = attachMediaSourceData && 'mediaSource' in attachMediaSourceData && ((_attachMediaSourceDat = attachMediaSourceData.mediaSource) == null ?
|
24280
|
+
var transferring = attachMediaSourceData && 'mediaSource' in attachMediaSourceData && ((_attachMediaSourceDat = attachMediaSourceData.mediaSource) == null ? undefined : _attachMediaSourceDat.readyState) !== 'closed';
|
24281
24281
|
var dataToAttach = transferring && attachMediaSourceData ? attachMediaSourceData : media;
|
24282
24282
|
this.log((transferring ? 'transfering MediaSource' : 'attaching media') + " to " + (isAssetPlayer ? player : 'Primary'));
|
24283
24283
|
if (dataToAttach === attachMediaSourceData) {
|
@@ -24368,9 +24368,9 @@
|
|
24368
24368
|
var _interstitial$assetLi;
|
24369
24369
|
var interstitial = currentItem.event;
|
24370
24370
|
var playingAsset = this.playingAsset;
|
24371
|
-
var assetId = playingAsset == null ?
|
24371
|
+
var assetId = playingAsset == null ? undefined : playingAsset.identifier;
|
24372
24372
|
var player = assetId ? this.getAssetPlayer(assetId) : null;
|
24373
|
-
if (player && assetId && (!this.eventItemsMatch(currentItem, scheduledItem) || assetListIndex !== undefined && assetId !== ((_interstitial$assetLi = interstitial.assetList) == null ?
|
24373
|
+
if (player && assetId && (!this.eventItemsMatch(currentItem, scheduledItem) || assetListIndex !== undefined && assetId !== ((_interstitial$assetLi = interstitial.assetList) == null ? undefined : _interstitial$assetLi[assetListIndex].identifier))) {
|
24374
24374
|
this.playingAsset = null;
|
24375
24375
|
var _assetListIndex = interstitial.findAssetIndex(playingAsset);
|
24376
24376
|
this.log("INTERSTITIAL_ASSET_ENDED " + (_assetListIndex + 1) + "/" + interstitial.assetList.length + " " + eventAssetToString(playingAsset));
|
@@ -24691,7 +24691,7 @@
|
|
24691
24691
|
if (interstitial.cue.post) {
|
24692
24692
|
var _this$schedule$items;
|
24693
24693
|
var scheduleIndex = this.schedule.findEventIndex(interstitial.identifier);
|
24694
|
-
var item = (_this$schedule$items = this.schedule.items) == null ?
|
24694
|
+
var item = (_this$schedule$items = this.schedule.items) == null ? undefined : _this$schedule$items[scheduleIndex];
|
24695
24695
|
if (this.isInterstitial(item) && this.eventItemsMatch(item, this.bufferingItem)) {
|
24696
24696
|
this.bufferedToItem(item, 0);
|
24697
24697
|
}
|
@@ -24719,11 +24719,11 @@
|
|
24719
24719
|
};
|
24720
24720
|
_proto.itemsMatch = function itemsMatch(a, b) {
|
24721
24721
|
var _a$nextEvent, _b$nextEvent;
|
24722
|
-
return !!b && (a === b || a.event && b.event && this.eventItemsMatch(a, b) || !a.event && !b.event && ((_a$nextEvent = a.nextEvent) == null ?
|
24722
|
+
return !!b && (a === b || a.event && b.event && this.eventItemsMatch(a, b) || !a.event && !b.event && ((_a$nextEvent = a.nextEvent) == null ? undefined : _a$nextEvent.identifier) === ((_b$nextEvent = b.nextEvent) == null ? undefined : _b$nextEvent.identifier));
|
24723
24723
|
};
|
24724
24724
|
_proto.eventItemsMatch = function eventItemsMatch(a, b) {
|
24725
24725
|
var _b$event;
|
24726
|
-
return !!b && (a === b || a.event.identifier === ((_b$event = b.event) == null ?
|
24726
|
+
return !!b && (a === b || a.event.identifier === ((_b$event = b.event) == null ? undefined : _b$event.identifier));
|
24727
24727
|
};
|
24728
24728
|
_proto.findItemIndex = function findItemIndex(item, time) {
|
24729
24729
|
return item ? this.schedule.findItemIndex(item, time) : -1;
|
@@ -24768,7 +24768,7 @@
|
|
24768
24768
|
if (bufferEndIndex === -1 && bufferingItem && bufferEnd >= bufferingItem.end) {
|
24769
24769
|
bufferEndIndex = nextToBufferIndex;
|
24770
24770
|
}
|
24771
|
-
if (nextToBufferIndex - playingIndex > 1 && (bufferingItem == null ?
|
24771
|
+
if (nextToBufferIndex - playingIndex > 1 && (bufferingItem == null ? undefined : (_bufferingItem$event = bufferingItem.event) == null ? undefined : _bufferingItem$event.appendInPlace) === false) {
|
24772
24772
|
// do not advance buffering item past Interstitial that requires source reset
|
24773
24773
|
return;
|
24774
24774
|
}
|
@@ -24826,7 +24826,7 @@
|
|
24826
24826
|
return bufferingLast;
|
24827
24827
|
};
|
24828
24828
|
_proto.bufferedToItem = function bufferedToItem(item, assetListIndex) {
|
24829
|
-
if (assetListIndex ===
|
24829
|
+
if (assetListIndex === undefined) {
|
24830
24830
|
assetListIndex = 0;
|
24831
24831
|
}
|
24832
24832
|
var bufferingLast = this.setBufferingItem(item);
|
@@ -25082,13 +25082,13 @@
|
|
25082
25082
|
var scheduleIndex = _this4.schedule.findEventIndex(interstitial.identifier);
|
25083
25083
|
var assetListIndex = interstitial.findAssetIndex(assetItem);
|
25084
25084
|
var nextAssetIndex = assetListIndex + 1;
|
25085
|
-
var item = (_this4$schedule$items = _this4.schedule.items) == null ?
|
25085
|
+
var item = (_this4$schedule$items = _this4.schedule.items) == null ? undefined : _this4$schedule$items[scheduleIndex];
|
25086
25086
|
if (_this4.isInterstitial(item)) {
|
25087
25087
|
if (assetListIndex !== -1 && !interstitial.isAssetPastPlayoutLimit(nextAssetIndex) && !interstitial.assetList[nextAssetIndex].error) {
|
25088
25088
|
_this4.bufferedToItem(item, assetListIndex + 1);
|
25089
25089
|
} else {
|
25090
25090
|
var _this4$schedule$items2;
|
25091
|
-
var nextItem = (_this4$schedule$items2 = _this4.schedule.items) == null ?
|
25091
|
+
var nextItem = (_this4$schedule$items2 = _this4.schedule.items) == null ? undefined : _this4$schedule$items2[scheduleIndex + 1];
|
25092
25092
|
if (nextItem) {
|
25093
25093
|
_this4.bufferedToItem(nextItem);
|
25094
25094
|
}
|
@@ -25197,7 +25197,7 @@
|
|
25197
25197
|
assetItem = player.assetItem,
|
25198
25198
|
assetId = player.assetId;
|
25199
25199
|
var scheduleIndex = this.schedule.findEventIndex(interstitial.identifier);
|
25200
|
-
var item = (_this$schedule$items2 = this.schedule.items) == null ?
|
25200
|
+
var item = (_this$schedule$items2 = this.schedule.items) == null ? undefined : _this$schedule$items2[scheduleIndex];
|
25201
25201
|
if (!item) {
|
25202
25202
|
return;
|
25203
25203
|
}
|
@@ -25207,7 +25207,7 @@
|
|
25207
25207
|
if (bufferingPlayer === player) {
|
25208
25208
|
return;
|
25209
25209
|
}
|
25210
|
-
var activeTracks = (bufferingPlayer == null ?
|
25210
|
+
var activeTracks = (bufferingPlayer == null ? undefined : bufferingPlayer.tracks) || ((_this$detachedData3 = this.detachedData) == null ? undefined : _this$detachedData3.tracks) || this.requiredTracks;
|
25211
25211
|
if (interstitial.appendInPlace && assetItem !== this.playingAsset) {
|
25212
25212
|
// Do not buffer another item if tracks are unknown or incompatible
|
25213
25213
|
if (!player.tracks) {
|
@@ -25321,23 +25321,23 @@
|
|
25321
25321
|
});
|
25322
25322
|
interstitial.duration = sumDuration;
|
25323
25323
|
var waitingItem = this.waitingItem;
|
25324
|
-
var waitingForItem = (waitingItem == null ?
|
25324
|
+
var waitingForItem = (waitingItem == null ? undefined : waitingItem.event.identifier) === interstitialId;
|
25325
25325
|
|
25326
25326
|
// Update schedule now that asset.DURATION(s) are parsed
|
25327
25327
|
this.updateSchedule();
|
25328
|
-
var bufferingEvent = (_this$bufferingItem = this.bufferingItem) == null ?
|
25328
|
+
var bufferingEvent = (_this$bufferingItem = this.bufferingItem) == null ? undefined : _this$bufferingItem.event;
|
25329
25329
|
|
25330
25330
|
// If buffer reached Interstitial, start buffering first asset
|
25331
25331
|
if (waitingForItem) {
|
25332
25332
|
var _this$schedule$items3;
|
25333
25333
|
// Advance schedule when waiting for asset list data to play
|
25334
25334
|
var scheduleIndex = this.schedule.findEventIndex(interstitialId);
|
25335
|
-
var item = (_this$schedule$items3 = this.schedule.items) == null ?
|
25335
|
+
var item = (_this$schedule$items3 = this.schedule.items) == null ? undefined : _this$schedule$items3[scheduleIndex];
|
25336
25336
|
if (item) {
|
25337
25337
|
this.setBufferingItem(item);
|
25338
25338
|
}
|
25339
25339
|
this.setSchedulePosition(scheduleIndex);
|
25340
|
-
} else if ((bufferingEvent == null ?
|
25340
|
+
} else if ((bufferingEvent == null ? undefined : bufferingEvent.identifier) === interstitialId && bufferingEvent.appendInPlace) {
|
25341
25341
|
// If buffering (but not playback) has reached this item transfer media-source
|
25342
25342
|
var assetItem = interstitial.assetList[0];
|
25343
25343
|
var player = this.getAssetPlayer(assetItem.identifier);
|
@@ -25384,7 +25384,7 @@
|
|
25384
25384
|
if (interstitial) {
|
25385
25385
|
if (timelineType === 'playout' || interstitial.timelineOccupancy !== TimelineOccupancy.Point) {
|
25386
25386
|
var assetPlayer = getAssetPlayer(asset);
|
25387
|
-
if ((assetPlayer == null ?
|
25387
|
+
if ((assetPlayer == null ? undefined : assetPlayer.interstitial) === interstitial) {
|
25388
25388
|
time += assetPlayer.assetItem.startOffset + assetPlayer[assetPlayerField];
|
25389
25389
|
}
|
25390
25390
|
}
|
@@ -25400,7 +25400,7 @@
|
|
25400
25400
|
if (primaryTime !== 0 && timelineType !== 'primary' && c.schedule.length) {
|
25401
25401
|
var _c$schedule$items;
|
25402
25402
|
var index = c.schedule.findItemIndexAtTime(primaryTime);
|
25403
|
-
var item = (_c$schedule$items = c.schedule.items) == null ?
|
25403
|
+
var item = (_c$schedule$items = c.schedule.items) == null ? undefined : _c$schedule$items[index];
|
25404
25404
|
if (item) {
|
25405
25405
|
var diff = item[timelineType].start - item.start;
|
25406
25406
|
return primaryTime + diff;
|
@@ -25432,14 +25432,14 @@
|
|
25432
25432
|
c.log("seek to " + time + " \"" + timelineType + "\"");
|
25433
25433
|
var playingItem = effectivePlayingItem();
|
25434
25434
|
var targetIndex = c.schedule.findItemIndexAtTime(time, timelineType);
|
25435
|
-
var targetItem = (_c$schedule$items2 = c.schedule.items) == null ?
|
25436
|
-
var playingInterstitial = playingItem == null ?
|
25437
|
-
var appendInPlace = playingInterstitial == null ?
|
25435
|
+
var targetItem = (_c$schedule$items2 = c.schedule.items) == null ? undefined : _c$schedule$items2[targetIndex];
|
25436
|
+
var playingInterstitial = playingItem == null ? undefined : playingItem.event;
|
25437
|
+
var appendInPlace = playingInterstitial == null ? undefined : playingInterstitial.appendInPlace;
|
25438
25438
|
var seekInItem = playingItem && c.itemsMatch(playingItem, targetItem);
|
25439
25439
|
if (playingItem && (appendInPlace || seekInItem)) {
|
25440
25440
|
// seek in asset player or primary media (appendInPlace)
|
25441
25441
|
var assetPlayer = getAssetPlayer(c.playingAsset);
|
25442
|
-
var media = (assetPlayer == null ?
|
25442
|
+
var media = (assetPlayer == null ? undefined : assetPlayer.media) || c.hls.media;
|
25443
25443
|
if (media) {
|
25444
25444
|
var currentTime = timelineType === 'primary' ? media.currentTime : getMappedTime(playingItem, timelineType, c.playingAsset, 'timelinePos', 'currentTime');
|
25445
25445
|
var diff = time - currentTime;
|
@@ -25479,7 +25479,7 @@
|
|
25479
25479
|
c.timelinePos = _seekToTime;
|
25480
25480
|
} else {
|
25481
25481
|
var _targetItem$event;
|
25482
|
-
var assetList = targetItem == null ?
|
25482
|
+
var assetList = targetItem == null ? undefined : (_targetItem$event = targetItem.event) == null ? undefined : _targetItem$event.assetList;
|
25483
25483
|
if (assetList) {
|
25484
25484
|
var eventTime = time - (targetItem[timelineType] || targetItem).start;
|
25485
25485
|
for (var i = assetList.length; i--;) {
|
@@ -25498,11 +25498,11 @@
|
|
25498
25498
|
this.manager = {
|
25499
25499
|
get events() {
|
25500
25500
|
var _c$schedule, _c$schedule$events;
|
25501
|
-
return ((_c$schedule = c.schedule) == null ?
|
25501
|
+
return ((_c$schedule = c.schedule) == null ? undefined : (_c$schedule$events = _c$schedule.events) == null ? undefined : _c$schedule$events.slice(0)) || [];
|
25502
25502
|
},
|
25503
25503
|
get schedule() {
|
25504
25504
|
var _c$schedule2, _c$schedule2$items;
|
25505
|
-
return ((_c$schedule2 = c.schedule) == null ?
|
25505
|
+
return ((_c$schedule2 = c.schedule) == null ? undefined : (_c$schedule2$items = _c$schedule2.items) == null ? undefined : _c$schedule2$items.slice(0)) || [];
|
25506
25506
|
},
|
25507
25507
|
get playerQueue() {
|
25508
25508
|
return c.playerQueue.slice(0);
|
@@ -25546,7 +25546,7 @@
|
|
25546
25546
|
},
|
25547
25547
|
get seekableStart() {
|
25548
25548
|
var _c$primaryDetails2;
|
25549
|
-
return ((_c$primaryDetails2 = c.primaryDetails) == null ?
|
25549
|
+
return ((_c$primaryDetails2 = c.primaryDetails) == null ? undefined : _c$primaryDetails2.fragmentStart) || 0;
|
25550
25550
|
},
|
25551
25551
|
seekTo: function seekTo(time) {
|
25552
25552
|
return _seekTo(time, 'primary');
|
@@ -25564,7 +25564,7 @@
|
|
25564
25564
|
},
|
25565
25565
|
get seekableStart() {
|
25566
25566
|
var _c$primaryDetails3;
|
25567
|
-
return findMappedTime(((_c$primaryDetails3 = c.primaryDetails) == null ?
|
25567
|
+
return findMappedTime(((_c$primaryDetails3 = c.primaryDetails) == null ? undefined : _c$primaryDetails3.fragmentStart) || 0, 'playout');
|
25568
25568
|
},
|
25569
25569
|
seekTo: function seekTo(time) {
|
25570
25570
|
return _seekTo(time, 'playout');
|
@@ -25582,7 +25582,7 @@
|
|
25582
25582
|
},
|
25583
25583
|
get seekableStart() {
|
25584
25584
|
var _c$primaryDetails4;
|
25585
|
-
return findMappedTime(((_c$primaryDetails4 = c.primaryDetails) == null ?
|
25585
|
+
return findMappedTime(((_c$primaryDetails4 = c.primaryDetails) == null ? undefined : _c$primaryDetails4.fragmentStart) || 0, 'integrated');
|
25586
25586
|
},
|
25587
25587
|
seekTo: function seekTo(time) {
|
25588
25588
|
return _seekTo(time, 'integrated');
|
@@ -25590,7 +25590,7 @@
|
|
25590
25590
|
},
|
25591
25591
|
skip: function skip() {
|
25592
25592
|
var item = effectivePlayingItem();
|
25593
|
-
var event = item == null ?
|
25593
|
+
var event = item == null ? undefined : item.event;
|
25594
25594
|
if (event && !event.restrictions.skip) {
|
25595
25595
|
var index = c.findItemIndex(item);
|
25596
25596
|
if (event.appendInPlace) {
|
@@ -25615,7 +25615,7 @@
|
|
25615
25615
|
if (!this.playbackStarted || !playingItem) {
|
25616
25616
|
return false;
|
25617
25617
|
}
|
25618
|
-
var items = (_this$schedule = this.schedule) == null ?
|
25618
|
+
var items = (_this$schedule = this.schedule) == null ? undefined : _this$schedule.items;
|
25619
25619
|
return this.itemsMatch(playingItem, items ? items[items.length - 1] : null);
|
25620
25620
|
}
|
25621
25621
|
}, {
|
@@ -25643,7 +25643,7 @@
|
|
25643
25643
|
// Observe detached media currentTime when appending in place
|
25644
25644
|
media = this.primaryMedia;
|
25645
25645
|
}
|
25646
|
-
var currentTime = (_media3 = media) == null ?
|
25646
|
+
var currentTime = (_media3 = media) == null ? undefined : _media3.currentTime;
|
25647
25647
|
if (currentTime === undefined || !isFiniteNumber(currentTime)) {
|
25648
25648
|
return undefined;
|
25649
25649
|
}
|
@@ -25653,7 +25653,7 @@
|
|
25653
25653
|
key: "primaryMedia",
|
25654
25654
|
get: function get() {
|
25655
25655
|
var _this$detachedData4;
|
25656
|
-
return this.media || ((_this$detachedData4 = this.detachedData) == null ?
|
25656
|
+
return this.media || ((_this$detachedData4 = this.detachedData) == null ? undefined : _this$detachedData4.media) || null;
|
25657
25657
|
}
|
25658
25658
|
}, {
|
25659
25659
|
key: "playbackDisabled",
|
@@ -25664,7 +25664,7 @@
|
|
25664
25664
|
key: "primaryDetails",
|
25665
25665
|
get: function get() {
|
25666
25666
|
var _this$mediaSelection, _this$mediaSelection$;
|
25667
|
-
return (_this$mediaSelection = this.mediaSelection) == null ?
|
25667
|
+
return (_this$mediaSelection = this.mediaSelection) == null ? undefined : (_this$mediaSelection$ = _this$mediaSelection.main) == null ? undefined : _this$mediaSelection$.details;
|
25668
25668
|
}
|
25669
25669
|
}, {
|
25670
25670
|
key: "primaryLive",
|
@@ -25803,7 +25803,7 @@
|
|
25803
25803
|
;
|
25804
25804
|
_proto.onError = function onError(event, data) {
|
25805
25805
|
var frag = data.frag;
|
25806
|
-
if ((frag == null ?
|
25806
|
+
if ((frag == null ? undefined : frag.type) === PlaylistLevelType.SUBTITLE) {
|
25807
25807
|
if (data.details === ErrorDetails.FRAG_GAP) {
|
25808
25808
|
this.fragmentTracker.fragBuffered(frag, true);
|
25809
25809
|
}
|
@@ -25893,7 +25893,7 @@
|
|
25893
25893
|
}
|
25894
25894
|
} else {
|
25895
25895
|
var _this$levelLastLoaded;
|
25896
|
-
sliding = this.alignPlaylists(newDetails, track.details, (_this$levelLastLoaded = this.levelLastLoaded) == null ?
|
25896
|
+
sliding = this.alignPlaylists(newDetails, track.details, (_this$levelLastLoaded = this.levelLastLoaded) == null ? undefined : _this$levelLastLoaded.details);
|
25897
25897
|
if (sliding === 0 && mainSlidingStartFragment) {
|
25898
25898
|
// realign with main when there is no overlap with last refresh
|
25899
25899
|
sliding = mainSlidingStartFragment.start;
|
@@ -25971,7 +25971,7 @@
|
|
25971
25971
|
if (this.state === State.IDLE) {
|
25972
25972
|
var currentTrackId = this.currentTrackId,
|
25973
25973
|
levels = this.levels;
|
25974
|
-
var track = levels == null ?
|
25974
|
+
var track = levels == null ? undefined : levels[currentTrackId];
|
25975
25975
|
if (!track || !levels.length || !track.details) {
|
25976
25976
|
return;
|
25977
25977
|
}
|
@@ -26036,7 +26036,7 @@
|
|
26036
26036
|
}]);
|
26037
26037
|
}(BaseStreamController);
|
26038
26038
|
var BufferableInstance = function BufferableInstance(timeranges) {
|
26039
|
-
this.buffered =
|
26039
|
+
this.buffered = undefined;
|
26040
26040
|
var getRange = function getRange(name, index, length) {
|
26041
26041
|
index = index >>> 0;
|
26042
26042
|
if (index > length - 1) {
|
@@ -26341,7 +26341,7 @@
|
|
26341
26341
|
details = data.details;
|
26342
26342
|
var trackInActiveGroup = this.tracksInGroup[id];
|
26343
26343
|
if (!trackInActiveGroup || trackInActiveGroup.groupId !== groupId) {
|
26344
|
-
this.warn("Subtitle track with id:" + id + " and group:" + groupId + " not found in active group " + (trackInActiveGroup == null ?
|
26344
|
+
this.warn("Subtitle track with id:" + id + " and group:" + groupId + " not found in active group " + (trackInActiveGroup == null ? undefined : trackInActiveGroup.groupId));
|
26345
26345
|
return;
|
26346
26346
|
}
|
26347
26347
|
var curDetails = trackInActiveGroup.details;
|
@@ -26365,8 +26365,8 @@
|
|
26365
26365
|
var subtitleGroups = levelInfo.subtitleGroups || null;
|
26366
26366
|
var currentGroups = this.groupIds;
|
26367
26367
|
var currentTrack = this.currentTrack;
|
26368
|
-
if (!subtitleGroups || (currentGroups == null ?
|
26369
|
-
return (currentGroups == null ?
|
26368
|
+
if (!subtitleGroups || (currentGroups == null ? undefined : currentGroups.length) !== (subtitleGroups == null ? undefined : subtitleGroups.length) || subtitleGroups != null && subtitleGroups.some(function (groupId) {
|
26369
|
+
return (currentGroups == null ? undefined : currentGroups.indexOf(groupId)) === -1;
|
26370
26370
|
})) {
|
26371
26371
|
this.groupIds = subtitleGroups;
|
26372
26372
|
this.trackId = -1;
|
@@ -26414,7 +26414,7 @@
|
|
26414
26414
|
var subtitleTracksUpdated = {
|
26415
26415
|
subtitleTracks: subtitleTracks
|
26416
26416
|
};
|
26417
|
-
this.log("Updating subtitle tracks, " + subtitleTracks.length + " track(s) found in \"" + (subtitleGroups == null ?
|
26417
|
+
this.log("Updating subtitle tracks, " + subtitleTracks.length + " track(s) found in \"" + (subtitleGroups == null ? undefined : subtitleGroups.join(',')) + "\" group-id");
|
26418
26418
|
this.hls.trigger(Events.SUBTITLE_TRACKS_UPDATED, subtitleTracksUpdated);
|
26419
26419
|
if (trackId !== -1 && this.trackId === -1) {
|
26420
26420
|
this.setSubtitleTrack(trackId);
|
@@ -26517,8 +26517,8 @@
|
|
26517
26517
|
var groupId = currentTrack.groupId;
|
26518
26518
|
var url = this.getUrlWithDirectives(currentTrack.url, hlsUrlParameters);
|
26519
26519
|
var details = currentTrack.details;
|
26520
|
-
var age = details == null ?
|
26521
|
-
this.log("Loading subtitle " + id + " \"" + currentTrack.name + "\" lang:" + currentTrack.lang + " group:" + groupId + ((hlsUrlParameters == null ?
|
26520
|
+
var age = details == null ? undefined : details.age;
|
26521
|
+
this.log("Loading subtitle " + id + " \"" + currentTrack.name + "\" lang:" + currentTrack.lang + " group:" + groupId + ((hlsUrlParameters == null ? undefined : hlsUrlParameters.msn) !== undefined ? ' at sn ' + hlsUrlParameters.msn + ' part ' + hlsUrlParameters.part : '') + (age && details.live ? ' age ' + age.toFixed(1) + (details.type ? ' ' + details.type || '' : '') : '') + " " + url);
|
26522
26522
|
this.hls.trigger(Events.SUBTITLE_TRACK_LOADING, {
|
26523
26523
|
url: url,
|
26524
26524
|
id: id,
|
@@ -26603,7 +26603,7 @@
|
|
26603
26603
|
this.log("Switching to subtitle-track " + newId + (track ? " \"" + track.name + "\" lang:" + track.lang + " group:" + track.groupId : ''));
|
26604
26604
|
var id = track.id,
|
26605
26605
|
_track$groupId = track.groupId,
|
26606
|
-
groupId = _track$groupId ===
|
26606
|
+
groupId = _track$groupId === undefined ? '' : _track$groupId,
|
26607
26607
|
name = track.name,
|
26608
26608
|
type = track.type,
|
26609
26609
|
url = track.url;
|
@@ -26614,7 +26614,7 @@
|
|
26614
26614
|
type: type,
|
26615
26615
|
url: url
|
26616
26616
|
});
|
26617
|
-
var hlsUrlParameters = this.switchParams(track.url, lastTrack == null ?
|
26617
|
+
var hlsUrlParameters = this.switchParams(track.url, lastTrack == null ? undefined : lastTrack.details, track.details);
|
26618
26618
|
this.loadPlaylist(hlsUrlParameters);
|
26619
26619
|
};
|
26620
26620
|
return _createClass(SubtitleTrackController, [{
|
@@ -27039,7 +27039,7 @@
|
|
27039
27039
|
this.pos = 0;
|
27040
27040
|
this.currPenState = new PenState();
|
27041
27041
|
this.cueStartTime = null;
|
27042
|
-
this.logger =
|
27042
|
+
this.logger = undefined;
|
27043
27043
|
for (var i = 0; i < NR_COLS; i++) {
|
27044
27044
|
this.chars.push(new StyledUnicodeChar());
|
27045
27045
|
}
|
@@ -27170,7 +27170,7 @@
|
|
27170
27170
|
this.currRow = NR_ROWS - 1;
|
27171
27171
|
this.nrRollUpRows = null;
|
27172
27172
|
this.lastOutputScreen = null;
|
27173
|
-
this.logger =
|
27173
|
+
this.logger = undefined;
|
27174
27174
|
for (var i = 0; i < NR_ROWS; i++) {
|
27175
27175
|
this.rows.push(new Row(logger));
|
27176
27176
|
}
|
@@ -27355,17 +27355,17 @@
|
|
27355
27355
|
// var modes = ['MODE_ROLL-UP', 'MODE_POP-ON', 'MODE_PAINT-ON', 'MODE_TEXT'];
|
27356
27356
|
var Cea608Channel = /*#__PURE__*/function () {
|
27357
27357
|
function Cea608Channel(channelNumber, outputFilter, logger) {
|
27358
|
-
this.chNr =
|
27359
|
-
this.outputFilter =
|
27360
|
-
this.mode =
|
27361
|
-
this.verbose =
|
27362
|
-
this.displayedMemory =
|
27363
|
-
this.nonDisplayedMemory =
|
27364
|
-
this.lastOutputScreen =
|
27365
|
-
this.currRollUpRow =
|
27366
|
-
this.writeScreen =
|
27367
|
-
this.cueStartTime =
|
27368
|
-
this.logger =
|
27358
|
+
this.chNr = undefined;
|
27359
|
+
this.outputFilter = undefined;
|
27360
|
+
this.mode = undefined;
|
27361
|
+
this.verbose = undefined;
|
27362
|
+
this.displayedMemory = undefined;
|
27363
|
+
this.nonDisplayedMemory = undefined;
|
27364
|
+
this.lastOutputScreen = undefined;
|
27365
|
+
this.currRollUpRow = undefined;
|
27366
|
+
this.writeScreen = undefined;
|
27367
|
+
this.cueStartTime = undefined;
|
27368
|
+
this.logger = undefined;
|
27369
27369
|
this.chNr = channelNumber;
|
27370
27370
|
this.outputFilter = outputFilter;
|
27371
27371
|
this.mode = null;
|
@@ -27551,7 +27551,7 @@
|
|
27551
27551
|
this.writeScreen.setPen(styles);
|
27552
27552
|
};
|
27553
27553
|
_proto6.outputDataUpdate = function outputDataUpdate(dispatch) {
|
27554
|
-
if (dispatch ===
|
27554
|
+
if (dispatch === undefined) {
|
27555
27555
|
dispatch = false;
|
27556
27556
|
}
|
27557
27557
|
var time = this.logger.time;
|
@@ -27588,10 +27588,10 @@
|
|
27588
27588
|
}(); // Will be 1 or 2 when parsing captions
|
27589
27589
|
var Cea608Parser = /*#__PURE__*/function () {
|
27590
27590
|
function Cea608Parser(field, out1, out2) {
|
27591
|
-
this.channels =
|
27591
|
+
this.channels = undefined;
|
27592
27592
|
this.currentChannel = 0;
|
27593
27593
|
this.cmdHistory = createCmdHistory();
|
27594
|
-
this.logger =
|
27594
|
+
this.logger = undefined;
|
27595
27595
|
var logger = this.logger = new CaptionsLogger();
|
27596
27596
|
this.channels = [null, new Cea608Channel(field, out1, logger), new Cea608Channel(field + 1, out2, logger)];
|
27597
27597
|
}
|
@@ -28421,9 +28421,9 @@
|
|
28421
28421
|
this.decoder = new StringDecoder();
|
28422
28422
|
this.regionList = [];
|
28423
28423
|
this.cue = null;
|
28424
|
-
this.oncue =
|
28425
|
-
this.onparsingerror =
|
28426
|
-
this.onflush =
|
28424
|
+
this.oncue = undefined;
|
28425
|
+
this.onparsingerror = undefined;
|
28426
|
+
this.onflush = undefined;
|
28427
28427
|
}
|
28428
28428
|
var _proto3 = VTTParser.prototype;
|
28429
28429
|
_proto3.parse = function parse(data) {
|
@@ -28626,7 +28626,7 @@
|
|
28626
28626
|
|
28627
28627
|
// String.prototype.startsWith is not supported in IE11
|
28628
28628
|
var startsWith = function startsWith(inputString, searchString, position) {
|
28629
|
-
if (position ===
|
28629
|
+
if (position === undefined) {
|
28630
28630
|
position = 0;
|
28631
28631
|
}
|
28632
28632
|
return inputString.slice(position, position + searchString.length) === searchString;
|
@@ -28967,9 +28967,9 @@
|
|
28967
28967
|
|
28968
28968
|
var OutputFilter = /*#__PURE__*/function () {
|
28969
28969
|
function OutputFilter(timelineController, trackName) {
|
28970
|
-
this.timelineController =
|
28970
|
+
this.timelineController = undefined;
|
28971
28971
|
this.cueRanges = [];
|
28972
|
-
this.trackName =
|
28972
|
+
this.trackName = undefined;
|
28973
28973
|
this.startTime = null;
|
28974
28974
|
this.endTime = null;
|
28975
28975
|
this.screen = null;
|
@@ -29001,19 +29001,19 @@
|
|
29001
29001
|
|
29002
29002
|
var TimelineController = /*#__PURE__*/function () {
|
29003
29003
|
function TimelineController(hls) {
|
29004
|
-
this.hls =
|
29004
|
+
this.hls = undefined;
|
29005
29005
|
this.media = null;
|
29006
|
-
this.config =
|
29006
|
+
this.config = undefined;
|
29007
29007
|
this.enabled = true;
|
29008
|
-
this.Cues =
|
29008
|
+
this.Cues = undefined;
|
29009
29009
|
this.textTracks = [];
|
29010
29010
|
this.tracks = [];
|
29011
29011
|
this.initPTS = [];
|
29012
29012
|
this.unparsedVttFrags = [];
|
29013
29013
|
this.captionsTracks = {};
|
29014
29014
|
this.nonNativeCaptionsTracks = {};
|
29015
|
-
this.cea608Parser1 =
|
29016
|
-
this.cea608Parser2 =
|
29015
|
+
this.cea608Parser1 = undefined;
|
29016
|
+
this.cea608Parser2 = undefined;
|
29017
29017
|
this.lastCc = -1;
|
29018
29018
|
// Last video (CEA-608) fragment CC
|
29019
29019
|
this.lastSn = -1;
|
@@ -29023,7 +29023,7 @@
|
|
29023
29023
|
this.prevCC = -1;
|
29024
29024
|
// Last subtitle fragment CC
|
29025
29025
|
this.vttCCs = newVTTCCs();
|
29026
|
-
this.captionsProperties =
|
29026
|
+
this.captionsProperties = undefined;
|
29027
29027
|
this.hls = hls;
|
29028
29028
|
this.config = hls.config;
|
29029
29029
|
this.Cues = hls.config.cueHandler;
|
@@ -29369,7 +29369,7 @@
|
|
29369
29369
|
};
|
29370
29370
|
_proto.closedCaptionsForLevel = function closedCaptionsForLevel(frag) {
|
29371
29371
|
var level = this.hls.levels[frag.level];
|
29372
|
-
return level == null ?
|
29372
|
+
return level == null ? undefined : level.attrs['CLOSED-CAPTIONS'];
|
29373
29373
|
};
|
29374
29374
|
_proto.onFragLoading = function onFragLoading(event, data) {
|
29375
29375
|
// if this frag isn't contiguous, clear the parser so cues with bad start/end times aren't added to the textTrack
|
@@ -29381,7 +29381,7 @@
|
|
29381
29381
|
var _data$frag = data.frag,
|
29382
29382
|
cc = _data$frag.cc,
|
29383
29383
|
sn = _data$frag.sn;
|
29384
|
-
var partIndex = (_data$part$index = (_data$part = data.part) == null ?
|
29384
|
+
var partIndex = (_data$part$index = (_data$part = data.part) == null ? undefined : _data$part.index) != null ? _data$part$index : -1;
|
29385
29385
|
if (cea608Parser1 && cea608Parser2) {
|
29386
29386
|
if (sn !== lastSn + 1 || sn === lastSn && partIndex !== this.lastPartIndex + 1 || cc !== this.lastCc) {
|
29387
29387
|
cea608Parser1.reset();
|
@@ -29730,15 +29730,15 @@
|
|
29730
29730
|
var BYTERANGE = /(\d+)-(\d+)\/(\d+)/;
|
29731
29731
|
var FetchLoader = /*#__PURE__*/function () {
|
29732
29732
|
function FetchLoader(config) {
|
29733
|
-
this.fetchSetup =
|
29734
|
-
this.requestTimeout =
|
29733
|
+
this.fetchSetup = undefined;
|
29734
|
+
this.requestTimeout = undefined;
|
29735
29735
|
this.request = null;
|
29736
29736
|
this.response = null;
|
29737
|
-
this.controller =
|
29737
|
+
this.controller = undefined;
|
29738
29738
|
this.context = null;
|
29739
29739
|
this.config = null;
|
29740
29740
|
this.callbacks = null;
|
29741
|
-
this.stats =
|
29741
|
+
this.stats = undefined;
|
29742
29742
|
this.loader = null;
|
29743
29743
|
this.fetchSetup = config.fetchSetup || getRequest;
|
29744
29744
|
this.controller = new self.AbortController();
|
@@ -29810,7 +29810,7 @@
|
|
29810
29810
|
}
|
29811
29811
|
stats.loading.first = first;
|
29812
29812
|
stats.total = getContentLength(response.headers) || stats.total;
|
29813
|
-
var onProgress = (_this$callbacks2 = _this.callbacks) == null ?
|
29813
|
+
var onProgress = (_this$callbacks2 = _this.callbacks) == null ? undefined : _this$callbacks2.onProgress;
|
29814
29814
|
if (onProgress && isFiniteNumber(config.highWaterMark)) {
|
29815
29815
|
return _this.loadProgressively(response, stats, context, config.highWaterMark, onProgress);
|
29816
29816
|
}
|
@@ -29838,11 +29838,11 @@
|
|
29838
29838
|
data: responseData,
|
29839
29839
|
code: response.status
|
29840
29840
|
};
|
29841
|
-
var onProgress = (_this$callbacks3 = _this.callbacks) == null ?
|
29841
|
+
var onProgress = (_this$callbacks3 = _this.callbacks) == null ? undefined : _this$callbacks3.onProgress;
|
29842
29842
|
if (onProgress && !isFiniteNumber(config.highWaterMark)) {
|
29843
29843
|
onProgress(stats, context, responseData, response);
|
29844
29844
|
}
|
29845
|
-
(_this$callbacks4 = _this.callbacks) == null ?
|
29845
|
+
(_this$callbacks4 = _this.callbacks) == null ? undefined : _this$callbacks4.onSuccess(loaderResponse, stats, context, response);
|
29846
29846
|
}).catch(function (error) {
|
29847
29847
|
var _this$callbacks5;
|
29848
29848
|
self.clearTimeout(_this.requestTimeout);
|
@@ -29853,7 +29853,7 @@
|
|
29853
29853
|
// when destroying, 'error' itself can be undefined
|
29854
29854
|
var code = !error ? 0 : error.code || 0;
|
29855
29855
|
var text = !error ? null : error.message;
|
29856
|
-
(_this$callbacks5 = _this.callbacks) == null ?
|
29856
|
+
(_this$callbacks5 = _this.callbacks) == null ? undefined : _this$callbacks5.onError({
|
29857
29857
|
code: code,
|
29858
29858
|
text: text
|
29859
29859
|
}, context, error ? error.details : null, stats);
|
@@ -29871,7 +29871,7 @@
|
|
29871
29871
|
return this.response ? this.response.headers.get(name) : null;
|
29872
29872
|
};
|
29873
29873
|
_proto.loadProgressively = function loadProgressively(response, stats, context, highWaterMark, onProgress) {
|
29874
|
-
if (highWaterMark ===
|
29874
|
+
if (highWaterMark === undefined) {
|
29875
29875
|
highWaterMark = 0;
|
29876
29876
|
}
|
29877
29877
|
var chunkCache = new ChunkCache();
|
@@ -29949,8 +29949,8 @@
|
|
29949
29949
|
function FetchError(message, code, details) {
|
29950
29950
|
var _this2;
|
29951
29951
|
_this2 = _Error.call(this, message) || this;
|
29952
|
-
_this2.code =
|
29953
|
-
_this2.details =
|
29952
|
+
_this2.code = undefined;
|
29953
|
+
_this2.details = undefined;
|
29954
29954
|
_this2.code = code;
|
29955
29955
|
_this2.details = details;
|
29956
29956
|
return _this2;
|
@@ -29962,15 +29962,15 @@
|
|
29962
29962
|
var AGE_HEADER_LINE_REGEX = /^age:\s*[\d.]+\s*$/im;
|
29963
29963
|
var XhrLoader = /*#__PURE__*/function () {
|
29964
29964
|
function XhrLoader(config) {
|
29965
|
-
this.xhrSetup =
|
29966
|
-
this.requestTimeout =
|
29967
|
-
this.retryTimeout =
|
29968
|
-
this.retryDelay =
|
29965
|
+
this.xhrSetup = undefined;
|
29966
|
+
this.requestTimeout = undefined;
|
29967
|
+
this.retryTimeout = undefined;
|
29968
|
+
this.retryDelay = undefined;
|
29969
29969
|
this.config = null;
|
29970
29970
|
this.callbacks = null;
|
29971
29971
|
this.context = null;
|
29972
29972
|
this.loader = null;
|
29973
|
-
this.stats =
|
29973
|
+
this.stats = undefined;
|
29974
29974
|
this.xhrSetup = config ? config.xhrSetup || null : null;
|
29975
29975
|
this.stats = new LoadStats();
|
29976
29976
|
this.retryDelay = 0;
|
@@ -30041,7 +30041,7 @@
|
|
30041
30041
|
}).catch(function (error) {
|
30042
30042
|
var _this$callbacks2;
|
30043
30043
|
// IE11 throws an exception on xhr.open if attempting to access an HTTP resource over HTTPS
|
30044
|
-
(_this$callbacks2 = _this.callbacks) == null ?
|
30044
|
+
(_this$callbacks2 = _this.callbacks) == null ? undefined : _this$callbacks2.onError({
|
30045
30045
|
code: xhr.status,
|
30046
30046
|
text: error.message
|
30047
30047
|
}, context, xhr, stats);
|
@@ -30117,7 +30117,7 @@
|
|
30117
30117
|
var len = xhr.responseType === 'arraybuffer' ? data.byteLength : data.length;
|
30118
30118
|
stats.loaded = stats.total = len;
|
30119
30119
|
stats.bwEstimate = stats.total * 8000 / (stats.loading.end - stats.loading.first);
|
30120
|
-
var onProgress = (_this$callbacks3 = this.callbacks) == null ?
|
30120
|
+
var onProgress = (_this$callbacks3 = this.callbacks) == null ? undefined : _this$callbacks3.onProgress;
|
30121
30121
|
if (onProgress) {
|
30122
30122
|
onProgress(stats, context, data, xhr);
|
30123
30123
|
}
|
@@ -30126,7 +30126,7 @@
|
|
30126
30126
|
data: data,
|
30127
30127
|
code: _status
|
30128
30128
|
};
|
30129
|
-
(_this$callbacks4 = this.callbacks) == null ?
|
30129
|
+
(_this$callbacks4 = this.callbacks) == null ? undefined : _this$callbacks4.onSuccess(_response, stats, context, xhr);
|
30130
30130
|
return;
|
30131
30131
|
}
|
30132
30132
|
}
|
@@ -30145,7 +30145,7 @@
|
|
30145
30145
|
} else {
|
30146
30146
|
var _this$callbacks5;
|
30147
30147
|
logger.error(_status + " while loading " + context.url);
|
30148
|
-
(_this$callbacks5 = this.callbacks) == null ?
|
30148
|
+
(_this$callbacks5 = this.callbacks) == null ? undefined : _this$callbacks5.onError({
|
30149
30149
|
code: _status,
|
30150
30150
|
text: xhr.statusText
|
30151
30151
|
}, context, xhr, stats);
|
@@ -30161,7 +30161,7 @@
|
|
30161
30161
|
this.retry(retryConfig);
|
30162
30162
|
} else {
|
30163
30163
|
var _this$context;
|
30164
|
-
logger.warn("timeout while loading " + ((_this$context = this.context) == null ?
|
30164
|
+
logger.warn("timeout while loading " + ((_this$context = this.context) == null ? undefined : _this$context.url));
|
30165
30165
|
var callbacks = this.callbacks;
|
30166
30166
|
if (callbacks) {
|
30167
30167
|
this.abortInternal();
|
@@ -30174,7 +30174,7 @@
|
|
30174
30174
|
stats = this.stats;
|
30175
30175
|
this.retryDelay = getRetryDelay(retryConfig, stats.retry);
|
30176
30176
|
stats.retry++;
|
30177
|
-
logger.warn((status ? 'HTTP Status ' + status : 'Timeout') + " while loading " + (context == null ?
|
30177
|
+
logger.warn((status ? 'HTTP Status ' + status : 'Timeout') + " while loading " + (context == null ? undefined : context.url) + ", retrying " + stats.retry + "/" + retryConfig.maxNumRetry + " in " + this.retryDelay + "ms");
|
30178
30178
|
// abort and reset internal state
|
30179
30179
|
this.abortInternal();
|
30180
30180
|
this.loader = null;
|
@@ -30653,7 +30653,7 @@
|
|
30653
30653
|
var ID3TrackController = /*#__PURE__*/function () {
|
30654
30654
|
function ID3TrackController(hls) {
|
30655
30655
|
var _this = this;
|
30656
|
-
this.hls =
|
30656
|
+
this.hls = undefined;
|
30657
30657
|
this.id3Track = null;
|
30658
30658
|
this.media = null;
|
30659
30659
|
this.dateRangeCuesAppended = {};
|
@@ -30702,7 +30702,7 @@
|
|
30702
30702
|
_proto.onMediaAttaching = function onMediaAttaching(event, data) {
|
30703
30703
|
var _data$overrides;
|
30704
30704
|
this.media = data.media;
|
30705
|
-
if (((_data$overrides = data.overrides) == null ?
|
30705
|
+
if (((_data$overrides = data.overrides) == null ? undefined : _data$overrides.cueRemoval) === false) {
|
30706
30706
|
this.removeCues = false;
|
30707
30707
|
}
|
30708
30708
|
};
|
@@ -30802,7 +30802,7 @@
|
|
30802
30802
|
};
|
30803
30803
|
_proto.updateId3CueEnds = function updateId3CueEnds(startTime, type) {
|
30804
30804
|
var _this$id3Track;
|
30805
|
-
var cues = (_this$id3Track = this.id3Track) == null ?
|
30805
|
+
var cues = (_this$id3Track = this.id3Track) == null ? undefined : _this$id3Track.cues;
|
30806
30806
|
if (cues) {
|
30807
30807
|
for (var i = cues.length; i--;) {
|
30808
30808
|
var cue = cues[i];
|
@@ -30890,7 +30890,7 @@
|
|
30890
30890
|
}
|
30891
30891
|
// Exit if the playlist does not have Date Ranges or does not have Program Date Time
|
30892
30892
|
var lastFragment = details.fragments[details.fragments.length - 1];
|
30893
|
-
if (ids.length === 0 || !isFiniteNumber(lastFragment == null ?
|
30893
|
+
if (ids.length === 0 || !isFiniteNumber(lastFragment == null ? undefined : lastFragment.programDateTime)) {
|
30894
30894
|
return;
|
30895
30895
|
}
|
30896
30896
|
if (!this.id3Track) {
|
@@ -30904,8 +30904,8 @@
|
|
30904
30904
|
|
30905
30905
|
// Process DateRanges to determine end-time (known DURATION, END-DATE, or END-ON-NEXT)
|
30906
30906
|
var appendedDateRangeCues = dateRangeCuesAppended[id];
|
30907
|
-
var cues = (appendedDateRangeCues == null ?
|
30908
|
-
var durationKnown = (appendedDateRangeCues == null ?
|
30907
|
+
var cues = (appendedDateRangeCues == null ? undefined : appendedDateRangeCues.cues) || {};
|
30908
|
+
var durationKnown = (appendedDateRangeCues == null ? undefined : appendedDateRangeCues.durationKnown) || false;
|
30909
30909
|
var endTime = MAX_CUE_ENDTIME;
|
30910
30910
|
var duration = dateRange.duration,
|
30911
30911
|
endDate = dateRange.endDate;
|
@@ -30984,8 +30984,8 @@
|
|
30984
30984
|
var LatencyController = /*#__PURE__*/function () {
|
30985
30985
|
function LatencyController(hls) {
|
30986
30986
|
var _this = this;
|
30987
|
-
this.hls =
|
30988
|
-
this.config =
|
30987
|
+
this.hls = undefined;
|
30988
|
+
this.config = undefined;
|
30989
30989
|
this.media = null;
|
30990
30990
|
this.currentTime = 0;
|
30991
30991
|
this.stallCount = 0;
|
@@ -31114,7 +31114,7 @@
|
|
31114
31114
|
if (config.liveMaxLatencyDuration !== undefined) {
|
31115
31115
|
return config.liveMaxLatencyDuration;
|
31116
31116
|
}
|
31117
|
-
var levelDetails = (_this$hls = this.hls) == null ?
|
31117
|
+
var levelDetails = (_this$hls = this.hls) == null ? undefined : _this$hls.latestLevelDetails;
|
31118
31118
|
return levelDetails ? config.liveMaxLatencyDurationCount * levelDetails.targetduration : 0;
|
31119
31119
|
}
|
31120
31120
|
}, {
|
@@ -31202,12 +31202,12 @@
|
|
31202
31202
|
_this._levels = [];
|
31203
31203
|
_this._firstLevel = -1;
|
31204
31204
|
_this._maxAutoLevel = -1;
|
31205
|
-
_this._startLevel =
|
31205
|
+
_this._startLevel = undefined;
|
31206
31206
|
_this.currentLevel = null;
|
31207
31207
|
_this.currentLevelIndex = -1;
|
31208
31208
|
_this.manualLevelIndex = -1;
|
31209
|
-
_this.steering =
|
31210
|
-
_this.onParsedComplete =
|
31209
|
+
_this.steering = undefined;
|
31210
|
+
_this.onParsedComplete = undefined;
|
31211
31211
|
_this.steering = contentSteeringController;
|
31212
31212
|
_this._registerListeners();
|
31213
31213
|
return _this;
|
@@ -31277,7 +31277,7 @@
|
|
31277
31277
|
// Returns empty and set to undefined for 'mp4a.40.34' with fallback to 'audio/mpeg' SourceBuffer
|
31278
31278
|
levelParsed.audioCodec = audioCodec = getCodecCompatibleName(audioCodec, preferManagedMediaSource) || undefined;
|
31279
31279
|
}
|
31280
|
-
if (((_videoCodec = videoCodec) == null ?
|
31280
|
+
if (((_videoCodec = videoCodec) == null ? undefined : _videoCodec.indexOf('avc1')) === 0) {
|
31281
31281
|
videoCodec = levelParsed.videoCodec = convertAVC1ToAVCOTI(videoCodec);
|
31282
31282
|
}
|
31283
31283
|
|
@@ -31448,7 +31448,7 @@
|
|
31448
31448
|
var bandwidthEstimate = this.hls.bandwidthEstimate;
|
31449
31449
|
this.log("manifest loaded, " + levels.length + " level(s) found, first bitrate: " + firstLevelBitrate);
|
31450
31450
|
// Update default bwe to first variant bitrate as long it has not been configured or set
|
31451
|
-
if (((_this$hls$userConfig = this.hls.userConfig) == null ?
|
31451
|
+
if (((_this$hls$userConfig = this.hls.userConfig) == null ? undefined : _this$hls$userConfig.abrEwmaDefaultEstimate) === undefined) {
|
31452
31452
|
var startingBwEstimate = Math.min(firstLevelBitrate, this.hls.config.abrEwmaDefaultEstimateMax);
|
31453
31453
|
if (startingBwEstimate > bandwidthEstimate && bandwidthEstimate === this.hls.abrEwmaDefaultEstimate) {
|
31454
31454
|
this.hls.bandwidthEstimate = startingBwEstimate;
|
@@ -31547,8 +31547,8 @@
|
|
31547
31547
|
var currentLevelIndex = this.currentLevelIndex;
|
31548
31548
|
var pathwayId = currentLevel.attrs['PATHWAY-ID'];
|
31549
31549
|
var details = currentLevel.details;
|
31550
|
-
var age = details == null ?
|
31551
|
-
this.log("Loading level index " + currentLevelIndex + ((hlsUrlParameters == null ?
|
31550
|
+
var age = details == null ? undefined : details.age;
|
31551
|
+
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);
|
31552
31552
|
this.hls.trigger(Events.LEVEL_LOADING, {
|
31553
31553
|
url: url,
|
31554
31554
|
level: currentLevelIndex,
|
@@ -31698,7 +31698,7 @@
|
|
31698
31698
|
var levelDetails = level.details;
|
31699
31699
|
if (!levelDetails || levelDetails.live) {
|
31700
31700
|
// level not retrieved yet, or live playlist we need to (re)load it
|
31701
|
-
var hlsUrlParameters = this.switchParams(level.uri, lastLevel == null ?
|
31701
|
+
var hlsUrlParameters = this.switchParams(level.uri, lastLevel == null ? undefined : lastLevel.details, levelDetails);
|
31702
31702
|
this.loadPlaylist(hlsUrlParameters);
|
31703
31703
|
}
|
31704
31704
|
}
|
@@ -31795,10 +31795,10 @@
|
|
31795
31795
|
function GapController(config, media, fragmentTracker, hls) {
|
31796
31796
|
var _this;
|
31797
31797
|
_this = _Logger.call(this, 'gap-controller', hls.logger) || this;
|
31798
|
-
_this.config =
|
31798
|
+
_this.config = undefined;
|
31799
31799
|
_this.media = null;
|
31800
|
-
_this.fragmentTracker =
|
31801
|
-
_this.hls =
|
31800
|
+
_this.fragmentTracker = undefined;
|
31801
|
+
_this.hls = undefined;
|
31802
31802
|
_this.nudgeRetry = 0;
|
31803
31803
|
_this.stallReported = false;
|
31804
31804
|
_this.stalled = null;
|
@@ -31925,7 +31925,7 @@
|
|
31925
31925
|
var stalledDuration = tnow - stalled;
|
31926
31926
|
if (!seeking && stalledDuration >= STALL_MINIMUM_DURATION_MS) {
|
31927
31927
|
// Dispatch MEDIA_ENDED when media.ended/ended event is not signalled at end of stream
|
31928
|
-
if (state === State.ENDED && !(levelDetails != null && levelDetails.live) && Math.abs(currentTime - ((levelDetails == null ?
|
31928
|
+
if (state === State.ENDED && !(levelDetails != null && levelDetails.live) && Math.abs(currentTime - ((levelDetails == null ? undefined : levelDetails.edge) || 0)) < 1) {
|
31929
31929
|
if (stalledDuration < 1000 || this.ended) {
|
31930
31930
|
return;
|
31931
31931
|
}
|
@@ -32142,7 +32142,7 @@
|
|
32142
32142
|
return false;
|
32143
32143
|
}
|
32144
32144
|
var mediaSource = getMediaSource();
|
32145
|
-
return typeof (mediaSource == null ?
|
32145
|
+
return typeof (mediaSource == null ? undefined : mediaSource.isTypeSupported) === 'function' && (['avc1.42E01E,mp4a.40.2', 'av01.0.01M.08', 'vp09.00.50.08'].some(function (codecsForVideoContainer) {
|
32146
32146
|
return mediaSource.isTypeSupported(mimeTypeForCodec(codecsForVideoContainer, 'video'));
|
32147
32147
|
}) || ['mp4a.40.2', 'fLaC'].some(function (codecForAudioContainer) {
|
32148
32148
|
return mediaSource.isTypeSupported(mimeTypeForCodec(codecForAudioContainer, 'audio'));
|
@@ -32151,7 +32151,7 @@
|
|
32151
32151
|
function changeTypeSupported() {
|
32152
32152
|
var _sourceBuffer$prototy;
|
32153
32153
|
var sourceBuffer = getSourceBuffer();
|
32154
|
-
return typeof (sourceBuffer == null ?
|
32154
|
+
return typeof (sourceBuffer == null ? undefined : (_sourceBuffer$prototy = sourceBuffer.prototype) == null ? undefined : _sourceBuffer$prototy.changeType) === 'function';
|
32155
32155
|
}
|
32156
32156
|
|
32157
32157
|
var TICK_INTERVAL = 100; // how often to tick in ms
|
@@ -32284,8 +32284,8 @@
|
|
32284
32284
|
{
|
32285
32285
|
var levels = this.levels,
|
32286
32286
|
level = this.level;
|
32287
|
-
var currentLevel = levels == null ?
|
32288
|
-
var details = currentLevel == null ?
|
32287
|
+
var currentLevel = levels == null ? undefined : levels[level];
|
32288
|
+
var details = currentLevel == null ? undefined : currentLevel.details;
|
32289
32289
|
if (details && (!details.live || this.levelLastLoaded === currentLevel && !this.waitForLive(currentLevel))) {
|
32290
32290
|
if (this.waitForCdnTuneIn(details)) {
|
32291
32291
|
break;
|
@@ -32307,7 +32307,7 @@
|
|
32307
32307
|
if (!retryDate || now >= retryDate || (_this$media = this.media) != null && _this$media.seeking) {
|
32308
32308
|
var _levels = this.levels,
|
32309
32309
|
_level = this.level;
|
32310
|
-
var _currentLevel = _levels == null ?
|
32310
|
+
var _currentLevel = _levels == null ? undefined : _levels[_level];
|
32311
32311
|
this.resetStartWhenNotLoaded(_currentLevel || null);
|
32312
32312
|
this.state = State.IDLE;
|
32313
32313
|
}
|
@@ -32582,7 +32582,7 @@
|
|
32582
32582
|
if (gapController.ended) {
|
32583
32583
|
return;
|
32584
32584
|
}
|
32585
|
-
gapController.ended = ((_this$media2 = this.media) == null ?
|
32585
|
+
gapController.ended = ((_this$media2 = this.media) == null ? undefined : _this$media2.currentTime) || 1;
|
32586
32586
|
}
|
32587
32587
|
this.hls.trigger(Events.MEDIA_ENDED, {
|
32588
32588
|
stalled: false
|
@@ -32653,7 +32653,7 @@
|
|
32653
32653
|
if (newDetails.deltaUpdateFailed) {
|
32654
32654
|
return;
|
32655
32655
|
}
|
32656
|
-
sliding = this.alignPlaylists(newDetails, curLevel.details, (_this$levelLastLoaded = this.levelLastLoaded) == null ?
|
32656
|
+
sliding = this.alignPlaylists(newDetails, curLevel.details, (_this$levelLastLoaded = this.levelLastLoaded) == null ? undefined : _this$levelLastLoaded.details);
|
32657
32657
|
}
|
32658
32658
|
// override level info
|
32659
32659
|
curLevel.details = newDetails;
|
@@ -32733,7 +32733,7 @@
|
|
32733
32733
|
|
32734
32734
|
// time Offset is accurate if level PTS is known, or if playlist is not sliding (not live)
|
32735
32735
|
var accurateTimeOffset = details.PTSKnown || !details.live;
|
32736
|
-
var initSegmentData = (_frag$initSegment = frag.initSegment) == null ?
|
32736
|
+
var initSegmentData = (_frag$initSegment = frag.initSegment) == null ? undefined : _frag$initSegment.data;
|
32737
32737
|
var audioCodec = this._getAudioCodec(currentLevel);
|
32738
32738
|
|
32739
32739
|
// transmux the MPEG-TS data to ISO-BMFF segments
|
@@ -32778,7 +32778,7 @@
|
|
32778
32778
|
this.fragmentTracker.removeAllFragments();
|
32779
32779
|
hls.once(Events.BUFFER_FLUSHED, function () {
|
32780
32780
|
var _this2$hls;
|
32781
|
-
(_this2$hls = _this2.hls) == null ?
|
32781
|
+
(_this2$hls = _this2.hls) == null ? undefined : _this2$hls.trigger(Events.AUDIO_TRACK_SWITCHED, data);
|
32782
32782
|
});
|
32783
32783
|
hls.trigger(Events.BUFFER_FLUSHING, {
|
32784
32784
|
startOffset: 0,
|
@@ -32886,7 +32886,7 @@
|
|
32886
32886
|
case ErrorDetails.LEVEL_LOAD_TIMEOUT:
|
32887
32887
|
case ErrorDetails.LEVEL_PARSING_ERROR:
|
32888
32888
|
// in case of non fatal error while loading level, if level controller is not retrying to load level, switch back to IDLE
|
32889
|
-
if (!data.levelRetry && this.state === State.WAITING_LEVEL && ((_data$context = data.context) == null ?
|
32889
|
+
if (!data.levelRetry && this.state === State.WAITING_LEVEL && ((_data$context = data.context) == null ? undefined : _data$context.type) === PlaylistContextType.LEVEL) {
|
32890
32890
|
this.state = State.IDLE;
|
32891
32891
|
}
|
32892
32892
|
break;
|
@@ -32980,13 +32980,13 @@
|
|
32980
32980
|
var details = this.getLevelDetails();
|
32981
32981
|
var configuredTimelineOffset = this.config.timelineOffset;
|
32982
32982
|
if (configuredTimelineOffset && startPosition) {
|
32983
|
-
startPosition += (details == null ?
|
32983
|
+
startPosition += (details == null ? undefined : details.appliedTimelineOffset) || configuredTimelineOffset;
|
32984
32984
|
}
|
32985
32985
|
var buffered = BufferHelper.getBuffered(media);
|
32986
32986
|
var bufferStart = buffered.length ? buffered.start(0) : 0;
|
32987
32987
|
var delta = bufferStart - startPosition;
|
32988
32988
|
var skipTolerance = Math.max(this.config.maxBufferHole, this.config.maxFragLookUpTolerance);
|
32989
|
-
if (delta > 0 && (delta < skipTolerance || this.loadingParts && delta < 2 * ((details == null ?
|
32989
|
+
if (delta > 0 && (delta < skipTolerance || this.loadingParts && delta < 2 * ((details == null ? undefined : details.partTarget) || 0))) {
|
32990
32990
|
this.log("adjusting start position by " + delta + " to match buffer start");
|
32991
32991
|
startPosition += delta;
|
32992
32992
|
this.startPosition = startPosition;
|
@@ -33014,7 +33014,7 @@
|
|
33014
33014
|
fragment.bitrateTest = true;
|
33015
33015
|
this._doFragLoad(fragment, level).then(function (data) {
|
33016
33016
|
var hls = _this3.hls;
|
33017
|
-
var frag = data == null ?
|
33017
|
+
var frag = data == null ? undefined : data.frag;
|
33018
33018
|
if (!frag || _this3.fragContextChanged(frag)) {
|
33019
33019
|
return;
|
33020
33020
|
}
|
@@ -33233,7 +33233,7 @@
|
|
33233
33233
|
video.levelCodec = currentLevel.videoCodec;
|
33234
33234
|
video.id = 'main';
|
33235
33235
|
var parsedVideoCodec = video.codec;
|
33236
|
-
if ((parsedVideoCodec == null ?
|
33236
|
+
if ((parsedVideoCodec == null ? undefined : parsedVideoCodec.length) === 4) {
|
33237
33237
|
// Make up for passthrough-remuxer not being able to parse full codec
|
33238
33238
|
// (logger warning "Unhandled video codec...")
|
33239
33239
|
switch (parsedVideoCodec) {
|
@@ -33347,7 +33347,7 @@
|
|
33347
33347
|
get: function get() {
|
33348
33348
|
var levels = this.levels,
|
33349
33349
|
level = this.level;
|
33350
|
-
var levelInfo = levels == null ?
|
33350
|
+
var levelInfo = levels == null ? undefined : levels[level];
|
33351
33351
|
if (!levelInfo) {
|
33352
33352
|
return this.config.maxBufferLength;
|
33353
33353
|
}
|
@@ -33369,7 +33369,7 @@
|
|
33369
33369
|
if (this.fragPlaying) {
|
33370
33370
|
return this.fragPlaying;
|
33371
33371
|
}
|
33372
|
-
var currentTime = ((_this$media3 = this.media) == null ?
|
33372
|
+
var currentTime = ((_this$media3 = this.media) == null ? undefined : _this$media3.currentTime) || this.lastCurrentTime;
|
33373
33373
|
if (isFiniteNumber(currentTime)) {
|
33374
33374
|
return this.getAppendedFrag(currentTime);
|
33375
33375
|
}
|
@@ -33379,7 +33379,7 @@
|
|
33379
33379
|
key: "currentProgramDateTime",
|
33380
33380
|
get: function get() {
|
33381
33381
|
var _this$media4;
|
33382
|
-
var currentTime = ((_this$media4 = this.media) == null ?
|
33382
|
+
var currentTime = ((_this$media4 = this.media) == null ? undefined : _this$media4.currentTime) || this.lastCurrentTime;
|
33383
33383
|
if (isFiniteNumber(currentTime)) {
|
33384
33384
|
var details = this.getLevelDetails();
|
33385
33385
|
var frag = this.currentFrag || (details ? findFragmentByPTS(null, details.fragments, currentTime) : null);
|
@@ -33421,7 +33421,7 @@
|
|
33421
33421
|
|
33422
33422
|
var KeyLoader = /*#__PURE__*/function () {
|
33423
33423
|
function KeyLoader(config) {
|
33424
|
-
this.config =
|
33424
|
+
this.config = undefined;
|
33425
33425
|
this.keyUriToKeyInfo = {};
|
33426
33426
|
this.emeController = null;
|
33427
33427
|
this.config = config;
|
@@ -33432,7 +33432,7 @@
|
|
33432
33432
|
var loader = this.keyUriToKeyInfo[uri].loader;
|
33433
33433
|
if (loader) {
|
33434
33434
|
var _loader$context;
|
33435
|
-
if (type && type !== ((_loader$context = loader.context) == null ?
|
33435
|
+
if (type && type !== ((_loader$context = loader.context) == null ? undefined : _loader$context.frag.type)) {
|
33436
33436
|
return;
|
33437
33437
|
}
|
33438
33438
|
loader.abort();
|
@@ -33459,7 +33459,7 @@
|
|
33459
33459
|
this.keyUriToKeyInfo = {};
|
33460
33460
|
};
|
33461
33461
|
_proto.createKeyLoadError = function createKeyLoadError(frag, details, error, networkDetails, response) {
|
33462
|
-
if (details ===
|
33462
|
+
if (details === undefined) {
|
33463
33463
|
details = ErrorDetails.KEY_LOAD_ERROR;
|
33464
33464
|
}
|
33465
33465
|
return new LoadError({
|
@@ -33527,7 +33527,7 @@
|
|
33527
33527
|
// Return key load promise as long as it does not have a mediakey session with an unusable key status
|
33528
33528
|
if ((_keyInfo2 = keyInfo) != null && _keyInfo2.keyLoadPromise) {
|
33529
33529
|
var _keyInfo$mediaKeySess;
|
33530
|
-
switch ((_keyInfo$mediaKeySess = keyInfo.mediaKeySessionContext) == null ?
|
33530
|
+
switch ((_keyInfo$mediaKeySess = keyInfo.mediaKeySessionContext) == null ? undefined : _keyInfo$mediaKeySess.keyStatus) {
|
33531
33531
|
case undefined:
|
33532
33532
|
case 'status-pending':
|
33533
33533
|
case 'usable':
|
@@ -33692,7 +33692,7 @@
|
|
33692
33692
|
}
|
33693
33693
|
var PlaylistLoader = /*#__PURE__*/function () {
|
33694
33694
|
function PlaylistLoader(hls) {
|
33695
|
-
this.hls =
|
33695
|
+
this.hls = undefined;
|
33696
33696
|
this.loaders = Object.create(null);
|
33697
33697
|
this.variableList = null;
|
33698
33698
|
this.onManifestLoaded = this.checkAutostartLoad;
|
@@ -33877,7 +33877,7 @@
|
|
33877
33877
|
|
33878
33878
|
// Override level/track timeout for LL-HLS requests
|
33879
33879
|
// (the default of 10000ms is counter productive to blocking playlist reload requests)
|
33880
|
-
if (isFiniteNumber((_context$deliveryDire = context.deliveryDirectives) == null ?
|
33880
|
+
if (isFiniteNumber((_context$deliveryDire = context.deliveryDirectives) == null ? undefined : _context$deliveryDire.part)) {
|
33881
33881
|
var levelDetails;
|
33882
33882
|
if (context.type === PlaylistContextType.LEVEL && context.level !== null) {
|
33883
33883
|
levelDetails = this.hls.levels[context.level].details;
|
@@ -33968,7 +33968,7 @@
|
|
33968
33968
|
this.variableList = variableList;
|
33969
33969
|
var _M3U8Parser$parseMast = M3U8Parser.parseMasterPlaylistMedia(string, url, parsedResult),
|
33970
33970
|
_M3U8Parser$parseMast2 = _M3U8Parser$parseMast.AUDIO,
|
33971
|
-
audioTracks = _M3U8Parser$parseMast2 ===
|
33971
|
+
audioTracks = _M3U8Parser$parseMast2 === undefined ? [] : _M3U8Parser$parseMast2,
|
33972
33972
|
subtitles = _M3U8Parser$parseMast.SUBTITLES,
|
33973
33973
|
captions = _M3U8Parser$parseMast['CLOSED-CAPTIONS'];
|
33974
33974
|
if (audioTracks.length) {
|
@@ -34072,7 +34072,7 @@
|
|
34072
34072
|
});
|
34073
34073
|
};
|
34074
34074
|
_proto.handleNetworkError = function handleNetworkError(context, networkDetails, timeout, response, stats) {
|
34075
|
-
if (timeout ===
|
34075
|
+
if (timeout === undefined) {
|
34076
34076
|
timeout = false;
|
34077
34077
|
}
|
34078
34078
|
var message = "A network " + (timeout ? 'timeout' : 'error' + (response ? ' (status ' + response.code + ')' : '')) + " occurred while loading " + context.type;
|
@@ -34119,7 +34119,7 @@
|
|
34119
34119
|
stats: stats
|
34120
34120
|
};
|
34121
34121
|
if (response) {
|
34122
|
-
var url = (networkDetails == null ?
|
34122
|
+
var url = (networkDetails == null ? undefined : networkDetails.url) || context.url;
|
34123
34123
|
errorData.response = _objectSpread2({
|
34124
34124
|
url: url,
|
34125
34125
|
data: undefined
|
@@ -34235,41 +34235,41 @@
|
|
34235
34235
|
* @param userConfig - Configuration options applied over `Hls.DefaultConfig`
|
34236
34236
|
*/
|
34237
34237
|
function Hls(userConfig) {
|
34238
|
-
if (userConfig ===
|
34238
|
+
if (userConfig === undefined) {
|
34239
34239
|
userConfig = {};
|
34240
34240
|
}
|
34241
34241
|
/**
|
34242
34242
|
* The runtime configuration used by the player. At instantiation this is combination of `hls.userConfig` merged over `Hls.DefaultConfig`.
|
34243
34243
|
*/
|
34244
|
-
this.config =
|
34244
|
+
this.config = undefined;
|
34245
34245
|
/**
|
34246
34246
|
* The configuration object provided on player instantiation.
|
34247
34247
|
*/
|
34248
|
-
this.userConfig =
|
34248
|
+
this.userConfig = undefined;
|
34249
34249
|
/**
|
34250
34250
|
* The logger functions used by this player instance, configured on player instantiation.
|
34251
34251
|
*/
|
34252
|
-
this.logger =
|
34253
|
-
this.coreComponents =
|
34254
|
-
this.networkControllers =
|
34252
|
+
this.logger = undefined;
|
34253
|
+
this.coreComponents = undefined;
|
34254
|
+
this.networkControllers = undefined;
|
34255
34255
|
this._emitter = new EventEmitter();
|
34256
34256
|
this._autoLevelCapping = -1;
|
34257
34257
|
this._maxHdcpLevel = null;
|
34258
|
-
this.abrController =
|
34259
|
-
this.bufferController =
|
34260
|
-
this.capLevelController =
|
34261
|
-
this.latencyController =
|
34262
|
-
this.levelController =
|
34263
|
-
this.streamController =
|
34264
|
-
this.audioTrackController =
|
34265
|
-
this.subtitleTrackController =
|
34266
|
-
this.interstitialsController =
|
34267
|
-
this.emeController =
|
34268
|
-
this.cmcdController =
|
34258
|
+
this.abrController = undefined;
|
34259
|
+
this.bufferController = undefined;
|
34260
|
+
this.capLevelController = undefined;
|
34261
|
+
this.latencyController = undefined;
|
34262
|
+
this.levelController = undefined;
|
34263
|
+
this.streamController = undefined;
|
34264
|
+
this.audioTrackController = undefined;
|
34265
|
+
this.subtitleTrackController = undefined;
|
34266
|
+
this.interstitialsController = undefined;
|
34267
|
+
this.emeController = undefined;
|
34268
|
+
this.cmcdController = undefined;
|
34269
34269
|
this._media = null;
|
34270
34270
|
this._url = null;
|
34271
|
-
this._sessionId =
|
34272
|
-
this.triggeringException =
|
34271
|
+
this._sessionId = undefined;
|
34272
|
+
this.triggeringException = undefined;
|
34273
34273
|
this.started = false;
|
34274
34274
|
var logger = this.logger = enableLogs(userConfig.debug || false, 'Hls instance', userConfig.assetPlayerId);
|
34275
34275
|
var config = this.config = mergeConfig(Hls.DefaultConfig, userConfig, logger);
|
@@ -34377,13 +34377,13 @@
|
|
34377
34377
|
// Delegate the EventEmitter through the public API of Hls.js
|
34378
34378
|
;
|
34379
34379
|
_proto.on = function on(event, listener, context) {
|
34380
|
-
if (context ===
|
34380
|
+
if (context === undefined) {
|
34381
34381
|
context = this;
|
34382
34382
|
}
|
34383
34383
|
this._emitter.on(event, listener, context);
|
34384
34384
|
};
|
34385
34385
|
_proto.once = function once(event, listener, context) {
|
34386
|
-
if (context ===
|
34386
|
+
if (context === undefined) {
|
34387
34387
|
context = this;
|
34388
34388
|
}
|
34389
34389
|
this._emitter.once(event, listener, context);
|
@@ -34392,7 +34392,7 @@
|
|
34392
34392
|
this._emitter.removeAllListeners(event);
|
34393
34393
|
};
|
34394
34394
|
_proto.off = function off(event, listener, context, once) {
|
34395
|
-
if (context ===
|
34395
|
+
if (context === undefined) {
|
34396
34396
|
context = this;
|
34397
34397
|
}
|
34398
34398
|
this._emitter.off(event, listener, context, once);
|
@@ -34541,7 +34541,7 @@
|
|
34541
34541
|
* Defaults to -1 (None: starts from earliest point)
|
34542
34542
|
*/
|
34543
34543
|
_proto.startLoad = function startLoad(startPosition, skipSeekToStartPosition) {
|
34544
|
-
if (startPosition ===
|
34544
|
+
if (startPosition === undefined) {
|
34545
34545
|
startPosition = -1;
|
34546
34546
|
}
|
34547
34547
|
this.logger.log("startLoad(" + (startPosition + (skipSeekToStartPosition ? ', <skip seek to start>' : '')) + ")");
|
@@ -34618,7 +34618,7 @@
|
|
34618
34618
|
_proto.recoverMediaError = function recoverMediaError() {
|
34619
34619
|
this.logger.log('recoverMediaError');
|
34620
34620
|
var media = this._media;
|
34621
|
-
var time = media == null ?
|
34621
|
+
var time = media == null ? undefined : media.currentTime;
|
34622
34622
|
this.detachMedia();
|
34623
34623
|
if (media) {
|
34624
34624
|
this.attachMedia(media);
|
@@ -34640,7 +34640,7 @@
|
|
34640
34640
|
*/
|
34641
34641
|
_proto.setAudioOption = function setAudioOption(audioOption) {
|
34642
34642
|
var _this$audioTrackContr;
|
34643
|
-
return ((_this$audioTrackContr = this.audioTrackController) == null ?
|
34643
|
+
return ((_this$audioTrackContr = this.audioTrackController) == null ? undefined : _this$audioTrackContr.setAudioOption(audioOption)) || null;
|
34644
34644
|
}
|
34645
34645
|
/**
|
34646
34646
|
* Find and select the best matching subtitle track, making a level switch when a Group change is necessary.
|
@@ -34648,7 +34648,7 @@
|
|
34648
34648
|
*/;
|
34649
34649
|
_proto.setSubtitleOption = function setSubtitleOption(subtitleOption) {
|
34650
34650
|
var _this$subtitleTrackCo;
|
34651
|
-
return ((_this$subtitleTrackCo = this.subtitleTrackController) == null ?
|
34651
|
+
return ((_this$subtitleTrackCo = this.subtitleTrackController) == null ? undefined : _this$subtitleTrackCo.setSubtitleOption(subtitleOption)) || null;
|
34652
34652
|
}
|
34653
34653
|
|
34654
34654
|
/**
|
@@ -34658,7 +34658,7 @@
|
|
34658
34658
|
* returns mediaCapabilities.decodingInfo for a variant/rendition
|
34659
34659
|
*/
|
34660
34660
|
_proto.getMediaDecodingInfo = function getMediaDecodingInfo(level, audioTracks) {
|
34661
|
-
if (audioTracks ===
|
34661
|
+
if (audioTracks === undefined) {
|
34662
34662
|
audioTracks = this.allAudioTracks;
|
34663
34663
|
}
|
34664
34664
|
var audioTracksByGroup = getAudioTracksByGroup(audioTracks);
|
@@ -35261,7 +35261,7 @@
|
|
35261
35261
|
key: "interstitialsManager",
|
35262
35262
|
get: function get() {
|
35263
35263
|
var _this$interstitialsCo;
|
35264
|
-
return ((_this$interstitialsCo = this.interstitialsController) == null ?
|
35264
|
+
return ((_this$interstitialsCo = this.interstitialsController) == null ? undefined : _this$interstitialsCo.interstitialsManager) || null;
|
35265
35265
|
}
|
35266
35266
|
}], [{
|
35267
35267
|
key: "version",
|
@@ -35313,7 +35313,7 @@
|
|
35313
35313
|
}
|
35314
35314
|
}]);
|
35315
35315
|
}();
|
35316
|
-
Hls.defaultConfig =
|
35316
|
+
Hls.defaultConfig = undefined;
|
35317
35317
|
|
35318
35318
|
return Hls;
|
35319
35319
|
|