@arcware-cloud/pixelstreaming-websdk 1.3.18 → 1.3.20
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 +6 -0
- package/index.cjs.js +84 -58
- package/index.esm.js +84 -58
- package/index.umd.js +84 -58
- package/package.json +6 -5
- package/types/lib/ArcwareApplication.d.ts +2 -0
- package/types/lib/ArcwareConfig.d.ts +3 -7
- package/types/lib/ArcwarePixelStreaming.d.ts +1 -1
- package/types/lib/domain/ArcwareSettingsSchema.d.ts +13 -0
- package/types/lib/features/ZWhiteLabel.d.ts +6 -0
package/README.md
CHANGED
|
@@ -80,6 +80,12 @@ For more detailed examples and advanced usage, please refer to our documentation
|
|
|
80
80
|
|
|
81
81
|
# Changelog
|
|
82
82
|
|
|
83
|
+
### 1.3.19
|
|
84
|
+
|
|
85
|
+
- added new configuration parameters to optionally hide AfkOverlay and to hide love letters box
|
|
86
|
+
- exposing a function to clear session ID which can be called before connecting to stream to force a fresh instance
|
|
87
|
+
- fixed a bug that was causing onWebsocketClosedEventHandler to fire three times. Also it now returns proper CloseEvent
|
|
88
|
+
|
|
83
89
|
### 1.3.17
|
|
84
90
|
|
|
85
91
|
- added support for videos in white labelling
|
package/index.cjs.js
CHANGED
|
@@ -22963,6 +22963,13 @@ class ArcwareApplication extends lib_pixelstreamingfrontend_ui_ue5_5_1.Applicati
|
|
|
22963
22963
|
this.fileDownloadCallback = null;
|
|
22964
22964
|
this.ArcwareSection = this.configUI.buildSectionWithHeading(this.settingsPanel.settingsContentElement, "Arcware Cloud");
|
|
22965
22965
|
this.stream = options === null || options === void 0 ? void 0 : options.stream;
|
|
22966
|
+
this.baseShowAfkOverlay = this.showAfkOverlay.bind(this); // capture original
|
|
22967
|
+
this.stream.config.whiteLabellingChanged.add(() => {
|
|
22968
|
+
try {
|
|
22969
|
+
this.syncAfkOverlayFromWhiteLabelling();
|
|
22970
|
+
}
|
|
22971
|
+
catch (_a) { }
|
|
22972
|
+
});
|
|
22966
22973
|
this.emitUIInteraction = this.emitUIInteraction.bind(this);
|
|
22967
22974
|
this.adjustSettingsPanel();
|
|
22968
22975
|
this.createAudioToggleButton();
|
|
@@ -23004,6 +23011,7 @@ class ArcwareApplication extends lib_pixelstreamingfrontend_ui_ue5_5_1.Applicati
|
|
|
23004
23011
|
this.preventDefaultKeyboardEvents();
|
|
23005
23012
|
this.analyticsEventCallback = this.analyticsEvent;
|
|
23006
23013
|
this.fileDownloadCallback = this.fileDownload;
|
|
23014
|
+
this.syncAfkOverlayFromWhiteLabelling();
|
|
23007
23015
|
}
|
|
23008
23016
|
addLoveLetterhandler() {
|
|
23009
23017
|
var _a, _b;
|
|
@@ -23336,6 +23344,18 @@ class ArcwareApplication extends lib_pixelstreamingfrontend_ui_ue5_5_1.Applicati
|
|
|
23336
23344
|
console.error("Download failed:", err);
|
|
23337
23345
|
}
|
|
23338
23346
|
}
|
|
23347
|
+
syncAfkOverlayFromWhiteLabelling() {
|
|
23348
|
+
var _a;
|
|
23349
|
+
const hide = (_a = this.stream.config.settings.whiteLabelling) === null || _a === void 0 ? void 0 : _a.hideAfkOverlay;
|
|
23350
|
+
if (hide) {
|
|
23351
|
+
// override with noop
|
|
23352
|
+
this.showAfkOverlay = (_countDown, _dismissAfk) => { };
|
|
23353
|
+
}
|
|
23354
|
+
else {
|
|
23355
|
+
// restore original behavior
|
|
23356
|
+
this.showAfkOverlay = this.baseShowAfkOverlay;
|
|
23357
|
+
}
|
|
23358
|
+
}
|
|
23339
23359
|
}
|
|
23340
23360
|
ArcwareApplication.Flags = (_a = class {
|
|
23341
23361
|
},
|
|
@@ -23432,10 +23452,9 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
|
|
|
23432
23452
|
if (!config.initialSettings.ss)
|
|
23433
23453
|
config.initialSettings.ss = exports.DefaultUrl;
|
|
23434
23454
|
super(config);
|
|
23435
|
-
this.VERSION = "1.3.
|
|
23455
|
+
this.VERSION = "1.3.20";
|
|
23436
23456
|
this.whiteLabellingChanged = new EventHandler_1.EventHandler();
|
|
23437
23457
|
this.signallingWlURL = "https://signalling-client.arcware.cloud/whiteLabel/";
|
|
23438
|
-
console.log(config);
|
|
23439
23458
|
if (config.envName) {
|
|
23440
23459
|
this.signallingWlURL = `https://signalling-client.${config.envName}.arcware.cloud/whiteLabel/`;
|
|
23441
23460
|
}
|
|
@@ -23464,8 +23483,13 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
|
|
|
23464
23483
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23465
23484
|
const qs = new URLSearchParams(window.location.search);
|
|
23466
23485
|
// Only fetch when wl param is present and empty (as before)
|
|
23467
|
-
if (!(qs.has("wl") && qs.get("wl") === ""))
|
|
23486
|
+
if (!(qs.has("wl") && qs.get("wl") === "")) {
|
|
23487
|
+
EventHandler_1.EventHandler.Emit(this.whiteLabellingChanged, {
|
|
23488
|
+
next: this.settings.whiteLabelling,
|
|
23489
|
+
changed: false
|
|
23490
|
+
});
|
|
23468
23491
|
return undefined;
|
|
23492
|
+
}
|
|
23469
23493
|
// Build final URL safely (trim trailing slashes, encode ShareId)
|
|
23470
23494
|
const base = this.signallingWlURL.replace(/\/+$/, "");
|
|
23471
23495
|
const requestUrl = `${base}/${encodeURIComponent(ShareId)}`;
|
|
@@ -23496,10 +23520,8 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
|
|
|
23496
23520
|
// Only apply & emit if it actually changed
|
|
23497
23521
|
const prev = this.settings.whiteLabelling;
|
|
23498
23522
|
const next = parsed.data;
|
|
23499
|
-
|
|
23500
|
-
|
|
23501
|
-
EventHandler_1.EventHandler.Emit(this.whiteLabellingChanged, next);
|
|
23502
|
-
}
|
|
23523
|
+
this.settings.whiteLabelling = next;
|
|
23524
|
+
EventHandler_1.EventHandler.Emit(this.whiteLabellingChanged, { next, changed: !deepEqual(prev, next) });
|
|
23503
23525
|
return parsed.data;
|
|
23504
23526
|
}
|
|
23505
23527
|
catch (_b) {
|
|
@@ -23623,8 +23645,10 @@ function ArcwareInit({ shareId, projectId }, configuration, forceRefresh = false
|
|
|
23623
23645
|
loadingIconUrl: undefined,
|
|
23624
23646
|
splashScreenMode: undefined,
|
|
23625
23647
|
splashScreenPosition: undefined,
|
|
23626
|
-
splashScreenBgColor: undefined
|
|
23627
|
-
|
|
23648
|
+
splashScreenBgColor: undefined,
|
|
23649
|
+
hideLoveLetters: undefined,
|
|
23650
|
+
hideAfkOverlay: undefined
|
|
23651
|
+
}, fetchRemoteWhiteLabelling: undefined }, configuration === null || configuration === void 0 ? void 0 : configuration.settings),
|
|
23628
23652
|
envName: (_a = configuration === null || configuration === void 0 ? void 0 : configuration.envName) !== null && _a !== void 0 ? _a : undefined
|
|
23629
23653
|
});
|
|
23630
23654
|
const PixelStreaming = new ArcwarePixelStreaming_1.ArcwarePixelStreaming(Config);
|
|
@@ -23692,23 +23716,20 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23692
23716
|
return true;
|
|
23693
23717
|
}
|
|
23694
23718
|
bindTransportEvents() {
|
|
23695
|
-
var _a, _b, _c, _d
|
|
23719
|
+
var _a, _b, _c, _d;
|
|
23696
23720
|
const current = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.transport;
|
|
23697
23721
|
if (!current || current === this._boundTransport)
|
|
23698
23722
|
return;
|
|
23699
|
-
// Unbind
|
|
23723
|
+
// Unbind previous
|
|
23700
23724
|
if (this._boundTransport) {
|
|
23701
23725
|
if (this._onWsOpen)
|
|
23702
23726
|
(_c = (_b = this._boundTransport).removeEventListener) === null || _c === void 0 ? void 0 : _c.call(_b, "open", this._onWsOpen);
|
|
23703
|
-
|
|
23704
|
-
(_e = (_d = this._boundTransport).removeEventListener) === null || _e === void 0 ? void 0 : _e.call(_d, "close", this._onWsClose);
|
|
23727
|
+
// ⚠️ this was the synthetic "close" before, we'll stop relying on it
|
|
23705
23728
|
}
|
|
23706
|
-
// Define (or reuse) callbacks
|
|
23707
23729
|
if (!this._onWsOpen) {
|
|
23708
23730
|
this._onWsOpen = () => {
|
|
23709
23731
|
this.flushOutbox();
|
|
23710
23732
|
this.attachFirstRenderedFrameOnce();
|
|
23711
|
-
// no watchdog anymore
|
|
23712
23733
|
setTimeout(() => {
|
|
23713
23734
|
var _a, _b, _c;
|
|
23714
23735
|
if (!this.videoInitializedSent) {
|
|
@@ -23721,15 +23742,15 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23721
23742
|
}, 1200);
|
|
23722
23743
|
};
|
|
23723
23744
|
}
|
|
23724
|
-
|
|
23745
|
+
(_d = current.addEventListener) === null || _d === void 0 ? void 0 : _d.call(current, "open", this._onWsOpen);
|
|
23746
|
+
// Real CloseEvent from underlying WebSocket
|
|
23747
|
+
const ws = current.webSocket;
|
|
23748
|
+
if (ws && !this._onWsClose) {
|
|
23725
23749
|
this._onWsClose = (evt) => {
|
|
23726
|
-
// Bubble to your public close handler
|
|
23727
23750
|
EventHandler_1.EventHandler.Emit(this.websocketOnCloseHandler, evt);
|
|
23728
23751
|
};
|
|
23752
|
+
ws.addEventListener("close", this._onWsClose);
|
|
23729
23753
|
}
|
|
23730
|
-
// Bind to current
|
|
23731
|
-
(_f = current.addEventListener) === null || _f === void 0 ? void 0 : _f.call(current, "open", this._onWsOpen);
|
|
23732
|
-
(_g = current.addEventListener) === null || _g === void 0 ? void 0 : _g.call(current, "close", this._onWsClose);
|
|
23733
23754
|
this._boundTransport = current;
|
|
23734
23755
|
}
|
|
23735
23756
|
get isWsOpen() {
|
|
@@ -23752,7 +23773,7 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23752
23773
|
return state !== undefined ? state : WebSocket.CLOSED;
|
|
23753
23774
|
}
|
|
23754
23775
|
constructor(config, overrides) {
|
|
23755
|
-
var _a, _b
|
|
23776
|
+
var _a, _b;
|
|
23756
23777
|
/** As soon as upstream is fixed, we got to adjust the url building process. */
|
|
23757
23778
|
(0, ApplyUrlHack_1.ApplyUrlHack)();
|
|
23758
23779
|
super(config, overrides);
|
|
@@ -23786,39 +23807,44 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23786
23807
|
this.flushOutbox();
|
|
23787
23808
|
// no polling watchdog
|
|
23788
23809
|
});
|
|
23789
|
-
(_c = transport === null || transport === void 0 ? void 0 : transport.addEventListener) === null || _c === void 0 ? void 0 : _c.call(transport, "close", (evt) => {
|
|
23790
|
-
if (this.websocketOnCloseHandler) {
|
|
23791
|
-
EventHandler_1.EventHandler.Emit(this.websocketOnCloseHandler, evt);
|
|
23792
|
-
}
|
|
23793
|
-
});
|
|
23794
23810
|
// Set override config.
|
|
23795
23811
|
this.config = config;
|
|
23796
23812
|
// Re-apply branding whenever config's WL changes
|
|
23797
|
-
this.config.whiteLabellingChanged.add(() => {
|
|
23813
|
+
this.config.whiteLabellingChanged.add((result) => {
|
|
23814
|
+
var _a;
|
|
23798
23815
|
try {
|
|
23799
|
-
|
|
23816
|
+
if (result.changed)
|
|
23817
|
+
this.applyBrandingFromSettings();
|
|
23818
|
+
this.config.settings.fetchRemoteWhiteLabelling = false;
|
|
23819
|
+
if (!((_a = this.config.settings.whiteLabelling) === null || _a === void 0 ? void 0 : _a.hideLoveLetters)) {
|
|
23820
|
+
if (!this.isProcessingQueue) {
|
|
23821
|
+
this === null || this === void 0 ? void 0 : this.processLoveLetterQueue();
|
|
23822
|
+
}
|
|
23823
|
+
}
|
|
23800
23824
|
}
|
|
23801
|
-
catch (
|
|
23825
|
+
catch (_b) { }
|
|
23802
23826
|
});
|
|
23803
23827
|
// Kick off WL fetch once (if we have a shareId); on success it will emit and re-apply
|
|
23804
|
-
|
|
23805
|
-
|
|
23806
|
-
const sid = this.config.settings.shareId;
|
|
23807
|
-
if (sid) {
|
|
23808
|
-
yield this.config.getWhiteLabelling(sid); // will emit if it changes
|
|
23809
|
-
}
|
|
23810
|
-
}
|
|
23811
|
-
catch (_d) {
|
|
23812
|
-
// ignore
|
|
23813
|
-
}
|
|
23814
|
-
finally {
|
|
23815
|
-
// Make sure we paint with whatever we have initially
|
|
23828
|
+
if (this.config.settings.fetchRemoteWhiteLabelling) {
|
|
23829
|
+
(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23816
23830
|
try {
|
|
23817
|
-
this.
|
|
23831
|
+
const sid = this.config.settings.shareId;
|
|
23832
|
+
if (sid) {
|
|
23833
|
+
yield this.config.getWhiteLabelling(sid); // will emit if it changes
|
|
23834
|
+
}
|
|
23818
23835
|
}
|
|
23819
|
-
catch (
|
|
23820
|
-
|
|
23821
|
-
|
|
23836
|
+
catch (_c) {
|
|
23837
|
+
// ignore
|
|
23838
|
+
}
|
|
23839
|
+
finally {
|
|
23840
|
+
// Make sure we paint with whatever we have initially
|
|
23841
|
+
try {
|
|
23842
|
+
this.applyBrandingFromSettings();
|
|
23843
|
+
}
|
|
23844
|
+
catch (_d) { }
|
|
23845
|
+
}
|
|
23846
|
+
}))();
|
|
23847
|
+
}
|
|
23822
23848
|
this.loveLettersList = [];
|
|
23823
23849
|
this.microphoneOverlay = new MicrophoneOverlay_1.MicrophoneOverlay(this);
|
|
23824
23850
|
this.diagnosticsCollector = new DiagnosticsCollector_1.DiagnosticsCollector({
|
|
@@ -23830,7 +23856,6 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23830
23856
|
// Arm first-frame detector & watch for element swaps
|
|
23831
23857
|
this.attachFirstRenderedFrameOnce();
|
|
23832
23858
|
this.watchVideoElementReplacement();
|
|
23833
|
-
this.wrapWebSocketOnCloseHandler();
|
|
23834
23859
|
// Bind the event listener function to the class instance
|
|
23835
23860
|
this.handleResolutionChange = this.handleResolutionChange.bind(this);
|
|
23836
23861
|
// Register message handlers.
|
|
@@ -24349,10 +24374,12 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
24349
24374
|
}
|
|
24350
24375
|
}
|
|
24351
24376
|
pushLetter(letter) {
|
|
24352
|
-
var _a;
|
|
24377
|
+
var _a, _b;
|
|
24353
24378
|
(_a = this === null || this === void 0 ? void 0 : this.loveLettersQueue) === null || _a === void 0 ? void 0 : _a.push(letter);
|
|
24354
|
-
if (!this.
|
|
24355
|
-
|
|
24379
|
+
if (!((_b = this.config.settings.whiteLabelling) === null || _b === void 0 ? void 0 : _b.hideLoveLetters) && !this.config.settings.fetchRemoteWhiteLabelling) {
|
|
24380
|
+
if (!this.isProcessingQueue) {
|
|
24381
|
+
this === null || this === void 0 ? void 0 : this.processLoveLetterQueue();
|
|
24382
|
+
}
|
|
24356
24383
|
}
|
|
24357
24384
|
}
|
|
24358
24385
|
processLoveLetterQueue() {
|
|
@@ -24418,13 +24445,6 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
24418
24445
|
}, 1000);
|
|
24419
24446
|
}
|
|
24420
24447
|
}
|
|
24421
|
-
wrapWebSocketOnCloseHandler() {
|
|
24422
|
-
var _a, _b;
|
|
24423
|
-
let self = this;
|
|
24424
|
-
(_b = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.transport) === null || _b === void 0 ? void 0 : _b.addEventListener("close", (event) => {
|
|
24425
|
-
EventHandler_1.EventHandler.Emit(self.websocketOnCloseHandler, event);
|
|
24426
|
-
});
|
|
24427
|
-
}
|
|
24428
24448
|
onStreamingStateChange(callback) {
|
|
24429
24449
|
var _a, _b, _c, _d;
|
|
24430
24450
|
const videoElement = (_b = (_a = this === null || this === void 0 ? void 0 : this.webRtcController) === null || _a === void 0 ? void 0 : _a.videoPlayer) === null || _b === void 0 ? void 0 : _b.getVideoElement();
|
|
@@ -24614,6 +24634,9 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
24614
24634
|
s.endsWith(".ogv") ||
|
|
24615
24635
|
s.endsWith(".m3u8"));
|
|
24616
24636
|
}
|
|
24637
|
+
static clearSessionId() {
|
|
24638
|
+
window.localStorage.removeItem("pxss"); // or your actual key
|
|
24639
|
+
}
|
|
24617
24640
|
}
|
|
24618
24641
|
exports.ArcwarePixelStreaming = ArcwarePixelStreaming;
|
|
24619
24642
|
|
|
@@ -24687,7 +24710,8 @@ exports.ArcwareSettingsSchema = zod_1.z.object({
|
|
|
24687
24710
|
.strict()
|
|
24688
24711
|
.optional(),
|
|
24689
24712
|
/** Loader customization */
|
|
24690
|
-
whiteLabelling: ZWhiteLabel_1.ZWhiteLabel.optional()
|
|
24713
|
+
whiteLabelling: ZWhiteLabel_1.ZWhiteLabel.optional(),
|
|
24714
|
+
fetchRemoteWhiteLabelling: zod_1.z.boolean().optional()
|
|
24691
24715
|
});
|
|
24692
24716
|
|
|
24693
24717
|
|
|
@@ -25507,7 +25531,9 @@ exports.ZWhiteLabel = zod_1.z
|
|
|
25507
25531
|
splashScreenUrl: ImageUrl.optional(),
|
|
25508
25532
|
splashScreenMode: zod_1.z.enum(["contain", "cover", "stretch", "repeat"]).optional(),
|
|
25509
25533
|
splashScreenPosition: zod_1.z.string().optional(),
|
|
25510
|
-
splashScreenBgColor: zod_1.z.string().optional()
|
|
25534
|
+
splashScreenBgColor: zod_1.z.string().optional(),
|
|
25535
|
+
hideLoveLetters: zod_1.z.boolean().optional(),
|
|
25536
|
+
hideAfkOverlay: zod_1.z.boolean().optional()
|
|
25511
25537
|
})
|
|
25512
25538
|
.strict();
|
|
25513
25539
|
|
package/index.esm.js
CHANGED
|
@@ -22964,6 +22964,13 @@ class ArcwareApplication extends _epicgames_ps_lib_pixelstreamingfrontend_ui_ue5
|
|
|
22964
22964
|
this.fileDownloadCallback = null;
|
|
22965
22965
|
this.ArcwareSection = this.configUI.buildSectionWithHeading(this.settingsPanel.settingsContentElement, "Arcware Cloud");
|
|
22966
22966
|
this.stream = options === null || options === void 0 ? void 0 : options.stream;
|
|
22967
|
+
this.baseShowAfkOverlay = this.showAfkOverlay.bind(this); // capture original
|
|
22968
|
+
this.stream.config.whiteLabellingChanged.add(() => {
|
|
22969
|
+
try {
|
|
22970
|
+
this.syncAfkOverlayFromWhiteLabelling();
|
|
22971
|
+
}
|
|
22972
|
+
catch (_a) { }
|
|
22973
|
+
});
|
|
22967
22974
|
this.emitUIInteraction = this.emitUIInteraction.bind(this);
|
|
22968
22975
|
this.adjustSettingsPanel();
|
|
22969
22976
|
this.createAudioToggleButton();
|
|
@@ -23005,6 +23012,7 @@ class ArcwareApplication extends _epicgames_ps_lib_pixelstreamingfrontend_ui_ue5
|
|
|
23005
23012
|
this.preventDefaultKeyboardEvents();
|
|
23006
23013
|
this.analyticsEventCallback = this.analyticsEvent;
|
|
23007
23014
|
this.fileDownloadCallback = this.fileDownload;
|
|
23015
|
+
this.syncAfkOverlayFromWhiteLabelling();
|
|
23008
23016
|
}
|
|
23009
23017
|
addLoveLetterhandler() {
|
|
23010
23018
|
var _a, _b;
|
|
@@ -23337,6 +23345,18 @@ class ArcwareApplication extends _epicgames_ps_lib_pixelstreamingfrontend_ui_ue5
|
|
|
23337
23345
|
console.error("Download failed:", err);
|
|
23338
23346
|
}
|
|
23339
23347
|
}
|
|
23348
|
+
syncAfkOverlayFromWhiteLabelling() {
|
|
23349
|
+
var _a;
|
|
23350
|
+
const hide = (_a = this.stream.config.settings.whiteLabelling) === null || _a === void 0 ? void 0 : _a.hideAfkOverlay;
|
|
23351
|
+
if (hide) {
|
|
23352
|
+
// override with noop
|
|
23353
|
+
this.showAfkOverlay = (_countDown, _dismissAfk) => { };
|
|
23354
|
+
}
|
|
23355
|
+
else {
|
|
23356
|
+
// restore original behavior
|
|
23357
|
+
this.showAfkOverlay = this.baseShowAfkOverlay;
|
|
23358
|
+
}
|
|
23359
|
+
}
|
|
23340
23360
|
}
|
|
23341
23361
|
ArcwareApplication.Flags = (_a = class {
|
|
23342
23362
|
},
|
|
@@ -23444,10 +23464,9 @@ class ArcwareConfig extends _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBP
|
|
|
23444
23464
|
if (!config.initialSettings.ss)
|
|
23445
23465
|
config.initialSettings.ss = DefaultUrl;
|
|
23446
23466
|
super(config);
|
|
23447
|
-
this.VERSION = "1.3.
|
|
23467
|
+
this.VERSION = "1.3.20";
|
|
23448
23468
|
this.whiteLabellingChanged = new _domain_EventHandler__WEBPACK_IMPORTED_MODULE_7__.EventHandler();
|
|
23449
23469
|
this.signallingWlURL = "https://signalling-client.arcware.cloud/whiteLabel/";
|
|
23450
|
-
console.log(config);
|
|
23451
23470
|
if (config.envName) {
|
|
23452
23471
|
this.signallingWlURL = `https://signalling-client.${config.envName}.arcware.cloud/whiteLabel/`;
|
|
23453
23472
|
}
|
|
@@ -23476,8 +23495,13 @@ class ArcwareConfig extends _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBP
|
|
|
23476
23495
|
return (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__awaiter)(this, void 0, void 0, function* () {
|
|
23477
23496
|
const qs = new URLSearchParams(window.location.search);
|
|
23478
23497
|
// Only fetch when wl param is present and empty (as before)
|
|
23479
|
-
if (!(qs.has("wl") && qs.get("wl") === ""))
|
|
23498
|
+
if (!(qs.has("wl") && qs.get("wl") === "")) {
|
|
23499
|
+
_domain_EventHandler__WEBPACK_IMPORTED_MODULE_7__.EventHandler.Emit(this.whiteLabellingChanged, {
|
|
23500
|
+
next: this.settings.whiteLabelling,
|
|
23501
|
+
changed: false
|
|
23502
|
+
});
|
|
23480
23503
|
return undefined;
|
|
23504
|
+
}
|
|
23481
23505
|
// Build final URL safely (trim trailing slashes, encode ShareId)
|
|
23482
23506
|
const base = this.signallingWlURL.replace(/\/+$/, "");
|
|
23483
23507
|
const requestUrl = `${base}/${encodeURIComponent(ShareId)}`;
|
|
@@ -23508,10 +23532,8 @@ class ArcwareConfig extends _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBP
|
|
|
23508
23532
|
// Only apply & emit if it actually changed
|
|
23509
23533
|
const prev = this.settings.whiteLabelling;
|
|
23510
23534
|
const next = parsed.data;
|
|
23511
|
-
|
|
23512
|
-
|
|
23513
|
-
_domain_EventHandler__WEBPACK_IMPORTED_MODULE_7__.EventHandler.Emit(this.whiteLabellingChanged, next);
|
|
23514
|
-
}
|
|
23535
|
+
this.settings.whiteLabelling = next;
|
|
23536
|
+
_domain_EventHandler__WEBPACK_IMPORTED_MODULE_7__.EventHandler.Emit(this.whiteLabellingChanged, { next, changed: !deepEqual(prev, next) });
|
|
23515
23537
|
return parsed.data;
|
|
23516
23538
|
}
|
|
23517
23539
|
catch (_b) {
|
|
@@ -23638,8 +23660,10 @@ function ArcwareInit({ shareId, projectId }, configuration, forceRefresh = false
|
|
|
23638
23660
|
loadingIconUrl: undefined,
|
|
23639
23661
|
splashScreenMode: undefined,
|
|
23640
23662
|
splashScreenPosition: undefined,
|
|
23641
|
-
splashScreenBgColor: undefined
|
|
23642
|
-
|
|
23663
|
+
splashScreenBgColor: undefined,
|
|
23664
|
+
hideLoveLetters: undefined,
|
|
23665
|
+
hideAfkOverlay: undefined
|
|
23666
|
+
}, fetchRemoteWhiteLabelling: undefined }, configuration === null || configuration === void 0 ? void 0 : configuration.settings),
|
|
23643
23667
|
envName: (_a = configuration === null || configuration === void 0 ? void 0 : configuration.envName) !== null && _a !== void 0 ? _a : undefined
|
|
23644
23668
|
});
|
|
23645
23669
|
const PixelStreaming = new _ArcwarePixelStreaming__WEBPACK_IMPORTED_MODULE_1__.ArcwarePixelStreaming(Config);
|
|
@@ -23722,23 +23746,20 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
23722
23746
|
return true;
|
|
23723
23747
|
}
|
|
23724
23748
|
bindTransportEvents() {
|
|
23725
|
-
var _a, _b, _c, _d
|
|
23749
|
+
var _a, _b, _c, _d;
|
|
23726
23750
|
const current = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.transport;
|
|
23727
23751
|
if (!current || current === this._boundTransport)
|
|
23728
23752
|
return;
|
|
23729
|
-
// Unbind
|
|
23753
|
+
// Unbind previous
|
|
23730
23754
|
if (this._boundTransport) {
|
|
23731
23755
|
if (this._onWsOpen)
|
|
23732
23756
|
(_c = (_b = this._boundTransport).removeEventListener) === null || _c === void 0 ? void 0 : _c.call(_b, "open", this._onWsOpen);
|
|
23733
|
-
|
|
23734
|
-
(_e = (_d = this._boundTransport).removeEventListener) === null || _e === void 0 ? void 0 : _e.call(_d, "close", this._onWsClose);
|
|
23757
|
+
// ⚠️ this was the synthetic "close" before, we'll stop relying on it
|
|
23735
23758
|
}
|
|
23736
|
-
// Define (or reuse) callbacks
|
|
23737
23759
|
if (!this._onWsOpen) {
|
|
23738
23760
|
this._onWsOpen = () => {
|
|
23739
23761
|
this.flushOutbox();
|
|
23740
23762
|
this.attachFirstRenderedFrameOnce();
|
|
23741
|
-
// no watchdog anymore
|
|
23742
23763
|
setTimeout(() => {
|
|
23743
23764
|
var _a, _b, _c;
|
|
23744
23765
|
if (!this.videoInitializedSent) {
|
|
@@ -23751,15 +23772,15 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
23751
23772
|
}, 1200);
|
|
23752
23773
|
};
|
|
23753
23774
|
}
|
|
23754
|
-
|
|
23775
|
+
(_d = current.addEventListener) === null || _d === void 0 ? void 0 : _d.call(current, "open", this._onWsOpen);
|
|
23776
|
+
// Real CloseEvent from underlying WebSocket
|
|
23777
|
+
const ws = current.webSocket;
|
|
23778
|
+
if (ws && !this._onWsClose) {
|
|
23755
23779
|
this._onWsClose = (evt) => {
|
|
23756
|
-
// Bubble to your public close handler
|
|
23757
23780
|
_domain_EventHandler__WEBPACK_IMPORTED_MODULE_5__.EventHandler.Emit(this.websocketOnCloseHandler, evt);
|
|
23758
23781
|
};
|
|
23782
|
+
ws.addEventListener("close", this._onWsClose);
|
|
23759
23783
|
}
|
|
23760
|
-
// Bind to current
|
|
23761
|
-
(_f = current.addEventListener) === null || _f === void 0 ? void 0 : _f.call(current, "open", this._onWsOpen);
|
|
23762
|
-
(_g = current.addEventListener) === null || _g === void 0 ? void 0 : _g.call(current, "close", this._onWsClose);
|
|
23763
23784
|
this._boundTransport = current;
|
|
23764
23785
|
}
|
|
23765
23786
|
get isWsOpen() {
|
|
@@ -23782,7 +23803,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
23782
23803
|
return state !== undefined ? state : WebSocket.CLOSED;
|
|
23783
23804
|
}
|
|
23784
23805
|
constructor(config, overrides) {
|
|
23785
|
-
var _a, _b
|
|
23806
|
+
var _a, _b;
|
|
23786
23807
|
/** As soon as upstream is fixed, we got to adjust the url building process. */
|
|
23787
23808
|
(0,_ApplyUrlHack__WEBPACK_IMPORTED_MODULE_6__.ApplyUrlHack)();
|
|
23788
23809
|
super(config, overrides);
|
|
@@ -23816,39 +23837,44 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
23816
23837
|
this.flushOutbox();
|
|
23817
23838
|
// no polling watchdog
|
|
23818
23839
|
});
|
|
23819
|
-
(_c = transport === null || transport === void 0 ? void 0 : transport.addEventListener) === null || _c === void 0 ? void 0 : _c.call(transport, "close", (evt) => {
|
|
23820
|
-
if (this.websocketOnCloseHandler) {
|
|
23821
|
-
_domain_EventHandler__WEBPACK_IMPORTED_MODULE_5__.EventHandler.Emit(this.websocketOnCloseHandler, evt);
|
|
23822
|
-
}
|
|
23823
|
-
});
|
|
23824
23840
|
// Set override config.
|
|
23825
23841
|
this.config = config;
|
|
23826
23842
|
// Re-apply branding whenever config's WL changes
|
|
23827
|
-
this.config.whiteLabellingChanged.add(() => {
|
|
23843
|
+
this.config.whiteLabellingChanged.add((result) => {
|
|
23844
|
+
var _a;
|
|
23828
23845
|
try {
|
|
23829
|
-
|
|
23846
|
+
if (result.changed)
|
|
23847
|
+
this.applyBrandingFromSettings();
|
|
23848
|
+
this.config.settings.fetchRemoteWhiteLabelling = false;
|
|
23849
|
+
if (!((_a = this.config.settings.whiteLabelling) === null || _a === void 0 ? void 0 : _a.hideLoveLetters)) {
|
|
23850
|
+
if (!this.isProcessingQueue) {
|
|
23851
|
+
this === null || this === void 0 ? void 0 : this.processLoveLetterQueue();
|
|
23852
|
+
}
|
|
23853
|
+
}
|
|
23830
23854
|
}
|
|
23831
|
-
catch (
|
|
23855
|
+
catch (_b) { }
|
|
23832
23856
|
});
|
|
23833
23857
|
// Kick off WL fetch once (if we have a shareId); on success it will emit and re-apply
|
|
23834
|
-
|
|
23835
|
-
|
|
23836
|
-
const sid = this.config.settings.shareId;
|
|
23837
|
-
if (sid) {
|
|
23838
|
-
yield this.config.getWhiteLabelling(sid); // will emit if it changes
|
|
23839
|
-
}
|
|
23840
|
-
}
|
|
23841
|
-
catch (_d) {
|
|
23842
|
-
// ignore
|
|
23843
|
-
}
|
|
23844
|
-
finally {
|
|
23845
|
-
// Make sure we paint with whatever we have initially
|
|
23858
|
+
if (this.config.settings.fetchRemoteWhiteLabelling) {
|
|
23859
|
+
(() => (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__awaiter)(this, void 0, void 0, function* () {
|
|
23846
23860
|
try {
|
|
23847
|
-
this.
|
|
23861
|
+
const sid = this.config.settings.shareId;
|
|
23862
|
+
if (sid) {
|
|
23863
|
+
yield this.config.getWhiteLabelling(sid); // will emit if it changes
|
|
23864
|
+
}
|
|
23848
23865
|
}
|
|
23849
|
-
catch (
|
|
23850
|
-
|
|
23851
|
-
|
|
23866
|
+
catch (_c) {
|
|
23867
|
+
// ignore
|
|
23868
|
+
}
|
|
23869
|
+
finally {
|
|
23870
|
+
// Make sure we paint with whatever we have initially
|
|
23871
|
+
try {
|
|
23872
|
+
this.applyBrandingFromSettings();
|
|
23873
|
+
}
|
|
23874
|
+
catch (_d) { }
|
|
23875
|
+
}
|
|
23876
|
+
}))();
|
|
23877
|
+
}
|
|
23852
23878
|
this.loveLettersList = [];
|
|
23853
23879
|
this.microphoneOverlay = new _ui_MicrophoneOverlay__WEBPACK_IMPORTED_MODULE_8__.MicrophoneOverlay(this);
|
|
23854
23880
|
this.diagnosticsCollector = new _features_DiagnosticsCollector__WEBPACK_IMPORTED_MODULE_3__.DiagnosticsCollector({
|
|
@@ -23860,7 +23886,6 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
23860
23886
|
// Arm first-frame detector & watch for element swaps
|
|
23861
23887
|
this.attachFirstRenderedFrameOnce();
|
|
23862
23888
|
this.watchVideoElementReplacement();
|
|
23863
|
-
this.wrapWebSocketOnCloseHandler();
|
|
23864
23889
|
// Bind the event listener function to the class instance
|
|
23865
23890
|
this.handleResolutionChange = this.handleResolutionChange.bind(this);
|
|
23866
23891
|
// Register message handlers.
|
|
@@ -24379,10 +24404,12 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24379
24404
|
}
|
|
24380
24405
|
}
|
|
24381
24406
|
pushLetter(letter) {
|
|
24382
|
-
var _a;
|
|
24407
|
+
var _a, _b;
|
|
24383
24408
|
(_a = this === null || this === void 0 ? void 0 : this.loveLettersQueue) === null || _a === void 0 ? void 0 : _a.push(letter);
|
|
24384
|
-
if (!this.
|
|
24385
|
-
|
|
24409
|
+
if (!((_b = this.config.settings.whiteLabelling) === null || _b === void 0 ? void 0 : _b.hideLoveLetters) && !this.config.settings.fetchRemoteWhiteLabelling) {
|
|
24410
|
+
if (!this.isProcessingQueue) {
|
|
24411
|
+
this === null || this === void 0 ? void 0 : this.processLoveLetterQueue();
|
|
24412
|
+
}
|
|
24386
24413
|
}
|
|
24387
24414
|
}
|
|
24388
24415
|
processLoveLetterQueue() {
|
|
@@ -24448,13 +24475,6 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24448
24475
|
}, 1000);
|
|
24449
24476
|
}
|
|
24450
24477
|
}
|
|
24451
|
-
wrapWebSocketOnCloseHandler() {
|
|
24452
|
-
var _a, _b;
|
|
24453
|
-
let self = this;
|
|
24454
|
-
(_b = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.transport) === null || _b === void 0 ? void 0 : _b.addEventListener("close", (event) => {
|
|
24455
|
-
_domain_EventHandler__WEBPACK_IMPORTED_MODULE_5__.EventHandler.Emit(self.websocketOnCloseHandler, event);
|
|
24456
|
-
});
|
|
24457
|
-
}
|
|
24458
24478
|
onStreamingStateChange(callback) {
|
|
24459
24479
|
var _a, _b, _c, _d;
|
|
24460
24480
|
const videoElement = (_b = (_a = this === null || this === void 0 ? void 0 : this.webRtcController) === null || _a === void 0 ? void 0 : _a.videoPlayer) === null || _b === void 0 ? void 0 : _b.getVideoElement();
|
|
@@ -24644,6 +24664,9 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24644
24664
|
s.endsWith(".ogv") ||
|
|
24645
24665
|
s.endsWith(".m3u8"));
|
|
24646
24666
|
}
|
|
24667
|
+
static clearSessionId() {
|
|
24668
|
+
window.localStorage.removeItem("pxss"); // or your actual key
|
|
24669
|
+
}
|
|
24647
24670
|
}
|
|
24648
24671
|
|
|
24649
24672
|
|
|
@@ -24719,7 +24742,8 @@ const ArcwareSettingsSchema = zod__WEBPACK_IMPORTED_MODULE_2__.z.object({
|
|
|
24719
24742
|
.strict()
|
|
24720
24743
|
.optional(),
|
|
24721
24744
|
/** Loader customization */
|
|
24722
|
-
whiteLabelling: _features_ZWhiteLabel__WEBPACK_IMPORTED_MODULE_1__.ZWhiteLabel.optional()
|
|
24745
|
+
whiteLabelling: _features_ZWhiteLabel__WEBPACK_IMPORTED_MODULE_1__.ZWhiteLabel.optional(),
|
|
24746
|
+
fetchRemoteWhiteLabelling: zod__WEBPACK_IMPORTED_MODULE_2__.z.boolean().optional()
|
|
24723
24747
|
});
|
|
24724
24748
|
|
|
24725
24749
|
|
|
@@ -25548,7 +25572,9 @@ const ZWhiteLabel = zod__WEBPACK_IMPORTED_MODULE_0__.z.object({
|
|
|
25548
25572
|
splashScreenUrl: ImageUrl.optional(),
|
|
25549
25573
|
splashScreenMode: zod__WEBPACK_IMPORTED_MODULE_0__.z["enum"](["contain", "cover", "stretch", "repeat"]).optional(),
|
|
25550
25574
|
splashScreenPosition: zod__WEBPACK_IMPORTED_MODULE_0__.z.string().optional(),
|
|
25551
|
-
splashScreenBgColor: zod__WEBPACK_IMPORTED_MODULE_0__.z.string().optional()
|
|
25575
|
+
splashScreenBgColor: zod__WEBPACK_IMPORTED_MODULE_0__.z.string().optional(),
|
|
25576
|
+
hideLoveLetters: zod__WEBPACK_IMPORTED_MODULE_0__.z.boolean().optional(),
|
|
25577
|
+
hideAfkOverlay: zod__WEBPACK_IMPORTED_MODULE_0__.z.boolean().optional()
|
|
25552
25578
|
})
|
|
25553
25579
|
.strict();
|
|
25554
25580
|
|
package/index.umd.js
CHANGED
|
@@ -22973,6 +22973,13 @@ class ArcwareApplication extends lib_pixelstreamingfrontend_ui_ue5_5_1.Applicati
|
|
|
22973
22973
|
this.fileDownloadCallback = null;
|
|
22974
22974
|
this.ArcwareSection = this.configUI.buildSectionWithHeading(this.settingsPanel.settingsContentElement, "Arcware Cloud");
|
|
22975
22975
|
this.stream = options === null || options === void 0 ? void 0 : options.stream;
|
|
22976
|
+
this.baseShowAfkOverlay = this.showAfkOverlay.bind(this); // capture original
|
|
22977
|
+
this.stream.config.whiteLabellingChanged.add(() => {
|
|
22978
|
+
try {
|
|
22979
|
+
this.syncAfkOverlayFromWhiteLabelling();
|
|
22980
|
+
}
|
|
22981
|
+
catch (_a) { }
|
|
22982
|
+
});
|
|
22976
22983
|
this.emitUIInteraction = this.emitUIInteraction.bind(this);
|
|
22977
22984
|
this.adjustSettingsPanel();
|
|
22978
22985
|
this.createAudioToggleButton();
|
|
@@ -23014,6 +23021,7 @@ class ArcwareApplication extends lib_pixelstreamingfrontend_ui_ue5_5_1.Applicati
|
|
|
23014
23021
|
this.preventDefaultKeyboardEvents();
|
|
23015
23022
|
this.analyticsEventCallback = this.analyticsEvent;
|
|
23016
23023
|
this.fileDownloadCallback = this.fileDownload;
|
|
23024
|
+
this.syncAfkOverlayFromWhiteLabelling();
|
|
23017
23025
|
}
|
|
23018
23026
|
addLoveLetterhandler() {
|
|
23019
23027
|
var _a, _b;
|
|
@@ -23346,6 +23354,18 @@ class ArcwareApplication extends lib_pixelstreamingfrontend_ui_ue5_5_1.Applicati
|
|
|
23346
23354
|
console.error("Download failed:", err);
|
|
23347
23355
|
}
|
|
23348
23356
|
}
|
|
23357
|
+
syncAfkOverlayFromWhiteLabelling() {
|
|
23358
|
+
var _a;
|
|
23359
|
+
const hide = (_a = this.stream.config.settings.whiteLabelling) === null || _a === void 0 ? void 0 : _a.hideAfkOverlay;
|
|
23360
|
+
if (hide) {
|
|
23361
|
+
// override with noop
|
|
23362
|
+
this.showAfkOverlay = (_countDown, _dismissAfk) => { };
|
|
23363
|
+
}
|
|
23364
|
+
else {
|
|
23365
|
+
// restore original behavior
|
|
23366
|
+
this.showAfkOverlay = this.baseShowAfkOverlay;
|
|
23367
|
+
}
|
|
23368
|
+
}
|
|
23349
23369
|
}
|
|
23350
23370
|
ArcwareApplication.Flags = (_a = class {
|
|
23351
23371
|
},
|
|
@@ -23442,10 +23462,9 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
|
|
|
23442
23462
|
if (!config.initialSettings.ss)
|
|
23443
23463
|
config.initialSettings.ss = exports.DefaultUrl;
|
|
23444
23464
|
super(config);
|
|
23445
|
-
this.VERSION = "1.3.
|
|
23465
|
+
this.VERSION = "1.3.20";
|
|
23446
23466
|
this.whiteLabellingChanged = new EventHandler_1.EventHandler();
|
|
23447
23467
|
this.signallingWlURL = "https://signalling-client.arcware.cloud/whiteLabel/";
|
|
23448
|
-
console.log(config);
|
|
23449
23468
|
if (config.envName) {
|
|
23450
23469
|
this.signallingWlURL = `https://signalling-client.${config.envName}.arcware.cloud/whiteLabel/`;
|
|
23451
23470
|
}
|
|
@@ -23474,8 +23493,13 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
|
|
|
23474
23493
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23475
23494
|
const qs = new URLSearchParams(window.location.search);
|
|
23476
23495
|
// Only fetch when wl param is present and empty (as before)
|
|
23477
|
-
if (!(qs.has("wl") && qs.get("wl") === ""))
|
|
23496
|
+
if (!(qs.has("wl") && qs.get("wl") === "")) {
|
|
23497
|
+
EventHandler_1.EventHandler.Emit(this.whiteLabellingChanged, {
|
|
23498
|
+
next: this.settings.whiteLabelling,
|
|
23499
|
+
changed: false
|
|
23500
|
+
});
|
|
23478
23501
|
return undefined;
|
|
23502
|
+
}
|
|
23479
23503
|
// Build final URL safely (trim trailing slashes, encode ShareId)
|
|
23480
23504
|
const base = this.signallingWlURL.replace(/\/+$/, "");
|
|
23481
23505
|
const requestUrl = `${base}/${encodeURIComponent(ShareId)}`;
|
|
@@ -23506,10 +23530,8 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
|
|
|
23506
23530
|
// Only apply & emit if it actually changed
|
|
23507
23531
|
const prev = this.settings.whiteLabelling;
|
|
23508
23532
|
const next = parsed.data;
|
|
23509
|
-
|
|
23510
|
-
|
|
23511
|
-
EventHandler_1.EventHandler.Emit(this.whiteLabellingChanged, next);
|
|
23512
|
-
}
|
|
23533
|
+
this.settings.whiteLabelling = next;
|
|
23534
|
+
EventHandler_1.EventHandler.Emit(this.whiteLabellingChanged, { next, changed: !deepEqual(prev, next) });
|
|
23513
23535
|
return parsed.data;
|
|
23514
23536
|
}
|
|
23515
23537
|
catch (_b) {
|
|
@@ -23633,8 +23655,10 @@ function ArcwareInit({ shareId, projectId }, configuration, forceRefresh = false
|
|
|
23633
23655
|
loadingIconUrl: undefined,
|
|
23634
23656
|
splashScreenMode: undefined,
|
|
23635
23657
|
splashScreenPosition: undefined,
|
|
23636
|
-
splashScreenBgColor: undefined
|
|
23637
|
-
|
|
23658
|
+
splashScreenBgColor: undefined,
|
|
23659
|
+
hideLoveLetters: undefined,
|
|
23660
|
+
hideAfkOverlay: undefined
|
|
23661
|
+
}, fetchRemoteWhiteLabelling: undefined }, configuration === null || configuration === void 0 ? void 0 : configuration.settings),
|
|
23638
23662
|
envName: (_a = configuration === null || configuration === void 0 ? void 0 : configuration.envName) !== null && _a !== void 0 ? _a : undefined
|
|
23639
23663
|
});
|
|
23640
23664
|
const PixelStreaming = new ArcwarePixelStreaming_1.ArcwarePixelStreaming(Config);
|
|
@@ -23702,23 +23726,20 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23702
23726
|
return true;
|
|
23703
23727
|
}
|
|
23704
23728
|
bindTransportEvents() {
|
|
23705
|
-
var _a, _b, _c, _d
|
|
23729
|
+
var _a, _b, _c, _d;
|
|
23706
23730
|
const current = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.transport;
|
|
23707
23731
|
if (!current || current === this._boundTransport)
|
|
23708
23732
|
return;
|
|
23709
|
-
// Unbind
|
|
23733
|
+
// Unbind previous
|
|
23710
23734
|
if (this._boundTransport) {
|
|
23711
23735
|
if (this._onWsOpen)
|
|
23712
23736
|
(_c = (_b = this._boundTransport).removeEventListener) === null || _c === void 0 ? void 0 : _c.call(_b, "open", this._onWsOpen);
|
|
23713
|
-
|
|
23714
|
-
(_e = (_d = this._boundTransport).removeEventListener) === null || _e === void 0 ? void 0 : _e.call(_d, "close", this._onWsClose);
|
|
23737
|
+
// ⚠️ this was the synthetic "close" before, we'll stop relying on it
|
|
23715
23738
|
}
|
|
23716
|
-
// Define (or reuse) callbacks
|
|
23717
23739
|
if (!this._onWsOpen) {
|
|
23718
23740
|
this._onWsOpen = () => {
|
|
23719
23741
|
this.flushOutbox();
|
|
23720
23742
|
this.attachFirstRenderedFrameOnce();
|
|
23721
|
-
// no watchdog anymore
|
|
23722
23743
|
setTimeout(() => {
|
|
23723
23744
|
var _a, _b, _c;
|
|
23724
23745
|
if (!this.videoInitializedSent) {
|
|
@@ -23731,15 +23752,15 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23731
23752
|
}, 1200);
|
|
23732
23753
|
};
|
|
23733
23754
|
}
|
|
23734
|
-
|
|
23755
|
+
(_d = current.addEventListener) === null || _d === void 0 ? void 0 : _d.call(current, "open", this._onWsOpen);
|
|
23756
|
+
// Real CloseEvent from underlying WebSocket
|
|
23757
|
+
const ws = current.webSocket;
|
|
23758
|
+
if (ws && !this._onWsClose) {
|
|
23735
23759
|
this._onWsClose = (evt) => {
|
|
23736
|
-
// Bubble to your public close handler
|
|
23737
23760
|
EventHandler_1.EventHandler.Emit(this.websocketOnCloseHandler, evt);
|
|
23738
23761
|
};
|
|
23762
|
+
ws.addEventListener("close", this._onWsClose);
|
|
23739
23763
|
}
|
|
23740
|
-
// Bind to current
|
|
23741
|
-
(_f = current.addEventListener) === null || _f === void 0 ? void 0 : _f.call(current, "open", this._onWsOpen);
|
|
23742
|
-
(_g = current.addEventListener) === null || _g === void 0 ? void 0 : _g.call(current, "close", this._onWsClose);
|
|
23743
23764
|
this._boundTransport = current;
|
|
23744
23765
|
}
|
|
23745
23766
|
get isWsOpen() {
|
|
@@ -23762,7 +23783,7 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23762
23783
|
return state !== undefined ? state : WebSocket.CLOSED;
|
|
23763
23784
|
}
|
|
23764
23785
|
constructor(config, overrides) {
|
|
23765
|
-
var _a, _b
|
|
23786
|
+
var _a, _b;
|
|
23766
23787
|
/** As soon as upstream is fixed, we got to adjust the url building process. */
|
|
23767
23788
|
(0, ApplyUrlHack_1.ApplyUrlHack)();
|
|
23768
23789
|
super(config, overrides);
|
|
@@ -23796,39 +23817,44 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23796
23817
|
this.flushOutbox();
|
|
23797
23818
|
// no polling watchdog
|
|
23798
23819
|
});
|
|
23799
|
-
(_c = transport === null || transport === void 0 ? void 0 : transport.addEventListener) === null || _c === void 0 ? void 0 : _c.call(transport, "close", (evt) => {
|
|
23800
|
-
if (this.websocketOnCloseHandler) {
|
|
23801
|
-
EventHandler_1.EventHandler.Emit(this.websocketOnCloseHandler, evt);
|
|
23802
|
-
}
|
|
23803
|
-
});
|
|
23804
23820
|
// Set override config.
|
|
23805
23821
|
this.config = config;
|
|
23806
23822
|
// Re-apply branding whenever config's WL changes
|
|
23807
|
-
this.config.whiteLabellingChanged.add(() => {
|
|
23823
|
+
this.config.whiteLabellingChanged.add((result) => {
|
|
23824
|
+
var _a;
|
|
23808
23825
|
try {
|
|
23809
|
-
|
|
23826
|
+
if (result.changed)
|
|
23827
|
+
this.applyBrandingFromSettings();
|
|
23828
|
+
this.config.settings.fetchRemoteWhiteLabelling = false;
|
|
23829
|
+
if (!((_a = this.config.settings.whiteLabelling) === null || _a === void 0 ? void 0 : _a.hideLoveLetters)) {
|
|
23830
|
+
if (!this.isProcessingQueue) {
|
|
23831
|
+
this === null || this === void 0 ? void 0 : this.processLoveLetterQueue();
|
|
23832
|
+
}
|
|
23833
|
+
}
|
|
23810
23834
|
}
|
|
23811
|
-
catch (
|
|
23835
|
+
catch (_b) { }
|
|
23812
23836
|
});
|
|
23813
23837
|
// Kick off WL fetch once (if we have a shareId); on success it will emit and re-apply
|
|
23814
|
-
|
|
23815
|
-
|
|
23816
|
-
const sid = this.config.settings.shareId;
|
|
23817
|
-
if (sid) {
|
|
23818
|
-
yield this.config.getWhiteLabelling(sid); // will emit if it changes
|
|
23819
|
-
}
|
|
23820
|
-
}
|
|
23821
|
-
catch (_d) {
|
|
23822
|
-
// ignore
|
|
23823
|
-
}
|
|
23824
|
-
finally {
|
|
23825
|
-
// Make sure we paint with whatever we have initially
|
|
23838
|
+
if (this.config.settings.fetchRemoteWhiteLabelling) {
|
|
23839
|
+
(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23826
23840
|
try {
|
|
23827
|
-
this.
|
|
23841
|
+
const sid = this.config.settings.shareId;
|
|
23842
|
+
if (sid) {
|
|
23843
|
+
yield this.config.getWhiteLabelling(sid); // will emit if it changes
|
|
23844
|
+
}
|
|
23828
23845
|
}
|
|
23829
|
-
catch (
|
|
23830
|
-
|
|
23831
|
-
|
|
23846
|
+
catch (_c) {
|
|
23847
|
+
// ignore
|
|
23848
|
+
}
|
|
23849
|
+
finally {
|
|
23850
|
+
// Make sure we paint with whatever we have initially
|
|
23851
|
+
try {
|
|
23852
|
+
this.applyBrandingFromSettings();
|
|
23853
|
+
}
|
|
23854
|
+
catch (_d) { }
|
|
23855
|
+
}
|
|
23856
|
+
}))();
|
|
23857
|
+
}
|
|
23832
23858
|
this.loveLettersList = [];
|
|
23833
23859
|
this.microphoneOverlay = new MicrophoneOverlay_1.MicrophoneOverlay(this);
|
|
23834
23860
|
this.diagnosticsCollector = new DiagnosticsCollector_1.DiagnosticsCollector({
|
|
@@ -23840,7 +23866,6 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23840
23866
|
// Arm first-frame detector & watch for element swaps
|
|
23841
23867
|
this.attachFirstRenderedFrameOnce();
|
|
23842
23868
|
this.watchVideoElementReplacement();
|
|
23843
|
-
this.wrapWebSocketOnCloseHandler();
|
|
23844
23869
|
// Bind the event listener function to the class instance
|
|
23845
23870
|
this.handleResolutionChange = this.handleResolutionChange.bind(this);
|
|
23846
23871
|
// Register message handlers.
|
|
@@ -24359,10 +24384,12 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
24359
24384
|
}
|
|
24360
24385
|
}
|
|
24361
24386
|
pushLetter(letter) {
|
|
24362
|
-
var _a;
|
|
24387
|
+
var _a, _b;
|
|
24363
24388
|
(_a = this === null || this === void 0 ? void 0 : this.loveLettersQueue) === null || _a === void 0 ? void 0 : _a.push(letter);
|
|
24364
|
-
if (!this.
|
|
24365
|
-
|
|
24389
|
+
if (!((_b = this.config.settings.whiteLabelling) === null || _b === void 0 ? void 0 : _b.hideLoveLetters) && !this.config.settings.fetchRemoteWhiteLabelling) {
|
|
24390
|
+
if (!this.isProcessingQueue) {
|
|
24391
|
+
this === null || this === void 0 ? void 0 : this.processLoveLetterQueue();
|
|
24392
|
+
}
|
|
24366
24393
|
}
|
|
24367
24394
|
}
|
|
24368
24395
|
processLoveLetterQueue() {
|
|
@@ -24428,13 +24455,6 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
24428
24455
|
}, 1000);
|
|
24429
24456
|
}
|
|
24430
24457
|
}
|
|
24431
|
-
wrapWebSocketOnCloseHandler() {
|
|
24432
|
-
var _a, _b;
|
|
24433
|
-
let self = this;
|
|
24434
|
-
(_b = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.transport) === null || _b === void 0 ? void 0 : _b.addEventListener("close", (event) => {
|
|
24435
|
-
EventHandler_1.EventHandler.Emit(self.websocketOnCloseHandler, event);
|
|
24436
|
-
});
|
|
24437
|
-
}
|
|
24438
24458
|
onStreamingStateChange(callback) {
|
|
24439
24459
|
var _a, _b, _c, _d;
|
|
24440
24460
|
const videoElement = (_b = (_a = this === null || this === void 0 ? void 0 : this.webRtcController) === null || _a === void 0 ? void 0 : _a.videoPlayer) === null || _b === void 0 ? void 0 : _b.getVideoElement();
|
|
@@ -24624,6 +24644,9 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
24624
24644
|
s.endsWith(".ogv") ||
|
|
24625
24645
|
s.endsWith(".m3u8"));
|
|
24626
24646
|
}
|
|
24647
|
+
static clearSessionId() {
|
|
24648
|
+
window.localStorage.removeItem("pxss"); // or your actual key
|
|
24649
|
+
}
|
|
24627
24650
|
}
|
|
24628
24651
|
exports.ArcwarePixelStreaming = ArcwarePixelStreaming;
|
|
24629
24652
|
|
|
@@ -24697,7 +24720,8 @@ exports.ArcwareSettingsSchema = zod_1.z.object({
|
|
|
24697
24720
|
.strict()
|
|
24698
24721
|
.optional(),
|
|
24699
24722
|
/** Loader customization */
|
|
24700
|
-
whiteLabelling: ZWhiteLabel_1.ZWhiteLabel.optional()
|
|
24723
|
+
whiteLabelling: ZWhiteLabel_1.ZWhiteLabel.optional(),
|
|
24724
|
+
fetchRemoteWhiteLabelling: zod_1.z.boolean().optional()
|
|
24701
24725
|
});
|
|
24702
24726
|
|
|
24703
24727
|
|
|
@@ -25517,7 +25541,9 @@ exports.ZWhiteLabel = zod_1.z
|
|
|
25517
25541
|
splashScreenUrl: ImageUrl.optional(),
|
|
25518
25542
|
splashScreenMode: zod_1.z.enum(["contain", "cover", "stretch", "repeat"]).optional(),
|
|
25519
25543
|
splashScreenPosition: zod_1.z.string().optional(),
|
|
25520
|
-
splashScreenBgColor: zod_1.z.string().optional()
|
|
25544
|
+
splashScreenBgColor: zod_1.z.string().optional(),
|
|
25545
|
+
hideLoveLetters: zod_1.z.boolean().optional(),
|
|
25546
|
+
hideAfkOverlay: zod_1.z.boolean().optional()
|
|
25521
25547
|
})
|
|
25522
25548
|
.strict();
|
|
25523
25549
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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.20",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./index.umd.js",
|
|
7
|
-
"module": "./index.
|
|
7
|
+
"module": "./index.esm.js",
|
|
8
8
|
"types": "./types/index.d.ts",
|
|
9
9
|
"keywords": [
|
|
10
10
|
"arcware",
|
|
@@ -20,8 +20,9 @@
|
|
|
20
20
|
},
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@epicgames-ps/lib-pixelstreamingcommon-ue5.5": "^0.3.
|
|
24
|
-
"@epicgames-ps/lib-pixelstreamingfrontend-ue5.5": "^1.2.
|
|
25
|
-
"@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5": "^1.3.1"
|
|
23
|
+
"@epicgames-ps/lib-pixelstreamingcommon-ue5.5": "^0.3.2",
|
|
24
|
+
"@epicgames-ps/lib-pixelstreamingfrontend-ue5.5": "^1.2.4",
|
|
25
|
+
"@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5": "^1.3.1",
|
|
26
|
+
"zod": "^3.21.4"
|
|
26
27
|
}
|
|
27
28
|
}
|
|
@@ -5,6 +5,7 @@ export declare class ArcwareApplication extends Application {
|
|
|
5
5
|
new (): {};
|
|
6
6
|
noSession: "noSession";
|
|
7
7
|
};
|
|
8
|
+
private baseShowAfkOverlay;
|
|
8
9
|
stream: ArcwarePixelStreaming;
|
|
9
10
|
private videoElementParent;
|
|
10
11
|
private parentElement;
|
|
@@ -49,4 +50,5 @@ export declare class ArcwareApplication extends Application {
|
|
|
49
50
|
private addTextToConnectOverlay;
|
|
50
51
|
analyticsEvent(response: unknown): void;
|
|
51
52
|
private fileDownload;
|
|
53
|
+
private syncAfkOverlayFromWhiteLabelling;
|
|
52
54
|
}
|
|
@@ -29,14 +29,10 @@ export declare class ArcwareConfig extends Config {
|
|
|
29
29
|
readonly session: Session;
|
|
30
30
|
readonly settings: Settings;
|
|
31
31
|
private _initialSettings;
|
|
32
|
-
readonly VERSION = "1.3.
|
|
32
|
+
readonly VERSION = "1.3.20";
|
|
33
33
|
readonly whiteLabellingChanged: EventHandler<{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
splashScreenUrl?: string;
|
|
37
|
-
splashScreenMode?: "repeat" | "contain" | "cover" | "stretch";
|
|
38
|
-
splashScreenPosition?: string;
|
|
39
|
-
splashScreenBgColor?: string;
|
|
34
|
+
next: WhiteLabel;
|
|
35
|
+
changed: boolean;
|
|
40
36
|
}>;
|
|
41
37
|
private signallingWlURL;
|
|
42
38
|
constructor(config: ArcwareConfigParams);
|
|
@@ -125,7 +125,6 @@ export declare class ArcwarePixelStreaming extends PixelStreaming {
|
|
|
125
125
|
toggleAudio(videoElement: HTMLVideoElement, enabled: boolean): void;
|
|
126
126
|
private createMicrophoneOverlay;
|
|
127
127
|
toggleMic(enable: boolean, isDefault: boolean): void;
|
|
128
|
-
private wrapWebSocketOnCloseHandler;
|
|
129
128
|
onStreamingStateChange(callback: (isStreaming: boolean) => void): void;
|
|
130
129
|
private removeXRIconIfDisabled;
|
|
131
130
|
private injectCustomUI;
|
|
@@ -135,5 +134,6 @@ export declare class ArcwarePixelStreaming extends PixelStreaming {
|
|
|
135
134
|
private upsertSplashVideo;
|
|
136
135
|
private hideSplashVideo;
|
|
137
136
|
private isVideoUrl;
|
|
137
|
+
static clearSessionId(): void;
|
|
138
138
|
}
|
|
139
139
|
export {};
|
|
@@ -140,6 +140,8 @@ export declare const ArcwareSettingsSchema: z.ZodObject<{
|
|
|
140
140
|
splashScreenMode: z.ZodOptional<z.ZodEnum<["contain", "cover", "stretch", "repeat"]>>;
|
|
141
141
|
splashScreenPosition: z.ZodOptional<z.ZodString>;
|
|
142
142
|
splashScreenBgColor: z.ZodOptional<z.ZodString>;
|
|
143
|
+
hideLoveLetters: z.ZodOptional<z.ZodBoolean>;
|
|
144
|
+
hideAfkOverlay: z.ZodOptional<z.ZodBoolean>;
|
|
143
145
|
}, "strict", z.ZodTypeAny, {
|
|
144
146
|
loadingIconUrl?: string;
|
|
145
147
|
loadingIconFadeMs?: number;
|
|
@@ -147,6 +149,8 @@ export declare const ArcwareSettingsSchema: z.ZodObject<{
|
|
|
147
149
|
splashScreenMode?: "repeat" | "contain" | "cover" | "stretch";
|
|
148
150
|
splashScreenPosition?: string;
|
|
149
151
|
splashScreenBgColor?: string;
|
|
152
|
+
hideLoveLetters?: boolean;
|
|
153
|
+
hideAfkOverlay?: boolean;
|
|
150
154
|
}, {
|
|
151
155
|
loadingIconUrl?: string;
|
|
152
156
|
loadingIconFadeMs?: number;
|
|
@@ -154,7 +158,10 @@ export declare const ArcwareSettingsSchema: z.ZodObject<{
|
|
|
154
158
|
splashScreenMode?: "repeat" | "contain" | "cover" | "stretch";
|
|
155
159
|
splashScreenPosition?: string;
|
|
156
160
|
splashScreenBgColor?: string;
|
|
161
|
+
hideLoveLetters?: boolean;
|
|
162
|
+
hideAfkOverlay?: boolean;
|
|
157
163
|
}>>;
|
|
164
|
+
fetchRemoteWhiteLabelling: z.ZodOptional<z.ZodBoolean>;
|
|
158
165
|
}, "strip", z.ZodTypeAny, {
|
|
159
166
|
session?: string;
|
|
160
167
|
token?: string;
|
|
@@ -207,7 +214,10 @@ export declare const ArcwareSettingsSchema: z.ZodObject<{
|
|
|
207
214
|
splashScreenMode?: "repeat" | "contain" | "cover" | "stretch";
|
|
208
215
|
splashScreenPosition?: string;
|
|
209
216
|
splashScreenBgColor?: string;
|
|
217
|
+
hideLoveLetters?: boolean;
|
|
218
|
+
hideAfkOverlay?: boolean;
|
|
210
219
|
};
|
|
220
|
+
fetchRemoteWhiteLabelling?: boolean;
|
|
211
221
|
}, {
|
|
212
222
|
session?: string;
|
|
213
223
|
token?: string;
|
|
@@ -260,6 +270,9 @@ export declare const ArcwareSettingsSchema: z.ZodObject<{
|
|
|
260
270
|
splashScreenMode?: "repeat" | "contain" | "cover" | "stretch";
|
|
261
271
|
splashScreenPosition?: string;
|
|
262
272
|
splashScreenBgColor?: string;
|
|
273
|
+
hideLoveLetters?: boolean;
|
|
274
|
+
hideAfkOverlay?: boolean;
|
|
263
275
|
};
|
|
276
|
+
fetchRemoteWhiteLabelling?: boolean;
|
|
264
277
|
}>;
|
|
265
278
|
export type Settings = z.infer<typeof ArcwareSettingsSchema>;
|
|
@@ -7,6 +7,8 @@ export declare const ZWhiteLabel: z.ZodObject<{
|
|
|
7
7
|
splashScreenMode: z.ZodOptional<z.ZodEnum<["contain", "cover", "stretch", "repeat"]>>;
|
|
8
8
|
splashScreenPosition: z.ZodOptional<z.ZodString>;
|
|
9
9
|
splashScreenBgColor: z.ZodOptional<z.ZodString>;
|
|
10
|
+
hideLoveLetters: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
hideAfkOverlay: z.ZodOptional<z.ZodBoolean>;
|
|
10
12
|
}, "strict", z.ZodTypeAny, {
|
|
11
13
|
loadingIconUrl?: string;
|
|
12
14
|
loadingIconFadeMs?: number;
|
|
@@ -14,6 +16,8 @@ export declare const ZWhiteLabel: z.ZodObject<{
|
|
|
14
16
|
splashScreenMode?: "repeat" | "contain" | "cover" | "stretch";
|
|
15
17
|
splashScreenPosition?: string;
|
|
16
18
|
splashScreenBgColor?: string;
|
|
19
|
+
hideLoveLetters?: boolean;
|
|
20
|
+
hideAfkOverlay?: boolean;
|
|
17
21
|
}, {
|
|
18
22
|
loadingIconUrl?: string;
|
|
19
23
|
loadingIconFadeMs?: number;
|
|
@@ -21,5 +25,7 @@ export declare const ZWhiteLabel: z.ZodObject<{
|
|
|
21
25
|
splashScreenMode?: "repeat" | "contain" | "cover" | "stretch";
|
|
22
26
|
splashScreenPosition?: string;
|
|
23
27
|
splashScreenBgColor?: string;
|
|
28
|
+
hideLoveLetters?: boolean;
|
|
29
|
+
hideAfkOverlay?: boolean;
|
|
24
30
|
}>;
|
|
25
31
|
export type WhiteLabel = z.infer<typeof ZWhiteLabel>;
|