@volcengine/veplayer-plugin 2.9.3-rc.0 → 2.9.3-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volcengine/veplayer-plugin",
3
- "version": "2.9.3-rc.0",
3
+ "version": "2.9.3-rc.2",
4
4
  "main": "./umd/index.production.js",
5
5
  "module": "./esm/index.production.js",
6
6
  "browser": "./umd/index.production.js",
@@ -4335,7 +4335,6 @@
4335
4335
  format: "%d %d"
4336
4336
  }],
4337
4337
  c: [{
4338
- // c=IN IP4 10.47.197.26
4339
4338
  name: "connection",
4340
4339
  reg: /^IN IP(\d) (\S*)/,
4341
4340
  names: ["version", "ip"],
@@ -4653,7 +4652,6 @@
4653
4652
  },
4654
4653
  {
4655
4654
  // RFC4570
4656
- // a=source-filter: incl IN IP4 239.5.2.31 10.1.15.5
4657
4655
  name: "sourceFilter",
4658
4656
  reg: /^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,
4659
4657
  names: ["filterMode", "netType", "addressTypes", "destAddress", "srcList"],
@@ -6784,6 +6782,7 @@
6784
6782
  _defineProperty$2(_assertThisInitialized$1(_this), "_mediaStream", null);
6785
6783
  _defineProperty$2(_assertThisInitialized$1(_this), "_lastMediaStream", null);
6786
6784
  _defineProperty$2(_assertThisInitialized$1(_this), "_media", null);
6785
+ _defineProperty$2(_assertThisInitialized$1(_this), "_player", null);
6787
6786
  _defineProperty$2(_assertThisInitialized$1(_this), "_opts", null);
6788
6787
  _defineProperty$2(_assertThisInitialized$1(_this), "_loader", null);
6789
6788
  _defineProperty$2(_assertThisInitialized$1(_this), "_networkEvaluate", null);
@@ -6852,8 +6851,8 @@
6852
6851
  return;
6853
6852
  clearTimeout(_this._waitingTimer);
6854
6853
  _this._waitingTimer = setTimeout(function() {
6855
- var _this$_media;
6856
- if ((_this$_media = _this._media) !== null && _this$_media !== void 0 && _this$_media.paused)
6854
+ var _this$_player;
6855
+ if ((_this$_player = _this._player) !== null && _this$_player !== void 0 && _this$_player.paused)
6857
6856
  return;
6858
6857
  _this.emit("waiting");
6859
6858
  }, _this._opts.stallInterval);
@@ -7051,6 +7050,7 @@
7051
7050
  });
7052
7051
  _this._opts = getOption(opts);
7053
7052
  _this._media = _this._opts.media;
7053
+ _this._player = _this._opts.player;
7054
7054
  _this._loader = new NetLoader(_objectSpread2$2(_objectSpread2$2({}, opts.fetchOptions), {}, {
7055
7055
  responseType: "json",
7056
7056
  method: "POST",
@@ -7205,7 +7205,7 @@
7205
7205
  value: function _handleMediaStream() {
7206
7206
  var _this4 = this;
7207
7207
  if (this._lastMediaStream) {
7208
- var _this$_media$play;
7208
+ var _this$_player$play;
7209
7209
  var videoTrack = this._lastMediaStream.getVideoTracks()[0];
7210
7210
  var audioTrack = this._lastMediaStream.getAudioTracks()[0];
7211
7211
  if (videoTrack) {
@@ -7218,8 +7218,8 @@
7218
7218
  this._audio && this._mediaStream.addTrack(this._audio);
7219
7219
  this._video && this._mediaStream.addTrack(this._video);
7220
7220
  this._isReplacing = true;
7221
- this._media.pause();
7222
- (_this$_media$play = this._media.play()) === null || _this$_media$play === void 0 ? void 0 : _this$_media$play.finally(function() {
7221
+ this._player.pause();
7222
+ (_this$_player$play = this._player.play()) === null || _this$_player$play === void 0 ? void 0 : _this$_player$play.finally(function() {
7223
7223
  _this4._isReplacing = false;
7224
7224
  });
7225
7225
  } else {
@@ -7227,7 +7227,7 @@
7227
7227
  this._audio && this._mediaStream.addTrack(this._audio);
7228
7228
  this._video && this._mediaStream.addTrack(this._video);
7229
7229
  this._media.srcObject = this._mediaStream;
7230
- var req = this._media.play();
7230
+ var req = this._player.play();
7231
7231
  if (req && req.catch) {
7232
7232
  req.catch(function(e) {
7233
7233
  });
@@ -7719,11 +7719,11 @@
7719
7719
  }, {
7720
7720
  key: "destroy",
7721
7721
  value: function destroy(keepClearMediaStream) {
7722
- var _this$_revertVolumeWo, _this$_media2;
7722
+ var _this$_revertVolumeWo, _this$_media;
7723
7723
  this._disconnect();
7724
7724
  (_this$_revertVolumeWo = this._revertVolumeWorkaround) === null || _this$_revertVolumeWo === void 0 ? void 0 : _this$_revertVolumeWo.call(this);
7725
7725
  delete this._revertVolumeWorkaround;
7726
- (_this$_media2 = this._media) === null || _this$_media2 === void 0 ? void 0 : _this$_media2.removeEventListener("timeupdate", this._mockWaitingByTimeupdate);
7726
+ (_this$_media = this._media) === null || _this$_media === void 0 ? void 0 : _this$_media.removeEventListener("timeupdate", this._mockWaitingByTimeupdate);
7727
7727
  if (this._media && !keepClearMediaStream) {
7728
7728
  this._media.srcObject = null;
7729
7729
  }
@@ -7732,6 +7732,7 @@
7732
7732
  }
7733
7733
  this._loader = null;
7734
7734
  this._media = null;
7735
+ this._player = null;
7735
7736
  this._pc = null;
7736
7737
  this._opts = null;
7737
7738
  }
@@ -7796,6 +7797,7 @@
7796
7797
  _this._rtsOpts = rtsOpts;
7797
7798
  _this._rts = new Rts(_objectSpread2$2({
7798
7799
  media: _this.player.video,
7800
+ player: _this.player,
7799
7801
  mediaStream: _this._mediaStream,
7800
7802
  preProcessUrl: function preProcessUrl(url, ext) {
7801
7803
  var _this$player$preProce, _this$player;
@@ -7858,7 +7860,7 @@
7858
7860
  }, {
7859
7861
  key: "version",
7860
7862
  get: function get() {
7861
- return "0.2.1-alpha.45";
7863
+ return "0.2.1-alpha.47";
7862
7864
  }
7863
7865
  }, {
7864
7866
  key: "beforePlayerInit",