@volcengine/veplayer-plugin 2.12.0-rc.0 → 2.12.0-rc.2
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/esm/index.development.js +537 -246
- package/esm/index.production.js +3 -3
- package/esm/veplayer.plugin.abr.development.js +3 -1
- package/esm/veplayer.plugin.abr.production.js +1 -1
- package/esm/veplayer.plugin.ad.development.js +18 -4
- package/esm/veplayer.plugin.ad.production.js +2 -2
- package/esm/veplayer.plugin.drm.development.js +3 -1
- package/esm/veplayer.plugin.drm.production.js +1 -1
- package/esm/veplayer.plugin.flv.development.js +5 -3
- package/esm/veplayer.plugin.flv.production.js +1 -1
- package/esm/veplayer.plugin.hls.development.js +64 -14
- package/esm/veplayer.plugin.hls.production.js +1 -1
- package/esm/veplayer.plugin.hlsjs.development.js +3 -1
- package/esm/veplayer.plugin.hlsjs.production.js +1 -1
- package/esm/veplayer.plugin.mp4.development.js +9 -3
- package/esm/veplayer.plugin.mp4.production.js +1 -1
- package/esm/veplayer.plugin.rtm.development.js +293 -151
- package/esm/veplayer.plugin.rtm.production.js +1 -1
- package/esm/veplayer.plugin.shaka.development.js +8 -2
- package/esm/veplayer.plugin.shaka.production.js +2 -2
- package/esm/veplayer.strategy.base.development.js +163 -78
- package/esm/veplayer.strategy.base.production.js +1 -1
- package/package.json +1 -1
- package/umd/veplayer.plugin.abr.development.js +3 -1
- package/umd/veplayer.plugin.abr.production.js +1 -1
- package/umd/veplayer.plugin.ad.development.js +18 -4
- package/umd/veplayer.plugin.ad.production.js +1 -1
- package/umd/veplayer.plugin.drm.development.js +3 -1
- package/umd/veplayer.plugin.drm.production.js +1 -1
- package/umd/veplayer.plugin.flv.development.js +5 -3
- package/umd/veplayer.plugin.flv.production.js +1 -1
- package/umd/veplayer.plugin.hls.development.js +64 -14
- package/umd/veplayer.plugin.hls.production.js +1 -1
- package/umd/veplayer.plugin.hlsjs.development.js +3 -1
- package/umd/veplayer.plugin.hlsjs.production.js +1 -1
- package/umd/veplayer.plugin.mp4.development.js +9 -3
- package/umd/veplayer.plugin.mp4.production.js +1 -1
- package/umd/veplayer.plugin.rtm.development.js +293 -151
- package/umd/veplayer.plugin.rtm.production.js +1 -1
- package/umd/veplayer.plugin.shaka.development.js +8 -2
- package/umd/veplayer.plugin.shaka.production.js +1 -1
- package/umd/veplayer.strategy.base.development.js +163 -78
- package/umd/veplayer.strategy.base.production.js +1 -1
package/esm/index.development.js
CHANGED
|
@@ -1579,6 +1579,8 @@ var sniffer$1 = {
|
|
|
1579
1579
|
var ua2 = navigator.userAgent;
|
|
1580
1580
|
var isWindowsPhone = /(?:Windows Phone)/.test(ua2);
|
|
1581
1581
|
var isSymbian = /(?:SymbianOS)/.test(ua2) || isWindowsPhone;
|
|
1582
|
+
var isTizen = /(?:Tizen)/ig.test(ua2);
|
|
1583
|
+
var isWebOS = /(?:Web0S)/ig.test(ua2);
|
|
1582
1584
|
var isAndroid2 = /(?:Android)/.test(ua2);
|
|
1583
1585
|
var isFireFox = /(?:Firefox)/.test(ua2);
|
|
1584
1586
|
var isIpad = /(?:iPad|PlayBook)/.test(ua2) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
|
|
@@ -1594,7 +1596,9 @@ var sniffer$1 = {
|
|
|
1594
1596
|
isPc,
|
|
1595
1597
|
isSymbian,
|
|
1596
1598
|
isWindowsPhone,
|
|
1597
|
-
isFireFox
|
|
1599
|
+
isFireFox,
|
|
1600
|
+
isTizen,
|
|
1601
|
+
isWebOS
|
|
1598
1602
|
};
|
|
1599
1603
|
},
|
|
1600
1604
|
get osVersion() {
|
|
@@ -1695,7 +1699,7 @@ var sniffer$1 = {
|
|
|
1695
1699
|
}
|
|
1696
1700
|
}
|
|
1697
1701
|
};
|
|
1698
|
-
var version$6 = "3.0.
|
|
1702
|
+
var version$6 = "3.0.24-rc.6";
|
|
1699
1703
|
var ERROR_MAP = {
|
|
1700
1704
|
1: 5101,
|
|
1701
1705
|
2: 5102,
|
|
@@ -1813,7 +1817,7 @@ function hook$1(hookName, handler) {
|
|
|
1813
1817
|
}
|
|
1814
1818
|
if (this.__hooks && this.__hooks[hookName]) {
|
|
1815
1819
|
try {
|
|
1816
|
-
var preRet = runHooks$1(this, hookName, handler);
|
|
1820
|
+
var preRet = runHooks$1.apply(void 0, [this, hookName, handler].concat(Array.prototype.slice.call(arguments)));
|
|
1817
1821
|
if (preRet) {
|
|
1818
1822
|
if (preRet.then) {
|
|
1819
1823
|
preRet.then(function(isContinue) {
|
|
@@ -1927,6 +1931,8 @@ function runHooks$1(obj, hookName, handler) {
|
|
|
1927
1931
|
});
|
|
1928
1932
|
} else if (ret !== false) {
|
|
1929
1933
|
return runHooksRecursive2.apply(void 0, [obj2, hookName2, handler2].concat(args2));
|
|
1934
|
+
} else if (ret === false) {
|
|
1935
|
+
return false;
|
|
1930
1936
|
}
|
|
1931
1937
|
};
|
|
1932
1938
|
return runHooksRecursive.apply(void 0, [obj, hookName, handler].concat(args));
|
|
@@ -12933,7 +12939,7 @@ var Flv = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
12933
12939
|
_createClass$p(Flv2, [{
|
|
12934
12940
|
key: "version",
|
|
12935
12941
|
get: function get4() {
|
|
12936
|
-
return "3.0.
|
|
12942
|
+
return "3.0.24-rc.6";
|
|
12937
12943
|
}
|
|
12938
12944
|
}, {
|
|
12939
12945
|
key: "isLive",
|
|
@@ -31247,9 +31253,9 @@ lib$1.parsePayloads = parser.parsePayloads;
|
|
|
31247
31253
|
lib$1.parseRemoteCandidates = parser.parseRemoteCandidates;
|
|
31248
31254
|
lib$1.parseImageAttributes = parser.parseImageAttributes;
|
|
31249
31255
|
lib$1.parseSimulcastStreamList = parser.parseSimulcastStreamList;
|
|
31250
|
-
var _excluded$5 = ["adaptiveJitterBuffer"];
|
|
31256
|
+
var _excluded$5 = ["adaptiveJitterBuffer", "standardizeKillSwitch"];
|
|
31251
31257
|
function getOption(options) {
|
|
31252
|
-
var _ref6 = options || {}, _ref$adaptiveJitterBu = _ref6.adaptiveJitterBuffer, adaptiveJitterBuffer = _ref$adaptiveJitterBu === void 0 ? {} : _ref$adaptiveJitterBu, opts = _objectWithoutProperties$5(_ref6, _excluded$5);
|
|
31258
|
+
var _ref6 = options || {}, _ref$adaptiveJitterBu = _ref6.adaptiveJitterBuffer, adaptiveJitterBuffer = _ref$adaptiveJitterBu === void 0 ? {} : _ref$adaptiveJitterBu, _ref$standardizeKillS = _ref6.standardizeKillSwitch, standardizeKillSwitch = _ref$standardizeKillS === void 0 ? {} : _ref$standardizeKillS, opts = _objectWithoutProperties$5(_ref6, _excluded$5);
|
|
31253
31259
|
return _objectSpread2$b({
|
|
31254
31260
|
retryCount: 0,
|
|
31255
31261
|
retryDelay: 1e3,
|
|
@@ -31320,7 +31326,12 @@ function getOption(options) {
|
|
|
31320
31326
|
5: {
|
|
31321
31327
|
jitterBuffer: 3
|
|
31322
31328
|
}
|
|
31323
|
-
}
|
|
31329
|
+
},
|
|
31330
|
+
standardizeKillSwitch: _objectSpread2$b({
|
|
31331
|
+
sld_fmtp_opus: true,
|
|
31332
|
+
sld_rtcpfb_opus_nack: true,
|
|
31333
|
+
sld_fmtp_sps_pps: true
|
|
31334
|
+
}, standardizeKillSwitch)
|
|
31324
31335
|
}, opts);
|
|
31325
31336
|
}
|
|
31326
31337
|
function _getStats(stats) {
|
|
@@ -31662,7 +31673,7 @@ function getCapacity() {
|
|
|
31662
31673
|
});
|
|
31663
31674
|
}
|
|
31664
31675
|
var isEncodedTransformSupported = function isEncodedTransformSupported2() {
|
|
31665
|
-
return typeof TransformStream !== "undefined" && typeof RTCRtpSender !== "undefined" && typeof RTCRtpReceiver !== "undefined" && typeof RTCRtpScriptTransform !== "undefined" && "transform" in RTCRtpSender.prototype && "transform" in RTCRtpReceiver.prototype && isWorkerSupported() && isMessageChannelSupported();
|
|
31676
|
+
return typeof window.TransformStream !== "undefined" && typeof window.RTCRtpSender !== "undefined" && typeof window.RTCRtpReceiver !== "undefined" && typeof window.RTCRtpScriptTransform !== "undefined" && "transform" in window.RTCRtpSender.prototype && "transform" in window.RTCRtpReceiver.prototype && isWorkerSupported() && isMessageChannelSupported();
|
|
31666
31677
|
};
|
|
31667
31678
|
var isWorkerSupported = function isWorkerSupported2() {
|
|
31668
31679
|
return typeof window !== "undefined" && window.Worker;
|
|
@@ -31671,7 +31682,7 @@ var isMessageChannelSupported = function isMessageChannelSupported2() {
|
|
|
31671
31682
|
return typeof MessageChannel !== "undefined";
|
|
31672
31683
|
};
|
|
31673
31684
|
var isLegacyEncodedTransformSupported = function isLegacyEncodedTransformSupported2() {
|
|
31674
|
-
return typeof TransformStream !== "undefined" && typeof RTCRtpSender !== "undefined" && typeof RTCRtpReceiver !== "undefined" && typeof RTCRtpSender.prototype.createEncodedStreams !== "undefined" && typeof RTCRtpReceiver.prototype.createEncodedStreams !== "undefined";
|
|
31685
|
+
return typeof window.TransformStream !== "undefined" && typeof window.RTCRtpSender !== "undefined" && typeof window.RTCRtpReceiver !== "undefined" && typeof window.RTCRtpSender.prototype.createEncodedStreams !== "undefined" && typeof window.RTCRtpReceiver.prototype.createEncodedStreams !== "undefined";
|
|
31675
31686
|
};
|
|
31676
31687
|
var Nalunit = {
|
|
31677
31688
|
getNALUnits: function getNALUnits(buffer2) {
|
|
@@ -32849,6 +32860,8 @@ function _getRecvVideoStats() {
|
|
|
32849
32860
|
currentStats.firCount = stat.firCount;
|
|
32850
32861
|
currentStats.nackCount = stat.nackCount;
|
|
32851
32862
|
currentStats.pliCount = stat.pliCount;
|
|
32863
|
+
currentStats.fecPacketsReceived = stat.fecPacketsReceived;
|
|
32864
|
+
currentStats.fecSsrc = stat.fecSsrc;
|
|
32852
32865
|
if (stat.jitterBufferDelay !== void 0) {
|
|
32853
32866
|
currentStats.jitterBufferEmittedCount = stat.jitterBufferEmittedCount;
|
|
32854
32867
|
currentStats.jitterBufferDelay = stat.jitterBufferDelay;
|
|
@@ -32913,12 +32926,14 @@ function diffRecvVideoStats(oldStats, newStats) {
|
|
|
32913
32926
|
nackCount,
|
|
32914
32927
|
pliCount: diffNumber(oldStats, newStats, "pliCount"),
|
|
32915
32928
|
e2eDelay: Math.round((newStats.rtt || 0) + jitterBufferDelay),
|
|
32916
|
-
retransmittedRate: +(nackCount / (packetsReceived + packetsLostDiff)).toFixed(2)
|
|
32929
|
+
retransmittedRate: +(nackCount / (packetsReceived + packetsLostDiff)).toFixed(2),
|
|
32930
|
+
fecPacketsReceived: diffNumber(oldStats, newStats, "fecPacketsReceived"),
|
|
32931
|
+
fecSsrc: newStats.fecSsrc
|
|
32917
32932
|
};
|
|
32918
32933
|
}
|
|
32919
32934
|
function diffNumber(oldValue, newValue, key2) {
|
|
32920
|
-
var oldV = Number.
|
|
32921
|
-
var newV = Number.
|
|
32935
|
+
var oldV = !Number.isFinite(oldValue[key2]) ? 0 : +oldValue[key2];
|
|
32936
|
+
var newV = !Number.isFinite(newValue[key2]) ? 0 : +newValue[key2];
|
|
32922
32937
|
return Math.max(0, newV - oldV);
|
|
32923
32938
|
}
|
|
32924
32939
|
var QoELevel = {
|
|
@@ -33049,6 +33064,63 @@ var NetworkQuality = /* @__PURE__ */ function() {
|
|
|
33049
33064
|
}]);
|
|
33050
33065
|
return NetworkQuality2;
|
|
33051
33066
|
}();
|
|
33067
|
+
var gpuInfo;
|
|
33068
|
+
function getGpuInfo() {
|
|
33069
|
+
if (!gpuInfo) {
|
|
33070
|
+
gpuInfo = _getGpuInfo();
|
|
33071
|
+
}
|
|
33072
|
+
return gpuInfo;
|
|
33073
|
+
}
|
|
33074
|
+
function _getGpuInfo() {
|
|
33075
|
+
var canvas = document.createElement("canvas");
|
|
33076
|
+
var gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");
|
|
33077
|
+
if (!gl) {
|
|
33078
|
+
return {
|
|
33079
|
+
renderer: "unknown(WebGLRenderingContext not existed)",
|
|
33080
|
+
vendor: "unknown(WebGLRenderingContext not existed)"
|
|
33081
|
+
};
|
|
33082
|
+
}
|
|
33083
|
+
var info = gl.getExtension("WEBGL_debug_renderer_info");
|
|
33084
|
+
if (!info) {
|
|
33085
|
+
return {
|
|
33086
|
+
renderer: "unknown(info not existed)",
|
|
33087
|
+
vendor: "unknown(info not existed)"
|
|
33088
|
+
};
|
|
33089
|
+
}
|
|
33090
|
+
var renderer = gl.getParameter(info.UNMASKED_RENDERER_WEBGL);
|
|
33091
|
+
var vendor = gl.getParameter(info.UNMASKED_VENDOR_WEBGL);
|
|
33092
|
+
if (canvas && canvas.parentNode) {
|
|
33093
|
+
canvas.parentNode.removeChild(canvas);
|
|
33094
|
+
}
|
|
33095
|
+
canvas = void 0;
|
|
33096
|
+
gl = void 0;
|
|
33097
|
+
return {
|
|
33098
|
+
renderer,
|
|
33099
|
+
vendor
|
|
33100
|
+
};
|
|
33101
|
+
}
|
|
33102
|
+
function extractProfileInfo(sdpFmtpLine) {
|
|
33103
|
+
var profileLevelId = "";
|
|
33104
|
+
if (!sdpFmtpLine) {
|
|
33105
|
+
return profileLevelId;
|
|
33106
|
+
}
|
|
33107
|
+
var paramArray = sdpFmtpLine.split(";");
|
|
33108
|
+
var _iterator = _createForOfIteratorHelper$4(paramArray), _step;
|
|
33109
|
+
try {
|
|
33110
|
+
for (_iterator.s(); !(_step = _iterator.n()).done; ) {
|
|
33111
|
+
var param = _step.value;
|
|
33112
|
+
var _param$trim$split = param.trim().split("="), _param$trim$split2 = _slicedToArray$7(_param$trim$split, 2), key2 = _param$trim$split2[0], value2 = _param$trim$split2[1];
|
|
33113
|
+
if (key2 === "profile-level-id") {
|
|
33114
|
+
profileLevelId = value2;
|
|
33115
|
+
}
|
|
33116
|
+
}
|
|
33117
|
+
} catch (err) {
|
|
33118
|
+
_iterator.e(err);
|
|
33119
|
+
} finally {
|
|
33120
|
+
_iterator.f();
|
|
33121
|
+
}
|
|
33122
|
+
return profileLevelId;
|
|
33123
|
+
}
|
|
33052
33124
|
var FIRST_FRAME_STATE_ORDER = [RTC_FIRST_FRAME_STATE.LOAD_START, RTC_FIRST_FRAME_STATE.OFFER_SDP_READY, RTC_FIRST_FRAME_STATE.ANSWER_SDP_RECV, RTC_FIRST_FRAME_STATE.ANSWER_SDP_READY, RTC_FIRST_FRAME_STATE.ICE_CONNECTED, RTC_FIRST_FRAME_STATE.DTLS_CONNECTED, RTC_FIRST_FRAME_STATE.PEER_CONNECTED, RTC_FIRST_FRAME_STATE.FIRST_PACKET_RECV, RTC_FIRST_FRAME_STATE.FIRST_FRAME_RECV, RTC_FIRST_FRAME_STATE.FIRST_FRAME_DECODED, RTC_FIRST_FRAME_STATE.VIDEO_LOADEDDATA, RTC_FIRST_FRAME_STATE.VIDEO_CANPLAY, RTC_FIRST_FRAME_STATE.VIDEO_PLAYING];
|
|
33053
33125
|
var FirstFrameObserver = /* @__PURE__ */ function() {
|
|
33054
33126
|
function FirstFrameObserver2(_emitFirstFrameState) {
|
|
@@ -33062,6 +33134,7 @@ var FirstFrameObserver = /* @__PURE__ */ function() {
|
|
|
33062
33134
|
this._pc = null;
|
|
33063
33135
|
this._video = null;
|
|
33064
33136
|
this._videoTransceiver = null;
|
|
33137
|
+
this._audioTransceiver = null;
|
|
33065
33138
|
this._extraInfo = {
|
|
33066
33139
|
is_preload: false
|
|
33067
33140
|
};
|
|
@@ -33134,11 +33207,12 @@ var FirstFrameObserver = /* @__PURE__ */ function() {
|
|
|
33134
33207
|
}
|
|
33135
33208
|
}, {
|
|
33136
33209
|
key: "bindEvents",
|
|
33137
|
-
value: function bindEvents(pc, videoTransceiver, video2) {
|
|
33210
|
+
value: function bindEvents(pc, videoTransceiver, audioTransceiver, video2) {
|
|
33138
33211
|
var _this3 = this;
|
|
33139
33212
|
this._pc = pc;
|
|
33140
33213
|
this._video = video2;
|
|
33141
33214
|
this._videoTransceiver = videoTransceiver;
|
|
33215
|
+
this._audioTransceiver = audioTransceiver;
|
|
33142
33216
|
pc.addEventListener("connectionstatechange", this._handleConnectionStateChange);
|
|
33143
33217
|
pc.addEventListener("iceconnectionstatechange", this._handleICEConnectionStateChange);
|
|
33144
33218
|
var _ref22 = (videoTransceiver === null || videoTransceiver === void 0 ? void 0 : videoTransceiver.receiver) || {}, transport = _ref22.transport;
|
|
@@ -33212,7 +33286,9 @@ var FirstFrameObserver = /* @__PURE__ */ function() {
|
|
|
33212
33286
|
if (Object.keys(this._state).length > 0) {
|
|
33213
33287
|
var state = _objectSpread2$b({}, this._state);
|
|
33214
33288
|
var extraInfo = _objectSpread2$b({}, this._extraInfo);
|
|
33215
|
-
getTransportInfo(this._videoTransceiver, extraInfo).
|
|
33289
|
+
Promise.all([getTransportInfo(this._videoTransceiver, extraInfo), getAudioCodecInfo(this._audioTransceiver, extraInfo)]).catch(function(e4) {
|
|
33290
|
+
extraInfo.failure_reason = e4.message;
|
|
33291
|
+
}).finally(function() {
|
|
33216
33292
|
_this5._emitFirstFrameState(state, extraInfo);
|
|
33217
33293
|
});
|
|
33218
33294
|
}
|
|
@@ -33231,6 +33307,7 @@ var FirstFrameObserver = /* @__PURE__ */ function() {
|
|
|
33231
33307
|
this._pc = null;
|
|
33232
33308
|
this._video = null;
|
|
33233
33309
|
this._videoTransceiver = null;
|
|
33310
|
+
this._audioTransceiver = null;
|
|
33234
33311
|
}
|
|
33235
33312
|
}]);
|
|
33236
33313
|
return FirstFrameObserver2;
|
|
@@ -33238,7 +33315,7 @@ var FirstFrameObserver = /* @__PURE__ */ function() {
|
|
|
33238
33315
|
var getTransportInfo = /* @__PURE__ */ function() {
|
|
33239
33316
|
var _ref42 = _asyncToGenerator$a(/* @__PURE__ */ _regeneratorRuntime$a().mark(function _callee2(videoTransceiver, extraInfo) {
|
|
33240
33317
|
var _videoTransceiver$rec;
|
|
33241
|
-
var reports, candidatePairStats, localCandidateStats, remoteCandidateStats;
|
|
33318
|
+
var reports, candidatePairStats, localCandidateStats, remoteCandidateStats, inboundRtpStats, codecStats, _inboundRtpStats4;
|
|
33242
33319
|
return _regeneratorRuntime$a().wrap(function _callee2$(_context2) {
|
|
33243
33320
|
while (1)
|
|
33244
33321
|
switch (_context2.prev = _context2.next) {
|
|
@@ -33253,6 +33330,9 @@ var getTransportInfo = /* @__PURE__ */ function() {
|
|
|
33253
33330
|
candidatePairStats = report;
|
|
33254
33331
|
localCandidateStats = reports.get(report.localCandidateId);
|
|
33255
33332
|
remoteCandidateStats = reports.get(report.remoteCandidateId);
|
|
33333
|
+
} else if (report.type === "inbound-rtp") {
|
|
33334
|
+
inboundRtpStats = report;
|
|
33335
|
+
codecStats = reports.get(report.codecId);
|
|
33256
33336
|
}
|
|
33257
33337
|
});
|
|
33258
33338
|
if (remoteCandidateStats) {
|
|
@@ -33273,7 +33353,20 @@ var getTransportInfo = /* @__PURE__ */ function() {
|
|
|
33273
33353
|
extraInfo.stun_responses_sent = candidatePairStats.responsesSent;
|
|
33274
33354
|
extraInfo.stun_responses_received = candidatePairStats.responsesReceived;
|
|
33275
33355
|
}
|
|
33276
|
-
|
|
33356
|
+
if (codecStats) {
|
|
33357
|
+
extraInfo.video_codec = codecStats.mimeType;
|
|
33358
|
+
extraInfo.video_fmtp = codecStats.sdpFmtpLine;
|
|
33359
|
+
extraInfo.video_profile_level_id = extractProfileInfo(codecStats.sdpFmtpLine);
|
|
33360
|
+
}
|
|
33361
|
+
if (inboundRtpStats) {
|
|
33362
|
+
extraInfo.video_width = inboundRtpStats.frameWidth;
|
|
33363
|
+
extraInfo.video_height = inboundRtpStats.frameHeight;
|
|
33364
|
+
extraInfo.video_framerate = inboundRtpStats.framesPerSecond;
|
|
33365
|
+
extraInfo.video_decoder_name = inboundRtpStats.decoderImplementation;
|
|
33366
|
+
extraInfo.video_result = ((_inboundRtpStats4 = inboundRtpStats) === null || _inboundRtpStats4 === void 0 ? void 0 : _inboundRtpStats4.framesDecoded) > 0 ? true : false;
|
|
33367
|
+
}
|
|
33368
|
+
extraInfo.gpu_info = getGpuInfo().renderer;
|
|
33369
|
+
case 10:
|
|
33277
33370
|
case "end":
|
|
33278
33371
|
return _context2.stop();
|
|
33279
33372
|
}
|
|
@@ -33283,6 +33376,43 @@ var getTransportInfo = /* @__PURE__ */ function() {
|
|
|
33283
33376
|
return _ref42.apply(this, arguments);
|
|
33284
33377
|
};
|
|
33285
33378
|
}();
|
|
33379
|
+
var getAudioCodecInfo = /* @__PURE__ */ function() {
|
|
33380
|
+
var _ref52 = _asyncToGenerator$a(/* @__PURE__ */ _regeneratorRuntime$a().mark(function _callee3(audioTransceiver, extraInfo) {
|
|
33381
|
+
var _audioTransceiver$rec;
|
|
33382
|
+
var reports, inboundRtpStats, codecStats, _inboundRtpStats5, _inboundRtpStats6, _inboundRtpStats7, _inboundRtpStats8, _inboundRtpStats9, _inboundRtpStats10;
|
|
33383
|
+
return _regeneratorRuntime$a().wrap(function _callee3$(_context3) {
|
|
33384
|
+
while (1)
|
|
33385
|
+
switch (_context3.prev = _context3.next) {
|
|
33386
|
+
case 0:
|
|
33387
|
+
_context3.next = 2;
|
|
33388
|
+
return audioTransceiver === null || audioTransceiver === void 0 ? void 0 : (_audioTransceiver$rec = audioTransceiver.receiver) === null || _audioTransceiver$rec === void 0 ? void 0 : _audioTransceiver$rec.getStats().catch(function() {
|
|
33389
|
+
});
|
|
33390
|
+
case 2:
|
|
33391
|
+
reports = _context3.sent;
|
|
33392
|
+
reports === null || reports === void 0 ? void 0 : reports.forEach(function(report) {
|
|
33393
|
+
if (report.type === "inbound-rtp") {
|
|
33394
|
+
inboundRtpStats = report;
|
|
33395
|
+
codecStats = reports.get(report.codecId);
|
|
33396
|
+
}
|
|
33397
|
+
});
|
|
33398
|
+
if (codecStats) {
|
|
33399
|
+
extraInfo.audio_codec = codecStats.mimeType;
|
|
33400
|
+
extraInfo.audio_fmtp = codecStats.sdpFmtpLine;
|
|
33401
|
+
}
|
|
33402
|
+
if (inboundRtpStats) {
|
|
33403
|
+
extraInfo.audio_packet_received = ((_inboundRtpStats5 = inboundRtpStats) === null || _inboundRtpStats5 === void 0 ? void 0 : _inboundRtpStats5.packetsReceived) > 0;
|
|
33404
|
+
extraInfo.audio_result = ((_inboundRtpStats6 = inboundRtpStats) === null || _inboundRtpStats6 === void 0 ? void 0 : _inboundRtpStats6.audioLevel) !== 0 || ((_inboundRtpStats7 = inboundRtpStats) === null || _inboundRtpStats7 === void 0 ? void 0 : _inboundRtpStats7.totalAudioEnergy) !== 0 || ((_inboundRtpStats8 = inboundRtpStats) === null || _inboundRtpStats8 === void 0 ? void 0 : _inboundRtpStats8.totalSamplesReceived) > 0 && ((_inboundRtpStats9 = inboundRtpStats) === null || _inboundRtpStats9 === void 0 ? void 0 : _inboundRtpStats9.totalSamplesReceived) !== ((_inboundRtpStats10 = inboundRtpStats) === null || _inboundRtpStats10 === void 0 ? void 0 : _inboundRtpStats10.concealedSamples) ? true : false;
|
|
33405
|
+
}
|
|
33406
|
+
case 6:
|
|
33407
|
+
case "end":
|
|
33408
|
+
return _context3.stop();
|
|
33409
|
+
}
|
|
33410
|
+
}, _callee3);
|
|
33411
|
+
}));
|
|
33412
|
+
return function getAudioCodecInfo2(_x3, _x4) {
|
|
33413
|
+
return _ref52.apply(this, arguments);
|
|
33414
|
+
};
|
|
33415
|
+
}();
|
|
33286
33416
|
function changeNumberInRange(source, min2, max2, delta) {
|
|
33287
33417
|
var target = source + delta;
|
|
33288
33418
|
if (target > max2) {
|
|
@@ -33563,13 +33693,13 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
33563
33693
|
_this$_opts$adaptiveJ = _this._opts.adaptiveJitterBuffer, loopInterval = _this$_opts$adaptiveJ.loopInterval, maxAvSyncDelay = _this$_opts$adaptiveJ.maxAvSyncDelay, maxJitterBufferDiff = _this$_opts$adaptiveJ.maxJitterBufferDiff, maxStep = _this$_opts$adaptiveJ.maxStep;
|
|
33564
33694
|
avDiffTooMuchCount = 0;
|
|
33565
33695
|
_this._setDelayTimer = setInterval(/* @__PURE__ */ _asyncToGenerator$a(/* @__PURE__ */ _regeneratorRuntime$a().mark(function _callee3() {
|
|
33566
|
-
var _this$_audioTransceic4, _this$_videoTransceic3, currentTargetDelay, targetDelayMs, currentTargetDelayMs, _yield$Promise$all, _yield$Promise$all2, curAudioStats, curVideoStats, audioStats, videoStats, av_sync_diff, currentAudioDelay, currentVideoDelay, addOrReduce, nextJitterBufferDelay;
|
|
33696
|
+
var _this$_audioTransceic4, _this$_audioTransceic5, _this$_videoTransceic3, _this$_videoTransceic4, currentTargetDelay, targetDelayMs, currentTargetDelayMs, _yield$Promise$all, _yield$Promise$all2, curAudioStats, curVideoStats, audioStats, videoStats, av_sync_diff, currentAudioDelay, currentVideoDelay, addOrReduce, nextJitterBufferDelay;
|
|
33567
33697
|
return _regeneratorRuntime$a().wrap(function _callee3$(_context3) {
|
|
33568
33698
|
while (1)
|
|
33569
33699
|
switch (_context3.prev = _context3.next) {
|
|
33570
33700
|
case 0:
|
|
33571
33701
|
_context3.prev = 0;
|
|
33572
|
-
if (!(!((_this$_audioTransceic4 = _this._audioTransceicer) !== null && _this$_audioTransceic4 !== void 0 && _this$_audioTransceic4.receiver) || !((_this$_videoTransceic3 = _this._videoTransceicer) !== null && _this$_videoTransceic3 !== void 0 && _this$_videoTransceic3.receiver))) {
|
|
33702
|
+
if (!(!((_this$_audioTransceic4 = _this._audioTransceicer) !== null && _this$_audioTransceic4 !== void 0 && (_this$_audioTransceic5 = _this$_audioTransceic4.receiver) !== null && _this$_audioTransceic5 !== void 0 && _this$_audioTransceic5.getStats) || !((_this$_videoTransceic3 = _this._videoTransceicer) !== null && _this$_videoTransceic3 !== void 0 && (_this$_videoTransceic4 = _this$_videoTransceic3.receiver) !== null && _this$_videoTransceic4 !== void 0 && _this$_videoTransceic4.getStats))) {
|
|
33573
33703
|
_context3.next = 5;
|
|
33574
33704
|
break;
|
|
33575
33705
|
}
|
|
@@ -33660,20 +33790,19 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
33660
33790
|
}();
|
|
33661
33791
|
_this._getDelay = function() {
|
|
33662
33792
|
try {
|
|
33663
|
-
var _this$
|
|
33793
|
+
var _this$_audioTransceic7;
|
|
33664
33794
|
var key2 = ["playoutDelayHint", "jitterBufferDelayHint", "jitterBufferTarget"].find(function(key22) {
|
|
33665
|
-
var _this$
|
|
33666
|
-
return key22 in (((_this$
|
|
33795
|
+
var _this$_videoTransceic5, _this$_audioTransceic6;
|
|
33796
|
+
return key22 in (((_this$_videoTransceic5 = _this._videoTransceicer) === null || _this$_videoTransceic5 === void 0 ? void 0 : _this$_videoTransceic5.receiver) || {}) && key22 in (((_this$_audioTransceic6 = _this._audioTransceicer) === null || _this$_audioTransceic6 === void 0 ? void 0 : _this$_audioTransceic6.receiver) || {});
|
|
33667
33797
|
});
|
|
33668
33798
|
if (!key2)
|
|
33669
33799
|
return;
|
|
33670
|
-
return (_this$
|
|
33800
|
+
return (_this$_audioTransceic7 = _this._audioTransceicer) === null || _this$_audioTransceic7 === void 0 ? void 0 : _this$_audioTransceic7.receiver[key2];
|
|
33671
33801
|
} catch (error) {
|
|
33672
33802
|
logger$b.error("get delay error");
|
|
33673
33803
|
}
|
|
33674
33804
|
};
|
|
33675
33805
|
_this._onLoaderRetry = function(error, retryTime) {
|
|
33676
|
-
console.log(error, "retryTime", retryTime);
|
|
33677
33806
|
_this.emit(EVENT$2.LOAD_RETRY, {
|
|
33678
33807
|
error: StreamingError$2.network(error),
|
|
33679
33808
|
retryTime
|
|
@@ -33765,7 +33894,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
33765
33894
|
value: function() {
|
|
33766
33895
|
var _load = _asyncToGenerator$a(/* @__PURE__ */ _regeneratorRuntime$a().mark(function _callee6(url2, failureReason) {
|
|
33767
33896
|
var _this2 = this;
|
|
33768
|
-
var lastPc, answerSdp, errorStr, preloadPromise, info, encodedTransformSupported;
|
|
33897
|
+
var lastPc, pc, answerSdp, errorStr, preloadPromise, info, encodedTransformSupported;
|
|
33769
33898
|
return _regeneratorRuntime$a().wrap(function _callee6$(_context6) {
|
|
33770
33899
|
while (1)
|
|
33771
33900
|
switch (_context6.prev = _context6.next) {
|
|
@@ -33773,44 +33902,47 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
33773
33902
|
logger$b.log("load()", 'invoked, url: "'.concat(url2, '"'));
|
|
33774
33903
|
this._disconnect(failureReason || "invoke load");
|
|
33775
33904
|
this._url = url2;
|
|
33905
|
+
this._retry = this._opts.retryCount || 0;
|
|
33776
33906
|
lastPc = this._pc;
|
|
33907
|
+
pc = null;
|
|
33777
33908
|
if (!this._opts.hackCreateOfferIssue) {
|
|
33778
|
-
_context6.next =
|
|
33909
|
+
_context6.next = 9;
|
|
33779
33910
|
break;
|
|
33780
33911
|
}
|
|
33781
|
-
_context6.next =
|
|
33912
|
+
_context6.next = 9;
|
|
33782
33913
|
return this._createEmptyPeer();
|
|
33783
|
-
case
|
|
33784
|
-
_context6.prev =
|
|
33914
|
+
case 9:
|
|
33915
|
+
_context6.prev = 9;
|
|
33785
33916
|
this._firstFrameObserver.start();
|
|
33786
33917
|
if (!this._preloadPromise) {
|
|
33787
|
-
_context6.next =
|
|
33918
|
+
_context6.next = 41;
|
|
33788
33919
|
break;
|
|
33789
33920
|
}
|
|
33790
33921
|
logger$b.log("load()", "in preload process...");
|
|
33791
|
-
_context6.prev =
|
|
33922
|
+
_context6.prev = 13;
|
|
33792
33923
|
this._firstFrameObserver.setIsPreload(true);
|
|
33793
33924
|
if (compareURL(this._url, this._preloadPromise.url, ["tabr_start_bitrate"])) {
|
|
33794
|
-
_context6.next =
|
|
33925
|
+
_context6.next = 19;
|
|
33795
33926
|
break;
|
|
33796
33927
|
}
|
|
33797
33928
|
errorStr = "preload url not match, current url: ".concat(this._url, ", preload url: ").concat(this._preloadPromise.url);
|
|
33798
33929
|
delete this._preloadPromise;
|
|
33799
33930
|
throw new Error(errorStr);
|
|
33800
|
-
case
|
|
33931
|
+
case 19:
|
|
33932
|
+
this._loader && (this._loader.finnalUrl = this._preloadPromise.url);
|
|
33801
33933
|
preloadPromise = this._preloadPromise.promise;
|
|
33802
33934
|
delete this._preloadPromise;
|
|
33803
|
-
_context6.next =
|
|
33935
|
+
_context6.next = 24;
|
|
33804
33936
|
return preloadPromise;
|
|
33805
|
-
case
|
|
33937
|
+
case 24:
|
|
33806
33938
|
info = _context6.sent;
|
|
33807
33939
|
if (!(info.pc.signalingState !== "have-local-offer")) {
|
|
33808
|
-
_context6.next =
|
|
33940
|
+
_context6.next = 27;
|
|
33809
33941
|
break;
|
|
33810
33942
|
}
|
|
33811
33943
|
throw new Error('pc.signalingState not equal "have-local-offer", current state is '.concat(info.pc.signalingState));
|
|
33812
|
-
case
|
|
33813
|
-
|
|
33944
|
+
case 27:
|
|
33945
|
+
pc = info.pc;
|
|
33814
33946
|
answerSdp = info.answerSdp;
|
|
33815
33947
|
this._videoTransceicer = info.videoTransceiver;
|
|
33816
33948
|
this._audioTransceicer = info.audioTransceiver;
|
|
@@ -33818,48 +33950,49 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
33818
33950
|
this.initVideoEncodedTransform();
|
|
33819
33951
|
this.initAudioEncodedTransform();
|
|
33820
33952
|
}
|
|
33821
|
-
_context6.next =
|
|
33953
|
+
_context6.next = 39;
|
|
33822
33954
|
break;
|
|
33823
|
-
case
|
|
33824
|
-
_context6.prev =
|
|
33825
|
-
_context6.t0 = _context6["catch"](
|
|
33955
|
+
case 34:
|
|
33956
|
+
_context6.prev = 34;
|
|
33957
|
+
_context6.t0 = _context6["catch"](13);
|
|
33826
33958
|
logger$b.warn("load()", "preload failed, ".concat(_context6.t0.message || _context6.t0.toString()));
|
|
33827
33959
|
this.load(url2, _context6.t0.message || _context6.t0.toString());
|
|
33828
33960
|
return _context6.abrupt("return");
|
|
33829
|
-
case
|
|
33830
|
-
_context6.next =
|
|
33961
|
+
case 39:
|
|
33962
|
+
_context6.next = 47;
|
|
33831
33963
|
break;
|
|
33832
|
-
case
|
|
33964
|
+
case 41:
|
|
33833
33965
|
encodedTransformSupported = isLegacyEncodedTransformSupported();
|
|
33834
33966
|
logger$b.log("load()", "isLegacyEncodedTransformSupported: ".concat(encodedTransformSupported));
|
|
33835
|
-
|
|
33967
|
+
pc = new RTCPeerConnection({
|
|
33836
33968
|
encodedInsertableStreams: encodedTransformSupported && this._opts.enableSei ? true : void 0
|
|
33837
33969
|
});
|
|
33838
|
-
_context6.next =
|
|
33839
|
-
return this._getAnswerSdp(
|
|
33840
|
-
case
|
|
33970
|
+
_context6.next = 46;
|
|
33971
|
+
return this._getAnswerSdp(pc);
|
|
33972
|
+
case 46:
|
|
33841
33973
|
answerSdp = _context6.sent;
|
|
33842
|
-
case 44:
|
|
33843
|
-
this._bindRTCEvents(this._pc);
|
|
33844
|
-
_context6.next = 47;
|
|
33845
|
-
return this._handleAnswerSdp(this._pc, answerSdp);
|
|
33846
33974
|
case 47:
|
|
33975
|
+
this._bindRTCEvents(pc);
|
|
33976
|
+
_context6.next = 50;
|
|
33977
|
+
return this._handleAnswerSdp(pc, answerSdp);
|
|
33978
|
+
case 50:
|
|
33847
33979
|
if (lastPc) {
|
|
33848
33980
|
lastPc.close();
|
|
33849
33981
|
}
|
|
33850
|
-
|
|
33982
|
+
this._pc = pc;
|
|
33983
|
+
_context6.next = 57;
|
|
33851
33984
|
break;
|
|
33852
|
-
case
|
|
33853
|
-
_context6.prev =
|
|
33854
|
-
_context6.t1 = _context6["catch"](
|
|
33985
|
+
case 54:
|
|
33986
|
+
_context6.prev = 54;
|
|
33987
|
+
_context6.t1 = _context6["catch"](9);
|
|
33855
33988
|
setTimeout(function() {
|
|
33856
33989
|
return _this2._emitError(StreamingError$2.create(ERR$2.OTHER, null, _context6.t1));
|
|
33857
33990
|
});
|
|
33858
|
-
case
|
|
33991
|
+
case 57:
|
|
33859
33992
|
case "end":
|
|
33860
33993
|
return _context6.stop();
|
|
33861
33994
|
}
|
|
33862
|
-
}, _callee6, this, [[
|
|
33995
|
+
}, _callee6, this, [[9, 54], [13, 34]]);
|
|
33863
33996
|
}));
|
|
33864
33997
|
function load(_x2, _x3) {
|
|
33865
33998
|
return _load.apply(this, arguments);
|
|
@@ -34002,6 +34135,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
34002
34135
|
key: "_getAnswerSdp",
|
|
34003
34136
|
value: function() {
|
|
34004
34137
|
var _getAnswerSdp2 = _asyncToGenerator$a(/* @__PURE__ */ _regeneratorRuntime$a().mark(function _callee7(pc) {
|
|
34138
|
+
var _this6 = this, _this$_opts$standardi;
|
|
34005
34139
|
var offer, answerSdp, parsed, finnalUrl, _this$_opts, _this$_loader, _this$_opts2, _parsed$media, parseSession, sessionId, reqStart, res, answer, err;
|
|
34006
34140
|
return _regeneratorRuntime$a().wrap(function _callee7$(_context7) {
|
|
34007
34141
|
while (1)
|
|
@@ -34053,31 +34187,38 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
34053
34187
|
parsed.media.filter(function(x2) {
|
|
34054
34188
|
return x2.type === "audio";
|
|
34055
34189
|
}).forEach(function(x2) {
|
|
34056
|
-
var _x$rtp$filter$,
|
|
34190
|
+
var _x$rtp$filter$, _this6$_opts$standard, _this6$_opts$standard2;
|
|
34057
34191
|
var opusPayload = (_x$rtp$filter$ = x2.rtp.filter(function(rtp) {
|
|
34058
34192
|
return rtp.codec === "opus";
|
|
34059
34193
|
})[0]) === null || _x$rtp$filter$ === void 0 ? void 0 : _x$rtp$filter$.payload;
|
|
34060
34194
|
if (!opusPayload)
|
|
34061
34195
|
return;
|
|
34062
|
-
|
|
34063
|
-
|
|
34064
|
-
|
|
34065
|
-
|
|
34066
|
-
|
|
34067
|
-
|
|
34068
|
-
|
|
34069
|
-
|
|
34070
|
-
|
|
34196
|
+
if ((_this6$_opts$standard = _this6._opts.standardizeKillSwitch) !== null && _this6$_opts$standard !== void 0 && _this6$_opts$standard.sld_fmtp_opus) {
|
|
34197
|
+
x2.fmtp.forEach(function(fmtp) {
|
|
34198
|
+
if (fmtp.payload !== opusPayload)
|
|
34199
|
+
return;
|
|
34200
|
+
fmtp.config = "minptime=10;stereo=1;useinbandfec=1";
|
|
34201
|
+
});
|
|
34202
|
+
}
|
|
34203
|
+
if ((_this6$_opts$standard2 = _this6._opts.standardizeKillSwitch) !== null && _this6$_opts$standard2 !== void 0 && _this6$_opts$standard2.sld_rtcpfb_opus_nack) {
|
|
34204
|
+
var _x$rtcpFb;
|
|
34205
|
+
(_x$rtcpFb = x2.rtcpFb) === null || _x$rtcpFb === void 0 ? void 0 : _x$rtcpFb.push({
|
|
34206
|
+
payload: opusPayload,
|
|
34207
|
+
type: "nack"
|
|
34208
|
+
});
|
|
34209
|
+
}
|
|
34071
34210
|
});
|
|
34072
|
-
|
|
34073
|
-
|
|
34074
|
-
|
|
34075
|
-
|
|
34076
|
-
|
|
34077
|
-
x22.config
|
|
34078
|
-
|
|
34211
|
+
if ((_this$_opts$standardi = this._opts.standardizeKillSwitch) !== null && _this$_opts$standardi !== void 0 && _this$_opts$standardi.sld_fmtp_sps_pps) {
|
|
34212
|
+
parsed.media.filter(function(x2) {
|
|
34213
|
+
return x2.type === "video";
|
|
34214
|
+
}).forEach(function(x2) {
|
|
34215
|
+
x2.fmtp.forEach(function(x22) {
|
|
34216
|
+
if (x22.config.indexOf("profile-level-id") !== -1) {
|
|
34217
|
+
x22.config = "".concat(x22.config, ";sps-pps-idr-in-keyframe=1");
|
|
34218
|
+
}
|
|
34219
|
+
});
|
|
34079
34220
|
});
|
|
34080
|
-
}
|
|
34221
|
+
}
|
|
34081
34222
|
offer.sdp = lib$1.write(parsed);
|
|
34082
34223
|
logger$b.log("local offer modified:\n", offer);
|
|
34083
34224
|
_context7.next = 25;
|
|
@@ -34212,7 +34353,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
34212
34353
|
this._firstFrameObserver.changeFirstFrameState(RTC_FIRST_FRAME_STATE.ANSWER_SDP_READY);
|
|
34213
34354
|
this._networkEvaluate = new NetworkEvaluate(pc, this._opts.networkEvaluateInterval);
|
|
34214
34355
|
this._listenPeerStateTimeout();
|
|
34215
|
-
this._firstFrameObserver.bindEvents(pc, this._videoTransceicer, this._media);
|
|
34356
|
+
this._firstFrameObserver.bindEvents(pc, this._videoTransceicer, this._audioTransceicer, this._media);
|
|
34216
34357
|
case 17:
|
|
34217
34358
|
case "end":
|
|
34218
34359
|
return _context8.stop();
|
|
@@ -34227,11 +34368,11 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
34227
34368
|
}, {
|
|
34228
34369
|
key: "_listenPeerStateTimeout",
|
|
34229
34370
|
value: function _listenPeerStateTimeout() {
|
|
34230
|
-
var
|
|
34371
|
+
var _this7 = this;
|
|
34231
34372
|
this._clearPeerStateTimeout();
|
|
34232
34373
|
if (this._opts.connectionStateChangeTimeout) {
|
|
34233
34374
|
this._peerStateTimer = setTimeout(function() {
|
|
34234
|
-
|
|
34375
|
+
_this7._emitError(StreamingError$2.create(ERR$2.MEDIA, ERR$2.SUB_TYPES.MEDIA_ERR_SRC_NOT_SUPPORTED, {
|
|
34235
34376
|
message: "listen connectionstatechange timeout"
|
|
34236
34377
|
}));
|
|
34237
34378
|
}, this._opts.connectionStateChangeTimeout);
|
|
@@ -34248,59 +34389,59 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
34248
34389
|
}, {
|
|
34249
34390
|
key: "_startRtcReport",
|
|
34250
34391
|
value: function _startRtcReport() {
|
|
34251
|
-
var
|
|
34392
|
+
var _this8 = this;
|
|
34252
34393
|
this._stopRtcReport();
|
|
34253
34394
|
var report = /* @__PURE__ */ function() {
|
|
34254
34395
|
var _ref52 = _asyncToGenerator$a(/* @__PURE__ */ _regeneratorRuntime$a().mark(function _callee9() {
|
|
34255
|
-
var
|
|
34256
|
-
var
|
|
34396
|
+
var _this8$_audioTranscei, _this8$_audioTranscei2, _this8$_videoTranscei, _this8$_videoTranscei2;
|
|
34397
|
+
var _this8$_frameRecvCall, _yield$Promise$all3, _yield$Promise$all4, curAudioStats, curVideoStats, _this8$_audioStallObs, _this8$_videoStallObs, _this8$_networkQualit, _this8$_networkQualit2, _this8$_media, _this8$_media2, _this8$_media3, _this8$_media4, _this8$_media5, _this8$_media6, _this8$_frameRecvCall2, audioStats, videoStats, audioStallInfo, videoStallInfo, _ref6, _ref7, quality, qualityInfo, av_sync_diff;
|
|
34257
34398
|
return _regeneratorRuntime$a().wrap(function _callee9$(_context9) {
|
|
34258
34399
|
while (1)
|
|
34259
34400
|
switch (_context9.prev = _context9.next) {
|
|
34260
34401
|
case 0:
|
|
34261
|
-
if (!(!((
|
|
34402
|
+
if (!(!((_this8$_audioTranscei = _this8._audioTransceicer) !== null && _this8$_audioTranscei !== void 0 && (_this8$_audioTranscei2 = _this8$_audioTranscei.receiver) !== null && _this8$_audioTranscei2 !== void 0 && _this8$_audioTranscei2.getStats) || !((_this8$_videoTranscei = _this8._videoTransceicer) !== null && _this8$_videoTranscei !== void 0 && (_this8$_videoTranscei2 = _this8$_videoTranscei.receiver) !== null && _this8$_videoTranscei2 !== void 0 && _this8$_videoTranscei2.getStats))) {
|
|
34262
34403
|
_context9.next = 4;
|
|
34263
34404
|
break;
|
|
34264
34405
|
}
|
|
34265
|
-
|
|
34266
|
-
|
|
34406
|
+
_this8._preAudioStats = null;
|
|
34407
|
+
_this8._preVideoStats = null;
|
|
34267
34408
|
return _context9.abrupt("return");
|
|
34268
34409
|
case 4:
|
|
34269
|
-
if (!
|
|
34270
|
-
|
|
34271
|
-
|
|
34410
|
+
if (!_this8._audioStallObserver && _this8._audioTransceicer) {
|
|
34411
|
+
_this8._audioStallObserver = new AudioStallObserver();
|
|
34412
|
+
_this8._audioStallObserver.start(_this8._audioTransceicer);
|
|
34272
34413
|
}
|
|
34273
|
-
if (!
|
|
34274
|
-
|
|
34275
|
-
|
|
34414
|
+
if (!_this8._videoStallObserver && _this8._video && _this8._media) {
|
|
34415
|
+
_this8._videoStallObserver = new VideoStallObserver();
|
|
34416
|
+
_this8._videoStallObserver.start(_this8._media);
|
|
34276
34417
|
}
|
|
34277
|
-
if (!
|
|
34278
|
-
|
|
34279
|
-
(
|
|
34418
|
+
if (!_this8._frameRecvCallback && _this8._media) {
|
|
34419
|
+
_this8._frameRecvCallback = new VideoFrameRecvCallback();
|
|
34420
|
+
(_this8$_frameRecvCall = _this8._frameRecvCallback) === null || _this8$_frameRecvCall === void 0 ? void 0 : _this8$_frameRecvCall.start(_this8._media);
|
|
34280
34421
|
}
|
|
34281
|
-
if (
|
|
34282
|
-
|
|
34422
|
+
if (_this8._pc && !_this8._networkQuality && _this8._opts.enableNetworkQuality && _this8._opts.networkQuality) {
|
|
34423
|
+
_this8._networkQuality = new NetworkQuality(_this8._pc, _this8._opts.networkQuality);
|
|
34283
34424
|
}
|
|
34284
34425
|
_context9.next = 10;
|
|
34285
|
-
return Promise.all([getRecvAudioStats(
|
|
34426
|
+
return Promise.all([getRecvAudioStats(_this8._audioTransceicer.receiver.getStats()), getRecvVideoStats(_this8._videoTransceicer.receiver.getStats())]);
|
|
34286
34427
|
case 10:
|
|
34287
34428
|
_yield$Promise$all3 = _context9.sent;
|
|
34288
34429
|
_yield$Promise$all4 = _slicedToArray$7(_yield$Promise$all3, 2);
|
|
34289
34430
|
curAudioStats = _yield$Promise$all4[0];
|
|
34290
34431
|
curVideoStats = _yield$Promise$all4[1];
|
|
34291
|
-
if (!(
|
|
34432
|
+
if (!(_this8._preAudioStats && _this8._preVideoStats)) {
|
|
34292
34433
|
_context9.next = 28;
|
|
34293
34434
|
break;
|
|
34294
34435
|
}
|
|
34295
|
-
audioStats = diffRecvAudioStats(
|
|
34296
|
-
videoStats = diffRecvVideoStats(
|
|
34297
|
-
|
|
34436
|
+
audioStats = diffRecvAudioStats(_this8._preAudioStats, curAudioStats);
|
|
34437
|
+
videoStats = diffRecvVideoStats(_this8._preVideoStats, curVideoStats);
|
|
34438
|
+
_this8._videoJitterBufferDelay = videoStats.jitterBufferDelay;
|
|
34298
34439
|
_context9.next = 20;
|
|
34299
|
-
return (
|
|
34440
|
+
return (_this8$_audioStallObs = _this8._audioStallObserver) === null || _this8$_audioStallObs === void 0 ? void 0 : _this8$_audioStallObs.getAudioStallInfo();
|
|
34300
34441
|
case 20:
|
|
34301
34442
|
audioStallInfo = _context9.sent;
|
|
34302
34443
|
_context9.next = 23;
|
|
34303
|
-
return (
|
|
34444
|
+
return (_this8$_videoStallObs = _this8._videoStallObserver) === null || _this8$_videoStallObs === void 0 ? void 0 : _this8$_videoStallObs.getStallInfo({
|
|
34304
34445
|
interval: videoStats.statsInterval,
|
|
34305
34446
|
frameRateReceived: videoStats.receivedFrameRate,
|
|
34306
34447
|
frameRateDecoded: videoStats.decoderOutputFrameRate,
|
|
@@ -34308,18 +34449,18 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
34308
34449
|
});
|
|
34309
34450
|
case 23:
|
|
34310
34451
|
videoStallInfo = _context9.sent;
|
|
34311
|
-
_ref6 = (
|
|
34452
|
+
_ref6 = (_this8$_networkQualit = (_this8$_networkQualit2 = _this8._networkQuality) === null || _this8$_networkQualit2 === void 0 ? void 0 : _this8$_networkQualit2.getDownlinkQuality(_objectSpread2$b(_objectSpread2$b({}, audioStats), {}, {
|
|
34312
34453
|
stallDuration: (audioStallInfo === null || audioStallInfo === void 0 ? void 0 : audioStallInfo.stallDuration) || 0
|
|
34313
34454
|
}), _objectSpread2$b(_objectSpread2$b({}, videoStats), {}, {
|
|
34314
34455
|
stallDuration: (videoStallInfo === null || videoStallInfo === void 0 ? void 0 : videoStallInfo.stall.stallDuration100ms) || (videoStallInfo === null || videoStallInfo === void 0 ? void 0 : videoStallInfo.stall.stallDuration500ms) || 0
|
|
34315
|
-
}))) !== null &&
|
|
34316
|
-
if (
|
|
34317
|
-
|
|
34456
|
+
}))) !== null && _this8$_networkQualit !== void 0 ? _this8$_networkQualit : [], _ref7 = _slicedToArray$7(_ref6, 2), quality = _ref7[0], qualityInfo = _ref7[1];
|
|
34457
|
+
if (_this8._opts.enableAdaptiveJitterBuffer) {
|
|
34458
|
+
_this8._handleJitterBuffer(qualityInfo === null || qualityInfo === void 0 ? void 0 : qualityInfo.qualityQos, _this8._opts.adaptiveJitterBuffer, _this8._opts.networkStrategy);
|
|
34318
34459
|
}
|
|
34319
34460
|
if (videoStats.estimatedPlayoutTimestamp && audioStats.estimatedPlayoutTimestamp) {
|
|
34320
34461
|
av_sync_diff = videoStats.estimatedPlayoutTimestamp - audioStats.estimatedPlayoutTimestamp;
|
|
34321
34462
|
}
|
|
34322
|
-
|
|
34463
|
+
_this8.emit(EXTEND_EVENTS.RTC_NETWORK, _objectSpread2$b({
|
|
34323
34464
|
interval: videoStats.statsInterval,
|
|
34324
34465
|
network_quality: quality,
|
|
34325
34466
|
audio_stall_duration: audioStallInfo === null || audioStallInfo === void 0 ? void 0 : audioStallInfo.stallDuration,
|
|
@@ -34345,13 +34486,13 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
34345
34486
|
quality_qos: qualityInfo === null || qualityInfo === void 0 ? void 0 : qualityInfo.qualityQos,
|
|
34346
34487
|
quality_audio_qoe: qualityInfo === null || qualityInfo === void 0 ? void 0 : qualityInfo.audioQoe,
|
|
34347
34488
|
quality_video_qoe: qualityInfo === null || qualityInfo === void 0 ? void 0 : qualityInfo.videoQoe,
|
|
34348
|
-
current_delay:
|
|
34489
|
+
current_delay: _this8._getDelay(),
|
|
34349
34490
|
visibility_state: document.visibilityState,
|
|
34350
|
-
target_delay:
|
|
34491
|
+
target_delay: _this8._targetDelayHint,
|
|
34351
34492
|
av_sync_diff,
|
|
34352
|
-
set_delay_error:
|
|
34353
|
-
video_width: ((
|
|
34354
|
-
video_height: ((
|
|
34493
|
+
set_delay_error: _this8._setDelayError || null,
|
|
34494
|
+
video_width: ((_this8$_media = _this8._media) === null || _this8$_media === void 0 ? void 0 : _this8$_media.videoWidth) || 0,
|
|
34495
|
+
video_height: ((_this8$_media2 = _this8._media) === null || _this8$_media2 === void 0 ? void 0 : _this8$_media2.videoHeight) || 0,
|
|
34355
34496
|
abr_state: videoStats.abrState || "none",
|
|
34356
34497
|
recv_frame_rate: videoStats.receivedFrameRate,
|
|
34357
34498
|
decode_frame_rate: videoStats.decoderOutputFrameRate,
|
|
@@ -34359,15 +34500,19 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
34359
34500
|
drop_frame_rate: videoStats.framesDropped,
|
|
34360
34501
|
audio_packets_received: audioStats.packetsReceived,
|
|
34361
34502
|
video_packets_received: videoStats.packetsReceived,
|
|
34362
|
-
video_muted: (
|
|
34363
|
-
video_paused: (
|
|
34364
|
-
video_volume: (
|
|
34365
|
-
video_current_time: (
|
|
34366
|
-
|
|
34503
|
+
video_muted: (_this8$_media3 = _this8._media) === null || _this8$_media3 === void 0 ? void 0 : _this8$_media3.muted,
|
|
34504
|
+
video_paused: (_this8$_media4 = _this8._media) === null || _this8$_media4 === void 0 ? void 0 : _this8$_media4.paused,
|
|
34505
|
+
video_volume: (_this8$_media5 = _this8._media) === null || _this8$_media5 === void 0 ? void 0 : _this8$_media5.volume,
|
|
34506
|
+
video_current_time: (_this8$_media6 = _this8._media) === null || _this8$_media6 === void 0 ? void 0 : _this8$_media6.currentTime,
|
|
34507
|
+
fec_packets_received: videoStats.fecPacketsReceived,
|
|
34508
|
+
video_kbps: videoStats.receivedKBitrate,
|
|
34509
|
+
audio_kbps: audioStats.receivedKBitrate,
|
|
34510
|
+
fec_ssrc: videoStats.fecSsrc
|
|
34511
|
+
}, ((_this8$_frameRecvCall2 = _this8._frameRecvCallback) === null || _this8$_frameRecvCall2 === void 0 ? void 0 : _this8$_frameRecvCall2.getRecentRenderInfo4Report()) || {}));
|
|
34367
34512
|
case 28:
|
|
34368
|
-
|
|
34369
|
-
|
|
34370
|
-
|
|
34513
|
+
_this8._preAudioStats = curAudioStats;
|
|
34514
|
+
_this8._preVideoStats = curVideoStats;
|
|
34515
|
+
_this8._setDelayError = null;
|
|
34371
34516
|
case 31:
|
|
34372
34517
|
case "end":
|
|
34373
34518
|
return _context9.stop();
|
|
@@ -34522,7 +34667,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
34522
34667
|
}, {
|
|
34523
34668
|
key: "_changeVolumeInHarmonyWorkaround",
|
|
34524
34669
|
value: function _changeVolumeInHarmonyWorkaround() {
|
|
34525
|
-
var
|
|
34670
|
+
var _this9 = this;
|
|
34526
34671
|
if (isHarmonyOS()) {
|
|
34527
34672
|
var originalDescriptor = Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, "muted");
|
|
34528
34673
|
if (this._media && originalDescriptor) {
|
|
@@ -34541,9 +34686,9 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
34541
34686
|
}
|
|
34542
34687
|
});
|
|
34543
34688
|
this._revertVolumeWorkaround = function() {
|
|
34544
|
-
logger$b.log("revert HarmonyOS muted workaround. video dom:",
|
|
34545
|
-
if (
|
|
34546
|
-
Object.defineProperty(
|
|
34689
|
+
logger$b.log("revert HarmonyOS muted workaround. video dom:", _this9._media);
|
|
34690
|
+
if (_this9._media) {
|
|
34691
|
+
Object.defineProperty(_this9._media, "muted", originalDescriptor);
|
|
34547
34692
|
}
|
|
34548
34693
|
};
|
|
34549
34694
|
}
|
|
@@ -34552,7 +34697,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
34552
34697
|
}, {
|
|
34553
34698
|
key: "_mutedBeforePlayingWorkaround",
|
|
34554
34699
|
value: function _mutedBeforePlayingWorkaround() {
|
|
34555
|
-
var
|
|
34700
|
+
var _this10 = this;
|
|
34556
34701
|
if (isHeyTapBrowser() || isVivoBrowser()) {
|
|
34557
34702
|
var originalDescriptor = Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, "muted");
|
|
34558
34703
|
if (this._media && originalDescriptor) {
|
|
@@ -34572,12 +34717,13 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
34572
34717
|
});
|
|
34573
34718
|
var revertMutedProxy = function revertMutedProxy2() {
|
|
34574
34719
|
logger$b.log("revert muted workaround. muted:", originalMuted);
|
|
34575
|
-
if (
|
|
34576
|
-
Object.defineProperty(
|
|
34577
|
-
|
|
34578
|
-
|
|
34720
|
+
if (_this10._media) {
|
|
34721
|
+
Object.defineProperty(_this10._media, "muted", originalDescriptor);
|
|
34722
|
+
_this10._media.muted = originalMuted;
|
|
34723
|
+
_this10._media.removeEventListener("playing", revertMutedProxy2);
|
|
34579
34724
|
}
|
|
34580
34725
|
};
|
|
34726
|
+
this._revertMutedWorkaround = revertMutedProxy;
|
|
34581
34727
|
this._media.addEventListener("playing", revertMutedProxy);
|
|
34582
34728
|
}
|
|
34583
34729
|
}
|
|
@@ -34585,8 +34731,10 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
34585
34731
|
}, {
|
|
34586
34732
|
key: "destroy",
|
|
34587
34733
|
value: function destroy(keepClearMediaStream) {
|
|
34588
|
-
var _this$_revertVolumeWo, _this$_media3;
|
|
34734
|
+
var _this$_revertMutedWor, _this$_revertVolumeWo, _this$_media3;
|
|
34589
34735
|
this._disconnect("invoke destroy");
|
|
34736
|
+
(_this$_revertMutedWor = this._revertMutedWorkaround) === null || _this$_revertMutedWor === void 0 ? void 0 : _this$_revertMutedWor.call(this);
|
|
34737
|
+
delete this._revertMutedWorkaround;
|
|
34590
34738
|
(_this$_revertVolumeWo = this._revertVolumeWorkaround) === null || _this$_revertVolumeWo === void 0 ? void 0 : _this$_revertVolumeWo.call(this);
|
|
34591
34739
|
delete this._revertVolumeWorkaround;
|
|
34592
34740
|
(_this$_media3 = this._media) === null || _this$_media3 === void 0 ? void 0 : _this$_media3.removeEventListener("timeupdate", this._mockWaitingByTimeupdate);
|
|
@@ -34685,15 +34833,19 @@ var RtsPlugin = /* @__PURE__ */ function(_BasePlugin) {
|
|
|
34685
34833
|
_this.__retry = function() {
|
|
34686
34834
|
_this.player.removeClass(STATE_CLASS$1.ERROR);
|
|
34687
34835
|
_this.player.addClass(STATE_CLASS$1.LOADING);
|
|
34688
|
-
runHooks
|
|
34836
|
+
_this.player.runHooks(_assertThisInitialized$f(_this), "retry", function() {
|
|
34689
34837
|
_this.player.src = "";
|
|
34690
34838
|
_this.player.once(CANPLAY, function() {
|
|
34691
|
-
|
|
34839
|
+
var _assertThisInitialize, _assertThisInitialize2;
|
|
34840
|
+
(_assertThisInitialize = _assertThisInitialized$f(_this)) === null || _assertThisInitialize === void 0 ? void 0 : (_assertThisInitialize2 = _assertThisInitialize.player) === null || _assertThisInitialize2 === void 0 ? void 0 : _assertThisInitialize2.mediaPlay();
|
|
34692
34841
|
});
|
|
34693
34842
|
});
|
|
34694
34843
|
};
|
|
34695
34844
|
_this.destroy = function() {
|
|
34696
34845
|
var _this$_rts3;
|
|
34846
|
+
if (typeof _this._originHandleSource === "boolean") {
|
|
34847
|
+
_this.player.handleSource = _this._originHandleSource;
|
|
34848
|
+
}
|
|
34697
34849
|
_this.player.switchURL = _this._originSwitchFn;
|
|
34698
34850
|
_this.player.retry = _this._originRetry;
|
|
34699
34851
|
_this._clearDisconnectTimer();
|
|
@@ -34740,12 +34892,16 @@ var RtsPlugin = /* @__PURE__ */ function(_BasePlugin) {
|
|
|
34740
34892
|
}, {
|
|
34741
34893
|
key: "version",
|
|
34742
34894
|
get: function get4() {
|
|
34743
|
-
return "0.2.1-alpha.
|
|
34895
|
+
return "0.2.1-alpha.64";
|
|
34744
34896
|
}
|
|
34745
34897
|
}, {
|
|
34746
34898
|
key: "beforePlayerInit",
|
|
34747
34899
|
value: function beforePlayerInit() {
|
|
34748
|
-
var _this$player2, _this$player$config, _this$player$config$r, _this2 = this;
|
|
34900
|
+
var _this$player$video, _this$player2, _this$player$config, _this$player$config$r, _this2 = this;
|
|
34901
|
+
var pl = this.player;
|
|
34902
|
+
this._originHandleSource = pl.handleSource;
|
|
34903
|
+
pl.handleSource = false;
|
|
34904
|
+
(_this$player$video = this.player.video) === null || _this$player$video === void 0 ? void 0 : _this$player$video.removeAttribute("src");
|
|
34749
34905
|
this._init();
|
|
34750
34906
|
if (!this._originSwitchFn) {
|
|
34751
34907
|
var _this$player$switchUR;
|
|
@@ -34775,24 +34931,6 @@ var RtsPlugin = /* @__PURE__ */ function(_BasePlugin) {
|
|
|
34775
34931
|
});
|
|
34776
34932
|
}
|
|
34777
34933
|
this._bindRtsEvents();
|
|
34778
|
-
try {
|
|
34779
|
-
BasePlugin$1.defineGetterOrSetter(this.player, {
|
|
34780
|
-
__url: {
|
|
34781
|
-
get: function get4() {
|
|
34782
|
-
try {
|
|
34783
|
-
return URL.createObjectURL(new MediaSource());
|
|
34784
|
-
} catch (e4) {
|
|
34785
|
-
var _this2$player, _this2$player$video;
|
|
34786
|
-
if (!((_this2$player = _this2.player) !== null && _this2$player !== void 0 && (_this2$player$video = _this2$player.video) !== null && _this2$player$video !== void 0 && _this2$player$video.srcObject)) {
|
|
34787
|
-
_this2.player.video.srcObject = new MediaStream();
|
|
34788
|
-
}
|
|
34789
|
-
return "";
|
|
34790
|
-
}
|
|
34791
|
-
}
|
|
34792
|
-
}
|
|
34793
|
-
});
|
|
34794
|
-
} catch (e4) {
|
|
34795
|
-
}
|
|
34796
34934
|
}
|
|
34797
34935
|
}, {
|
|
34798
34936
|
key: "getStats",
|
|
@@ -34882,6 +35020,9 @@ var RtsPlugin = /* @__PURE__ */ function(_BasePlugin) {
|
|
|
34882
35020
|
player.unRegisterPlugin("rts");
|
|
34883
35021
|
player.switchURL = _this3._originSwitchFn;
|
|
34884
35022
|
player.retry = _this3._originRetry;
|
|
35023
|
+
if (typeof _this3._originHandleSource === "boolean") {
|
|
35024
|
+
player.handleSource = _this3._originHandleSource;
|
|
35025
|
+
}
|
|
34885
35026
|
_this3._rts = null;
|
|
34886
35027
|
player.rts = null;
|
|
34887
35028
|
if ((_player$video = player.video) !== null && _player$video !== void 0 && _player$video.srcObject) {
|
|
@@ -34977,6 +35118,11 @@ var RtsPlugin = /* @__PURE__ */ function(_BasePlugin) {
|
|
|
34977
35118
|
}
|
|
34978
35119
|
return isSupportedH264;
|
|
34979
35120
|
}()
|
|
35121
|
+
}, {
|
|
35122
|
+
key: "isEncodedTransformSupported",
|
|
35123
|
+
value: function isEncodedTransformSupported$1() {
|
|
35124
|
+
return isEncodedTransformSupported() || isLegacyEncodedTransformSupported();
|
|
35125
|
+
}
|
|
34980
35126
|
}]);
|
|
34981
35127
|
return RtsPlugin2;
|
|
34982
35128
|
}(BasePlugin$1);
|
|
@@ -37383,7 +37529,8 @@ var MSE$2 = /* @__PURE__ */ function() {
|
|
|
37383
37529
|
key: "isSupported",
|
|
37384
37530
|
value: function isSupported2() {
|
|
37385
37531
|
var mime = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';
|
|
37386
|
-
var
|
|
37532
|
+
var preferMMS = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
37533
|
+
var MediaSource2 = getMediaSource$2(preferMMS);
|
|
37387
37534
|
if (!MediaSource2)
|
|
37388
37535
|
return false;
|
|
37389
37536
|
try {
|
|
@@ -37579,6 +37726,7 @@ var FetchLoader$2 = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
37579
37726
|
_defineProperty$f(_assertThisInitialized$c(_this), "_running", false);
|
|
37580
37727
|
_defineProperty$f(_assertThisInitialized$c(_this), "_logger", null);
|
|
37581
37728
|
_defineProperty$f(_assertThisInitialized$c(_this), "_vid", "");
|
|
37729
|
+
_defineProperty$f(_assertThisInitialized$c(_this), "_firtstByte", 0);
|
|
37582
37730
|
_defineProperty$f(_assertThisInitialized$c(_this), "_onProcessMinLen", 0);
|
|
37583
37731
|
_defineProperty$f(_assertThisInitialized$c(_this), "_onCancel", null);
|
|
37584
37732
|
_defineProperty$f(_assertThisInitialized$c(_this), "_priOptions", null);
|
|
@@ -37588,7 +37736,7 @@ var FetchLoader$2 = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
37588
37736
|
key: "load",
|
|
37589
37737
|
value: function load(_ref6) {
|
|
37590
37738
|
var _this$_abortControlle, _this2 = this;
|
|
37591
|
-
var url2 = _ref6.url, vid = _ref6.vid, timeout = _ref6.timeout, responseType = _ref6.responseType, onProgress = _ref6.onProgress, index2 = _ref6.index, onTimeout = _ref6.onTimeout, onCancel = _ref6.onCancel, range = _ref6.range, transformResponse = _ref6.transformResponse, request2 = _ref6.request, params = _ref6.params, logger2 = _ref6.logger, method = _ref6.method, headers = _ref6.headers, body = _ref6.body, mode = _ref6.mode, credentials = _ref6.credentials, cache = _ref6.cache, redirect = _ref6.redirect, referrer = _ref6.referrer, referrerPolicy = _ref6.referrerPolicy, onProcessMinLen = _ref6.onProcessMinLen, priOptions = _ref6.priOptions;
|
|
37739
|
+
var url2 = _ref6.url, vid = _ref6.vid, timeout = _ref6.timeout, responseType = _ref6.responseType, onProgress = _ref6.onProgress, index2 = _ref6.index, onTimeout = _ref6.onTimeout, onCancel = _ref6.onCancel, range = _ref6.range, transformResponse = _ref6.transformResponse, request2 = _ref6.request, params = _ref6.params, logger2 = _ref6.logger, method = _ref6.method, headers = _ref6.headers, body = _ref6.body, mode = _ref6.mode, credentials = _ref6.credentials, cache = _ref6.cache, redirect = _ref6.redirect, referrer = _ref6.referrer, referrerPolicy = _ref6.referrerPolicy, onProcessMinLen = _ref6.onProcessMinLen, priOptions = _ref6.priOptions, streamRes = _ref6.streamRes, firstMaxChunkSize = _ref6.firstMaxChunkSize;
|
|
37592
37740
|
this._logger = logger2;
|
|
37593
37741
|
this._aborted = false;
|
|
37594
37742
|
this._onProcessMinLen = onProcessMinLen;
|
|
@@ -37599,6 +37747,7 @@ var FetchLoader$2 = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
37599
37747
|
this._range = range || [0, 0];
|
|
37600
37748
|
this._vid = vid || url2;
|
|
37601
37749
|
this._priOptions = priOptions || {};
|
|
37750
|
+
this._firstMaxChunkSize = firstMaxChunkSize;
|
|
37602
37751
|
var init = {
|
|
37603
37752
|
method,
|
|
37604
37753
|
headers,
|
|
@@ -37646,7 +37795,10 @@ var FetchLoader$2 = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
37646
37795
|
var startTime = Date.now();
|
|
37647
37796
|
this._logger.debug("[fetch load start], index,", index2, ",range,", range);
|
|
37648
37797
|
return new Promise(function(resolve3, reject3) {
|
|
37649
|
-
|
|
37798
|
+
var promise2 = streamRes ? new Promise(function(r2) {
|
|
37799
|
+
r2(streamRes);
|
|
37800
|
+
}) : fetch(request2 || url2, request2 ? void 0 : init);
|
|
37801
|
+
promise2.then(/* @__PURE__ */ function() {
|
|
37650
37802
|
var _ref22 = _asyncToGenerator$7(/* @__PURE__ */ _regeneratorRuntime$7().mark(function _callee(response) {
|
|
37651
37803
|
var firstByteTime, data2, costTime, speed;
|
|
37652
37804
|
return _regeneratorRuntime$7().wrap(function _callee$(_context) {
|
|
@@ -37842,7 +37994,7 @@ var FetchLoader$2 = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
37842
37994
|
var pump = /* @__PURE__ */ function() {
|
|
37843
37995
|
var _ref32 = _asyncToGenerator$7(/* @__PURE__ */ _regeneratorRuntime$7().mark(function _callee3() {
|
|
37844
37996
|
var _this3$_range;
|
|
37845
|
-
var startRange, startByte, curLen, retData, temp, costTime, speed;
|
|
37997
|
+
var startRange, startByte, curLen, retData, temp, tmp, _tmp, costTime, speed;
|
|
37846
37998
|
return _regeneratorRuntime$7().wrap(function _callee3$(_context3) {
|
|
37847
37999
|
while (1)
|
|
37848
38000
|
switch (_context3.prev = _context3.next) {
|
|
@@ -37921,6 +38073,20 @@ var FetchLoader$2 = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
37921
38073
|
retData = data2.value;
|
|
37922
38074
|
}
|
|
37923
38075
|
if (retData && retData.byteLength > 0 || data2.done) {
|
|
38076
|
+
if (_this3._firstMaxChunkSize) {
|
|
38077
|
+
if (!_this3._firtstByte) {
|
|
38078
|
+
_this3._firtstByte++;
|
|
38079
|
+
tmp = retData.slice(0, _this3._firstMaxChunkSize);
|
|
38080
|
+
_this3._cacheData = retData.slice(_this3._firstMaxChunkSize);
|
|
38081
|
+
retData = tmp;
|
|
38082
|
+
} else if (_this3._cacheData) {
|
|
38083
|
+
_tmp = new Uint8Array(_this3._cacheData.byteLength + retData.byteLength);
|
|
38084
|
+
_tmp.set(_this3._cacheData, 0);
|
|
38085
|
+
_tmp.set(retData, _this3._cacheData.byteLength);
|
|
38086
|
+
retData = _tmp;
|
|
38087
|
+
_this3._cacheData = null;
|
|
38088
|
+
}
|
|
38089
|
+
}
|
|
37924
38090
|
onProgress(retData, data2.done, {
|
|
37925
38091
|
range: [_this3._range[0] + _this3._receivedLength - (retData ? retData.byteLength : 0), _this3._range[0] + _this3._receivedLength],
|
|
37926
38092
|
vid: _this3._vid,
|
|
@@ -37933,7 +38099,13 @@ var FetchLoader$2 = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
37933
38099
|
}, response);
|
|
37934
38100
|
}
|
|
37935
38101
|
if (!data2.done) {
|
|
37936
|
-
|
|
38102
|
+
if (_this3._firstMaxChunkSize) {
|
|
38103
|
+
setTimeout(function() {
|
|
38104
|
+
pump();
|
|
38105
|
+
}, 0);
|
|
38106
|
+
} else {
|
|
38107
|
+
pump();
|
|
38108
|
+
}
|
|
37937
38109
|
} else {
|
|
37938
38110
|
costTime = Date.now() - st;
|
|
37939
38111
|
speed = calculateSpeed$1(_this3._receivedLength, costTime);
|
|
@@ -39655,7 +39827,7 @@ var AAC$2 = /* @__PURE__ */ function() {
|
|
|
39655
39827
|
objectType = 2;
|
|
39656
39828
|
extensionSamplingIndex = samplingIndex;
|
|
39657
39829
|
} else {
|
|
39658
|
-
objectType =
|
|
39830
|
+
objectType = 5;
|
|
39659
39831
|
extensionSamplingIndex = samplingIndex;
|
|
39660
39832
|
if (samplingIndex >= 6) {
|
|
39661
39833
|
extensionSamplingIndex = samplingIndex - 3;
|
|
@@ -40588,7 +40760,7 @@ var TsFixer = /* @__PURE__ */ function() {
|
|
|
40588
40760
|
x2.pts += vDelta;
|
|
40589
40761
|
});
|
|
40590
40762
|
} else {
|
|
40591
|
-
for (var i2 = 1; i2
|
|
40763
|
+
for (var i2 = 1; i2 <= len - 1; i2++) {
|
|
40592
40764
|
var _samples$i;
|
|
40593
40765
|
var dts = (_samples$i = samples[i2]) === null || _samples$i === void 0 ? void 0 : _samples$i.dts;
|
|
40594
40766
|
var prevDts = samples[i2 - 1].dts;
|
|
@@ -42148,6 +42320,13 @@ var MP4Parser$1 = /* @__PURE__ */ function() {
|
|
|
42148
42320
|
}
|
|
42149
42321
|
ret.objectType = objectType;
|
|
42150
42322
|
ret.codec += objectType.toString(16);
|
|
42323
|
+
if (/^mp4a/ig.test(ret.codec) && config2.length >= 2) {
|
|
42324
|
+
var samplingFrequencyIndex = (config2[0] & 7) << 1 | (config2[1] & 128) >> 7;
|
|
42325
|
+
ret.samplingFrequencyIndex = samplingFrequencyIndex;
|
|
42326
|
+
if (samplingFrequencyIndex < AAC$2.FREQ.length) {
|
|
42327
|
+
ret.sampleRate = AAC$2.FREQ[samplingFrequencyIndex];
|
|
42328
|
+
}
|
|
42329
|
+
}
|
|
42151
42330
|
if (ret.codec[ret.codec.length - 1] === ".") {
|
|
42152
42331
|
ret.codec = ret.codec.substring(0, ret.codec.length - 1);
|
|
42153
42332
|
}
|
|
@@ -42436,7 +42615,9 @@ var MP4Parser$1 = /* @__PURE__ */ function() {
|
|
|
42436
42615
|
v2.codecType = VideoCodecType$2.AV1;
|
|
42437
42616
|
v2.codec = e1.av1C.codec;
|
|
42438
42617
|
v2.av1C = e1.av1C.data;
|
|
42439
|
-
|
|
42618
|
+
if (e1.colr) {
|
|
42619
|
+
v2.colr = e1.colr.data;
|
|
42620
|
+
}
|
|
42440
42621
|
} else if (e1.hvcC) {
|
|
42441
42622
|
v2.codecType = VideoCodecType$2.HEVC;
|
|
42442
42623
|
v2.codec = e1.hvcC.codec;
|
|
@@ -42482,7 +42663,7 @@ var MP4Parser$1 = /* @__PURE__ */ function() {
|
|
|
42482
42663
|
a2.duration = aTrack.mdia.mdhd.duration || a2.mvhdDurtion / a2.mvhdTimecale * a2.timescale;
|
|
42483
42664
|
var _e = aTrack.mdia.minf.stbl.stsd.entries[0];
|
|
42484
42665
|
a2.sampleSize = _e.sampleSize;
|
|
42485
|
-
a2.sampleRate = _e
|
|
42666
|
+
a2.sampleRate = getAudioSampleRate(_e);
|
|
42486
42667
|
a2.channelCount = _e.channelCount;
|
|
42487
42668
|
a2.present = true;
|
|
42488
42669
|
switch (_e.type) {
|
|
@@ -42665,6 +42846,19 @@ var MP4Parser$1 = /* @__PURE__ */ function() {
|
|
|
42665
42846
|
}]);
|
|
42666
42847
|
return MP4Parser2;
|
|
42667
42848
|
}();
|
|
42849
|
+
function getAudioSampleRate(audioSampleEntry) {
|
|
42850
|
+
var sampleRate = 0;
|
|
42851
|
+
if (audioSampleEntry.type === "mp4a") {
|
|
42852
|
+
if (audioSampleEntry.sampleRate > 0) {
|
|
42853
|
+
sampleRate = audioSampleEntry.sampleRate;
|
|
42854
|
+
} else {
|
|
42855
|
+
sampleRate = audioSampleEntry.esds.sampleRate;
|
|
42856
|
+
}
|
|
42857
|
+
} else {
|
|
42858
|
+
sampleRate = audioSampleEntry.sampleRate;
|
|
42859
|
+
}
|
|
42860
|
+
return sampleRate || 0;
|
|
42861
|
+
}
|
|
42668
42862
|
function getSamples$1(stts, stsc, stsz, stco, ctts, stss) {
|
|
42669
42863
|
var samples = [];
|
|
42670
42864
|
var cttsEntries = ctts === null || ctts === void 0 ? void 0 : ctts.entries;
|
|
@@ -48015,7 +48209,7 @@ var Hls$1 = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
48015
48209
|
if (!_this.media)
|
|
48016
48210
|
return;
|
|
48017
48211
|
var cfg = _this.config;
|
|
48018
|
-
if (cfg.isLive && cfg.maxLatency && cfg.targetLatency
|
|
48212
|
+
if (cfg.isLive && cfg.maxLatency && cfg.targetLatency) {
|
|
48019
48213
|
var liveEdge = _this._playlist.liveEdge;
|
|
48020
48214
|
if (!liveEdge)
|
|
48021
48215
|
return;
|
|
@@ -48029,7 +48223,7 @@ var Hls$1 = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
48029
48223
|
var _this$_seiService;
|
|
48030
48224
|
(_this$_seiService = _this._seiService) === null || _this$_seiService === void 0 ? void 0 : _this$_seiService.throw(_this.media.currentTime);
|
|
48031
48225
|
}
|
|
48032
|
-
if (
|
|
48226
|
+
if (cfg.allowedStreamTrackChange && !cfg.softDecode && _this.media.readyState) {
|
|
48033
48227
|
_this._checkStreamTrackChange(_this.media.currentTime);
|
|
48034
48228
|
}
|
|
48035
48229
|
});
|
|
@@ -49207,7 +49401,7 @@ var Hls$1 = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
49207
49401
|
}]);
|
|
49208
49402
|
return Hls2;
|
|
49209
49403
|
}(EventEmitter$2);
|
|
49210
|
-
_defineProperty$g(Hls$1, "version", "3.0.
|
|
49404
|
+
_defineProperty$g(Hls$1, "version", "3.0.24-rc.2");
|
|
49211
49405
|
try {
|
|
49212
49406
|
if (localStorage.getItem("xgd")) {
|
|
49213
49407
|
Hls$1.enableLogger();
|
|
@@ -127620,7 +127814,7 @@ var path$b$1 = path$t, now$5 = path$b$1.Date.now, parent$14 = now$5, now$4 = par
|
|
|
127620
127814
|
_classCallCheck$b(this, e4), _defineProperty$9(this, "logger", void 0), _defineProperty$9(this, "level", void 0), _defineProperty$9(this, "customLogger", void 0), this.level = null == r2 ? void 0 : r2.level, this.customLogger = null == r2 ? void 0 : r2.logger, this.logger = function(e5, r3) {
|
|
127621
127815
|
var o2, a2, i2, s2;
|
|
127622
127816
|
try {
|
|
127623
|
-
s2 = "0.0.0-feat-
|
|
127817
|
+
s2 = "0.0.0-feat-ott-20251117064959";
|
|
127624
127818
|
} catch (e6) {
|
|
127625
127819
|
s2 = "--";
|
|
127626
127820
|
}
|
|
@@ -128930,9 +129124,12 @@ var entryVirtual$2 = entryVirtual$j, splice$7 = entryVirtual$2("Array").splice,
|
|
|
128930
129124
|
} }]), e4;
|
|
128931
129125
|
}(), FeatureCenter = function() {
|
|
128932
129126
|
function e4(t4) {
|
|
128933
|
-
|
|
129127
|
+
var r3 = this;
|
|
129128
|
+
_classCallCheck$b(this, e4), _defineProperty$9(this, "featureList", void 0), _defineProperty$9(this, "videoType", void 0), this.videoType = t4.type || VideoType.VOD, this.featureList = _objectSpread2$5(_objectSpread2$5(_objectSpread2$5(_objectSpread2$5({ deviceId: null == t4 ? void 0 : t4.deviceId, userId: null == t4 ? void 0 : t4.userId, playerVersion: null == t4 ? void 0 : t4.playerVersion }, this.initSync()), this.getGPUInfo()), this.getLocalDeviceMarkInfo()), this.getH265FeatureList()), this.getOSVersionAsync().then(function(e5) {
|
|
129129
|
+
r3.updateFeatureList({ osVersion: e5 });
|
|
129130
|
+
});
|
|
128934
129131
|
}
|
|
128935
|
-
var t3;
|
|
129132
|
+
var t3, r2;
|
|
128936
129133
|
return _createClass$b(e4, [{ key: "initSync", value: function() {
|
|
128937
129134
|
return _objectSpread2$5({}, this.getBrowserInfo());
|
|
128938
129135
|
} }, { key: "updateFeatureList", value: function(e5) {
|
|
@@ -128946,13 +129143,13 @@ var entryVirtual$2 = entryVirtual$j, splice$7 = entryVirtual$2("Array").splice,
|
|
|
128946
129143
|
if (!e5)
|
|
128947
129144
|
return t4;
|
|
128948
129145
|
try {
|
|
128949
|
-
var
|
|
128950
|
-
return { cpuScore:
|
|
129146
|
+
var r3 = JSON.parse(e5);
|
|
129147
|
+
return { cpuScore: r3.cpuScore, netScore: r3.netScore, renderScore: r3.renderScore };
|
|
128951
129148
|
} catch (e6) {
|
|
128952
129149
|
}
|
|
128953
129150
|
return t4;
|
|
128954
|
-
} }, { key: "getDeviceMarkInfoAsync", value: (
|
|
128955
|
-
var t4,
|
|
129151
|
+
} }, { key: "getDeviceMarkInfoAsync", value: (r2 = _asyncToGenerator$4(_regeneratorRuntime$4().mark(function e5() {
|
|
129152
|
+
var t4, r3, n2, o2, a2, i2;
|
|
128956
129153
|
return _regeneratorRuntime$4().wrap(function(e6) {
|
|
128957
129154
|
for (; ; )
|
|
128958
129155
|
switch (e6.prev = e6.next) {
|
|
@@ -128965,21 +129162,76 @@ var entryVirtual$2 = entryVirtual$j, splice$7 = entryVirtual$2("Array").splice,
|
|
|
128965
129162
|
}
|
|
128966
129163
|
e6.t0 = {};
|
|
128967
129164
|
case 6:
|
|
128968
|
-
return
|
|
129165
|
+
return r3 = e6.t0, n2 = r3.cpu, o2 = r3.net, a2 = r3.render, i2 = { cpuScore: (null == n2 ? void 0 : n2.score) || -1, netScore: (null == o2 ? void 0 : o2.score) || -1, renderScore: (null == a2 ? void 0 : a2.score) || -1 }, setLocalStorage(this.videoType === VideoType.LIVE ? FEATURE_STORAGE_KEY.DEVICE_INFO_LIVE : FEATURE_STORAGE_KEY.DEVICE_INFO, _JSON$stringify(i2)), this.updateFeatureList(i2), e6.abrupt("return", i2);
|
|
128969
129166
|
case 14:
|
|
128970
129167
|
case "end":
|
|
128971
129168
|
return e6.stop();
|
|
128972
129169
|
}
|
|
128973
129170
|
}, e5, this);
|
|
128974
129171
|
})), function() {
|
|
128975
|
-
return
|
|
129172
|
+
return r2.apply(this, arguments);
|
|
128976
129173
|
}) }, { key: "getBrowserInfo", value: function() {
|
|
128977
129174
|
var e5 = Bowser.getParser(navigator.userAgent);
|
|
128978
|
-
return { browserVersion: e5.getBrowserVersion(), browserName: e5.getBrowserName(), cpuCore: navigator.hardwareConcurrency, osName: e5.getOSName(), osVersion: e5.getOSVersion(), platformType:
|
|
129175
|
+
return { browserVersion: e5.getBrowserVersion(), browserName: e5.getBrowserName(), cpuCore: navigator.hardwareConcurrency, osName: e5.getOSName(), osVersion: e5.getOSVersion(), platformType: this.getPlatformType(), engineName: e5.getEngineName() };
|
|
129176
|
+
} }, { key: "getPlatformType", value: function() {
|
|
129177
|
+
var e5 = Bowser.getParser(navigator.userAgent), t4 = e5.getOSName();
|
|
129178
|
+
return "WebOS" === t4 || "Tizen" === t4 ? "tv" : e5.getPlatformType();
|
|
129179
|
+
} }, { key: "getOSVersionAsync", value: (t3 = _asyncToGenerator$4(_regeneratorRuntime$4().mark(function e5() {
|
|
129180
|
+
var t4, r3;
|
|
129181
|
+
return _regeneratorRuntime$4().wrap(function(e6) {
|
|
129182
|
+
for (; ; )
|
|
129183
|
+
switch (e6.prev = e6.next) {
|
|
129184
|
+
case 0:
|
|
129185
|
+
if (t4 = Bowser.getParser(navigator.userAgent), !(r3 = t4.getOSVersion())) {
|
|
129186
|
+
e6.next = 4;
|
|
129187
|
+
break;
|
|
129188
|
+
}
|
|
129189
|
+
return e6.abrupt("return", r3);
|
|
129190
|
+
case 4:
|
|
129191
|
+
if ("tv" != this.getPlatformType()) {
|
|
129192
|
+
e6.next = 8;
|
|
129193
|
+
break;
|
|
129194
|
+
}
|
|
129195
|
+
return e6.next = 7, this.getSmartTvInfoAsync();
|
|
129196
|
+
case 7:
|
|
129197
|
+
return e6.abrupt("return", e6.sent.osVersion);
|
|
129198
|
+
case 8:
|
|
129199
|
+
return e6.abrupt("return", "unknown");
|
|
129200
|
+
case 9:
|
|
129201
|
+
case "end":
|
|
129202
|
+
return e6.stop();
|
|
129203
|
+
}
|
|
129204
|
+
}, e5, this);
|
|
129205
|
+
})), function() {
|
|
129206
|
+
return t3.apply(this, arguments);
|
|
129207
|
+
}) }, { key: "getSmartTvInfoAsync", value: function() {
|
|
129208
|
+
return new _Promise(function(e5) {
|
|
129209
|
+
var t4 = navigator.userAgent.toLowerCase();
|
|
129210
|
+
if ((_includesInstanceProperty(t4).call(t4, "webos") || _includesInstanceProperty(t4).call(t4, "web0s")) && window.webOS.deviceInfo(function(t5) {
|
|
129211
|
+
var r4 = (null == t5 ? void 0 : t5.sdkVersion) || "unknown";
|
|
129212
|
+
e5({ osVersion: r4 });
|
|
129213
|
+
}), _includesInstanceProperty(t4).call(t4, "tizen")) {
|
|
129214
|
+
var r3 = "unknown";
|
|
129215
|
+
try {
|
|
129216
|
+
var n2;
|
|
129217
|
+
if ("undefined" != typeof window && null !== (n2 = window) && void 0 !== n2 && null !== (n2 = n2.webapis) && void 0 !== n2 && n2.systeminfo) {
|
|
129218
|
+
var o2 = window.webapis.systeminfo.getVersion();
|
|
129219
|
+
o2 && (r3 = o2);
|
|
129220
|
+
}
|
|
129221
|
+
if ("unknown" === r3) {
|
|
129222
|
+
var a2, i2 = null === (a2 = window) || void 0 === a2 || null === (a2 = a2.tizen) || void 0 === a2 || null === (a2 = a2.systeminfo) || void 0 === a2 ? void 0 : a2.getCapability("http://tizen.org/feature/platform.version");
|
|
129223
|
+
i2 && (r3 = i2);
|
|
129224
|
+
}
|
|
129225
|
+
} catch (e6) {
|
|
129226
|
+
r3 = "unknown", console.warn("Failed to get Tizen version", e6);
|
|
129227
|
+
}
|
|
129228
|
+
e5({ osVersion: r3 });
|
|
129229
|
+
}
|
|
129230
|
+
});
|
|
128979
129231
|
} }, { key: "getGPUInfo", value: function() {
|
|
128980
129232
|
try {
|
|
128981
|
-
var e5 = Gpu$1.parseVendor(), t4 = Gpu$1.getGPUVendor(),
|
|
128982
|
-
return { gpuScore: (null == e5 ? void 0 : e5.score) || -1, isCloseGPU:
|
|
129233
|
+
var e5 = Gpu$1.parseVendor(), t4 = Gpu$1.getGPUVendor(), r3 = _includesInstanceProperty(t4).call(t4, "SwiftShader");
|
|
129234
|
+
return { gpuScore: (null == e5 ? void 0 : e5.score) || -1, isCloseGPU: r3 };
|
|
128983
129235
|
} catch (e6) {
|
|
128984
129236
|
return { gpuScore: -1, isCloseGPU: false };
|
|
128985
129237
|
}
|
|
@@ -129533,9 +129785,9 @@ lodash_merge.exports, function(e4, t3) {
|
|
|
129533
129785
|
} catch (e6) {
|
|
129534
129786
|
}
|
|
129535
129787
|
}(), O2 = _ && _.isTypedArray;
|
|
129536
|
-
var P2, I2, E2, T2 = Array.prototype, A2 = Function.prototype,
|
|
129788
|
+
var P2, I2, E2, T2 = Array.prototype, A2 = Function.prototype, w2 = Object.prototype, C2 = g2["__core-js_shared__"], R2 = A2.toString, j = w2.hasOwnProperty, N2 = (P2 = /[^.]+$/.exec(C2 && _keysInstanceProperty(C2) && _keysInstanceProperty(C2).IE_PROTO || "")) ? "Symbol(src)_1." + P2 : "", M = w2.toString, D2 = R2.call(Object), k2 = RegExp("^" + R2.call(j).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), L2 = m2 ? g2.Buffer : void 0, x2 = g2.Symbol, U2 = g2.Uint8Array, F2 = L2 ? L2.allocUnsafe : void 0, B2 = (I2 = _Object$getPrototypeOf$2, E2 = Object, function(e5) {
|
|
129537
129789
|
return I2(E2(e5));
|
|
129538
|
-
}), V2 = _Object$create$2,
|
|
129790
|
+
}), V2 = _Object$create$2, G = w2.propertyIsEnumerable, K = _spliceInstanceProperty(T2), H = x2 ? x2.toStringTag : void 0, W2 = function() {
|
|
129539
129791
|
try {
|
|
129540
129792
|
var e5 = be(Object, "defineProperty");
|
|
129541
129793
|
return e5({}, "", {}), e5;
|
|
@@ -129545,7 +129797,7 @@ lodash_merge.exports, function(e4, t3) {
|
|
|
129545
129797
|
function e5() {
|
|
129546
129798
|
}
|
|
129547
129799
|
return function(t4) {
|
|
129548
|
-
if (!
|
|
129800
|
+
if (!Ce(t4))
|
|
129549
129801
|
return {};
|
|
129550
129802
|
if (V2)
|
|
129551
129803
|
return V2(t4);
|
|
@@ -129627,7 +129879,7 @@ lodash_merge.exports, function(e4, t3) {
|
|
|
129627
129879
|
this.__data__ = [], this.size = 0;
|
|
129628
129880
|
}, ee.prototype.delete = function(e5) {
|
|
129629
129881
|
var t4 = this.__data__, r3 = ie(t4, e5);
|
|
129630
|
-
return !(r3 < 0) && (r3 == t4.length - 1 ? t4.pop() :
|
|
129882
|
+
return !(r3 < 0) && (r3 == t4.length - 1 ? t4.pop() : K.call(t4, r3, 1), --this.size, true);
|
|
129631
129883
|
}, ee.prototype.get = function(e5) {
|
|
129632
129884
|
var t4 = this.__data__, r3 = ie(t4, e5);
|
|
129633
129885
|
return r3 < 0 ? void 0 : t4[r3][1];
|
|
@@ -129694,7 +129946,7 @@ lodash_merge.exports, function(e4, t3) {
|
|
|
129694
129946
|
return Re(e5) && ue(e5) == o2;
|
|
129695
129947
|
}
|
|
129696
129948
|
function pe(e5) {
|
|
129697
|
-
return !(!
|
|
129949
|
+
return !(!Ce(e5) || function(e6) {
|
|
129698
129950
|
return !!N2 && N2 in e6;
|
|
129699
129951
|
}(e5)) && (Ae(e5) ? k2 : p2).test(function(e6) {
|
|
129700
129952
|
if (null != e6) {
|
|
@@ -129711,7 +129963,7 @@ lodash_merge.exports, function(e4, t3) {
|
|
|
129711
129963
|
}(e5));
|
|
129712
129964
|
}
|
|
129713
129965
|
function fe(e5) {
|
|
129714
|
-
if (!
|
|
129966
|
+
if (!Ce(e5))
|
|
129715
129967
|
return function(e6) {
|
|
129716
129968
|
var t5 = [];
|
|
129717
129969
|
if (null != e6)
|
|
@@ -129726,7 +129978,7 @@ lodash_merge.exports, function(e4, t3) {
|
|
|
129726
129978
|
}
|
|
129727
129979
|
function ye(e5, t4, r3, n3, o3) {
|
|
129728
129980
|
e5 !== t4 && ce(t4, function(a3, i3) {
|
|
129729
|
-
if (o3 || (o3 = new re()),
|
|
129981
|
+
if (o3 || (o3 = new re()), Ce(a3))
|
|
129730
129982
|
!function(e6, t5, r4, n4, o4, a4, i4) {
|
|
129731
129983
|
var s4 = Se(e6, r4), l3 = Se(t5, r4), u3 = i4.get(l3);
|
|
129732
129984
|
if (u3)
|
|
@@ -129764,7 +130016,7 @@ lodash_merge.exports, function(e4, t3) {
|
|
|
129764
130016
|
}
|
|
129765
130017
|
return r5;
|
|
129766
130018
|
}(e7, Ne(e7));
|
|
129767
|
-
}(s4) :
|
|
130019
|
+
}(s4) : Ce(s4) && !Ae(s4) || ($3 = function(e7) {
|
|
129768
130020
|
return "function" != typeof e7.constructor || me(e7) ? {} : X(B2(e7));
|
|
129769
130021
|
}(l3))) : p3 = false;
|
|
129770
130022
|
}
|
|
@@ -129825,7 +130077,7 @@ lodash_merge.exports, function(e4, t3) {
|
|
|
129825
130077
|
}
|
|
129826
130078
|
function me(e5) {
|
|
129827
130079
|
var t4 = e5 && e5.constructor;
|
|
129828
|
-
return e5 === ("function" == typeof t4 && t4.prototype ||
|
|
130080
|
+
return e5 === ("function" == typeof t4 && t4.prototype || w2);
|
|
129829
130081
|
}
|
|
129830
130082
|
function Se(e5, t4) {
|
|
129831
130083
|
if (("constructor" !== t4 || "function" != typeof e5[t4]) && "__proto__" != t4)
|
|
@@ -129849,24 +130101,24 @@ lodash_merge.exports, function(e4, t3) {
|
|
|
129849
130101
|
var Pe = $e(function() {
|
|
129850
130102
|
return arguments;
|
|
129851
130103
|
}()) ? $e : function(e5) {
|
|
129852
|
-
return Re(e5) && j.call(e5, "callee") && !
|
|
130104
|
+
return Re(e5) && j.call(e5, "callee") && !G.call(e5, "callee");
|
|
129853
130105
|
}, Ie = _Array$isArray;
|
|
129854
130106
|
function Ee(e5) {
|
|
129855
|
-
return null != e5 &&
|
|
130107
|
+
return null != e5 && we(e5.length) && !Ae(e5);
|
|
129856
130108
|
}
|
|
129857
130109
|
var Te = Y || function() {
|
|
129858
130110
|
return false;
|
|
129859
130111
|
};
|
|
129860
130112
|
function Ae(e5) {
|
|
129861
|
-
if (!
|
|
130113
|
+
if (!Ce(e5))
|
|
129862
130114
|
return false;
|
|
129863
130115
|
var t4 = ue(e5);
|
|
129864
130116
|
return t4 == i2 || t4 == s2 || t4 == a2 || t4 == u2;
|
|
129865
130117
|
}
|
|
129866
|
-
function
|
|
130118
|
+
function we(e5) {
|
|
129867
130119
|
return "number" == typeof e5 && e5 > -1 && e5 % 1 == 0 && e5 <= n2;
|
|
129868
130120
|
}
|
|
129869
|
-
function
|
|
130121
|
+
function Ce(e5) {
|
|
129870
130122
|
var t4 = _typeof$8(e5);
|
|
129871
130123
|
return null != e5 && ("object" == t4 || "function" == t4);
|
|
129872
130124
|
}
|
|
@@ -129878,7 +130130,7 @@ lodash_merge.exports, function(e4, t3) {
|
|
|
129878
130130
|
return e5(t4);
|
|
129879
130131
|
};
|
|
129880
130132
|
}(O2) : function(e5) {
|
|
129881
|
-
return Re(e5) &&
|
|
130133
|
+
return Re(e5) && we(e5.length) && !!y2[ue(e5)];
|
|
129882
130134
|
};
|
|
129883
130135
|
function Ne(e5) {
|
|
129884
130136
|
return Ee(e5) ? ne(e5, true) : fe(e5);
|
|
@@ -129888,7 +130140,7 @@ lodash_merge.exports, function(e4, t3) {
|
|
|
129888
130140
|
}, de(function(e5, t4) {
|
|
129889
130141
|
var r3 = -1, n3 = t4.length, o3 = n3 > 1 ? t4[n3 - 1] : void 0, a3 = n3 > 2 ? t4[2] : void 0;
|
|
129890
130142
|
for (o3 = Me.length > 3 && "function" == typeof o3 ? (n3--, o3) : void 0, a3 && function(e6, t5, r4) {
|
|
129891
|
-
if (!
|
|
130143
|
+
if (!Ce(r4))
|
|
129892
130144
|
return false;
|
|
129893
130145
|
var n4 = _typeof$8(t5);
|
|
129894
130146
|
return !!("number" == n4 ? Ee(r4) && ve(t5, r4.length) : "string" == n4 && t5 in r4) && Oe(r4[t5], e6);
|
|
@@ -130898,41 +131150,41 @@ function _$jsvmprt(e4, t3, r2) {
|
|
|
130898
131150
|
for (var g2 = []; ; )
|
|
130899
131151
|
try {
|
|
130900
131152
|
switch (i2[t4++]) {
|
|
130901
|
-
case
|
|
131153
|
+
case 71:
|
|
130902
131154
|
y3[++f3] = null;
|
|
130903
131155
|
break;
|
|
130904
|
-
case
|
|
131156
|
+
case 48:
|
|
130905
131157
|
l3 = ((l3 = ((l3 = i2[t4++]) << 8) + i2[t4++]) << 8) + i2[t4++], y3[++f3] = (l3 << 8) + i2[t4++];
|
|
130906
131158
|
break;
|
|
130907
|
-
case
|
|
131159
|
+
case 32:
|
|
130908
131160
|
l3 = (i2[t4] << 8) + i2[t4 + 1], t4 += 2, y3[++f3] = s2[l3];
|
|
130909
131161
|
break;
|
|
130910
|
-
case
|
|
131162
|
+
case 73:
|
|
130911
131163
|
y3[++f3] = void 0;
|
|
130912
131164
|
break;
|
|
130913
|
-
case
|
|
131165
|
+
case 8:
|
|
130914
131166
|
l3 = (i2[t4] << 8) + i2[t4 + 1], t4 += 2, f3 = f3 - l3 + 1, c3 = y3.slice(f3, f3 + l3), y3[f3] = c3;
|
|
130915
131167
|
break;
|
|
130916
|
-
case
|
|
131168
|
+
case 35:
|
|
130917
131169
|
for (c3 = i2[t4++], u3 = i2[t4++], $3 = h2; c3 > 0; --c3)
|
|
130918
131170
|
$3 = $3.p;
|
|
130919
131171
|
y3[++f3] = $3[u3];
|
|
130920
131172
|
break;
|
|
130921
|
-
case
|
|
131173
|
+
case 50:
|
|
130922
131174
|
l3 = (i2[t4] << 8) + i2[t4 + 1], t4 += 2, c3 = s2[l3], y3[f3] = y3[f3][c3];
|
|
130923
131175
|
break;
|
|
130924
|
-
case
|
|
131176
|
+
case 42:
|
|
130925
131177
|
for (c3 = i2[t4++], u3 = i2[t4++], $3 = h2; c3 > 0; --c3)
|
|
130926
131178
|
$3 = $3.p;
|
|
130927
131179
|
$3[u3] = y3[f3--];
|
|
130928
131180
|
break;
|
|
130929
|
-
case
|
|
131181
|
+
case 2:
|
|
130930
131182
|
l3 = i2[t4++], c3 = y3[f3--], (u3 = function e6() {
|
|
130931
131183
|
var t5 = e6._v;
|
|
130932
131184
|
return (0, e6._u)(t5[0], arguments, t5[1], t5[2], this);
|
|
130933
131185
|
})._v = [c3, l3, h2], u3._u = e5, y3[++f3] = u3;
|
|
130934
131186
|
break;
|
|
130935
|
-
case
|
|
131187
|
+
case 13:
|
|
130936
131188
|
for (c3 = y3[f3--], u3 = null; $3 = g2.pop(); )
|
|
130937
131189
|
if (2 === $3[0] || 3 === $3[0]) {
|
|
130938
131190
|
u3 = $3;
|
|
@@ -130946,12 +131198,12 @@ function _$jsvmprt(e4, t3, r2) {
|
|
|
130946
131198
|
t4 = d3[1], a3 = d3[2], h2 = d3[3], g2 = d3[4], y3[++f3] = c3, d3 = d3[0];
|
|
130947
131199
|
}
|
|
130948
131200
|
break;
|
|
130949
|
-
case
|
|
131201
|
+
case 43:
|
|
130950
131202
|
f3 -= l3 = i2[t4++], u3 = y3.slice(f3 + 1, f3 + l3 + 1), c3 = y3[f3--], $3 = y3[f3--], c3._u === e5 ? (c3 = c3._v, d3 = [d3, t4, a3, h2, g2], t4 = c3[0], null == $3 && ($3 = function() {
|
|
130951
131203
|
return this;
|
|
130952
131204
|
}()), a3 = $3, (h2 = [u3].concat(u3)).length = Math.min(c3[1], l3) + 1, h2.p = c3[2], g2 = []) : (p3 = c3.apply($3, u3), y3[++f3] = p3);
|
|
130953
131205
|
break;
|
|
130954
|
-
case
|
|
131206
|
+
case 9:
|
|
130955
131207
|
c3 = y3[f3], y3[++f3] = c3;
|
|
130956
131208
|
break;
|
|
130957
131209
|
default:
|
|
@@ -130976,7 +131228,7 @@ function _$jsvmprt(e4, t3, r2) {
|
|
|
130976
131228
|
}
|
|
130977
131229
|
}(l2, [], 0, t3, r2);
|
|
130978
131230
|
}
|
|
130979
|
-
_$jsvmprt("
|
|
131231
|
+
_$jsvmprt("504B0101c6625bb800000028b95862c70000003447230200230001230002230003230004080004093200002000012b012000022b02093200032b000d300000000002042a0101490d00040450555354011c200b0d50564a584f575249035b5352400b484b0b4c0a0b504d0d54025403504a5e084e55694e4853545d", { get 0() {
|
|
130980
131232
|
return HmacSHA1;
|
|
130981
131233
|
}, get 1() {
|
|
130982
131234
|
return generateSignature;
|
|
@@ -130984,70 +131236,92 @@ _$jsvmprt("504B0101d6ff48f400000028f44afcd4000000343e480200480001480002480003480
|
|
|
130984
131236
|
generateSignature = e4;
|
|
130985
131237
|
} }, void 0);
|
|
130986
131238
|
var _ADAPTER, VodSettingsLoader = function() {
|
|
130987
|
-
function e4(
|
|
130988
|
-
var
|
|
130989
|
-
_classCallCheck$b(this, e4), _defineProperty$9(this, "appId", void 0), _defineProperty$9(this, "ctx", void 0), _defineProperty$9(this, "host", void 0), _defineProperty$9(this, "needSignature", true), _defineProperty$9(this, "region", void 0), _defineProperty$9(this, "scene", void 0), _defineProperty$9(this, "ext", void 0), this.scene = (
|
|
131239
|
+
function e4(t4, r3, n2) {
|
|
131240
|
+
var o2, a2, i2, s2;
|
|
131241
|
+
_classCallCheck$b(this, e4), _defineProperty$9(this, "appId", void 0), _defineProperty$9(this, "ctx", void 0), _defineProperty$9(this, "host", void 0), _defineProperty$9(this, "needSignature", true), _defineProperty$9(this, "region", void 0), _defineProperty$9(this, "fetchOptions", void 0), _defineProperty$9(this, "scene", void 0), _defineProperty$9(this, "ext", void 0), this.scene = (o2 = {}, _defineProperty$9(o2, VideoType.LIVE, 1), _defineProperty$9(o2, VideoType.VOD, 0), o2)[r3.videoType], this.ext = _objectSpread2$5({ userId: null !== (a2 = r3.featureCenter.getFeatureList().userId) && void 0 !== a2 ? a2 : "", playerVerson: null !== (i2 = r3.featureCenter.getFeatureList().playerVersion) && void 0 !== i2 ? i2 : "" }, this.getConfigType(r3.strategies)), this.appId = t4, this.ctx = r3, this.region = null !== (s2 = n2.region) && void 0 !== s2 ? s2 : Regions.CN, this.fetchOptions = n2.fetchOptions, this.host = this.getHostByRegion();
|
|
130990
131242
|
}
|
|
131243
|
+
var t3, r2;
|
|
130991
131244
|
return _createClass$b(e4, [{ key: "getConfigType", value: function(e5) {
|
|
130992
|
-
var
|
|
131245
|
+
var t4;
|
|
130993
131246
|
if (!e5)
|
|
130994
131247
|
return {};
|
|
130995
|
-
var
|
|
130996
|
-
return _forEachInstanceProperty(
|
|
130997
|
-
var n2 = e5[
|
|
130998
|
-
n2 && (
|
|
130999
|
-
}),
|
|
131248
|
+
var r3 = {};
|
|
131249
|
+
return _forEachInstanceProperty(t4 = _Object$keys(e5)).call(t4, function(t5) {
|
|
131250
|
+
var n2 = e5[t5];
|
|
131251
|
+
n2 && (r3["".concat(t5, "_id")] = "object" === _typeof$8(n2) && n2.configId ? n2.configId : "default");
|
|
131252
|
+
}), r3;
|
|
131000
131253
|
} }, { key: "getCacheKey", value: function() {
|
|
131001
131254
|
return _JSON$stringify([this.appId, this.ctx.cacheKey, this.ctx.featureCenter.getH265FeatureList().isHevcSupported, this.ctx.featureCenter.getBrowserInfo(), this.ctx.featureCenter.getFeatureList().deviceId]);
|
|
131002
131255
|
} }, { key: "fetch", value: function(e5) {
|
|
131003
|
-
function
|
|
131256
|
+
function t4() {
|
|
131004
131257
|
return e5.apply(this, arguments);
|
|
131005
131258
|
}
|
|
131006
|
-
return
|
|
131259
|
+
return t4.toString = function() {
|
|
131007
131260
|
return e5.toString();
|
|
131008
|
-
},
|
|
131261
|
+
}, t4;
|
|
131009
131262
|
}(_asyncToGenerator$4(_regeneratorRuntime$4().mark(function e5() {
|
|
131010
|
-
var
|
|
131263
|
+
var t4, r3, n2, o2, a2, i2, s2, l2;
|
|
131011
131264
|
return _regeneratorRuntime$4().wrap(function(e6) {
|
|
131012
131265
|
for (; ; )
|
|
131013
131266
|
switch (e6.prev = e6.next) {
|
|
131014
131267
|
case 0:
|
|
131015
|
-
return e6.
|
|
131016
|
-
case
|
|
131017
|
-
|
|
131018
|
-
|
|
131268
|
+
return e6.next = 2, this.generateUrl();
|
|
131269
|
+
case 2:
|
|
131270
|
+
return t4 = e6.sent, e6.prev = 3, e6.next = 6, fetch(t4, _objectSpread2$5({ mode: "cors" }, this.fetchOptions));
|
|
131271
|
+
case 6:
|
|
131272
|
+
if ((r3 = e6.sent).ok) {
|
|
131273
|
+
e6.next = 9;
|
|
131019
131274
|
break;
|
|
131020
131275
|
}
|
|
131021
131276
|
throw new Error("Network response was not OK");
|
|
131022
|
-
case
|
|
131023
|
-
return e6.next =
|
|
131024
|
-
case
|
|
131025
|
-
return
|
|
131026
|
-
case 17:
|
|
131027
|
-
throw e6.prev = 17, e6.t0 = e6.catch(0), e6.t0;
|
|
131277
|
+
case 9:
|
|
131278
|
+
return e6.next = 11, r3.json();
|
|
131279
|
+
case 11:
|
|
131280
|
+
return n2 = e6.sent, o2 = n2.data, a2 = o2.custom_settings.web, i2 = o2.general_settings, s2 = i2.use_local_cache, l2 = i2.local_cache_expire, e6.abrupt("return", _objectSpread2$5(_objectSpread2$5({}, a2), {}, { use_local_cache: s2, local_cache_expired_at: l2 > 0 ? _Date$now() + 1e3 * l2 : void 0, cache_key: this.getCacheKey() }));
|
|
131028
131281
|
case 20:
|
|
131282
|
+
throw e6.prev = 20, e6.t0 = e6.catch(3), e6.t0;
|
|
131283
|
+
case 23:
|
|
131029
131284
|
case "end":
|
|
131030
131285
|
return e6.stop();
|
|
131031
131286
|
}
|
|
131032
|
-
}, e5, this, [[
|
|
131287
|
+
}, e5, this, [[3, 20]]);
|
|
131033
131288
|
}))) }, { key: "getHostByRegion", value: function() {
|
|
131034
131289
|
var e5;
|
|
131035
131290
|
return (null === (e5 = { cn: { settingsHost: "vod-settings.volcvod.com" } }[this.region]) || void 0 === e5 ? void 0 : e5.settingsHost) || "vod-settings.volcvod.com";
|
|
131036
|
-
} }, { key: "generateSearchParams", value: function(
|
|
131037
|
-
|
|
131038
|
-
|
|
131039
|
-
|
|
131040
|
-
|
|
131041
|
-
|
|
131042
|
-
|
|
131043
|
-
|
|
131044
|
-
|
|
131045
|
-
|
|
131046
|
-
|
|
131291
|
+
} }, { key: "generateSearchParams", value: (r2 = _asyncToGenerator$4(_regeneratorRuntime$4().mark(function e5(t4) {
|
|
131292
|
+
var r3, n2, o2;
|
|
131293
|
+
return _regeneratorRuntime$4().wrap(function(e6) {
|
|
131294
|
+
for (; ; )
|
|
131295
|
+
switch (e6.prev = e6.next) {
|
|
131296
|
+
case 0:
|
|
131297
|
+
return e6.next = 2, this.ctx.featureCenter.getOSVersionAsync();
|
|
131298
|
+
case 2:
|
|
131299
|
+
return r3 = e6.sent, t4.searchParams.set("module", "web"), t4.searchParams.set("aid", String(this.appId)), t4.searchParams.set("region", this.region), t4.searchParams.set("web_support_hardware_decode_bytevc1", String(this.ctx.featureCenter.getH265FeatureList().isHevcSupported)), t4.searchParams.set("web_os", this.ctx.featureCenter.getBrowserInfo().osName), t4.searchParams.set("web_os_version", r3), t4.searchParams.set("web_platform", this.ctx.featureCenter.getBrowserInfo().platformType), t4.searchParams.set("web_browser", this.ctx.featureCenter.getBrowserInfo().browserName), t4.searchParams.set("web_browser_version", this.ctx.featureCenter.getBrowserInfo().browserVersion), t4.searchParams.set("web_cpu_core", String(this.ctx.featureCenter.getBrowserInfo().cpuCore)), t4.searchParams.set("web_scene", String(this.scene)), t4.searchParams.set("web_ext", _JSON$stringify(this.ext)), t4.searchParams.set("device_id", this.ctx.featureCenter.getFeatureList().deviceId), this.needSignature && (n2 = _Date$now(), t4.searchParams.set("timestamp", String(n2)), o2 = generateSignature(this.appId, this.ctx.featureCenter.getFeatureList().deviceId, this.ctx.featureCenter.getBrowserInfo().browserName, n2), t4.searchParams.set("signature", o2)), e6.abrupt("return", t4);
|
|
131300
|
+
case 18:
|
|
131301
|
+
case "end":
|
|
131302
|
+
return e6.stop();
|
|
131303
|
+
}
|
|
131304
|
+
}, e5, this);
|
|
131305
|
+
})), function(e5) {
|
|
131306
|
+
return r2.apply(this, arguments);
|
|
131307
|
+
}) }, { key: "generateUrl", value: (t3 = _asyncToGenerator$4(_regeneratorRuntime$4().mark(function e5() {
|
|
131308
|
+
return _regeneratorRuntime$4().wrap(function(e6) {
|
|
131309
|
+
for (; ; )
|
|
131310
|
+
switch (e6.prev = e6.next) {
|
|
131311
|
+
case 0:
|
|
131312
|
+
return e6.abrupt("return", this.generateSearchParams(new _URL("https://".concat(this.host, "/vod/settings/v1"))));
|
|
131313
|
+
case 1:
|
|
131314
|
+
case "end":
|
|
131315
|
+
return e6.stop();
|
|
131316
|
+
}
|
|
131317
|
+
}, e5, this);
|
|
131318
|
+
})), function() {
|
|
131319
|
+
return t3.apply(this, arguments);
|
|
131320
|
+
}) }]), e4;
|
|
131047
131321
|
}(), logger$3 = new Logger$3("VeStrategy"), ADAPTER = (_defineProperty$9(_ADAPTER = {}, VideoType.VOD, BaseAdapter), _defineProperty$9(_ADAPTER, VideoType.LIVE, LiveAdapter), _ADAPTER), StrategyController = function() {
|
|
131048
131322
|
function e4(t4) {
|
|
131049
131323
|
_classCallCheck$b(this, e4), _defineProperty$9(this, "ctx", void 0), _defineProperty$9(this, "configPreparePromise", void 0), _defineProperty$9(this, "isStrategyStarted", false);
|
|
131050
|
-
var r3 = new FeatureCenter(t4), n3 = new DataCenter(t4, new VodSettingsLoader(t4.appId, { featureCenter: r3, cacheKey: t4.cacheKey, strategies: t4.strategies, videoType: t4.type || VideoType.VOD }));
|
|
131324
|
+
var r3 = new FeatureCenter(t4), n3 = new DataCenter(t4, new VodSettingsLoader(t4.appId, { featureCenter: r3, cacheKey: t4.cacheKey, strategies: t4.strategies, videoType: t4.type || VideoType.VOD }, { fetchOptions: t4.fetchOptions }));
|
|
131051
131325
|
logger$3.update(t4.log), this.ctx = { dataCenter: n3, featureCenter: r3, playerManager: new PlayerManager(), tracker: new Tracker({ trackInfo: t4.tracker, type: t4.type || VideoType.VOD, lineAppId: t4.appId, lineUserId: t4.deviceId, appId: t4.type === VideoType.VOD ? 577780 : 579013, channel: t4.region, cxt: { dataCenter: n3, featureCenter: r3 } }) }, this.prepare(true);
|
|
131052
131326
|
}
|
|
131053
131327
|
var t3, r2, n2, o2, a2;
|
|
@@ -131212,6 +131486,9 @@ var _ADAPTER, VodSettingsLoader = function() {
|
|
|
131212
131486
|
} }, { key: "getServiceConfig", value: function() {
|
|
131213
131487
|
var t4, r3, n3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : VideoType.VOD;
|
|
131214
131488
|
return VideoType.VOD === n3 ? (null === (t4 = e4._vodInst) || void 0 === t4 || null === (t4 = t4.ctx) || void 0 === t4 || null === (t4 = t4.dataCenter) || void 0 === t4 ? void 0 : t4.getServiceStrategyConfig()) || {} : VideoType.LIVE === n3 && (null === (r3 = e4._liveInst) || void 0 === r3 || null === (r3 = r3.ctx) || void 0 === r3 || null === (r3 = r3.dataCenter) || void 0 === r3 ? void 0 : r3.getServiceStrategyConfig()) || {};
|
|
131489
|
+
} }, { key: "getFeatureList", value: function() {
|
|
131490
|
+
var t4, r3, n3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : VideoType.VOD;
|
|
131491
|
+
return VideoType.VOD === n3 ? null === (t4 = e4._vodInst) || void 0 === t4 || null === (t4 = t4.ctx) || void 0 === t4 || null === (t4 = t4.featureCenter) || void 0 === t4 ? void 0 : t4.getFeatureList() : VideoType.LIVE === n3 ? null === (r3 = e4._liveInst) || void 0 === r3 || null === (r3 = r3.ctx) || void 0 === r3 || null === (r3 = r3.featureCenter) || void 0 === r3 ? void 0 : r3.getFeatureList() : void 0;
|
|
131215
131492
|
} }, { key: "apply", value: function(t4, r3, n3) {
|
|
131216
131493
|
var o3, a3;
|
|
131217
131494
|
if (!t4 || !r3)
|
|
@@ -134371,7 +134648,7 @@ function hook(hookName, handler) {
|
|
|
134371
134648
|
}
|
|
134372
134649
|
if (this.__hooks && this.__hooks[hookName]) {
|
|
134373
134650
|
try {
|
|
134374
|
-
var preRet = runHooks(this, hookName, handler);
|
|
134651
|
+
var preRet = runHooks.apply(void 0, [this, hookName, handler].concat(Array.prototype.slice.call(arguments)));
|
|
134375
134652
|
if (preRet) {
|
|
134376
134653
|
if (preRet.then) {
|
|
134377
134654
|
preRet.then(function(isContinue) {
|
|
@@ -134485,6 +134762,8 @@ function runHooks(obj, hookName, handler) {
|
|
|
134485
134762
|
});
|
|
134486
134763
|
} else if (ret !== false) {
|
|
134487
134764
|
return runHooksRecursive2.apply(void 0, [obj2, hookName2, handler2].concat(args2));
|
|
134765
|
+
} else if (ret === false) {
|
|
134766
|
+
return false;
|
|
134488
134767
|
}
|
|
134489
134768
|
};
|
|
134490
134769
|
return runHooksRecursive.apply(void 0, [obj, hookName, handler].concat(args));
|
|
@@ -138851,7 +139130,7 @@ var AdsPlugin$1 = /* @__PURE__ */ function(_Plugin) {
|
|
|
138851
139130
|
_createClass$9(AdsPlugin2, [{
|
|
138852
139131
|
key: "version",
|
|
138853
139132
|
get: function get4() {
|
|
138854
|
-
return "3.0.
|
|
139133
|
+
return "3.0.24-rc.2";
|
|
138855
139134
|
}
|
|
138856
139135
|
}, {
|
|
138857
139136
|
key: "paused",
|
|
@@ -143347,12 +143626,24 @@ class AdsPlugin extends AdsPlugin$1 {
|
|
|
143347
143626
|
}
|
|
143348
143627
|
}
|
|
143349
143628
|
async beforePlayerInit() {
|
|
143350
|
-
var _a, _b;
|
|
143629
|
+
var _a, _b, _c;
|
|
143351
143630
|
const promise2 = super.beforePlayerInit();
|
|
143352
143631
|
(_a = this.csManager) == null ? void 0 : _a.once(IMA_SDK_LOAD_SUCCESS, () => {
|
|
143353
143632
|
google.ima.settings.setDisableCustomPlaybackForIOS10Plus(true);
|
|
143354
143633
|
});
|
|
143355
|
-
if (
|
|
143634
|
+
if (sniffer.os.isTizen || sniffer.os.isWebOS) {
|
|
143635
|
+
this.on(AD_COMPLETE, () => {
|
|
143636
|
+
setTimeout(() => {
|
|
143637
|
+
var _a2, _b2, _c2, _d;
|
|
143638
|
+
(_d = (_c2 = (_b2 = (_a2 = this.player) == null ? void 0 : _a2.plugins) == null ? void 0 : _b2.hls) == null ? void 0 : _c2.hls) == null ? void 0 : _d.attachMedia(this.player.media);
|
|
143639
|
+
}, 100);
|
|
143640
|
+
});
|
|
143641
|
+
(_b = this.csManager) == null ? void 0 : _b.on(IMA_CONTENT_PAUSE_REQUESTED, () => {
|
|
143642
|
+
var _a2, _b2, _c2, _d;
|
|
143643
|
+
(_d = (_c2 = (_b2 = (_a2 = this.player) == null ? void 0 : _a2.plugins) == null ? void 0 : _b2.hls) == null ? void 0 : _c2.hls) == null ? void 0 : _d.detachMedia();
|
|
143644
|
+
});
|
|
143645
|
+
}
|
|
143646
|
+
if (this.config.enableSCTE35 && ((_c = this.config.ima) == null ? void 0 : _c.adTagUrlForSCTE35)) {
|
|
143356
143647
|
this._scte35Manager = new Scte35Manager({
|
|
143357
143648
|
player: this.player,
|
|
143358
143649
|
adTagUrl: this.config.ima.adTagUrlForSCTE35,
|