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.
@@ -8866,7 +8866,6 @@ var GetSendModel = function GetSendModel(action, data, params) {
8866
8866
  var _player = /*#__PURE__*/new WeakMap();
8867
8867
 
8868
8868
  var common_request_wsClass = /*#__PURE__*/function () {
8869
- //根据播放的id存储每个播放器,播放器们
8870
8869
  function wsClass(config, _ref2) {
8871
8870
  var _this = this;
8872
8871
 
@@ -8879,7 +8878,7 @@ var common_request_wsClass = /*#__PURE__*/function () {
8879
8878
 
8880
8879
  Object(classPrivateFieldInitSpec["a" /* default */])(this, _player, {
8881
8880
  writable: true,
8882
- value: {}
8881
+ value: null
8883
8882
  });
8884
8883
 
8885
8884
  this.config = config;
@@ -8925,22 +8924,25 @@ var common_request_wsClass = /*#__PURE__*/function () {
8925
8924
  }
8926
8925
  }, {
8927
8926
  key: "getPlayer",
8928
- value: function getPlayer(id, rtcServe, doceProUrl, videoConfig) {
8929
- if (_classPrivateFieldGet(this, _player)[id]) return _classPrivateFieldGet(this, _player)[id];
8930
- _classPrivateFieldGet(this, _player)[id] = getH265PlayerObj(rtcServe, doceProUrl, videoConfig);
8931
- return _classPrivateFieldGet(this, _player)[id];
8927
+ value: function getPlayer(rtcServe, doceProUrl, videoConfig) {
8928
+ if (_classPrivateFieldGet(this, _player)) return _classPrivateFieldGet(this, _player);
8929
+
8930
+ _classPrivateFieldSet(this, _player, getH265PlayerObj(rtcServe, doceProUrl, videoConfig));
8931
+
8932
+ return _classPrivateFieldGet(this, _player);
8932
8933
  }
8933
8934
  }, {
8934
8935
  key: "destroy",
8935
8936
  value: function destroy() {
8936
8937
  var _this2 = this;
8937
8938
 
8938
- // 释放掉播放器们
8939
- Object.keys(_classPrivateFieldGet(this, _player)).forEach(function (key) {
8940
- _classPrivateFieldGet(_this2, _player)[key] = null;
8939
+ _classPrivateFieldGet(this, _player) && _classPrivateFieldGet(this, _player).play265Obj && Object.keys(_classPrivateFieldGet(this, _player).play265Obj).forEach(function (key) {
8940
+ _classPrivateFieldGet(_this2, _player).play265Obj[key].destroy();
8941
+
8942
+ delete _classPrivateFieldGet(_this2, _player).play265Obj[key];
8941
8943
  });
8942
8944
 
8943
- _classPrivateFieldSet(this, _player, {});
8945
+ _classPrivateFieldSet(this, _player, null);
8944
8946
 
8945
8947
  this.socket.closeSocket();
8946
8948
  }
Binary file