@arcware-cloud/pixelstreaming-websdk 1.3.6 → 1.3.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/README.md +4 -0
- package/index.cjs.js +33 -1
- package/index.esm.js +33 -1
- package/index.umd.js +33 -1
- package/package.json +1 -1
- package/types/lib/ArcwareConfig.d.ts +1 -1
- package/types/lib/ArcwarePixelStreaming.d.ts +1 -0
package/README.md
CHANGED
|
@@ -80,6 +80,10 @@ For more detailed examples and advanced usage, please refer to our documentation
|
|
|
80
80
|
|
|
81
81
|
# Changelog
|
|
82
82
|
|
|
83
|
+
### 1.3.8
|
|
84
|
+
|
|
85
|
+
- fixed error handling in SDK to back of reconnects if connection was intentionally terminated by cloud
|
|
86
|
+
|
|
83
87
|
### 1.3.3
|
|
84
88
|
|
|
85
89
|
- adding built in functionality for filetransfer (docs will follow soon)
|
package/index.cjs.js
CHANGED
|
@@ -23420,7 +23420,7 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
|
|
|
23420
23420
|
if (!config.initialSettings.ss)
|
|
23421
23421
|
config.initialSettings.ss = exports.DefaultUrl;
|
|
23422
23422
|
super(config);
|
|
23423
|
-
this.VERSION = "1.3.
|
|
23423
|
+
this.VERSION = "1.3.8";
|
|
23424
23424
|
this.settings = settings;
|
|
23425
23425
|
this.session = new Session_1.Session();
|
|
23426
23426
|
this._initialSettings = config.initialSettings;
|
|
@@ -23585,6 +23585,22 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23585
23585
|
super.reconnect();
|
|
23586
23586
|
this.resetInitGuardsAndHooks();
|
|
23587
23587
|
}
|
|
23588
|
+
// Classify CloseEvent into retryable vs. legit (non-retryable)
|
|
23589
|
+
isRetryableClose(err) {
|
|
23590
|
+
var _a, _b;
|
|
23591
|
+
//const reason = (evt.reason || "").toLowerCase();
|
|
23592
|
+
const code = (_b = (_a = err.code) !== null && _a !== void 0 ? _a : err.status) !== null && _b !== void 0 ? _b : err.errorCode;
|
|
23593
|
+
if (code >= 4000 /*||
|
|
23594
|
+
reason.includes("Stream disconnected.") ||
|
|
23595
|
+
reason.includes("forbidden") ||
|
|
23596
|
+
reason.includes("invalid token") ||
|
|
23597
|
+
reason.includes("policy violation") ||
|
|
23598
|
+
reason.includes("not allowed")*/) {
|
|
23599
|
+
return false; // legit server-side rejection: do NOT auto-retry
|
|
23600
|
+
}
|
|
23601
|
+
// Transient/server/network issues: keep auto behavior
|
|
23602
|
+
return true;
|
|
23603
|
+
}
|
|
23588
23604
|
bindTransportEvents() {
|
|
23589
23605
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
23590
23606
|
const current = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.transport;
|
|
@@ -23817,7 +23833,23 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23817
23833
|
EventHandler_1.EventHandler.Emit(this.queueHandler, message);
|
|
23818
23834
|
}
|
|
23819
23835
|
onError(error) {
|
|
23836
|
+
var _a, _b;
|
|
23820
23837
|
lib_pixelstreamingfrontend_ue5_5_1.Logger.Error(error.type);
|
|
23838
|
+
console.log(error);
|
|
23839
|
+
const retryable = this.isRetryableClose(error);
|
|
23840
|
+
if (!retryable) {
|
|
23841
|
+
// This stops the signaling client and shows the built-in "Play to reconnect" overlay
|
|
23842
|
+
try {
|
|
23843
|
+
(_b = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.closeSignalingServer) === null || _b === void 0 ? void 0 : _b.call(_a, error.reason, false);
|
|
23844
|
+
}
|
|
23845
|
+
catch (_c) { }
|
|
23846
|
+
// Optional: pause the transport watcher so we don't churn while idle
|
|
23847
|
+
this.stopTransportWatcher();
|
|
23848
|
+
}
|
|
23849
|
+
else {
|
|
23850
|
+
// Leave your existing auto-retry behavior for transient errors
|
|
23851
|
+
this.startTransportWatcher(); // (in case it was stopped)
|
|
23852
|
+
}
|
|
23821
23853
|
EventHandler_1.EventHandler.Emit(this.errorHandler, error);
|
|
23822
23854
|
}
|
|
23823
23855
|
onLoveLetter(loveLetter) {
|
package/index.esm.js
CHANGED
|
@@ -23428,7 +23428,7 @@ class ArcwareConfig extends _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBP
|
|
|
23428
23428
|
if (!config.initialSettings.ss)
|
|
23429
23429
|
config.initialSettings.ss = DefaultUrl;
|
|
23430
23430
|
super(config);
|
|
23431
|
-
this.VERSION = "1.3.
|
|
23431
|
+
this.VERSION = "1.3.8";
|
|
23432
23432
|
this.settings = settings;
|
|
23433
23433
|
this.session = new _domain_Session__WEBPACK_IMPORTED_MODULE_0__.Session();
|
|
23434
23434
|
this._initialSettings = config.initialSettings;
|
|
@@ -23610,6 +23610,22 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
23610
23610
|
super.reconnect();
|
|
23611
23611
|
this.resetInitGuardsAndHooks();
|
|
23612
23612
|
}
|
|
23613
|
+
// Classify CloseEvent into retryable vs. legit (non-retryable)
|
|
23614
|
+
isRetryableClose(err) {
|
|
23615
|
+
var _a, _b;
|
|
23616
|
+
//const reason = (evt.reason || "").toLowerCase();
|
|
23617
|
+
const code = (_b = (_a = err.code) !== null && _a !== void 0 ? _a : err.status) !== null && _b !== void 0 ? _b : err.errorCode;
|
|
23618
|
+
if (code >= 4000 /*||
|
|
23619
|
+
reason.includes("Stream disconnected.") ||
|
|
23620
|
+
reason.includes("forbidden") ||
|
|
23621
|
+
reason.includes("invalid token") ||
|
|
23622
|
+
reason.includes("policy violation") ||
|
|
23623
|
+
reason.includes("not allowed")*/) {
|
|
23624
|
+
return false; // legit server-side rejection: do NOT auto-retry
|
|
23625
|
+
}
|
|
23626
|
+
// Transient/server/network issues: keep auto behavior
|
|
23627
|
+
return true;
|
|
23628
|
+
}
|
|
23613
23629
|
bindTransportEvents() {
|
|
23614
23630
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
23615
23631
|
const current = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.transport;
|
|
@@ -23842,7 +23858,23 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
23842
23858
|
_domain_EventHandler__WEBPACK_IMPORTED_MODULE_5__.EventHandler.Emit(this.queueHandler, message);
|
|
23843
23859
|
}
|
|
23844
23860
|
onError(error) {
|
|
23861
|
+
var _a, _b;
|
|
23845
23862
|
_epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_10__.Logger.Error(error.type);
|
|
23863
|
+
console.log(error);
|
|
23864
|
+
const retryable = this.isRetryableClose(error);
|
|
23865
|
+
if (!retryable) {
|
|
23866
|
+
// This stops the signaling client and shows the built-in "Play to reconnect" overlay
|
|
23867
|
+
try {
|
|
23868
|
+
(_b = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.closeSignalingServer) === null || _b === void 0 ? void 0 : _b.call(_a, error.reason, false);
|
|
23869
|
+
}
|
|
23870
|
+
catch (_c) { }
|
|
23871
|
+
// Optional: pause the transport watcher so we don't churn while idle
|
|
23872
|
+
this.stopTransportWatcher();
|
|
23873
|
+
}
|
|
23874
|
+
else {
|
|
23875
|
+
// Leave your existing auto-retry behavior for transient errors
|
|
23876
|
+
this.startTransportWatcher(); // (in case it was stopped)
|
|
23877
|
+
}
|
|
23846
23878
|
_domain_EventHandler__WEBPACK_IMPORTED_MODULE_5__.EventHandler.Emit(this.errorHandler, error);
|
|
23847
23879
|
}
|
|
23848
23880
|
onLoveLetter(loveLetter) {
|
package/index.umd.js
CHANGED
|
@@ -23430,7 +23430,7 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
|
|
|
23430
23430
|
if (!config.initialSettings.ss)
|
|
23431
23431
|
config.initialSettings.ss = exports.DefaultUrl;
|
|
23432
23432
|
super(config);
|
|
23433
|
-
this.VERSION = "1.3.
|
|
23433
|
+
this.VERSION = "1.3.8";
|
|
23434
23434
|
this.settings = settings;
|
|
23435
23435
|
this.session = new Session_1.Session();
|
|
23436
23436
|
this._initialSettings = config.initialSettings;
|
|
@@ -23595,6 +23595,22 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23595
23595
|
super.reconnect();
|
|
23596
23596
|
this.resetInitGuardsAndHooks();
|
|
23597
23597
|
}
|
|
23598
|
+
// Classify CloseEvent into retryable vs. legit (non-retryable)
|
|
23599
|
+
isRetryableClose(err) {
|
|
23600
|
+
var _a, _b;
|
|
23601
|
+
//const reason = (evt.reason || "").toLowerCase();
|
|
23602
|
+
const code = (_b = (_a = err.code) !== null && _a !== void 0 ? _a : err.status) !== null && _b !== void 0 ? _b : err.errorCode;
|
|
23603
|
+
if (code >= 4000 /*||
|
|
23604
|
+
reason.includes("Stream disconnected.") ||
|
|
23605
|
+
reason.includes("forbidden") ||
|
|
23606
|
+
reason.includes("invalid token") ||
|
|
23607
|
+
reason.includes("policy violation") ||
|
|
23608
|
+
reason.includes("not allowed")*/) {
|
|
23609
|
+
return false; // legit server-side rejection: do NOT auto-retry
|
|
23610
|
+
}
|
|
23611
|
+
// Transient/server/network issues: keep auto behavior
|
|
23612
|
+
return true;
|
|
23613
|
+
}
|
|
23598
23614
|
bindTransportEvents() {
|
|
23599
23615
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
23600
23616
|
const current = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.transport;
|
|
@@ -23827,7 +23843,23 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23827
23843
|
EventHandler_1.EventHandler.Emit(this.queueHandler, message);
|
|
23828
23844
|
}
|
|
23829
23845
|
onError(error) {
|
|
23846
|
+
var _a, _b;
|
|
23830
23847
|
lib_pixelstreamingfrontend_ue5_5_1.Logger.Error(error.type);
|
|
23848
|
+
console.log(error);
|
|
23849
|
+
const retryable = this.isRetryableClose(error);
|
|
23850
|
+
if (!retryable) {
|
|
23851
|
+
// This stops the signaling client and shows the built-in "Play to reconnect" overlay
|
|
23852
|
+
try {
|
|
23853
|
+
(_b = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.closeSignalingServer) === null || _b === void 0 ? void 0 : _b.call(_a, error.reason, false);
|
|
23854
|
+
}
|
|
23855
|
+
catch (_c) { }
|
|
23856
|
+
// Optional: pause the transport watcher so we don't churn while idle
|
|
23857
|
+
this.stopTransportWatcher();
|
|
23858
|
+
}
|
|
23859
|
+
else {
|
|
23860
|
+
// Leave your existing auto-retry behavior for transient errors
|
|
23861
|
+
this.startTransportWatcher(); // (in case it was stopped)
|
|
23862
|
+
}
|
|
23831
23863
|
EventHandler_1.EventHandler.Emit(this.errorHandler, error);
|
|
23832
23864
|
}
|
|
23833
23865
|
onLoveLetter(loveLetter) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcware-cloud/pixelstreaming-websdk",
|
|
3
3
|
"description": "WebSDK for easy implementation of pixel streaming with Arcware Cloud Services. Heavily based on the '@epicgames-ps' library.",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.8",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./index.umd.js",
|
|
7
7
|
"module": "./index.umd.js",
|
|
@@ -26,7 +26,7 @@ export declare class ArcwareConfig extends Config {
|
|
|
26
26
|
readonly session: Session;
|
|
27
27
|
readonly settings: Settings;
|
|
28
28
|
private _initialSettings;
|
|
29
|
-
readonly VERSION = "1.3.
|
|
29
|
+
readonly VERSION = "1.3.8";
|
|
30
30
|
constructor(config: ArcwareConfigParams);
|
|
31
31
|
/** Setup connection string. */
|
|
32
32
|
get urlFlags(): string;
|
|
@@ -31,6 +31,7 @@ export declare class ArcwarePixelStreaming extends PixelStreaming {
|
|
|
31
31
|
private _postInitSideEffectsDone;
|
|
32
32
|
private resetInitGuardsAndHooks;
|
|
33
33
|
reconnect(): void;
|
|
34
|
+
private isRetryableClose;
|
|
34
35
|
private bindTransportEvents;
|
|
35
36
|
private get isWsOpen();
|
|
36
37
|
/** Returns a list of WebSocketStates of all PixelStreaming Instances generated. */
|