@arcware-cloud/pixelstreaming-websdk 1.3.6 → 1.3.7
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/index.cjs.js +32 -1
- package/index.esm.js +32 -1
- package/index.umd.js +32 -1
- package/package.json +1 -1
- package/types/lib/ArcwareConfig.d.ts +1 -1
- package/types/lib/ArcwarePixelStreaming.d.ts +1 -0
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.7";
|
|
23424
23424
|
this.settings = settings;
|
|
23425
23425
|
this.session = new Session_1.Session();
|
|
23426
23426
|
this._initialSettings = config.initialSettings;
|
|
@@ -23585,6 +23585,20 @@ 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(evt) {
|
|
23590
|
+
//const reason = (evt.reason || "").toLowerCase();
|
|
23591
|
+
if (evt.code >= 4000 /*||
|
|
23592
|
+
reason.includes("Stream disconnected.") ||
|
|
23593
|
+
reason.includes("forbidden") ||
|
|
23594
|
+
reason.includes("invalid token") ||
|
|
23595
|
+
reason.includes("policy violation") ||
|
|
23596
|
+
reason.includes("not allowed")*/) {
|
|
23597
|
+
return false; // legit server-side rejection: do NOT auto-retry
|
|
23598
|
+
}
|
|
23599
|
+
// Transient/server/network issues: keep auto behavior
|
|
23600
|
+
return true;
|
|
23601
|
+
}
|
|
23588
23602
|
bindTransportEvents() {
|
|
23589
23603
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
23590
23604
|
const current = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.transport;
|
|
@@ -23617,6 +23631,23 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23617
23631
|
}
|
|
23618
23632
|
if (!this._onWsClose) {
|
|
23619
23633
|
this._onWsClose = (evt) => {
|
|
23634
|
+
var _a, _b;
|
|
23635
|
+
console.log(evt.code);
|
|
23636
|
+
console.log(evt.reason);
|
|
23637
|
+
const retryable = this.isRetryableClose(evt);
|
|
23638
|
+
if (!retryable) {
|
|
23639
|
+
// This stops the signaling client and shows the built-in "Play to reconnect" overlay
|
|
23640
|
+
try {
|
|
23641
|
+
(_b = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.closeSignalingServer) === null || _b === void 0 ? void 0 : _b.call(_a, evt.reason, false);
|
|
23642
|
+
}
|
|
23643
|
+
catch (_c) { }
|
|
23644
|
+
// Optional: pause the transport watcher so we don't churn while idle
|
|
23645
|
+
this.stopTransportWatcher();
|
|
23646
|
+
}
|
|
23647
|
+
else {
|
|
23648
|
+
// Leave your existing auto-retry behavior for transient errors
|
|
23649
|
+
this.startTransportWatcher(); // (in case it was stopped)
|
|
23650
|
+
}
|
|
23620
23651
|
// Bubble to your public close handler
|
|
23621
23652
|
EventHandler_1.EventHandler.Emit(this.websocketOnCloseHandler, evt);
|
|
23622
23653
|
};
|
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.7";
|
|
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,20 @@ 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(evt) {
|
|
23615
|
+
//const reason = (evt.reason || "").toLowerCase();
|
|
23616
|
+
if (evt.code >= 4000 /*||
|
|
23617
|
+
reason.includes("Stream disconnected.") ||
|
|
23618
|
+
reason.includes("forbidden") ||
|
|
23619
|
+
reason.includes("invalid token") ||
|
|
23620
|
+
reason.includes("policy violation") ||
|
|
23621
|
+
reason.includes("not allowed")*/) {
|
|
23622
|
+
return false; // legit server-side rejection: do NOT auto-retry
|
|
23623
|
+
}
|
|
23624
|
+
// Transient/server/network issues: keep auto behavior
|
|
23625
|
+
return true;
|
|
23626
|
+
}
|
|
23613
23627
|
bindTransportEvents() {
|
|
23614
23628
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
23615
23629
|
const current = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.transport;
|
|
@@ -23642,6 +23656,23 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
23642
23656
|
}
|
|
23643
23657
|
if (!this._onWsClose) {
|
|
23644
23658
|
this._onWsClose = (evt) => {
|
|
23659
|
+
var _a, _b;
|
|
23660
|
+
console.log(evt.code);
|
|
23661
|
+
console.log(evt.reason);
|
|
23662
|
+
const retryable = this.isRetryableClose(evt);
|
|
23663
|
+
if (!retryable) {
|
|
23664
|
+
// This stops the signaling client and shows the built-in "Play to reconnect" overlay
|
|
23665
|
+
try {
|
|
23666
|
+
(_b = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.closeSignalingServer) === null || _b === void 0 ? void 0 : _b.call(_a, evt.reason, false);
|
|
23667
|
+
}
|
|
23668
|
+
catch (_c) { }
|
|
23669
|
+
// Optional: pause the transport watcher so we don't churn while idle
|
|
23670
|
+
this.stopTransportWatcher();
|
|
23671
|
+
}
|
|
23672
|
+
else {
|
|
23673
|
+
// Leave your existing auto-retry behavior for transient errors
|
|
23674
|
+
this.startTransportWatcher(); // (in case it was stopped)
|
|
23675
|
+
}
|
|
23645
23676
|
// Bubble to your public close handler
|
|
23646
23677
|
_domain_EventHandler__WEBPACK_IMPORTED_MODULE_5__.EventHandler.Emit(this.websocketOnCloseHandler, evt);
|
|
23647
23678
|
};
|
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.7";
|
|
23434
23434
|
this.settings = settings;
|
|
23435
23435
|
this.session = new Session_1.Session();
|
|
23436
23436
|
this._initialSettings = config.initialSettings;
|
|
@@ -23595,6 +23595,20 @@ 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(evt) {
|
|
23600
|
+
//const reason = (evt.reason || "").toLowerCase();
|
|
23601
|
+
if (evt.code >= 4000 /*||
|
|
23602
|
+
reason.includes("Stream disconnected.") ||
|
|
23603
|
+
reason.includes("forbidden") ||
|
|
23604
|
+
reason.includes("invalid token") ||
|
|
23605
|
+
reason.includes("policy violation") ||
|
|
23606
|
+
reason.includes("not allowed")*/) {
|
|
23607
|
+
return false; // legit server-side rejection: do NOT auto-retry
|
|
23608
|
+
}
|
|
23609
|
+
// Transient/server/network issues: keep auto behavior
|
|
23610
|
+
return true;
|
|
23611
|
+
}
|
|
23598
23612
|
bindTransportEvents() {
|
|
23599
23613
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
23600
23614
|
const current = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.transport;
|
|
@@ -23627,6 +23641,23 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23627
23641
|
}
|
|
23628
23642
|
if (!this._onWsClose) {
|
|
23629
23643
|
this._onWsClose = (evt) => {
|
|
23644
|
+
var _a, _b;
|
|
23645
|
+
console.log(evt.code);
|
|
23646
|
+
console.log(evt.reason);
|
|
23647
|
+
const retryable = this.isRetryableClose(evt);
|
|
23648
|
+
if (!retryable) {
|
|
23649
|
+
// This stops the signaling client and shows the built-in "Play to reconnect" overlay
|
|
23650
|
+
try {
|
|
23651
|
+
(_b = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.closeSignalingServer) === null || _b === void 0 ? void 0 : _b.call(_a, evt.reason, false);
|
|
23652
|
+
}
|
|
23653
|
+
catch (_c) { }
|
|
23654
|
+
// Optional: pause the transport watcher so we don't churn while idle
|
|
23655
|
+
this.stopTransportWatcher();
|
|
23656
|
+
}
|
|
23657
|
+
else {
|
|
23658
|
+
// Leave your existing auto-retry behavior for transient errors
|
|
23659
|
+
this.startTransportWatcher(); // (in case it was stopped)
|
|
23660
|
+
}
|
|
23630
23661
|
// Bubble to your public close handler
|
|
23631
23662
|
EventHandler_1.EventHandler.Emit(this.websocketOnCloseHandler, evt);
|
|
23632
23663
|
};
|
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.7",
|
|
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.7";
|
|
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. */
|