@byteplus/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.
@@ -30287,7 +30287,6 @@ var grammar$1 = grammar$2.exports = {
30287
30287
  format: "%d %d"
30288
30288
  }],
30289
30289
  c: [{
30290
- // c=IN IP4 10.47.197.26
30291
30290
  name: "connection",
30292
30291
  reg: /^IN IP(\d) (\S*)/,
30293
30292
  names: ["version", "ip"],
@@ -30605,7 +30604,6 @@ var grammar$1 = grammar$2.exports = {
30605
30604
  },
30606
30605
  {
30607
30606
  // RFC4570
30608
- // a=source-filter: incl IN IP4 239.5.2.31 10.1.15.5
30609
30607
  name: "sourceFilter",
30610
30608
  reg: /^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,
30611
30609
  names: ["filterMode", "netType", "addressTypes", "destAddress", "srcList"],
@@ -32736,6 +32734,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
32736
32734
  _defineProperty$i(_assertThisInitialized$f(_this), "_mediaStream", null);
32737
32735
  _defineProperty$i(_assertThisInitialized$f(_this), "_lastMediaStream", null);
32738
32736
  _defineProperty$i(_assertThisInitialized$f(_this), "_media", null);
32737
+ _defineProperty$i(_assertThisInitialized$f(_this), "_player", null);
32739
32738
  _defineProperty$i(_assertThisInitialized$f(_this), "_opts", null);
32740
32739
  _defineProperty$i(_assertThisInitialized$f(_this), "_loader", null);
32741
32740
  _defineProperty$i(_assertThisInitialized$f(_this), "_networkEvaluate", null);
@@ -32804,8 +32803,8 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
32804
32803
  return;
32805
32804
  clearTimeout(_this._waitingTimer);
32806
32805
  _this._waitingTimer = setTimeout(function() {
32807
- var _this$_media;
32808
- if ((_this$_media = _this._media) !== null && _this$_media !== void 0 && _this$_media.paused)
32806
+ var _this$_player;
32807
+ if ((_this$_player = _this._player) !== null && _this$_player !== void 0 && _this$_player.paused)
32809
32808
  return;
32810
32809
  _this.emit("waiting");
32811
32810
  }, _this._opts.stallInterval);
@@ -33003,6 +33002,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
33003
33002
  });
33004
33003
  _this._opts = getOption(opts);
33005
33004
  _this._media = _this._opts.media;
33005
+ _this._player = _this._opts.player;
33006
33006
  _this._loader = new NetLoader$2(_objectSpread2$b(_objectSpread2$b({}, opts.fetchOptions), {}, {
33007
33007
  responseType: "json",
33008
33008
  method: "POST",
@@ -33157,7 +33157,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
33157
33157
  value: function _handleMediaStream() {
33158
33158
  var _this4 = this;
33159
33159
  if (this._lastMediaStream) {
33160
- var _this$_media$play;
33160
+ var _this$_player$play;
33161
33161
  var videoTrack = this._lastMediaStream.getVideoTracks()[0];
33162
33162
  var audioTrack = this._lastMediaStream.getAudioTracks()[0];
33163
33163
  if (videoTrack) {
@@ -33170,8 +33170,8 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
33170
33170
  this._audio && this._mediaStream.addTrack(this._audio);
33171
33171
  this._video && this._mediaStream.addTrack(this._video);
33172
33172
  this._isReplacing = true;
33173
- this._media.pause();
33174
- (_this$_media$play = this._media.play()) === null || _this$_media$play === void 0 ? void 0 : _this$_media$play.finally(function() {
33173
+ this._player.pause();
33174
+ (_this$_player$play = this._player.play()) === null || _this$_player$play === void 0 ? void 0 : _this$_player$play.finally(function() {
33175
33175
  _this4._isReplacing = false;
33176
33176
  });
33177
33177
  } else {
@@ -33179,7 +33179,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
33179
33179
  this._audio && this._mediaStream.addTrack(this._audio);
33180
33180
  this._video && this._mediaStream.addTrack(this._video);
33181
33181
  this._media.srcObject = this._mediaStream;
33182
- var req = this._media.play();
33182
+ var req = this._player.play();
33183
33183
  if (req && req.catch) {
33184
33184
  req.catch(function(e4) {
33185
33185
  });
@@ -33671,11 +33671,11 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
33671
33671
  }, {
33672
33672
  key: "destroy",
33673
33673
  value: function destroy(keepClearMediaStream) {
33674
- var _this$_revertVolumeWo, _this$_media2;
33674
+ var _this$_revertVolumeWo, _this$_media;
33675
33675
  this._disconnect();
33676
33676
  (_this$_revertVolumeWo = this._revertVolumeWorkaround) === null || _this$_revertVolumeWo === void 0 ? void 0 : _this$_revertVolumeWo.call(this);
33677
33677
  delete this._revertVolumeWorkaround;
33678
- (_this$_media2 = this._media) === null || _this$_media2 === void 0 ? void 0 : _this$_media2.removeEventListener("timeupdate", this._mockWaitingByTimeupdate);
33678
+ (_this$_media = this._media) === null || _this$_media === void 0 ? void 0 : _this$_media.removeEventListener("timeupdate", this._mockWaitingByTimeupdate);
33679
33679
  if (this._media && !keepClearMediaStream) {
33680
33680
  this._media.srcObject = null;
33681
33681
  }
@@ -33684,6 +33684,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
33684
33684
  }
33685
33685
  this._loader = null;
33686
33686
  this._media = null;
33687
+ this._player = null;
33687
33688
  this._pc = null;
33688
33689
  this._opts = null;
33689
33690
  }
@@ -33748,6 +33749,7 @@ var RtsPlugin = /* @__PURE__ */ function(_BasePlugin) {
33748
33749
  _this._rtsOpts = rtsOpts;
33749
33750
  _this._rts = new Rts(_objectSpread2$b({
33750
33751
  media: _this.player.video,
33752
+ player: _this.player,
33751
33753
  mediaStream: _this._mediaStream,
33752
33754
  preProcessUrl: function preProcessUrl(url2, ext) {
33753
33755
  var _this$player$preProce, _this$player;
@@ -33810,7 +33812,7 @@ var RtsPlugin = /* @__PURE__ */ function(_BasePlugin) {
33810
33812
  }, {
33811
33813
  key: "version",
33812
33814
  get: function get4() {
33813
- return "0.2.1-alpha.45";
33815
+ return "0.2.1-alpha.47";
33814
33816
  }
33815
33817
  }, {
33816
33818
  key: "beforePlayerInit",