@arcware-cloud/pixelstreaming-websdk 1.3.18 → 1.3.19

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 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.18";
23455
+ this.VERSION = "1.3.19";
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
  }
@@ -23496,10 +23515,8 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
23496
23515
  // Only apply & emit if it actually changed
23497
23516
  const prev = this.settings.whiteLabelling;
23498
23517
  const next = parsed.data;
23499
- if (!deepEqual(prev, next)) {
23500
- this.settings.whiteLabelling = next;
23501
- EventHandler_1.EventHandler.Emit(this.whiteLabellingChanged, next);
23502
- }
23518
+ this.settings.whiteLabelling = next;
23519
+ EventHandler_1.EventHandler.Emit(this.whiteLabellingChanged, { next, changed: !deepEqual(prev, next) });
23503
23520
  return parsed.data;
23504
23521
  }
23505
23522
  catch (_b) {
@@ -23623,8 +23640,10 @@ function ArcwareInit({ shareId, projectId }, configuration, forceRefresh = false
23623
23640
  loadingIconUrl: undefined,
23624
23641
  splashScreenMode: undefined,
23625
23642
  splashScreenPosition: undefined,
23626
- splashScreenBgColor: undefined
23627
- } }, configuration === null || configuration === void 0 ? void 0 : configuration.settings),
23643
+ splashScreenBgColor: undefined,
23644
+ hideLoveLetters: undefined,
23645
+ hideAfkOverlay: undefined
23646
+ }, fetchRemoteWhiteLabelling: undefined }, configuration === null || configuration === void 0 ? void 0 : configuration.settings),
23628
23647
  envName: (_a = configuration === null || configuration === void 0 ? void 0 : configuration.envName) !== null && _a !== void 0 ? _a : undefined
23629
23648
  });
23630
23649
  const PixelStreaming = new ArcwarePixelStreaming_1.ArcwarePixelStreaming(Config);
@@ -23692,23 +23711,20 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
23692
23711
  return true;
23693
23712
  }
