@volcengine/veplayer-plugin 2.8.0-rc.2 → 2.8.0
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 +76578 -35139
- package/esm/index.production.js +8 -7
- package/esm/veplayer.plugin.ad.development.js +1412 -1398
- package/esm/veplayer.plugin.ad.production.js +2 -2
- package/esm/veplayer.plugin.drm.development.js +147 -63
- package/esm/veplayer.plugin.drm.production.js +1 -1
- package/esm/veplayer.plugin.hlsjs.development.js +32501 -10992
- package/esm/veplayer.plugin.hlsjs.production.js +1 -1
- package/esm/veplayer.plugin.rtm.development.js +123 -51
- package/esm/veplayer.plugin.rtm.production.js +1 -1
- package/package.json +1 -1
- package/umd/veplayer.plugin.ad.development.js +1412 -1398
- package/umd/veplayer.plugin.ad.production.js +1 -1
- package/umd/veplayer.plugin.drm.development.js +148 -64
- package/umd/veplayer.plugin.drm.production.js +1 -1
- package/umd/veplayer.plugin.hlsjs.development.js +32478 -10969
- package/umd/veplayer.plugin.hlsjs.production.js +1 -1
- package/umd/veplayer.plugin.rtm.development.js +123 -51
- package/umd/veplayer.plugin.rtm.production.js +1 -1
|
@@ -4951,11 +4951,14 @@ function getOption(opts) {
|
|
|
4951
4951
|
stallInterval: 400,
|
|
4952
4952
|
networkEvaluateInterval: 1e3,
|
|
4953
4953
|
delayHint: 0,
|
|
4954
|
+
videoDelaySync: false,
|
|
4954
4955
|
seamlesslyReload: false,
|
|
4955
4956
|
enableSei: false,
|
|
4956
4957
|
enableOriginSdpLogger: false,
|
|
4957
4958
|
checkStatsErrorDelay: 5e3,
|
|
4959
|
+
connectionStateChangeTimeout: 5e3,
|
|
4958
4960
|
enableNetworkQuality: false,
|
|
4961
|
+
hackCreateOfferIssue: false,
|
|
4959
4962
|
networkQuality: {
|
|
4960
4963
|
networkQos: {
|
|
4961
4964
|
1: {
|
|
@@ -6728,11 +6731,15 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
6728
6731
|
_defineProperty$2(_assertThisInitialized$1(_this), "_preVideoStats", null);
|
|
6729
6732
|
_defineProperty$2(_assertThisInitialized$1(_this), "_rtcReportTimer", 0);
|
|
6730
6733
|
_defineProperty$2(_assertThisInitialized$1(_this), "_networkQualityResult", []);
|
|
6734
|
+
_defineProperty$2(_assertThisInitialized$1(_this), "_peerStateTimer", null);
|
|
6731
6735
|
_defineProperty$2(_assertThisInitialized$1(_this), "_checkStatsError", /* @__PURE__ */ _asyncToGenerator$1(/* @__PURE__ */ _regeneratorRuntime$1().mark(function _callee2() {
|
|
6732
6736
|
return _regeneratorRuntime$1().wrap(function _callee2$(_context2) {
|
|
6733
6737
|
while (1)
|
|
6734
6738
|
switch (_context2.prev = _context2.next) {
|
|
6735
6739
|
case 0:
|
|
6740
|
+
if (_this._checkStatsErrorTimer) {
|
|
6741
|
+
clearTimeout(_this._checkStatsErrorTimer);
|
|
6742
|
+
}
|
|
6736
6743
|
_this._checkStatsErrorTimer = setTimeout(/* @__PURE__ */ _asyncToGenerator$1(/* @__PURE__ */ _regeneratorRuntime$1().mark(function _callee() {
|
|
6737
6744
|
var stats, _stats$video, framesDecoded, bytesReceived;
|
|
6738
6745
|
return _regeneratorRuntime$1().wrap(function _callee$(_context) {
|
|
@@ -6761,7 +6768,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
6761
6768
|
}
|
|
6762
6769
|
}, _callee);
|
|
6763
6770
|
})), _this._opts.checkStatsErrorDelay);
|
|
6764
|
-
case
|
|
6771
|
+
case 2:
|
|
6765
6772
|
case "end":
|
|
6766
6773
|
return _context2.stop();
|
|
6767
6774
|
}
|
|
@@ -6799,6 +6806,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
6799
6806
|
});
|
|
6800
6807
|
});
|
|
6801
6808
|
_defineProperty$2(_assertThisInitialized$1(_this), "_setDelay", function(delayHint) {
|
|
6809
|
+
var videoDelaySync = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
6802
6810
|
var currentDelay = _this._getDelay();
|
|
6803
6811
|
delayHint = typeof delayHint === "number" && delayHint > 0 ? delayHint : null;
|
|
6804
6812
|
if (currentDelay === delayHint)
|
|
@@ -6815,6 +6823,10 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
6815
6823
|
});
|
|
6816
6824
|
if (key) {
|
|
6817
6825
|
audioReceiver[key] = delayHint;
|
|
6826
|
+
if (!videoDelaySync) {
|
|
6827
|
+
videoReceiver[key] = delayHint;
|
|
6828
|
+
logger.log("set videoReceiver.".concat(key, " = ").concat(delayHint));
|
|
6829
|
+
}
|
|
6818
6830
|
logger.log("set audioReceiver.".concat(key, " = ").concat(delayHint));
|
|
6819
6831
|
}
|
|
6820
6832
|
} catch (error) {
|
|
@@ -6912,26 +6924,33 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
6912
6924
|
}
|
|
6913
6925
|
encodedTransformSupported = isLegacyEncodedTransformSupported();
|
|
6914
6926
|
_context3.prev = 6;
|
|
6927
|
+
if (!this._opts.hackCreateOfferIssue) {
|
|
6928
|
+
_context3.next = 10;
|
|
6929
|
+
break;
|
|
6930
|
+
}
|
|
6931
|
+
_context3.next = 10;
|
|
6932
|
+
return this._createEmptyPeer();
|
|
6933
|
+
case 10:
|
|
6915
6934
|
this._pc = new RTCPeerConnection({
|
|
6916
6935
|
encodedInsertableStreams: encodedTransformSupported && this._opts.enableSei ? true : void 0
|
|
6917
6936
|
});
|
|
6918
6937
|
this._bindRTCEvents();
|
|
6919
|
-
_context3.next =
|
|
6938
|
+
_context3.next = 14;
|
|
6920
6939
|
return this._connect(url);
|
|
6921
|
-
case
|
|
6922
|
-
_context3.next =
|
|
6940
|
+
case 14:
|
|
6941
|
+
_context3.next = 19;
|
|
6923
6942
|
break;
|
|
6924
|
-
case
|
|
6925
|
-
_context3.prev =
|
|
6943
|
+
case 16:
|
|
6944
|
+
_context3.prev = 16;
|
|
6926
6945
|
_context3.t0 = _context3["catch"](6);
|
|
6927
6946
|
setTimeout(function() {
|
|
6928
6947
|
return _this2._emitError(StreamingError.create(ERR.OTHER, null, _context3.t0));
|
|
6929
6948
|
});
|
|
6930
|
-
case
|
|
6949
|
+
case 19:
|
|
6931
6950
|
case "end":
|
|
6932
6951
|
return _context3.stop();
|
|
6933
6952
|
}
|
|
6934
|
-
}, _callee3, this, [[6,
|
|
6953
|
+
}, _callee3, this, [[6, 16]]);
|
|
6935
6954
|
}));
|
|
6936
6955
|
function load(_x) {
|
|
6937
6956
|
return _load.apply(this, arguments);
|
|
@@ -6951,6 +6970,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
6951
6970
|
pc.addEventListener("track", this._onTrack);
|
|
6952
6971
|
pc.addEventListener("connectionstatechange", function() {
|
|
6953
6972
|
logger.warn("onconnectionstatechange:", pc.connectionState);
|
|
6973
|
+
_this3._clearPeerStateTimeout();
|
|
6954
6974
|
_this3.emit(EXTEND_EVENTS.RTC_STATE_CHANGE, {
|
|
6955
6975
|
state: pc.connectionState,
|
|
6956
6976
|
url: _this3._url
|
|
@@ -7087,7 +7107,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
7087
7107
|
this._videoTransceicer = pc.addTransceiver("video", {
|
|
7088
7108
|
direction: "recvonly"
|
|
7089
7109
|
});
|
|
7090
|
-
|
|
7110
|
+
this._opts.delayHint !== void 0 && this._setDelay(this._opts.delayHint, this._opts.videoDelaySync);
|
|
7091
7111
|
if (this._opts.enableSei) {
|
|
7092
7112
|
this.initVideoEncodedTransform();
|
|
7093
7113
|
this.initAudioEncodedTransform();
|
|
@@ -7108,6 +7128,9 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
7108
7128
|
case 13:
|
|
7109
7129
|
offer = _context4.sent;
|
|
7110
7130
|
case 14:
|
|
7131
|
+
if (this._opts.hackCreateOfferIssue) {
|
|
7132
|
+
this._createEmptyPeer();
|
|
7133
|
+
}
|
|
7111
7134
|
logger.log("local offer");
|
|
7112
7135
|
logger.log(offer.sdp);
|
|
7113
7136
|
parsed = lib.parse(offer.sdp);
|
|
@@ -7132,11 +7155,11 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
7132
7155
|
});
|
|
7133
7156
|
offer.sdp = lib.write(parsed);
|
|
7134
7157
|
logger.log("local offer modified:\n", offer.sdp);
|
|
7135
|
-
_context4.next =
|
|
7158
|
+
_context4.next = 23;
|
|
7136
7159
|
return pc.setLocalDescription(offer);
|
|
7137
|
-
case
|
|
7160
|
+
case 23:
|
|
7138
7161
|
finnalUrl = this._url;
|
|
7139
|
-
_context4.prev =
|
|
7162
|
+
_context4.prev = 24;
|
|
7140
7163
|
if (this._opts.preProcessUrl) {
|
|
7141
7164
|
finnalUrl = this._opts.preProcessUrl(finnalUrl).url;
|
|
7142
7165
|
}
|
|
@@ -7149,7 +7172,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
7149
7172
|
sessionId
|
|
7150
7173
|
});
|
|
7151
7174
|
reqStart = Date.now();
|
|
7152
|
-
_context4.next =
|
|
7175
|
+
_context4.next = 33;
|
|
7153
7176
|
return this._loader.load(finnalUrl, {
|
|
7154
7177
|
body: JSON.stringify({
|
|
7155
7178
|
sessionId,
|
|
@@ -7157,27 +7180,27 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
7157
7180
|
localSdp: offer
|
|
7158
7181
|
})
|
|
7159
7182
|
});
|
|
7160
|
-
case
|
|
7183
|
+
case 33:
|
|
7161
7184
|
res = _context4.sent;
|
|
7162
7185
|
this.emit(EVENT.LOAD_RESPONSE_HEADERS, {
|
|
7163
7186
|
headers: res.response.headers
|
|
7164
7187
|
});
|
|
7165
7188
|
answer = res === null || res === void 0 ? void 0 : res.data;
|
|
7166
7189
|
if (!((answer === null || answer === void 0 ? void 0 : answer.code) === 404 || (answer === null || answer === void 0 ? void 0 : answer.code) === 403)) {
|
|
7167
|
-
_context4.next =
|
|
7190
|
+
_context4.next = 41;
|
|
7168
7191
|
break;
|
|
7169
7192
|
}
|
|
7170
7193
|
err = StreamingError.create(answer.code === 404 ? ERR.NETWORK_NOTFOUND : ERR.NETWORK_FORBIDDEN, null, answer);
|
|
7171
7194
|
err.errorType = ERR.NETWORK;
|
|
7172
7195
|
this._emitError(err);
|
|
7173
7196
|
return _context4.abrupt("return");
|
|
7174
|
-
case
|
|
7197
|
+
case 41:
|
|
7175
7198
|
if (!((answer === null || answer === void 0 ? void 0 : answer.code) !== 200)) {
|
|
7176
|
-
_context4.next =
|
|
7199
|
+
_context4.next = 43;
|
|
7177
7200
|
break;
|
|
7178
7201
|
}
|
|
7179
7202
|
throw new Error("code: ".concat(answer === null || answer === void 0 ? void 0 : answer.code, ", message:").concat(answer === null || answer === void 0 ? void 0 : answer.message));
|
|
7180
|
-
case
|
|
7203
|
+
case 43:
|
|
7181
7204
|
logger.log("answer:");
|
|
7182
7205
|
logger.log((_answer$remoteSdp = answer.remoteSdp) === null || _answer$remoteSdp === void 0 ? void 0 : _answer$remoteSdp.sdp);
|
|
7183
7206
|
_parsed = lib.parse(answer.remoteSdp.sdp);
|
|
@@ -7206,68 +7229,88 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
7206
7229
|
answer.remoteSdp.sdp = lib.write(_parsed);
|
|
7207
7230
|
logger.log("answer modified:\n", answer.remoteSdp.sdp);
|
|
7208
7231
|
this._rctConnectStartTs = Date.now();
|
|
7209
|
-
_context4.next =
|
|
7232
|
+
_context4.next = 53;
|
|
7210
7233
|
return this._pc.setRemoteDescription(answer.remoteSdp);
|
|
7211
|
-
case
|
|
7234
|
+
case 53:
|
|
7212
7235
|
this._networkEvaluate = new NetworkEvaluate(pc, this._opts.networkEvaluateInterval);
|
|
7213
|
-
|
|
7236
|
+
this._listenPeerStateTimeout();
|
|
7237
|
+
_context4.next = 60;
|
|
7214
7238
|
break;
|
|
7215
|
-
case
|
|
7216
|
-
_context4.prev =
|
|
7217
|
-
_context4.t0 = _context4["catch"](
|
|
7239
|
+
case 57:
|
|
7240
|
+
_context4.prev = 57;
|
|
7241
|
+
_context4.t0 = _context4["catch"](24);
|
|
7218
7242
|
this._emitError(StreamingError.network(_context4.t0));
|
|
7219
|
-
case
|
|
7243
|
+
case 60:
|
|
7220
7244
|
case "end":
|
|
7221
7245
|
return _context4.stop();
|
|
7222
7246
|
}
|
|
7223
|
-
}, _callee4, this, [[
|
|
7247
|
+
}, _callee4, this, [[24, 57]]);
|
|
7224
7248
|
}));
|
|
7225
7249
|
function _connect() {
|
|
7226
7250
|
return _connect2.apply(this, arguments);
|
|
7227
7251
|
}
|
|
7228
7252
|
return _connect;
|
|
7229
7253
|
}()
|
|
7254
|
+
}, {
|
|
7255
|
+
key: "_listenPeerStateTimeout",
|
|
7256
|
+
value: function _listenPeerStateTimeout() {
|
|
7257
|
+
var _this6 = this;
|
|
7258
|
+
this._peerStateTimer && this._clearPeerStateTimeout();
|
|
7259
|
+
if (this._opts.connectionStateChangeTimeout) {
|
|
7260
|
+
this._peerStateTimer = setTimeout(function() {
|
|
7261
|
+
_this6._emitError(StreamingError.create(ERR.MEDIA, ERR.SUB_TYPES.MEDIA_ERR_SRC_NOT_SUPPORTED, {
|
|
7262
|
+
message: "listen connectionstatechange timeout"
|
|
7263
|
+
}));
|
|
7264
|
+
}, this._opts.connectionStateChangeTimeout);
|
|
7265
|
+
}
|
|
7266
|
+
}
|
|
7267
|
+
}, {
|
|
7268
|
+
key: "_clearPeerStateTimeout",
|
|
7269
|
+
value: function _clearPeerStateTimeout() {
|
|
7270
|
+
clearTimeout(this._peerStateTimer);
|
|
7271
|
+
this._peerStateTimer = null;
|
|
7272
|
+
}
|
|
7230
7273
|
}, {
|
|
7231
7274
|
key: "_startRtcReport",
|
|
7232
7275
|
value: function _startRtcReport() {
|
|
7233
|
-
var
|
|
7276
|
+
var _this7 = this;
|
|
7234
7277
|
this._stopRtcReport();
|
|
7235
7278
|
this._rtcReportTimer = setInterval(/* @__PURE__ */ _asyncToGenerator$1(/* @__PURE__ */ _regeneratorRuntime$1().mark(function _callee5() {
|
|
7236
|
-
var _yield$Promise$all, _yield$Promise$all2, curAudioStats, curVideoStats,
|
|
7279
|
+
var _yield$Promise$all, _yield$Promise$all2, curAudioStats, curVideoStats, _this7$_audioStallObs, _this7$_videoStallObs, _this7$_networkQualit, _this7$_networkQualit2, audioStats, videoStats, audioStallInfo, videoStallInfo, _ref4, _ref5, quality, qualityInfo, targetDelay;
|
|
7237
7280
|
return _regeneratorRuntime$1().wrap(function _callee5$(_context5) {
|
|
7238
7281
|
while (1)
|
|
7239
7282
|
switch (_context5.prev = _context5.next) {
|
|
7240
7283
|
case 0:
|
|
7241
|
-
if (!
|
|
7242
|
-
|
|
7243
|
-
|
|
7284
|
+
if (!_this7._audioStallObserver && _this7._audioTransceicer) {
|
|
7285
|
+
_this7._audioStallObserver = new AudioStallObserver();
|
|
7286
|
+
_this7._audioStallObserver.start(_this7._audioTransceicer);
|
|
7244
7287
|
}
|
|
7245
|
-
if (!
|
|
7246
|
-
|
|
7247
|
-
|
|
7288
|
+
if (!_this7._videoStallObserver && _this7._video) {
|
|
7289
|
+
_this7._videoStallObserver = new VideoStallObserver();
|
|
7290
|
+
_this7._videoStallObserver.start(_this7._media);
|
|
7248
7291
|
}
|
|
7249
|
-
if (!
|
|
7250
|
-
|
|
7292
|
+
if (!_this7._networkQuality && _this7._opts.enableNetworkQuality) {
|
|
7293
|
+
_this7._networkQuality = new NetworkQuality(_this7._pc, _this7._opts.networkQuality);
|
|
7251
7294
|
}
|
|
7252
7295
|
_context5.next = 5;
|
|
7253
|
-
return Promise.all([getRecvAudioStats(
|
|
7296
|
+
return Promise.all([getRecvAudioStats(_this7._audioTransceicer.receiver.getStats()), getRecvVideoStats(_this7._videoTransceicer.receiver.getStats())]);
|
|
7254
7297
|
case 5:
|
|
7255
7298
|
_yield$Promise$all = _context5.sent;
|
|
7256
7299
|
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
|
|
7257
7300
|
curAudioStats = _yield$Promise$all2[0];
|
|
7258
7301
|
curVideoStats = _yield$Promise$all2[1];
|
|
7259
|
-
if (!(
|
|
7302
|
+
if (!(_this7._preAudioStats && _this7._preVideoStats)) {
|
|
7260
7303
|
_context5.next = 21;
|
|
7261
7304
|
break;
|
|
7262
7305
|
}
|
|
7263
|
-
audioStats = diffRecvAudioStats(
|
|
7264
|
-
videoStats = diffRecvVideoStats(
|
|
7306
|
+
audioStats = diffRecvAudioStats(_this7._preAudioStats, curAudioStats);
|
|
7307
|
+
videoStats = diffRecvVideoStats(_this7._preVideoStats, curVideoStats);
|
|
7265
7308
|
_context5.next = 14;
|
|
7266
|
-
return (
|
|
7309
|
+
return (_this7$_audioStallObs = _this7._audioStallObserver) === null || _this7$_audioStallObs === void 0 ? void 0 : _this7$_audioStallObs.getAudioStallInfo();
|
|
7267
7310
|
case 14:
|
|
7268
7311
|
audioStallInfo = _context5.sent;
|
|
7269
7312
|
_context5.next = 17;
|
|
7270
|
-
return (
|
|
7313
|
+
return (_this7$_videoStallObs = _this7._videoStallObserver) === null || _this7$_videoStallObs === void 0 ? void 0 : _this7$_videoStallObs.getStallInfo({
|
|
7271
7314
|
interval: videoStats.statsInterval,
|
|
7272
7315
|
frameRateReceived: videoStats.frameRateReceived,
|
|
7273
7316
|
frameRateDecoded: videoStats.frameRateDecoded,
|
|
@@ -7275,15 +7318,15 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
7275
7318
|
});
|
|
7276
7319
|
case 17:
|
|
7277
7320
|
videoStallInfo = _context5.sent;
|
|
7278
|
-
_ref4 = (
|
|
7321
|
+
_ref4 = (_this7$_networkQualit = (_this7$_networkQualit2 = _this7._networkQuality) === null || _this7$_networkQualit2 === void 0 ? void 0 : _this7$_networkQualit2.getDownlinkQuality(_objectSpread2$2(_objectSpread2$2({}, audioStats), {}, {
|
|
7279
7322
|
stallDuration: audioStallInfo.stallDuration
|
|
7280
7323
|
}), _objectSpread2$2(_objectSpread2$2({}, videoStats), {}, {
|
|
7281
7324
|
stallDuration: videoStallInfo.stall.stallDuration100ms
|
|
7282
|
-
}))) !== null &&
|
|
7283
|
-
if (
|
|
7284
|
-
targetDelay =
|
|
7325
|
+
}))) !== null && _this7$_networkQualit !== void 0 ? _this7$_networkQualit : [], _ref5 = _slicedToArray(_ref4, 2), quality = _ref5[0], qualityInfo = _ref5[1];
|
|
7326
|
+
if (_this7._opts.enableAdaptiveJitterBuffer) {
|
|
7327
|
+
targetDelay = _this7._handleJitterBuffer(qualityInfo === null || qualityInfo === void 0 ? void 0 : qualityInfo.qualityQos, _this7._opts.adaptiveJitterBuffer, _this7._opts.networkStrategy);
|
|
7285
7328
|
}
|
|
7286
|
-
|
|
7329
|
+
_this7.emit(EXTEND_EVENTS.RTC_NETWORK, {
|
|
7287
7330
|
interval: videoStats.statsInterval,
|
|
7288
7331
|
visibility_state: document.visibilityState,
|
|
7289
7332
|
network_quality: quality,
|
|
@@ -7310,12 +7353,12 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
7310
7353
|
quality_qos: qualityInfo === null || qualityInfo === void 0 ? void 0 : qualityInfo.qualityQos,
|
|
7311
7354
|
quality_audio_qoe: qualityInfo === null || qualityInfo === void 0 ? void 0 : qualityInfo.audioQoe,
|
|
7312
7355
|
quality_video_qoe: qualityInfo === null || qualityInfo === void 0 ? void 0 : qualityInfo.videoQoe,
|
|
7313
|
-
current_delay:
|
|
7356
|
+
current_delay: _this7._getDelay(),
|
|
7314
7357
|
target_delay: targetDelay
|
|
7315
7358
|
});
|
|
7316
7359
|
case 21:
|
|
7317
|
-
|
|
7318
|
-
|
|
7360
|
+
_this7._preAudioStats = curAudioStats;
|
|
7361
|
+
_this7._preVideoStats = curVideoStats;
|
|
7319
7362
|
case 23:
|
|
7320
7363
|
case "end":
|
|
7321
7364
|
return _context5.stop();
|
|
@@ -7367,6 +7410,8 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
7367
7410
|
(_this$_loader = this._loader) === null || _this$_loader === void 0 ? void 0 : _this$_loader.cancel();
|
|
7368
7411
|
(_this$_networkEvaluat2 = this._networkEvaluate) === null || _this$_networkEvaluat2 === void 0 ? void 0 : _this$_networkEvaluat2.destroy();
|
|
7369
7412
|
this._stopRtcReport();
|
|
7413
|
+
clearTimeout(this._checkStatsErrorTimer);
|
|
7414
|
+
this._clearPeerStateTimeout();
|
|
7370
7415
|
this._audioTransceicer = null;
|
|
7371
7416
|
this._videoTransceicer = null;
|
|
7372
7417
|
this._mediaStream = null;
|
|
@@ -7377,10 +7422,37 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
7377
7422
|
value: function _emitError(error) {
|
|
7378
7423
|
this.emit(EVENT.ERROR, error);
|
|
7379
7424
|
clearTimeout(this._checkStatsErrorTimer);
|
|
7425
|
+
this._clearPeerStateTimeout();
|
|
7380
7426
|
if (this._pc) {
|
|
7381
7427
|
this._pc.close();
|
|
7382
7428
|
}
|
|
7383
7429
|
}
|
|
7430
|
+
}, {
|
|
7431
|
+
key: "_createEmptyPeer",
|
|
7432
|
+
value: function() {
|
|
7433
|
+
var _createEmptyPeer2 = _asyncToGenerator$1(/* @__PURE__ */ _regeneratorRuntime$1().mark(function _callee6() {
|
|
7434
|
+
var pc;
|
|
7435
|
+
return _regeneratorRuntime$1().wrap(function _callee6$(_context6) {
|
|
7436
|
+
while (1)
|
|
7437
|
+
switch (_context6.prev = _context6.next) {
|
|
7438
|
+
case 0:
|
|
7439
|
+
pc = new RTCPeerConnection();
|
|
7440
|
+
_context6.next = 3;
|
|
7441
|
+
return pc.createOffer();
|
|
7442
|
+
case 3:
|
|
7443
|
+
pc.close();
|
|
7444
|
+
pc = null;
|
|
7445
|
+
case 5:
|
|
7446
|
+
case "end":
|
|
7447
|
+
return _context6.stop();
|
|
7448
|
+
}
|
|
7449
|
+
}, _callee6);
|
|
7450
|
+
}));
|
|
7451
|
+
function _createEmptyPeer() {
|
|
7452
|
+
return _createEmptyPeer2.apply(this, arguments);
|
|
7453
|
+
}
|
|
7454
|
+
return _createEmptyPeer;
|
|
7455
|
+
}()
|
|
7384
7456
|
}, {
|
|
7385
7457
|
key: "destroy",
|
|
7386
7458
|
value: function destroy(keepClearMediaStream) {
|
|
@@ -7521,7 +7593,7 @@ var RtsPlugin = /* @__PURE__ */ function(_BasePlugin) {
|
|
|
7521
7593
|
}, {
|
|
7522
7594
|
key: "version",
|
|
7523
7595
|
get: function get() {
|
|
7524
|
-
return "0.2.1-alpha.
|
|
7596
|
+
return "0.2.1-alpha.35";
|
|
7525
7597
|
}
|
|
7526
7598
|
}, {
|
|
7527
7599
|
key: "beforePlayerInit",
|