@byteplus/veplayer-plugin 2.8.0-rc.8 → 2.8.0-rc.9

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.
@@ -6910,7 +6910,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
6910
6910
  value: function() {
6911
6911
  var _load = _asyncToGenerator$1(/* @__PURE__ */ _regeneratorRuntime$1().mark(function _callee3(url) {
6912
6912
  var _this2 = this;
6913
- var lastPc, encodedTransformSupported;
6913
+ var encodedTransformSupported, lastPc;
6914
6914
  return _regeneratorRuntime$1().wrap(function _callee3$(_context3) {
6915
6915
  while (1)
6916
6916
  switch (_context3.prev = _context3.next) {
@@ -6918,19 +6918,19 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
6918
6918
  this._disconnect();
6919
6919
  this._url = url;
6920
6920
  this._retry = this._opts.retryCount;
6921
- lastPc = this._pc;
6922
- if (lastPc) {
6923
- lastPc.close();
6924
- }
6925
- encodedTransformSupported = isLegacyEncodedTransformSupported();
6926
- _context3.prev = 6;
6927
6921
  if (!this._opts.hackCreateOfferIssue) {
6928
- _context3.next = 10;
6922
+ _context3.next = 6;
6929
6923
  break;
6930
6924
  }
6931
- _context3.next = 10;
6925
+ _context3.next = 6;
6932
6926
  return this._createEmptyPeer();
6933
- case 10:
6927
+ case 6:
6928
+ encodedTransformSupported = isLegacyEncodedTransformSupported();
6929
+ _context3.prev = 7;
6930
+ lastPc = this._pc;
6931
+ if (lastPc) {
6932
+ lastPc.close();
6933
+ }
6934
6934
  this._pc = new RTCPeerConnection({
6935
6935
  encodedInsertableStreams: encodedTransformSupported && this._opts.enableSei ? true : void 0
6936
6936
  });
@@ -6942,7 +6942,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
6942
6942
  break;
6943
6943
  case 16:
6944
6944
  _context3.prev = 16;
6945
- _context3.t0 = _context3["catch"](6);
6945
+ _context3.t0 = _context3["catch"](7);
6946
6946
  setTimeout(function() {
6947
6947
  return _this2._emitError(StreamingError.create(ERR.OTHER, null, _context3.t0));
6948
6948
  });
@@ -6950,7 +6950,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
6950
6950
  case "end":
6951
6951
  return _context3.stop();
6952
6952
  }
6953
- }, _callee3, this, [[6, 16]]);
6953
+ }, _callee3, this, [[7, 16]]);
6954
6954
  }));
6955
6955
  function load(_x) {
6956
6956
  return _load.apply(this, arguments);
@@ -7229,22 +7229,28 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
7229
7229
  answer.remoteSdp.sdp = lib.write(_parsed);
7230
7230
  logger.log("answer modified:\n", answer.remoteSdp.sdp);
7231
7231
  this._rctConnectStartTs = Date.now();
7232
- _context4.next = 53;
7233
- return this._pc.setRemoteDescription(answer.remoteSdp);
7232
+ if (!(pc.signalingState === "closed")) {
7233
+ _context4.next = 53;
7234
+ break;
7235
+ }
7236
+ return _context4.abrupt("return");
7234
7237
  case 53:
7238
+ _context4.next = 55;
7239
+ return pc.setRemoteDescription(answer.remoteSdp);
7240
+ case 55:
7235
7241
  this._networkEvaluate = new NetworkEvaluate(pc, this._opts.networkEvaluateInterval);
7236
7242
  this._listenPeerStateTimeout();
7237
- _context4.next = 60;
7243
+ _context4.next = 62;
7238
7244
  break;
7239
- case 57:
7240
- _context4.prev = 57;
7245
+ case 59:
7246
+ _context4.prev = 59;
7241
7247
  _context4.t0 = _context4["catch"](24);
7242
7248
  this._emitError(StreamingError.network(_context4.t0));
7243
- case 60:
7249
+ case 62:
7244
7250
  case "end":
7245
7251
  return _context4.stop();
7246
7252
  }
7247
- }, _callee4, this, [[24, 57]]);
7253
+ }, _callee4, this, [[24, 59]]);
7248
7254
  }));
7249
7255
  function _connect() {
7250
7256
  return _connect2.apply(this, arguments);
@@ -7593,7 +7599,7 @@ var RtsPlugin = /* @__PURE__ */ function(_BasePlugin) {
7593
7599
  }, {
7594
7600
  key: "version",
7595
7601
  get: function get() {
7596
- return "0.2.1-alpha.35";
7602
+ return "0.2.1-alpha.37";
7597
7603
  }
7598
7604
  }, {
7599
7605
  key: "beforePlayerInit",