23694
23713
  bindTransportEvents() {
23695
- var _a, _b, _c, _d, _e, _f, _g;
23714
+ var _a, _b, _c, _d;
23696
23715
  const current = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.transport;
23697
23716
  if (!current || current === this._boundTransport)
23698
23717
  return;
23699
- // Unbind from previous
23718
+ // Unbind previous
23700
23719
  if (this._boundTransport) {
23701
23720
  if (this._onWsOpen)
23702
23721
  (_c = (_b = this._boundTransport).removeEventListener) === null || _c === void 0 ? void 0 : _c.call(_b, "open", this._onWsOpen);
23703
- if (this._onWsClose)
23704
- (_e = (_d = this._boundTransport).removeEventListener) === null || _e === void 0 ? void 0 : _e.call(_d, "close", this._onWsClose);
23722
+ // ⚠️ this was the synthetic "close" before, we'll stop relying on it
23705
23723
  }
23706
- // Define (or reuse) callbacks
23707
23724
  if (!this._onWsOpen) {
23708
23725
  this._onWsOpen = () => {
23709
23726
  this.flushOutbox();
23710
23727
  this.attachFirstRenderedFrameOnce();
23711
- // no watchdog anymore
23712
23728
  setTimeout(() => {
23713
23729
  var _a, _b, _c;
23714
23730
  if (!this.videoInitializedSent) {
@@ -23721,15 +23737,15 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
23721
23737
  }, 1200);
23722
23738
  };
23723
23739
  }
23724
- if (!this._onWsClose) {
23740
+ (_d = current.addEventListener) === null || _d === void 0 ? void 0 : _d.call(current, "open", this._onWsOpen);
23741
+ // Real CloseEvent from underlying WebSocket
23742
+ const ws = current.webSocket;
23743
+ if (ws && !this._onWsClose) {
23725
23744
  this._onWsClose = (evt) => {
23726
- // Bubble to your public close handler
23727
23745
  EventHandler_1.EventHandler.Emit(this.websocketOnCloseHandler, evt);
23728
23746
  };
23747
+ ws.addEventListener("close", this._onWsClose);
23729
23748
  }
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
23749
  this._boundTransport = current;
23734
23750
  }
23735
23751
  get isWsOpen() {
@@ -23752,7 +23768,7 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
23752
23768
  return state !== undefined ? state : WebSocket.CLOSED;
23753
23769
  }
23754
23770
  constructor(config, overrides) {
23755
- var _a, _b, _c;
23771
+ var _a, _b;
23756
23772
  /** As soon as upstream is fixed, we got to adjust the url building process. */
23757
23773
  (0, ApplyUrlHack_1.ApplyUrlHack)();
23758
23774
  super(config, overrides);
@@ -23786,39 +23802,44 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
23786
23802
  this.flushOutbox();
23787
23803
  // no polling watchdog
23788
23804
  });
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
23805
  // Set override config.
23795
23806
  this.config = config;
23796
23807
  // Re-apply branding whenever config's WL changes
23797
- this.config.whiteLabellingChanged.add(() => {
23808
+ this.config.whiteLabellingChanged.add((result) => {
23809
+ var _a;
23798
23810
  try {
23799
- this.applyBrandingFromSettings();
23811
+ if (result.changed)
23812
+ this.applyBrandingFromSettings();
23813
+ this.config.settings.fetchRemoteWhiteLabelling = false;
23814
+ if (!((_a = this.config.settings.whiteLabelling) === null || _a === void 0 ? void 0 : _a.hideLoveLetters)) {
23815
+ if (!this.isProcessingQueue) {
23816
+ this === null || this === void 0 ? void 0 : this.processLoveLetterQueue();
23817
+ }
23818
+ }
23800
23819
  }
23801
- catch (_a) { }
23820
+ catch (_b) { }
23802
23821
  });
23803
23822
  // Kick off WL fetch once (if we have a shareId); on success it will emit and re-apply
23804
- (() => tslib_1.__awaiter(this, void 0, void 0, function* () {
23805
- try {
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
23823
+ if (this.config.settings.fetchRemoteWhiteLabelling) {
23824
+ (() => tslib_1.__awaiter(this, void 0, void 0, function* () {
23816
23825
  try {
23817
- this.applyBrandingFromSettings();
23826
+ const sid = this.config.settings.shareId;
23827
+ if (sid) {
23828
+ yield this.config.getWhiteLabelling(sid); // will emit if it changes
23829
+ }
23818
23830
  }
23819
- catch (_e) { }
23820
- }
23821
- }))();
23831
+ catch (_c) {
23832
+ // ignore
23833
+ }
23834
+ finally {
23835
+ // Make sure we paint with whatever we have initially
23836
+ try {
23837
+ this.applyBrandingFromSettings();
23838
+ }
23839
+ catch (_d) { }
23840
+ }
23841
+ }))();
23842
+ }
23822
23843
  this.loveLettersList = [];
23823
23844
  this.microphoneOverlay = new MicrophoneOverlay_1.MicrophoneOverlay(this);
23824
23845
  this.diagnosticsCollector = new DiagnosticsCollector_1.DiagnosticsCollector({
@@ -23830,7 +23851,6 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
23830
23851
  // Arm first-frame detector & watch for element swaps
23831
23852
  this.attachFirstRenderedFrameOnce();
23832
23853
  this.watchVideoElementReplacement();
23833
- this.wrapWebSocketOnCloseHandler();
23834
23854
  // Bind the event listener function to the class instance
23835
23855
  this.handleResolutionChange = this.handleResolutionChange.bind(this);
23836
23856
  // Register message handlers.
@@ -24349,10 +24369,12 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
24349
24369
  }
24350
24370
  }
24351
24371
  pushLetter(letter) {
24352
- var _a;
24372
+ var _a, _b;
24353
24373
  (_a = this === null || this === void 0 ? void 0 : this.loveLettersQueue) === null || _a === void 0 ? void 0 : _a.push(letter);
24354
- if (!this.isProcessingQueue) {
24355
- this === null || this === void 0 ? void 0 : this.processLoveLetterQueue();
24374
+ if (!((_b = this.config.settings.whiteLabelling) === null || _b === void 0 ? void 0 : _b.hideLoveLetters) && !this.config.settings.fetchRemoteWhiteLabelling) {
24375
+ if (!this.isProcessingQueue) {
24376
+ this === null || this === void 0 ? void 0 : this.processLoveLetterQueue();
24377
+ }
24356
24378
  }
24357
24379
  }
24358
24380
  processLoveLetterQueue() {
@@ -24418,13 +24440,6 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
24418
24440
  }, 1000);
24419
24441
  }
24420
24442
  }
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
24443
  onStreamingStateChange(callback) {
24429
24444
  var _a, _b, _c, _d;
24430
24445
  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 +24629,9 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
24614
24629
  s.endsWith(".ogv") ||
24615
24630
  s.endsWith(".m3u8"));
24616
24631
  }
