kucservice 1.1.9 → 1.2.0

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.
@@ -8857,7 +8857,6 @@ var GetSendModel = function GetSendModel(action, data, params) {
8857
8857
  var _player = /*#__PURE__*/new WeakMap();
8858
8858
 
8859
8859
  var common_request_wsClass = /*#__PURE__*/function () {
8860
- //根据播放的id存储每个播放器,播放器们
8861
8860
  function wsClass(config, _ref2) {
8862
8861
  var _this = this;
8863
8862
 
@@ -8870,7 +8869,7 @@ var common_request_wsClass = /*#__PURE__*/function () {
8870
8869
 
8871
8870
  Object(classPrivateFieldInitSpec["a" /* default */])(this, _player, {
8872
8871
  writable: true,
8873
- value: {}
8872
+ value: null
8874
8873
  });
8875
8874
 
8876
8875
  this.config = config;
@@ -8916,22 +8915,25 @@ var common_request_wsClass = /*#__PURE__*/function () {
8916
8915
  }
8917
8916
  }, {
8918
8917
  key: "getPlayer",
8919
- value: function getPlayer(id, rtcServe, doceProUrl, videoConfig) {
8920
- if (_classPrivateFieldGet(this, _player)[id]) return _classPrivateFieldGet(this, _player)[id];
8921
- _classPrivateFieldGet(this, _player)[id] = getH265PlayerObj(rtcServe, doceProUrl, videoConfig);
8922
- return _classPrivateFieldGet(this, _player)[id];
8918
+ value: function getPlayer(rtcServe, doceProUrl, videoConfig) {
8919
+ if (_classPrivateFieldGet(this, _player)) return _classPrivateFieldGet(this, _player);
8920
+
8921
+ _classPrivateFieldSet(this, _player, getH265PlayerObj(rtcServe, doceProUrl, videoConfig));
8922
+
8923
+ return _classPrivateFieldGet(this, _player);
8923
8924
  }
8924
8925
  }, {
8925
8926
  key: "destroy",
8926
8927
  value: function destroy() {
8927
8928
  var _this2 = this;
8928
8929
 
8929
- // 释放掉播放器们
8930
- Object.keys(_classPrivateFieldGet(this, _player)).forEach(function (key) {
8931
- _classPrivateFieldGet(_this2, _player)[key] = null;
8930
+ _classPrivateFieldGet(this, _player) && _classPrivateFieldGet(this, _player).play265Obj && Object.keys(_classPrivateFieldGet(this, _player).play265Obj).forEach(function (key) {
8931
+ _classPrivateFieldGet(_this2, _player).play265Obj[key].destroy();
8932
+
8933
+ delete _classPrivateFieldGet(_this2, _player).play265Obj[key];
8932
8934
  });
8933
8935
 
8934
- _classPrivateFieldSet(this, _player, {});
8936
+ _classPrivateFieldSet(this, _player, null);
8935
8937
 
8936
8938
  this.socket.closeSocket();
8937
8939
  }
Binary file