@byteplus/veplayer-plugin 2.9.2 → 2.9.3-rc.1

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.
@@ -32736,6 +32736,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
32736
32736
  _defineProperty$i(_assertThisInitialized$f(_this), "_mediaStream", null);
32737
32737
  _defineProperty$i(_assertThisInitialized$f(_this), "_lastMediaStream", null);
32738
32738
  _defineProperty$i(_assertThisInitialized$f(_this), "_media", null);
32739
+ _defineProperty$i(_assertThisInitialized$f(_this), "_player", null);
32739
32740
  _defineProperty$i(_assertThisInitialized$f(_this), "_opts", null);
32740
32741
  _defineProperty$i(_assertThisInitialized$f(_this), "_loader", null);
32741
32742
  _defineProperty$i(_assertThisInitialized$f(_this), "_networkEvaluate", null);
@@ -32804,8 +32805,8 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
32804
32805
  return;
32805
32806
  clearTimeout(_this._waitingTimer);
32806
32807
  _this._waitingTimer = setTimeout(function() {
32807
- var _this$_media;
32808
- if ((_this$_media = _this._media) !== null && _this$_media !== void 0 && _this$_media.paused)
32808
+ var _this$_player;
32809
+ if ((_this$_player = _this._player) !== null && _this$_player !== void 0 && _this$_player.paused)
32809
32810
  return;
32810
32811
  _this.emit("waiting");
32811
32812
  }, _this._opts.stallInterval);
@@ -33003,6 +33004,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
33003
33004
  });
33004
33005
  _this._opts = getOption(opts);
33005
33006
  _this._media = _this._opts.media;
33007
+ _this._player = _this._opts.player;
33006
33008
  _this._loader = new NetLoader$2(_objectSpread2$b(_objectSpread2$b({}, opts.fetchOptions), {}, {
33007
33009
  responseType: "json",
33008
33010
  method: "POST",
@@ -33157,7 +33159,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
33157
33159
  value: function _handleMediaStream() {
33158
33160
  var _this4 = this;
33159
33161
  if (this._lastMediaStream) {
33160
- var _this$_media$play;
33162
+ var _this$_player$play;
33161
33163
  var videoTrack = this._lastMediaStream.getVideoTracks()[0];
33162
33164
  var audioTrack = this._lastMediaStream.getAudioTracks()[0];
33163
33165
  if (videoTrack) {
@@ -33170,8 +33172,8 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
33170
33172
  this._audio && this._mediaStream.addTrack(this._audio);
33171
33173
  this._video && this._mediaStream.addTrack(this._video);
33172
33174
  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() {
33175
+ this._player.pause();
33176
+ (_this$_player$play = this._player.play()) === null || _this$_player$play === void 0 ? void 0 : _this$_player$play.finally(function() {
33175
33177
  _this4._isReplacing = false;
33176
33178
  });
33177
33179
  } else {
@@ -33179,7 +33181,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
33179
33181
  this._audio && this._mediaStream.addTrack(this._audio);
33180
33182
  this._video && this._mediaStream.addTrack(this._video);
33181
33183
  this._media.srcObject = this._mediaStream;
33182
- var req = this._media.play();
33184
+ var req = this._player.play();
33183
33185
  if (req && req.catch) {
33184
33186
  req.catch(function(e4) {
33185
33187
  });
@@ -33671,11 +33673,11 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
33671
33673
  }, {
33672
33674
  key: "destroy",
33673
33675
  value: function destroy(keepClearMediaStream) {
33674
- var _this$_revertVolumeWo, _this$_media2;
33676
+ var _this$_revertVolumeWo, _this$_media;
33675
33677
  this._disconnect();
33676
33678
  (_this$_revertVolumeWo = this._revertVolumeWorkaround) === null || _this$_revertVolumeWo === void 0 ? void 0 : _this$_revertVolumeWo.call(this);
33677
33679
  delete this._revertVolumeWorkaround;
33678
- (_this$_media2 = this._media) === null || _this$_media2 === void 0 ? void 0 : _this$_media2.removeEventListener("timeupdate", this._mockWaitingByTimeupdate);
33680
+ (_this$_media = this._media) === null || _this$_media === void 0 ? void 0 : _this$_media.removeEventListener("timeupdate", this._mockWaitingByTimeupdate);
33679
33681
  if (this._media && !keepClearMediaStream) {
33680
33682
  this._media.srcObject = null;
33681
33683
  }
@@ -33684,6 +33686,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
33684
33686
  }
33685
33687
  this._loader = null;
33686
33688
  this._media = null;
33689
+ this._player = null;
33687
33690
  this._pc = null;
33688
33691
  this._opts = null;
33689
33692
  }
@@ -33748,6 +33751,7 @@ var RtsPlugin = /* @__PURE__ */ function(_BasePlugin) {
33748
33751
  _this._rtsOpts = rtsOpts;
33749
33752
  _this._rts = new Rts(_objectSpread2$b({
33750
33753
  media: _this.player.video,
33754
+ player: _this.player,
33751
33755
  mediaStream: _this._mediaStream,
33752
33756
  preProcessUrl: function preProcessUrl(url2, ext) {
33753
33757
  var _this$player$preProce, _this$player;
@@ -33810,7 +33814,7 @@ var RtsPlugin = /* @__PURE__ */ function(_BasePlugin) {
33810
33814
  }, {
33811
33815
  key: "version",
33812
33816
  get: function get4() {
33813
- return "0.2.1-alpha.45";
33817
+ return "0.2.1-alpha.47";
33814
33818
  }
33815
33819
  }, {
33816
33820
  key: "beforePlayerInit",