|
@@ -5345,10 +5345,28 @@
|
|
|
|
|
|
function _isNativeReflectConstruct$d() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
function _isNativeReflectConstruct$d() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
|
|
|
|
|
|
+ var InternalError = /*#__PURE__*/function (_XverseError) {
|
|
|
|
+ _inherits(InternalError, _XverseError);
|
|
|
|
+
|
|
|
|
+ var _super = _createSuper$d(InternalError);
|
|
|
|
+
|
|
|
|
+ function InternalError(e) {
|
|
|
|
+ _classCallCheck(this, InternalError);
|
|
|
|
+
|
|
|
|
+ return _super.call(this, 1002, e || "\u5185\u90E8\u9519\u8BEF");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return _createClass(InternalError);
|
|
|
|
+ }(XverseError);
|
|
|
|
+
|
|
|
|
+ function _createSuper$c(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$c(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
|
|
+
|
|
|
|
+ function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
|
|
+
|
|
var Socket = /*#__PURE__*/function (_EventEmitter) {
|
|
var Socket = /*#__PURE__*/function (_EventEmitter) {
|
|
_inherits(Socket, _EventEmitter);
|
|
_inherits(Socket, _EventEmitter);
|
|
|
|
|
|
- var _super = _createSuper$d(Socket);
|
|
|
|
|
|
+ var _super = _createSuper$c(Socket);
|
|
|
|
|
|
function Socket(e) {
|
|
function Socket(e) {
|
|
var _this;
|
|
var _this;
|
|
@@ -6804,14 +6822,14 @@
|
|
return Workers;
|
|
return Workers;
|
|
}();
|
|
}();
|
|
|
|
|
|
- function _createSuper$c(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$c(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
|
|
|
|
+ function _createSuper$b(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$b(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
|
|
|
|
- function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
|
|
|
|
+ function _isNativeReflectConstruct$b() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
|
|
|
|
var Rtcp = /*#__PURE__*/function (_EventEmitter) {
|
|
var Rtcp = /*#__PURE__*/function (_EventEmitter) {
|
|
_inherits(Rtcp, _EventEmitter);
|
|
_inherits(Rtcp, _EventEmitter);
|
|
|
|
|
|
- var _super = _createSuper$c(Rtcp);
|
|
|
|
|
|
+ var _super = _createSuper$b(Rtcp);
|
|
|
|
|
|
function Rtcp(e) {
|
|
function Rtcp(e) {
|
|
var _this;
|
|
var _this;
|
|
@@ -7113,24 +7131,6 @@
|
|
return Stream;
|
|
return Stream;
|
|
}();
|
|
}();
|
|
|
|
|
|
- function _createSuper$b(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$b(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
|
|
-
|
|
|
|
- function _isNativeReflectConstruct$b() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
|
|
-
|
|
|
|
- var InternalError$1 = /*#__PURE__*/function (_XverseError) {
|
|
|
|
- _inherits(InternalError, _XverseError);
|
|
|
|
-
|
|
|
|
- var _super = _createSuper$b(InternalError);
|
|
|
|
-
|
|
|
|
- function InternalError(e) {
|
|
|
|
- _classCallCheck(this, InternalError);
|
|
|
|
-
|
|
|
|
- return _super.call(this, 1002, e || "\u5185\u90E8\u9519\u8BEF");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return _createClass(InternalError);
|
|
|
|
- }(XverseError);
|
|
|
|
-
|
|
|
|
function _createSuper$a(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$a(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
function _createSuper$a(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$a(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
|
|
|
|
function _isNativeReflectConstruct$a() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
function _isNativeReflectConstruct$a() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -7187,8 +7187,8 @@
|
|
var _this2 = this;
|
|
var _this2 = this;
|
|
|
|
|
|
return new Promise(function (e, t) {
|
|
return new Promise(function (e, t) {
|
|
- if (!_this2.rtcp.connected) return t(new InternalError$1("Game cannot load. Please refresh"));
|
|
|
|
- if (!_this2.rtcp.inputReady) return t(new InternalError$1("Game is not ready yet. Please wait"));
|
|
|
|
|
|
+ if (!_this2.rtcp.connected) return t(new InternalError("Game cannot load. Please refresh"));
|
|
|
|
+ if (!_this2.rtcp.inputReady) return t(new InternalError("Game is not ready yet. Please wait"));
|
|
_this2.socket.on("gameRoomAvailable", function (r) {
|
|
_this2.socket.on("gameRoomAvailable", function (r) {
|
|
_this2.setState("connected"), e(r), _this2.rtcp.heartbeat.start();
|
|
_this2.setState("connected"), e(r), _this2.rtcp.heartbeat.start();
|
|
}), _this2.socket.on("socketClosed", function (r) {
|
|
}), _this2.socket.on("socketClosed", function (r) {
|
|
@@ -7263,7 +7263,7 @@
|
|
_this3.rtcp.on("rtcConnected", function () {
|
|
_this3.rtcp.on("rtcConnected", function () {
|
|
_this3.setState("connected"), t();
|
|
_this3.setState("connected"), t();
|
|
}), _this3.rtcp.on("rtcDisconnected", function () {
|
|
}), _this3.rtcp.on("rtcDisconnected", function () {
|
|
- logger$1.info("rtc disconnected"), _this3._state === "connecting" ? (_this3.setState("disconnected"), r(new InternalError$1("rtc connect failed"))) : (_this3.setState("disconnected"), logger$1.info("rtc disconnected, start to reconnect"), _this3.reconnect());
|
|
|
|
|
|
+ logger$1.info("rtc disconnected"), _this3._state === "connecting" ? (_this3.setState("disconnected"), r(new InternalError("rtc connect failed"))) : (_this3.setState("disconnected"), logger$1.info("rtc disconnected, start to reconnect"), _this3.reconnect());
|
|
}), _this3.socket.on("socketQuit", function () {
|
|
}), _this3.socket.on("socketQuit", function () {
|
|
logger$1.info("socket quit success"), _this3.setState("closed");
|
|
logger$1.info("socket quit success"), _this3.setState("closed");
|
|
}), _this3.socket.on("socketClosed", function (n) {
|
|
}), _this3.socket.on("socketClosed", function (n) {
|