24632
+ static clearSessionId() {
24633
+ window.localStorage.removeItem("pxss"); // or your actual key
24634
+ }
24617
24635
  }
24618
24636
  exports.ArcwarePixelStreaming = ArcwarePixelStreaming;
24619
24637
 
@@ -24687,7 +24705,8 @@ exports.ArcwareSettingsSchema = zod_1.z.object({
24687
24705
  .strict()
24688
24706
  .optional(),
24689
24707
  /** Loader customization */
24690
- whiteLabelling: ZWhiteLabel_1.ZWhiteLabel.optional()
24708
+ whiteLabelling: ZWhiteLabel_1.ZWhiteLabel.optional(),
24709
+ fetchRemoteWhiteLabelling: zod_1.z.boolean().optional()
24691
24710
  });
24692
24711
 
24693
24712
 
@@ -25507,7 +25526,9 @@ exports.ZWhiteLabel = zod_1.z
25507
25526
  splashScreenUrl: ImageUrl.optional(),
25508
25527
  splashScreenMode: zod_1.z.enum(["contain", "cover", "stretch", "repeat"]).optional(),
25509
25528
  splashScreenPosition: zod_1.z.string().optional(),
25510
- splashScreenBgColor: zod_1.z.string().optional()
25529
+ splashScreenBgColor: zod_1.z.string().optional(),
25530
+ hideLoveLetters: zod_1.z.boolean().optional(),
25531
+ hideAfkOverlay: zod_1.z.boolean().optional()
25511
25532
  })
25512
25533
  .strict();
25513
25534
 
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.18";
23467
+ this.VERSION = "1.3.19";
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
  }
@@ -23508,10 +23527,8 @@ class ArcwareConfig extends _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBP
23508
23527
  // Only apply & emit if it actually changed
23509
23528
  const prev = this.settings.whiteLabelling;
23510
23529
  const next = parsed.data;
23511
- if (!deepEqual(prev, next)) {
23512
- this.settings.whiteLabelling = next;
23513
- _domain_EventHandler__WEBPACK_IMPORTED_MODULE_7__.EventHandler.Emit(this.whiteLabellingChanged, next);
23514
- }
23530
+ this.settings.whiteLabelling = next;
23531
+ _domain_EventHandler__WEBPACK_IMPORTED_MODULE_7__.EventHandler.Emit(this.whiteLabellingChanged, { next, changed: !deepEqual(prev, next) });
23515
23532
  return parsed.data;
23516
23533
  }
23517
23534
  catch (_b) {
@@ -23638,8 +23655,10 @@ function ArcwareInit({ shareId, projectId }, configuration, forceRefresh = false
23638
23655
  loadingIconUrl: undefined,
23639
23656
  splashScreenMode: undefined,
23640
23657
  splashScreenPosition: undefined,
23641
- splashScreenBgColor: undefined
23642
- } }, configuration === null || configuration === void 0 ? void 0 : configuration.settings),
23658
+ splashScreenBgColor: undefined,
23659
+ hideLoveLetters: undefined,
23660
+ hideAfkOverlay: undefined
23661
+ }, fetchRemoteWhiteLabelling: undefined }, configuration === null || configuration === void 0 ? void 0 : configuration.settings),
23643
23662
  envName: (_a = configuration === null || configuration === void 0 ? void 0 : configuration.envName) !== null && _a !== void 0 ? _a : undefined
