kucservice 1.4.6 → 1.4.8
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.
- package/dist/kucservice.common.js +11 -4
- package/dist/kucservice.common.js.gz +0 -0
- package/dist/kucservice.common.js.map +1 -1
- package/dist/kucservice.umd.js +11 -4
- package/dist/kucservice.umd.js.gz +0 -0
- package/dist/kucservice.umd.js.map +1 -1
- package/dist/kucservice.umd.min.js +1 -1
- package/dist/kucservice.umd.min.js.gz +0 -0
- package/dist/kucservice.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/kucservice.umd.js
CHANGED
|
@@ -2220,6 +2220,8 @@ var websocket_Socket = /*#__PURE__*/function (_WebSocket) {
|
|
|
2220
2220
|
this.onclose = function (e) {
|
|
2221
2221
|
var _this2 = this;
|
|
2222
2222
|
|
|
2223
|
+
console.error('webSocket关闭', e);
|
|
2224
|
+
|
|
2223
2225
|
this._dep.notify('close', e); // 如果WebSocket是非正常关闭 则进行重连
|
|
2224
2226
|
|
|
2225
2227
|
|
|
@@ -11503,11 +11505,12 @@ var common_request_wsClass = /*#__PURE__*/function () {
|
|
|
11503
11505
|
value: null
|
|
11504
11506
|
});
|
|
11505
11507
|
|
|
11508
|
+
if (config !== null && config !== void 0 && config.onlyPlay) return;
|
|
11506
11509
|
this.config = config;
|
|
11507
11510
|
Object.assign(this.config, {
|
|
11508
11511
|
checkData: JSON.stringify(GetSendModel('keeplive', this.config))
|
|
11509
11512
|
});
|
|
11510
|
-
this.socket = common_request_useRequest('websocket')(config);
|
|
11513
|
+
this.socket = common_request_useRequest('websocket')(config, this);
|
|
11511
11514
|
initWsBaseTheme(this.socket, {
|
|
11512
11515
|
onOpen: function onOpen(e) {
|
|
11513
11516
|
// 登录
|
|
@@ -11545,7 +11548,9 @@ var common_request_wsClass = /*#__PURE__*/function () {
|
|
|
11545
11548
|
Object(createClass["a" /* default */])(wsClass, [{
|
|
11546
11549
|
key: "send",
|
|
11547
11550
|
value: function send(action, params) {
|
|
11548
|
-
|
|
11551
|
+
var _this$socket;
|
|
11552
|
+
|
|
11553
|
+
(_this$socket = this.socket) === null || _this$socket === void 0 ? void 0 : _this$socket.send(JSON.stringify(GetSendModel(action, this.config, params)));
|
|
11549
11554
|
}
|
|
11550
11555
|
}, {
|
|
11551
11556
|
key: "getPlayer",
|
|
@@ -11572,7 +11577,8 @@ var common_request_wsClass = /*#__PURE__*/function () {
|
|
|
11572
11577
|
}, {
|
|
11573
11578
|
key: "destroy",
|
|
11574
11579
|
value: function destroy() {
|
|
11575
|
-
var _this2 = this
|
|
11580
|
+
var _this2 = this,
|
|
11581
|
+
_this$socket2;
|
|
11576
11582
|
|
|
11577
11583
|
_classPrivateFieldGet(this, _player) && _classPrivateFieldGet(this, _player).play265Obj && Object.keys(_classPrivateFieldGet(this, _player).play265Obj).forEach(function (key) {
|
|
11578
11584
|
_classPrivateFieldGet(_this2, _player).play265Obj[key].destroy();
|
|
@@ -11582,7 +11588,8 @@ var common_request_wsClass = /*#__PURE__*/function () {
|
|
|
11582
11588
|
|
|
11583
11589
|
_classPrivateFieldSet(this, _player, null);
|
|
11584
11590
|
|
|
11585
|
-
this.
|
|
11591
|
+
this.socketTimer && clearTimeout(this.socketTimer);
|
|
11592
|
+
(_this$socket2 = this.socket) === null || _this$socket2 === void 0 ? void 0 : _this$socket2.closeSocket(1000, '通知关闭websocket连接');
|
|
11586
11593
|
this.socket = null;
|
|
11587
11594
|
|
|
11588
11595
|
if (_classPrivateFieldGet(this, _phoneClientObj)) {
|
|
Binary file
|