@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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volcengine/veplayer-plugin",
3
- "version": "2.4.2-rc.6",
3
+ "version": "2.4.2-rc.7",
4
4
  "main": "./umd/index.production.js",
5
5
  "module": "./esm/index.production.js",
6
6
  "browser": "./umd/index.production.js",
@@ -4940,7 +4940,8 @@
4940
4940
  networkEvaluateInterval: 1e3,
4941
4941
  delayHint: 0,
4942
4942
  seamlesslyReload: false,
4943
- enableSei: true
4943
+ enableSei: true,
4944
+ enableOriginSdpLogger: false
4944
4945
  }, opts);
4945
4946
  }
4946
4947
  function _getStats(stats) {
@@ -5959,7 +5960,7 @@
5959
5960
  key: "_connect",
5960
5961
  value: function() {
5961
5962
  var _connect2 = _asyncToGenerator$1(/* @__PURE__ */ _regeneratorRuntime$1().mark(function _callee2() {
5962
- var pc, offer, delayHint, parsed, finnalUrl, _answer$remoteSdp, _answer$remoteSdp2, parseSession, sessionId, reqStart, res, answer, err, _parsed;
5963
+ var pc, offer, delayHint, parsed, finnalUrl, _this$_opts, _answer$remoteSdp, _this$_opts2, _answer$remoteSdp2, _parsed$media, parseSession, sessionId, reqStart, res, answer, err, _parsed;
5963
5964
  return _regeneratorRuntime$1().wrap(function _callee2$(_context2) {
5964
5965
  while (1)
5965
5966
  switch (_context2.prev = _context2.next) {
@@ -6038,7 +6039,7 @@
6038
6039
  sessionId = parseSession ? parseSession[1] : Date.now() + "666";
6039
6040
  this.emit(EVENT.LOAD_START, {
6040
6041
  url: finnalUrl,
6041
- offersdp: offer.sdp,
6042
+ offersdp: (_this$_opts = this._opts) !== null && _this$_opts !== void 0 && _this$_opts.enableOriginSdpLogger ? offer.sdp : void 0,
6042
6043
  sessionId
6043
6044
  });
6044
6045
  reqStart = Date.now();
@@ -6073,12 +6074,19 @@
6073
6074
  case 43:
6074
6075
  logger.log("answer:");
6075
6076
  logger.log((_answer$remoteSdp = answer.remoteSdp) === null || _answer$remoteSdp === void 0 ? void 0 : _answer$remoteSdp.sdp);
6077
+ _parsed = lib.parse(answer.remoteSdp.sdp);
6076
6078
  this.emit(EVENT.LOAD_COMPLETE, {
6077
6079
  url: finnalUrl,
6078
6080
  elapsed: Date.now() - reqStart,
6079
- answersdp: (_answer$remoteSdp2 = answer.remoteSdp) === null || _answer$remoteSdp2 === void 0 ? void 0 : _answer$remoteSdp2.sdp
6081
+ 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,
6082
+ parsedSdp: _parsed === null || _parsed === void 0 ? void 0 : (_parsed$media = _parsed.media) === null || _parsed$media === void 0 ? void 0 : _parsed$media.map(function(media) {
6083
+ return {
6084
+ candidates: media.candidates,
6085
+ rtp: media.rtp,
6086
+ type: media.type
6087
+ };
6088
+ })
6080
6089
  });
6081
- _parsed = lib.parse(answer.remoteSdp.sdp);
6082
6090
  _parsed.media.forEach(function(x) {
6083
6091
  x.fingerprint.hash = x.fingerprint.hash.toUpperCase();
6084
6092
  });
@@ -6127,10 +6135,10 @@
6127
6135
  }, {
6128
6136
  key: "destroy",
6129
6137
  value: function destroy() {
6130
- var _this$_media2, _this$_opts;
6138
+ var _this$_media2, _this$_opts3;
6131
6139
  this._disconnect();
6132
6140
  (_this$_media2 = this._media) === null || _this$_media2 === void 0 ? void 0 : _this$_media2.removeEventListener("timeupdate", this._mockWaitingByTimeupdate);
6133
- if (this._media && !((_this$_opts = this._opts) !== null && _this$_opts !== void 0 && _this$_opts.seamlesslyReload)) {
6141
+ if (this._media && !((_this$_opts3 = this._opts) !== null && _this$_opts3 !== void 0 && _this$_opts3.seamlesslyReload)) {
6134
6142
  this._media.srcObject = null;
6135
6143
  }
6136
6144
  if (this._pc) {
@@ -6257,7 +6265,7 @@
6257
6265
  }, {
6258
6266
  key: "version",
6259
6267
  get: function get() {
6260
- return "0.2.1-alpha.8";
6268
+ return "0.2.1-alpha.13";
6261
6269
  }
6262
6270
  }, {
6263
6271
  key: "beforePlayerInit",