23644
23663
  });
23645
23664
  const PixelStreaming = new _ArcwarePixelStreaming__WEBPACK_IMPORTED_MODULE_1__.ArcwarePixelStreaming(Config);
@@ -23722,23 +23741,20 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
23722
23741
  return true;
23723
23742
  }
23724
23743
  bindTransportEvents() {
23725
- var _a, _b, _c, _d, _e, _f, _g;
23744
+ var _a, _b, _c, _d;
23726
23745
  const current = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.transport;
23727
23746
  if (!current || current === this._boundTransport)
23728
23747
  return;
23729
- // Unbind from previous
23748
+ // Unbind previous
23730
23749
  if (this._boundTransport) {
23731
23750
  if (this._onWsOpen)
23732
23751
  (_c = (_b = this._boundTransport).removeEventListener) === null || _c === void 0 ? void 0 : _c.call(_b, "open", this._onWsOpen);
23733
- if (this._onWsClose)
23734
- (_e = (_d = this._boundTransport).removeEventListener) === null || _e === void 0 ? void 0 : _e.call(_d, "close", this._onWsClose);
23752
+ // ⚠️ this was the synthetic "close" before, we'll stop relying on it
23735
23753
  }
23736
- // Define (or reuse) callbacks
23737
23754
  if (!this._onWsOpen) {
23738
23755
  this._onWsOpen = () => {
23739
23756
  this.flushOutbox();
23740
23757
  this.attachFirstRenderedFrameOnce();
23741
- // no watchdog anymore
23742
23758
  setTimeout(() => {
23743
23759
  var _a, _b, _c;
23744
23760
  if (!this.videoInitializedSent) {
@@ -23751,15 +23767,15 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
23751
23767
  }, 1200);
23752
23768
  };
23753
23769
  }
23754
- if (!this._onWsClose) {
23770
+ (_d = current.addEventListener) === null || _d === void 0 ? void 0 : _d.call(current, "open", this._onWsOpen);
23771
+ // Real CloseEvent from underlying WebSocket
23772
+ const ws = current.webSocket;
23773
+ if (ws && !this._onWsClose) {
23755
23774
  this._onWsClose = (evt) => {
23756
- // Bubble to your public close handler
23757
23775
  _domain_EventHandler__WEBPACK_IMPORTED_MODULE_5__.EventHandler.Emit(this.websocketOnCloseHandler, evt);
23758
23776
  };
23777
+ ws.addEventListener("close", this._onWsClose);
23759
23778
  }
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
23779
  this._boundTransport = current;
23764
23780
  }
23765
23781
  get isWsOpen() {
@@ -23782,7 +23798,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
23782
23798
  return state !== undefined ? state : WebSocket.CLOSED;
23783
23799
  }
23784
23800
  constructor(config, overrides) {
23785
- var _a, _b, _c;
23801
+ var _a, _b;
23786
23802
  /** As soon as upstream is fixed, we got to adjust the url building process. */
23787
23803
  (0,_ApplyUrlHack__WEBPACK_IMPORTED_MODULE_6__.ApplyUrlHack)();
23788
23804
  super(config, overrides);
@@ -23816,39 +23832,44 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
23816
23832
  this.flushOutbox();
23817
23833
  // no polling watchdog
23818
23834
  });
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
23835
  // Set override config.
23825
23836
  this.config = config;
23826
23837
  // Re-apply branding whenever config's WL changes
23827
- this.config.whiteLabellingChanged.add(() => {
23838
+ this.config.whiteLabellingChanged.add((result) => {
23839
+ var _a;
23828
23840
  try {
23829
- this.applyBrandingFromSettings();
23841
+ if (result.changed)
23842
+ this.applyBrandingFromSettings();
23843
+ this.config.settings.fetchRemoteWhiteLabelling = false;
23844
+ if (!((_a = this.config.settings.whiteLabelling) === null || _a === void 0 ? void 0 : _a.hideLoveLetters)) {
23845
+ if (!this.isProcessingQueue) {
23846
+ this === null || this === void 0 ? void 0 : this.processLoveLetterQueue();
23847
+ }
23848
+ }
23830
23849
  }
23831
- catch (_a) { }
23850
+ catch (_b) { }
23832
23851
  });
23833
23852
  // Kick off WL fetch once (if we have a shareId); on success it will emit and re-apply
23834
- (() => (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__awaiter)(this, void 0, void 0, function* () {
23835
- try {
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
23853
+ if (this.config.settings.fetchRemoteWhiteLabelling) {
23854
+ (() => (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__awaiter)(this, void 0, void 0, function* () {
23846
23855
  try {
23847
- this.applyBrandingFromSettings();
23856
+ const sid = this.config.settings.shareId;
23857
+ if (sid) {
23858
+ yield this.config.getWhiteLabelling(sid); // will emit if it changes
23859
+ }
23848
23860
  }
23849
- catch (_e) { }
23850
- }
23851
- }))();
23861
+ catch (_c) {
23862
+ // ignore
23863
+ }
23864
+ finally {
23865
+ // Make sure we paint with whatever we have initially
23866
+ try {
23867
+ this.applyBrandingFromSettings();
23868
+ }
23869
+ catch (_d) { }
23870
+ }
23871
+ }))();
23872
+ }
23852
23873
  this.loveLettersList = [];
23853
23874
  this.microphoneOverlay = new _ui_MicrophoneOverlay__WEBPACK_IMPORTED_MODULE_8__.MicrophoneOverlay(this);
23854
23875
  this.diagnosticsCollector = new _features_DiagnosticsCollector__WEBPACK_IMPORTED_MODULE_3__.DiagnosticsCollector({
@@ -23860,7 +23881,6 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
23860
23881
  // Arm first-frame detector & watch for element swaps
23861
23882
  this.attachFirstRenderedFrameOnce();
23862
23883
  this.watchVideoElementReplacement();
23863
- this.wrapWebSocketOnCloseHandler();
23864
23884
  // Bind the event listener function to the class instance
23865
23885
  this.handleResolutionChange = this.handleResolutionChange.bind(this);
23866
23886
  // Register message handlers.
@@ -24379,10 +24399,12 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
24379
24399
  }
24380
24400
  }
24381
24401
  pushLetter(letter) {
24382
- var _a;
24402
+ var _a, _b;
24383
24403
  (_a = this === null || this === void 0 ? void 0 : this.loveLettersQueue) === null || _a === void 0 ? void 0 : _a.push(letter);
24384
- if (!this.isProcessingQueue) {
24385
- this === null || this === void 0 ? void 0 : this.processLoveLetterQueue();
24404
+ if (!((_b = this.config.settings.whiteLabelling) === null || _b === void 0 ? void 0 : _b.hideLoveLetters) && !this.config.settings.fetchRemoteWhiteLabelling) {
24405
+ if (!this.isProcessingQueue) {
24406
+ this === null || this === void 0 ? void 0 : this.processLoveLetterQueue();
24407
+ }
24386
24408
  }
24387
24409
  }
24388
24410
  processLoveLetterQueue() {
@@ -24448,13 +24470,6 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
24448
24470
  }, 1000);
24449
24471
  }
24450
24472
  }
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
24473
  onStreamingStateChange(callback) {
24459
24474
  var _a, _b, _c, _d;
24460
24475
  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 +24659,9 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
24644
24659
  s.endsWith(".ogv") ||
24645
24660
  s.endsWith(".m3u8"));
24646
24661
  }
