@volcengine/veplayer-plugin 2.4.2-rc.6 → 2.4.2-rc.7

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.
@@ -4936,7 +4936,8 @@ function getOption(opts) {
4936
4936
  networkEvaluateInterval: 1e3,
4937
4937
  delayHint: 0,
4938
4938
  seamlesslyReload: false,
4939
- enableSei: true
4939
+ enableSei: true,
4940
+ enableOriginSdpLogger: false
4940
4941
  }, opts);
4941
4942
  }
4942
4943
  function _getStats(stats) {
@@ -5955,7 +5956,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
5955
5956
  key: "_connect",
5956
5957
  value: function() {
5957
5958
  var _connect2 = _asyncToGenerator$1(/* @__PURE__ */ _regeneratorRuntime$1().mark(function _callee2() {
5958
- var pc, offer, delayHint, parsed, finnalUrl, _answer$remoteSdp, _answer$remoteSdp2, parseSession, sessionId, reqStart, res, answer, err, _parsed;
5959
+ var pc, offer, delayHint, parsed, finnalUrl, _this$_opts, _answer$remoteSdp, _this$_opts2, _answer$remoteSdp2, _parsed$media, parseSession, sessionId, reqStart, res, answer, err, _parsed;
5959
5960
  return _regeneratorRuntime$1().wrap(function _callee2$(_context2) {
5960
5961
  while (1)
5961
5962
  switch (_context2.prev = _context2.next) {
@@ -6034,7 +6035,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
6034
6035
  sessionId = parseSession ? parseSession[1] : Date.now() + "666";
6035
6036
  this.emit(EVENT.LOAD_START, {
6036
6037
  url: finnalUrl,
6037
- offersdp: offer.sdp,
6038
+ offersdp: (_this$_opts = this._opts) !== null && _this$_opts !== void 0 && _this$_opts.enableOriginSdpLogger ? offer.sdp : void 0,
6038
6039
  sessionId
6039
6040
  });
6040
6041
  reqStart = Date.now();
@@ -6069,12 +6070,19 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
6069
6070
  case 43:
6070
6071
  logger.log("answer:");
6071
6072
  logger.log((_answer$remoteSdp = answer.remoteSdp) === null || _answer$remoteSdp === void 0 ? void 0 : _answer$remoteSdp.sdp);
6073
+ _parsed = lib.parse(answer.remoteSdp.sdp);
6072
6074
  this.emit(EVENT.LOAD_COMPLETE, {
6073
6075
  url: finnalUrl,
6074
6076
  elapsed: Date.now() - reqStart,
6075
- answersdp: (_answer$remoteSdp2 = answer.remoteSdp) === null || _answer$remoteSdp2 === void 0 ? void 0 : _answer$remoteSdp2.sdp
6077
+ answersdp: (_this$_opts2 = this._opts) !== null && _this$_opts2 !== void 0 && _this$_opts2.enableOriginSdpLogger ? answer === null || answer === void 0 ? void 0 : (_answer$remoteSdp2 = answer.remoteSdp) === null || _answer$remoteSdp2 === void 0 ? void 0 : _answer$remoteSdp2.sdp : void 0,
6078
+ parsedSdp: _parsed === null || _parsed === void 0 ? void 0 : (_parsed$media = _parsed.media) === null || _parsed$media === void 0 ? void 0 : _parsed$media.map(function(media) {
6079
+ return {
6080
+ candidates: media.candidates,
6081
+ rtp: media.rtp,
6082
+ type: media.type
6083
+ };
6084
+ })
6076
6085
  });
6077
- _parsed = lib.parse(answer.remoteSdp.sdp);
6078
6086
  _parsed.media.forEach(function(x) {
6079
6087
  x.fingerprint.hash = x.fingerprint.hash.toUpperCase();
6080
6088
  });
@@ -6123,10 +6131,10 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
6123
6131
  }, {
6124
6132
  key: "destroy",
6125
6133
  value: function destroy() {
6126
- var _this$_media2, _this$_opts;
6134
+ var _this$_media2, _this$_opts3;
6127
6135
  this._disconnect();
6128
6136
  (_this$_media2 = this._media) === null || _this$_media2 === void 0 ? void 0 : _this$_media2.removeEventListener("timeupdate", this._mockWaitingByTimeupdate);
6129
- if (this._media && !((_this$_opts = this._opts) !== null && _this$_opts !== void 0 && _this$_opts.seamlesslyReload)) {
6137
+ if (this._media && !((_this$_opts3 = this._opts) !== null && _this$_opts3 !== void 0 && _this$_opts3.seamlesslyReload)) {
6130
6138
  this._media.srcObject = null;
6131
6139
  }
6132
6140
  if (this._pc) {
@@ -6253,7 +6261,7 @@ var RtsPlugin = /* @__PURE__ */ function(_BasePlugin) {
6253
6261
  }, {
6254
6262
  key: "version",
6255
6263
  get: function get() {
6256
- return "0.2.1-alpha.8";
6264
+ return "0.2.1-alpha.13";
6257
6265
  }
6258
6266
  }, {
6259
6267
  key: "beforePlayerInit",