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
|
@@ -2211,6 +2211,8 @@ var websocket_Socket = /*#__PURE__*/function (_WebSocket) {
|
|
|
2211
2211
|
this.onclose = function (e) {
|
|
2212
2212
|
var _this2 = this;
|
|
2213
2213
|
|
|
2214
|
+
console.error('webSocket关闭', e);
|
|
2215
|
+
|
|
2214
2216
|
this._dep.notify('close', e); // 如果WebSocket是非正常关闭 则进行重连
|
|
2215
2217
|
|
|
2216
2218
|
|
|
@@ -11494,11 +11496,12 @@ var common_request_wsClass = /*#__PURE__*/function () {
|
|
|
11494
11496
|
value: null
|
|
11495
11497
|
});
|
|
11496
11498
|
|
|
11499
|
+
if (config !== null && config !== void 0 && config.onlyPlay) return;
|
|
11497
11500
|
this.config = config;
|
|
11498
11501
|
Object.assign(this.config, {
|
|
11499
11502
|
checkData: JSON.stringify(GetSendModel('keeplive', this.config))
|
|
11500
11503
|
});
|
|
11501
|
-
this.socket = common_request_useRequest('websocket')(config);
|
|
11504
|
+
this.socket = common_request_useRequest('websocket')(config, this);
|
|
11502
11505
|
initWsBaseTheme(this.socket, {
|
|
11503
11506
|
onOpen: function onOpen(e) {
|
|
11504
11507
|
// 登录
|
|
@@ -11536,7 +11539,9 @@ var common_request_wsClass = /*#__PURE__*/function () {
|
|
|
11536
11539
|
Object(createClass["a" /* default */])(wsClass, [{
|
|
11537
11540
|
key: "send",
|
|
11538
11541
|
value: function send(action, params) {
|
|
11539
|
-
|
|
11542
|
+
var _this$socket;
|
|
11543
|
+
|
|
11544
|
+
(_this$socket = this.socket) === null || _this$socket === void 0 ? void 0 : _this$socket.send(JSON.stringify(GetSendModel(action, this.config, params)));
|
|
11540
11545
|
}
|
|
11541
11546
|
}, {
|
|
11542
11547
|
key: "getPlayer",
|
|
@@ -11563,7 +11568,8 @@ var common_request_wsClass = /*#__PURE__*/function () {
|
|
|
11563
11568
|
}, {
|
|
11564
11569
|
key: "destroy",
|
|
11565
11570
|
value: function destroy() {
|
|
11566
|
-
var _this2 = this
|
|
11571
|
+
var _this2 = this,
|
|
11572
|
+
_this$socket2;
|
|
11567
11573
|
|
|
11568
11574
|
_classPrivateFieldGet(this, _player) && _classPrivateFieldGet(this, _player).play265Obj && Object.keys(_classPrivateFieldGet(this, _player).play265Obj).forEach(function (key) {
|
|
11569
11575
|
_classPrivateFieldGet(_this2, _player).play265Obj[key].destroy();
|
|
@@ -11573,7 +11579,8 @@ var common_request_wsClass = /*#__PURE__*/function () {
|
|
|
11573
11579
|
|
|
11574
11580
|
_classPrivateFieldSet(this, _player, null);
|
|
11575
11581
|
|
|
11576
|
-
this.
|
|
11582
|
+
this.socketTimer && clearTimeout(this.socketTimer);
|
|
11583
|
+
(_this$socket2 = this.socket) === null || _this$socket2 === void 0 ? void 0 : _this$socket2.closeSocket(1000, '通知关闭websocket连接');
|
|
11577
11584
|
this.socket = null;
|
|
11578
11585
|
|
|
11579
11586
|
if (_classPrivateFieldGet(this, _phoneClientObj)) {
|
|
Binary file
|