24662
+ static clearSessionId() {
24663
+ window.localStorage.removeItem("pxss"); // or your actual key
24664
+ }
24647
24665
  }
24648
24666
 
24649
24667
 
@@ -24719,7 +24737,8 @@ const ArcwareSettingsSchema = zod__WEBPACK_IMPORTED_MODULE_2__.z.object({
24719
24737
  .strict()
24720
24738
  .optional(),
24721
24739
  /** Loader customization */
24722
- whiteLabelling: _features_ZWhiteLabel__WEBPACK_IMPORTED_MODULE_1__.ZWhiteLabel.optional()
24740
+ whiteLabelling: _features_ZWhiteLabel__WEBPACK_IMPORTED_MODULE_1__.ZWhiteLabel.optional(),
24741
+ fetchRemoteWhiteLabelling: zod__WEBPACK_IMPORTED_MODULE_2__.z.boolean().optional()
24723
24742
  });
24724
24743
 
24725
24744
 
@@ -25548,7 +25567,9 @@ const ZWhiteLabel = zod__WEBPACK_IMPORTED_MODULE_0__.z.object({
25548
25567
  splashScreenUrl: ImageUrl.optional(),
25549
25568
  splashScreenMode: zod__WEBPACK_IMPORTED_MODULE_0__.z["enum"](["contain", "cover", "stretch", "repeat"]).optional(),
25550
25569
  splashScreenPosition: zod__WEBPACK_IMPORTED_MODULE_0__.z.string().optional(),
25551
- splashScreenBgColor: zod__WEBPACK_IMPORTED_MODULE_0__.z.string().optional()
25570
+ splashScreenBgColor: zod__WEBPACK_IMPORTED_MODULE_0__.z.string().optional(),
25571
+ hideLoveLetters: zod__WEBPACK_IMPORTED_MODULE_0__.z.boolean().optional(),
25572
+ hideAfkOverlay: zod__WEBPACK_IMPORTED_MODULE_0__.z.boolean().optional()
25552
25573
  })
