@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.
@@ -4331,7 +4331,6 @@ var grammar$1 = grammar$2.exports = {
4331
4331
  format: "%d %d"
4332
4332
  }],
4333
4333
  c: [{
4334
- // c=IN IP4 10.47.197.26
4335
4334
  name: "connection",
4336
4335
  reg: /^IN IP(\d) (\S*)/,
4337
4336
  names: ["version", "ip"],
@@ -4649,7 +4648,6 @@ var grammar$1 = grammar$2.exports = {
4649
4648
  },
4650
4649
  {
4651
4650
  // RFC4570
4652
- // a=source-filter: incl IN IP4 239.5.2.31 10.1.15.5
4653
4651
  name: "sourceFilter",
4654
4652
  reg: /^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,
4655
4653
  names: ["filterMode", "netType", "addressTypes", "destAddress", "srcList"],
@@ -6780,6 +6778,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
6780
6778
  _defineProperty$2(_assertThisInitialized$1(_this), "_mediaStream", null);
6781
6779
  _defineProperty$2(_assertThisInitialized$1(_this), "_lastMediaStream", null);
6782
6780
  _defineProperty$2(_assertThisInitialized$1(_this), "_media", null);
6781
+ _defineProperty$2(_assertThisInitialized$1(_this), "_player", null);
6783
6782
  _defineProperty$2(_assertThisInitialized$1(_this), "_opts", null);
6784
6783
  _defineProperty$2(_assertThisInitialized$1(_this), "_loader", null);
6785
6784
  _defineProperty$2(_assertThisInitialized$1(_this), "_networkEvaluate", null);
@@ -6848,8 +6847,8 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
6848
6847
  return;
6849
6848
  clearTimeout(_this._waitingTimer);
6850
6849
  _this._waitingTimer = setTimeout(function() {
6851
- var _this$_media;
6852
- if ((_this$_media = _this._media) !== null && _this$_media !== void 0 && _this$_media.paused)
6850
+ var _this$_player;
6851
+ if ((_this$_player = _this._player) !== null && _this$_player !== void 0 && _this$_player.paused)
6853
6852
  return;
6854
6853
  _this.emit("waiting");
6855
6854
  }, _this._opts.stallInterval);
@@ -7047,6 +7046,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
7047
7046
  });
7048
7047
  _this._opts = getOption(opts);
7049
7048
  _this._media = _this._opts.media;
7049
+ _this._player = _this._opts.player;
7050
7050
  _this._loader = new NetLoader(_objectSpread2$2(_objectSpread2$2({}, opts.fetchOptions), {}, {
7051
7051
  responseType: "json",
7052
7052
  method: "POST",
@@ -7201,7 +7201,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
7201
7201
  value: function _handleMediaStream() {
7202
7202
  var _this4 = this;
7203
7203
  if (this._lastMediaStream) {
7204
- var _this$_media$play;
7204
+ var _this$_player$play;
7205
7205
  var videoTrack = this._lastMediaStream.getVideoTracks()[0];
7206
7206
  var audioTrack = this._lastMediaStream.getAudioTracks()[0];
7207
7207
  if (videoTrack) {
@@ -7214,8 +7214,8 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
7214
7214
  this._audio && this._mediaStream.addTrack(this._audio);
7215
7215
  this._video && this._mediaStream.addTrack(this._video);
7216
7216
  this._isReplacing = true;
7217
- this._media.pause();
7218
- (_this$_media$play = this._media.play()) === null || _this$_media$play === void 0 ? void 0 : _this$_media$play.finally(function() {
7217
+ this._player.pause();
7218
+ (_this$_player$play = this._player.play()) === null || _this$_player$play === void 0 ? void 0 : _this$_player$play.finally(function() {
7219
7219
  _this4._isReplacing = false;
7220
7220
  });
7221
7221
  } else {
@@ -7223,7 +7223,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
7223
7223
  this._audio && this._mediaStream.addTrack(this._audio);
7224
7224
  this._video && this._mediaStream.addTrack(this._video);
7225
7225
  this._media.srcObject = this._mediaStream;
7226
- var req = this._media.play();
7226
+ var req = this._player.play();
7227
7227
  if (req && req.catch) {
7228
7228
  req.catch(function(e) {
7229
7229
  });
@@ -7715,11 +7715,11 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
7715
7715
  }, {
7716
7716
  key: "destroy",
7717
7717
  value: function destroy(keepClearMediaStream) {
7718
- var _this$_revertVolumeWo, _this$_media2;
7718
+ var _this$_revertVolumeWo, _this$_media;
7719
7719
  this._disconnect();
7720
7720
  (_this$_revertVolumeWo = this._revertVolumeWorkaround) === null || _this$_revertVolumeWo === void 0 ? void 0 : _this$_revertVolumeWo.call(this);
7721
7721
  delete this._revertVolumeWorkaround;
7722
- (_this$_media2 = this._media) === null || _this$_media2 === void 0 ? void 0 : _this$_media2.removeEventListener("timeupdate", this._mockWaitingByTimeupdate);
7722
+ (_this$_media = this._media) === null || _this$_media === void 0 ? void 0 : _this$_media.removeEventListener("timeupdate", this._mockWaitingByTimeupdate);
7723
7723
  if (this._media && !keepClearMediaStream) {
7724
7724
  this._media.srcObject = null;
7725
7725
  }
@@ -7728,6 +7728,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
7728
7728
  }
7729
7729
  this._loader = null;
7730
7730
  this._media = null;
7731
+ this._player = null;
7731
7732
  this._pc = null;
7732
7733
  this._opts = null;
7733
7734
  }
@@ -7792,6 +7793,7 @@ var RtsPlugin = /* @__PURE__ */ function(_BasePlugin) {
7792
7793
  _this._rtsOpts = rtsOpts;
7793
7794
  _this._rts = new Rts(_objectSpread2$2({
7794
7795
  media: _this.player.video,
7796
+ player: _this.player,
7795
7797
  mediaStream: _this._mediaStream,
7796
7798
  preProcessUrl: function preProcessUrl(url, ext) {
7797
7799
  var _this$player$preProce, _this$player;
@@ -7854,7 +7856,7 @@ var RtsPlugin = /* @__PURE__ */ function(_BasePlugin) {
7854
7856
  }, {
7855
7857
  key: "version",
7856
7858
  get: function get() {
7857
- return "0.2.1-alpha.45";
7859
+ return "0.2.1-alpha.47";
7858
7860
  }
7859
7861
  }, {
7860
7862
  key: "beforePlayerInit",