25553
25574
  .strict();
25554
25575
 
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.18";
23465
+ this.VERSION = "1.3.19";
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
  }
@@ -23506,10 +23525,8 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
23506
23525
  // Only apply & emit if it actually changed
23507
23526
  const prev = this.settings.whiteLabelling;
23508
23527
  const next = parsed.data;
23509
- if (!deepEqual(prev, next)) {
23510
- this.settings.whiteLabelling = next;
23511
- EventHandler_1.EventHandler.Emit(this.whiteLabellingChanged, next);
23512
- }
23528
+ this.settings.whiteLabelling = next;
23529
+ EventHandler_1.EventHandler.Emit(this.whiteLabellingChanged, { next, changed: !deepEqual(prev, next) });
23513
23530
  return parsed.data;
23514
23531
  }
23515
23532
  catch (_b) {
@@ -23633,8 +23650,10 @@ function ArcwareInit({ shareId, projectId }, configuration, forceRefresh = false
23633
23650
  loadingIconUrl: undefined,
23634
23651
  splashScreenMode: undefined,
23635
23652
  splashScreenPosition: undefined,
23636
- splashScreenBgColor: undefined
23637
- } }, configuration === null || configuration === void 0 ? void 0 : configuration.settings),
23653
+ splashScreenBgColor: undefined,
23654
+ hideLoveLetters: undefined,
23655
+ hideAfkOverlay: undefined
23656
+ }, fetchRemoteWhiteLabelling: undefined }, configuration === null || configuration === void 0 ? void 0 : configuration.settings),
23638
23657
  envName: (_a = configuration === null || configuration === void 0 ? void 0 : configuration.envName) !== null && _a !== void 0 ? _a : undefined
23639
23658
  });
23640
23659
  const PixelStreaming = new ArcwarePixelStreaming_1.ArcwarePixelStreaming(Config);
@@ -23702,23 +23721,20 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
23702
23721
  return true;
23703
23722
  }
23704
23723
  bindTransportEvents() {
23705
- var _a, _b, _c, _d, _e, _f, _g;
23724
+ var _a, _b, _c, _d;
23706
23725
  const current = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.transport;
23707
23726
  if (!current || current === this._boundTransport)
23708
23727
  return;
23709
- // Unbind from previous
23728
+ // Unbind previous
23710
23729
  if (this._boundTransport) {
23711
23730
  if (this._onWsOpen)
23712
23731
  (_c = (_b = this._boundTransport).removeEventListener) === null || _c === void 0 ? void 0 : _c.call(_b, "open", this._onWsOpen);
23713
- if (this._onWsClose)
23714
- (_e = (_d = this._boundTransport).removeEventListener) === null || _e === void 0 ? void 0 : _e.call(_d, "close", this._onWsClose);
23732
+ // ⚠️ this was the synthetic "close" before, we'll stop relying on it
23715
23733
  }
23716
- // Define (or reuse) callbacks
23717
23734
  if (!this._onWsOpen) {
23718
23735
  this._onWsOpen = () => {
23719
23736
  this.flushOutbox();
23720
23737
  this.attachFirstRenderedFrameOnce();
23721
- // no watchdog anymore
23722
23738
  setTimeout(() => {
23723
23739
  var _a, _b, _c;
23724
23740
  if (!this.videoInitializedSent) {
@@ -23731,15 +23747,15 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
23731
23747
  }, 1200);
23732
23748
  };
23733
23749
  }
23734
- if (!this._onWsClose) {
23750
+ (_d = current.addEventListener) === null || _d === void 0 ? void 0 : _d.call(current, "open", this._onWsOpen);
23751
+ // Real CloseEvent from underlying WebSocket
23752
+ const ws = current.webSocket;
23753
+ if (ws && !this._onWsClose) {
23735
23754
  this._onWsClose = (evt) => {
23736
- // Bubble to your public close handler
23737
23755
  EventHandler_1.EventHandler.Emit(this.websocketOnCloseHandler, evt);
23738
23756
  };
23757
+ ws.addEventListener("close", this._onWsClose);
23739
23758
  }
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
23759
  this._boundTransport = current;
23744
23760
  }
23745
23761
  get isWsOpen() {
@@ -23762,7 +23778,7 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
23762
23778
  return state !== undefined ? state : WebSocket.CLOSED;
23763
23779
  }
23764
23780
  constructor(config, overrides) {
23765
- var _a, _b, _c;
23781
+ var _a, _b;
23766
23782
  /** As soon as upstream is fixed, we got to adjust the url building process. */
23767
23783
  (0, ApplyUrlHack_1.ApplyUrlHack)();
23768
23784
  super(config, overrides);
@@ -23796,39 +23812,44 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
23796
23812
  this.flushOutbox();
23797
23813
  // no polling watchdog
23798
23814
  });
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
23815
  // Set override config.
23805
23816
  this.config = config;
23806
23817
  // Re-apply branding whenever config's WL changes
23807
- this.config.whiteLabellingChanged.add(() => {
23818
+ this.config.whiteLabellingChanged.add((result) => {
23819
+ var _a;
23808
23820
  try {
23809
- this.applyBrandingFromSettings();
23821
+ if (result.changed)
23822
+ this.applyBrandingFromSettings();
23823
+ this.config.settings.fetchRemoteWhiteLabelling = false;
23824
+ if (!((_a = this.config.settings.whiteLabelling) === null || _a === void 0 ? void 0 : _a.hideLoveLetters)) {
23825
+ if (!this.isProcessingQueue) {
23826
+ this === null || this === void 0 ? void 0 : this.processLoveLetterQueue();
23827
+ }
23828
+ }
23810
23829
  }
23811
- catch (_a) { }
23830
+ catch (_b) { }
23812
23831
  });
23813
23832
  // Kick off WL fetch once (if we have a shareId); on success it will emit and re-apply
23814
- (() => tslib_1.__awaiter(this, void 0, void 0, function* () {
23815
- try {
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
23833
+ if (this.config.settings.fetchRemoteWhiteLabelling) {
23834
+ (() => tslib_1.__awaiter(this, void 0, void 0, function* () {
23826
23835
  try {
23827
- this.applyBrandingFromSettings();
23836
+ const sid = this.config.settings.shareId;
23837
+ if (sid) {
23838
+ yield this.config.getWhiteLabelling(sid); // will emit if it changes
23839
+ }
23828
23840
  }
23829
- catch (_e) { }
23830
- }
23831
- }))();
23841
+ catch (_c) {
23842
+ // ignore
23843
+ }
23844
+ finally {
23845
+ // Make sure we paint with whatever we have initially
23846
+ try {
23847
+ this.applyBrandingFromSettings();
23848
+ }
23849
+ catch (_d) { }
23850
+ }
23851
+ }))();
23852
+ }
23832
23853
  this.loveLettersList = [];
23833
23854
  this.microphoneOverlay = new MicrophoneOverlay_1.MicrophoneOverlay(this);
23834
23855
  this.diagnosticsCollector = new DiagnosticsCollector_1.DiagnosticsCollector({
@@ -23840,7 +23861,6 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
23840
23861
  // Arm first-frame detector & watch for element swaps
23841
23862
  this.attachFirstRenderedFrameOnce();
23842
23863
  this.watchVideoElementReplacement();
23843
- this.wrapWebSocketOnCloseHandler();
23844
23864
  // Bind the event listener function to the class instance
23845
23865
  this.handleResolutionChange = this.handleResolutionChange.bind(this);
23846
23866
  // Register message handlers.
@@ -24359,10 +24379,12 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
24359
24379
  }
24360
24380
  }
24361
24381
  pushLetter(letter) {
24362
- var _a;
24382
+ var _a, _b;
24363
24383
  (_a = this === null || this === void 0 ? void 0 : this.loveLettersQueue) === null || _a === void 0 ? void 0 : _a.push(letter);
24364
- if (!this.isProcessingQueue) {
24365
- this === null || this === void 0 ? void 0 : this.processLoveLetterQueue();
24384
+ if (!((_b = this.config.settings.whiteLabelling) === null || _b === void 0 ? void 0 : _b.hideLoveLetters) && !this.config.settings.fetchRemoteWhiteLabelling) {
24385
+ if (!this.isProcessingQueue) {
24386
+ this === null || this === void 0 ? void 0 : this.processLoveLetterQueue();
24387
+ }
24366
24388
  }
24367
24389
  }
24368
24390
  processLoveLetterQueue() {
@@ -24428,13 +24450,6 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
24428
24450
  }, 1000);
24429
24451
  }
24430
24452
  }
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
24453
  onStreamingStateChange(callback) {
24439
24454
  var _a, _b, _c, _d;
24440
24455
  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 +24639,9 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
24624
24639
  s.endsWith(".ogv") ||
24625
24640
  s.endsWith(".m3u8"));
24626
24641
  }
24642
+ static clearSessionId() {
24643
+ window.localStorage.removeItem("pxss"); // or your actual key
24644
+ }
24627
24645
  }
24628
24646
  exports.ArcwarePixelStreaming = ArcwarePixelStreaming;
24629
24647
 
@@ -24697,7 +24715,8 @@ exports.ArcwareSettingsSchema = zod_1.z.object({
24697
24715
  .strict()
24698
24716
  .optional(),
24699
24717
  /** Loader customization */
24700
- whiteLabelling: ZWhiteLabel_1.ZWhiteLabel.optional()
24718
+ whiteLabelling: ZWhiteLabel_1.ZWhiteLabel.optional(),
24719
+ fetchRemoteWhiteLabelling: zod_1.z.boolean().optional()
24701
24720
  });
24702
24721
 
24703
24722
 
@@ -25517,7 +25536,9 @@ exports.ZWhiteLabel = zod_1.z
25517
25536
  splashScreenUrl: ImageUrl.optional(),
25518
25537
  splashScreenMode: zod_1.z.enum(["contain", "cover", "stretch", "repeat"]).optional(),
25519
25538
  splashScreenPosition: zod_1.z.string().optional(),
25520
- splashScreenBgColor: zod_1.z.string().optional()
25539
+ splashScreenBgColor: zod_1.z.string().optional(),
25540
+ hideLoveLetters: zod_1.z.boolean().optional(),
25541
+ hideAfkOverlay: zod_1.z.boolean().optional()
25521
25542
  })
25522
25543
  .strict();
25523
25544
 
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.18",
4
+ "version": "1.3.19",
5
5
  "type": "commonjs",
6
6
  "main": "./index.umd.js",
7
- "module": "./index.umd.js",
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.1",
24
- "@epicgames-ps/lib-pixelstreamingfrontend-ue5.5": "^1.2.1",
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.18";
32
+ readonly VERSION = "1.3.19";
33
33
  readonly whiteLabellingChanged: EventHandler<{
34
- loadingIconUrl?: string;
35
- loadingIconFadeMs?: number;
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>;