@arcware-cloud/pixelstreaming-websdk 1.3.13 → 1.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js CHANGED
@@ -23356,12 +23356,18 @@ __webpack_require__.r(__webpack_exports__);
23356
23356
  /* harmony export */ "ArcwareConfig": () => (/* binding */ ArcwareConfig),
23357
23357
  /* harmony export */ "DefaultUrl": () => (/* binding */ DefaultUrl)
23358
23358
  /* harmony export */ });
23359
- /* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1604);
23360
- /* harmony import */ var _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7800);
23361
- /* harmony import */ var _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7463);
23359
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(655);
23360
+ /* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1604);
23361
+ /* harmony import */ var _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7800);
23362
+ /* harmony import */ var _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7463);
23362
23363
  /* harmony import */ var _domain_Session__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2469);
23363
23364
  /* harmony import */ var _domain_ArcwareSettingsSchema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5602);
23364
23365
  /* harmony import */ var _features_whiteLabelling__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3545);
23366
+ /* harmony import */ var _features_ZWhiteLabel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(467);
23367
+ /* harmony import */ var _domain_EventHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3379);
23368
+
23369
+
23370
+
23365
23371
 
23366
23372
 
23367
23373
 
@@ -23381,8 +23387,16 @@ Logger.Error = (message: string) => {
23381
23387
  if (message?.startsWith("unhandled Stat Type")) return;
23382
23388
  console.error(message);
23383
23389
  };*/
23384
- _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_3__.Logger.InitLogging(2, false);
23385
- class ArcwareConfig extends _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_4__.Config {
23390
+ _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_4__.Logger.InitLogging(2, false);
23391
+ function deepEqual(a, b) {
23392
+ try {
23393
+ return JSON.stringify(a) === JSON.stringify(b);
23394
+ }
23395
+ catch (_a) {
23396
+ return false;
23397
+ }
23398
+ }
23399
+ class ArcwareConfig extends _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_5__.Config {
23386
23400
  /**
23387
23401
  * Can be used to fetch projectId and shareId from the current url.
23388
23402
  * Example:
@@ -23401,8 +23415,8 @@ class ArcwareConfig extends _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBP
23401
23415
  static PickIdsOfUrl() {
23402
23416
  const { pathname } = new URL(window.location.href);
23403
23417
  const sections = pathname.split("/");
23404
- const projectId = sections.find((section) => zod__WEBPACK_IMPORTED_MODULE_5__.z.string().uuid().safeParse(section).success);
23405
- const shareId = sections.find((section) => zod__WEBPACK_IMPORTED_MODULE_5__.z.string().startsWith("share-").safeParse(section).success);
23418
+ const projectId = sections.find((section) => zod__WEBPACK_IMPORTED_MODULE_6__.z.string().uuid().safeParse(section).success);
23419
+ const shareId = sections.find((section) => zod__WEBPACK_IMPORTED_MODULE_6__.z.string().startsWith("share-").safeParse(section).success);
23406
23420
  return {
23407
23421
  projectId,
23408
23422
  shareId
@@ -23430,26 +23444,84 @@ class ArcwareConfig extends _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBP
23430
23444
  if (!config.initialSettings.ss)
23431
23445
  config.initialSettings.ss = DefaultUrl;
23432
23446
  super(config);
23433
- this.VERSION = "1.3.13";
23447
+ this.VERSION = "1.3.16";
23448
+ this.whiteLabellingChanged = new _domain_EventHandler__WEBPACK_IMPORTED_MODULE_7__.EventHandler();
23449
+ this.signallingWlURL = "https://signalling-client.arcware.cloud/whiteLabel/";
23450
+ console.log(config);
23451
+ if (config.envName) {
23452
+ this.signallingWlURL = `https://signalling-client.${config.envName}.arcware.cloud/whiteLabel/`;
23453
+ }
23434
23454
  this.settings = settings;
23435
23455
  this.session = new _domain_Session__WEBPACK_IMPORTED_MODULE_0__.Session();
23436
23456
  this._initialSettings = config.initialSettings;
23437
23457
  // Setup arcware default settings.
23438
- this.setFlagEnabled(_epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_4__.Flags.AFKDetection, true);
23458
+ this.setFlagEnabled(_epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_5__.Flags.AFKDetection, true);
23439
23459
  // IMPORTANT NOTE: The feature BrowserSendOffer is no longer supported in PSInfra 5.5.
23440
23460
  // The offer is now expected to come from UE. Ensure that your signalling server supports this behaviour.
23441
23461
  //this.setFlagEnabled(Flags.BrowserSendOffer, true);
23442
23462
  if (this.useUrlParams) {
23443
23463
  // Get the query string from URL
23444
23464
  const qs = new URLSearchParams(window.location.search);
23445
- // Retrieve image loading from there
23446
- const wlParsed = this.useUrlParams ? (0,_features_whiteLabelling__WEBPACK_IMPORTED_MODULE_2__.readWhiteLabelFromQuery)(qs) : undefined; // respect useUrlParams
23447
- if (wlParsed) {
23448
- this.settings.whiteLabelling = Object.assign(Object.assign({}, ((_c = this.settings.whiteLabelling) !== null && _c !== void 0 ? _c : {})), wlParsed);
23465
+ if (qs.has("wl") && qs.get("wl") !== "") {
23466
+ // Retrieve image loading from there
23467
+ const wlParsed = this.useUrlParams ? (0,_features_whiteLabelling__WEBPACK_IMPORTED_MODULE_2__.readWhiteLabelFromQuery)(qs) : undefined; // respect useUrlParams
23468
+ if (wlParsed) {
23469
+ this.settings.whiteLabelling = Object.assign(Object.assign({}, ((_c = this.settings.whiteLabelling) !== null && _c !== void 0 ? _c : {})), wlParsed);
23470
+ }
23449
23471
  }
23450
23472
  this.settings.infoButton = qs.has("i") || qs.has("info");
23451
23473
  }
23452
23474
  }
23475
+ getWhiteLabelling(ShareId) {
23476
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__awaiter)(this, void 0, void 0, function* () {
23477
+ const qs = new URLSearchParams(window.location.search);
23478
+ // Only fetch when wl param is present and empty (as before)
23479
+ if (!(qs.has("wl") && qs.get("wl") === ""))
23480
+ return undefined;
23481
+ // Build final URL safely (trim trailing slashes, encode ShareId)
23482
+ const base = this.signallingWlURL.replace(/\/+$/, "");
23483
+ const requestUrl = `${base}/${encodeURIComponent(ShareId)}`;
23484
+ const controller = new AbortController();
23485
+ const timeoutId = setTimeout(() => controller.abort(), 1000);
23486
+ try {
23487
+ const res = yield fetch(requestUrl, {
23488
+ method: "GET",
23489
+ signal: controller.signal,
23490
+ headers: { Accept: "application/json, text/plain" },
23491
+ credentials: "omit"
23492
+ });
23493
+ if (!res.ok)
23494
+ return undefined;
23495
+ const text = yield res.text();
23496
+ if (!text || text.trim() === "")
23497
+ return undefined;
23498
+ let json;
23499
+ try {
23500
+ json = JSON.parse(text);
23501
+ }
23502
+ catch (_a) {
23503
+ return undefined;
23504
+ }
23505
+ const parsed = _features_ZWhiteLabel__WEBPACK_IMPORTED_MODULE_3__.ZWhiteLabel.safeParse(json);
23506
+ if (!parsed.success)
23507
+ return undefined;
23508
+ // Only apply & emit if it actually changed
23509
+ const prev = this.settings.whiteLabelling;
23510
+ 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
+ }
23515
+ return parsed.data;
23516
+ }
23517
+ catch (_b) {
23518
+ return undefined;
23519
+ }
23520
+ finally {
23521
+ clearTimeout(timeoutId);
23522
+ }
23523
+ });
23524
+ }
23453
23525
  /** Setup connection string. */
23454
23526
  get urlFlags() {
23455
23527
  var _a;
@@ -23501,7 +23573,7 @@ class ArcwareConfig extends _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBP
23501
23573
  return this._initialSettings;
23502
23574
  }
23503
23575
  modifyInitialSettings(mouseLock) {
23504
- this.setFlagEnabled(_epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_4__.Flags.HoveringMouseMode, mouseLock);
23576
+ this.setFlagEnabled(_epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_5__.Flags.HoveringMouseMode, mouseLock);
23505
23577
  }
23506
23578
  }
23507
23579
 
@@ -23527,6 +23599,7 @@ let globalApplication = null;
23527
23599
  let previousShareId = null;
23528
23600
  let previousProjectId = null;
23529
23601
  function ArcwareInit({ shareId, projectId }, configuration, forceRefresh = false) {
23602
+ var _a;
23530
23603
  if (shareId && !shareId.startsWith("share-"))
23531
23604
  throw new Error(`Unexpected shareId-format: '${shareId}'.`);
23532
23605
  if (shareId && previousShareId !== shareId) {
@@ -23566,7 +23639,8 @@ function ArcwareInit({ shareId, projectId }, configuration, forceRefresh = false
23566
23639
  splashScreenMode: undefined,
23567
23640
  splashScreenPosition: undefined,
23568
23641
  splashScreenBgColor: undefined
23569
- } }, configuration === null || configuration === void 0 ? void 0 : configuration.settings)
23642
+ } }, configuration === null || configuration === void 0 ? void 0 : configuration.settings),
23643
+ envName: (_a = configuration === null || configuration === void 0 ? void 0 : configuration.envName) !== null && _a !== void 0 ? _a : undefined
23570
23644
  });
23571
23645
  const PixelStreaming = new _ArcwarePixelStreaming__WEBPACK_IMPORTED_MODULE_1__.ArcwarePixelStreaming(Config);
23572
23646
  const Application = new _ArcwareApplication__WEBPACK_IMPORTED_MODULE_2__.ArcwareApplication({ stream: PixelStreaming });
@@ -23591,7 +23665,7 @@ __webpack_require__.r(__webpack_exports__);
23591
23665
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23592
23666
  /* harmony export */ "ArcwarePixelStreaming": () => (/* binding */ ArcwarePixelStreaming)
23593
23667
  /* harmony export */ });
23594
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(655);
23668
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(655);
23595
23669
  /* harmony import */ var _arcware_cloud_shared_pixelstreaming_websdk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7910);
23596
23670
  /* harmony import */ var _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(516);
23597
23671
  /* harmony import */ var _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(7800);
@@ -23599,10 +23673,10 @@ __webpack_require__.r(__webpack_exports__);
23599
23673
  /* harmony import */ var _ApplyUrlHack__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4790);
23600
23674
  /* harmony import */ var _domain_EventHandler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3379);
23601
23675
  /* harmony import */ var _domain_Stats__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9764);
23602
- /* harmony import */ var _domain_debounce__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(9580);
23676
+ /* harmony import */ var _domain_debounce__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(9580);
23603
23677
  /* harmony import */ var _ui_LoveLetters__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(4572);
23604
23678
  /* harmony import */ var _ui_ArcwareLogoLoader__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(6469);
23605
- /* harmony import */ var _ui_MicrophoneOverlay__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3613);
23679
+ /* harmony import */ var _ui_MicrophoneOverlay__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(3613);
23606
23680
  /* harmony import */ var _domain_ConnectionIdentifier__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5999);
23607
23681
  /* harmony import */ var _features_DiagnosticsCollector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8429);
23608
23682
  /* harmony import */ var _features_common__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(2483);
@@ -23749,8 +23823,34 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
23749
23823
  });
23750
23824
  // Set override config.
23751
23825
  this.config = config;
23826
+ // Re-apply branding whenever config's WL changes
23827
+ this.config.whiteLabellingChanged.add(() => {
23828
+ try {
23829
+ this.applyBrandingFromSettings();
23830
+ }
23831
+ catch (_a) { }
23832
+ });
23833
+ // 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
23846
+ try {
23847
+ this.applyBrandingFromSettings();
23848
+ }
23849
+ catch (_e) { }
23850
+ }
23851
+ }))();
23752
23852
  this.loveLettersList = [];
23753
- this.microphoneOverlay = new _ui_MicrophoneOverlay__WEBPACK_IMPORTED_MODULE_7__.MicrophoneOverlay(this);
23853
+ this.microphoneOverlay = new _ui_MicrophoneOverlay__WEBPACK_IMPORTED_MODULE_8__.MicrophoneOverlay(this);
23754
23854
  this.diagnosticsCollector = new _features_DiagnosticsCollector__WEBPACK_IMPORTED_MODULE_3__.DiagnosticsCollector({
23755
23855
  enableBandwidthProbe: false
23756
23856
  });
@@ -23773,7 +23873,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
23773
23873
  this.addMessageHandler("version", _arcware_cloud_shared_pixelstreaming_websdk__WEBPACK_IMPORTED_MODULE_0__.Messages.ZVersion, this.onVersion);
23774
23874
  this.addMessageHandler("render", _arcware_cloud_shared_pixelstreaming_websdk__WEBPACK_IMPORTED_MODULE_0__.Messages.ZRender, this.onRender);
23775
23875
  // Create a debounced version of the handleResolutionChange function
23776
- const debouncedResolutionChange = (0,_domain_debounce__WEBPACK_IMPORTED_MODULE_8__["default"])(() => {
23876
+ const debouncedResolutionChange = (0,_domain_debounce__WEBPACK_IMPORTED_MODULE_9__["default"])(() => {
23777
23877
  this.handleResolutionChange();
23778
23878
  }, 0);
23779
23879
  // Register event listeners.
@@ -23819,7 +23919,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
23819
23919
  /** On version requested, the version of the WebSDK would be returned. */
23820
23920
  onVersion(_msg) {
23821
23921
  var _a, _b;
23822
- return (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__awaiter)(this, void 0, void 0, function* () {
23922
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__awaiter)(this, void 0, void 0, function* () {
23823
23923
  let diagnostics;
23824
23924
  try {
23825
23925
  diagnostics = yield this.diagnosticsCollector.collect();
@@ -23849,7 +23949,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
23849
23949
  }
23850
23950
  waitForFirstFrameWithTimeout(ms = 2000) {
23851
23951
  var _a, _b, _c;
23852
- return (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__awaiter)(this, void 0, void 0, function* () {
23952
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__awaiter)(this, void 0, void 0, function* () {
23853
23953
  const video = (_c = (_b = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.videoPlayer) === null || _b === void 0 ? void 0 : _b.getVideoElement) === null || _c === void 0 ? void 0 : _c.call(_b);
23854
23954
  if (this.isVideoRenderingNow(video))
23855
23955
  return true;
@@ -23887,7 +23987,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
23887
23987
  });
23888
23988
  }
23889
23989
  onRender(_msg) {
23890
- return (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__awaiter)(this, void 0, void 0, function* () {
23990
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__awaiter)(this, void 0, void 0, function* () {
23891
23991
  const isRendering = yield this.waitForFirstFrameWithTimeout();
23892
23992
  const payload = {
23893
23993
  type: "render",
@@ -23930,7 +24030,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
23930
24030
  });
23931
24031
  }
23932
24032
  }
23933
- this.applyBrandingFromSettings();
24033
+ //this.applyBrandingFromSettings();
23934
24034
  this.handleMouseLock();
23935
24035
  this.injectCustomUI();
23936
24036
  }
@@ -24272,8 +24372,6 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
24272
24372
  (_a = logoLoader.setHostElement) === null || _a === void 0 ? void 0 : _a.call(logoLoader, loaderRoot);
24273
24373
  loveLettersContainer.appendChild(lettersBlock);
24274
24374
  lettersBlock.appendChild(lettersWrapper);
24275
- // apply current (local) settings immediately
24276
- this.applyBrandingFromSettings();
24277
24375
  }
24278
24376
  }
24279
24377
  pushLetter(letter) {
@@ -24388,7 +24486,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
24388
24486
  });
24389
24487
  }
24390
24488
  applyBrandingFromSettings() {
24391
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
24489
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
24392
24490
  const cfg = ((_b = (_a = this === null || this === void 0 ? void 0 : this.config) === null || _a === void 0 ? void 0 : _a.settings.whiteLabelling) !== null && _b !== void 0 ? _b : {});
24393
24491
  // Loader image + fade
24394
24492
  try {
@@ -24397,25 +24495,36 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
24397
24495
  (_f = (_e = this.logoLoader).setFade) === null || _f === void 0 ? void 0 : _f.call(_e, cfg.loadingIconFadeMs);
24398
24496
  }
24399
24497
  }
24400
- catch (_p) { }
24401
- // Splash on loveLettersContainer (preferred), fallback to player parent
24498
+ catch (_q) { }
24499
+ // Pick splash host: loveLettersContainer (preferred) or player parent
24402
24500
  try {
24403
24501
  const el = (_m = (_g = this.loveLettersContainer) !== null && _g !== void 0 ? _g : (_l = (_k = (_j = (_h = this.webRtcController) === null || _h === void 0 ? void 0 : _h.videoPlayer) === null || _j === void 0 ? void 0 : _j.getVideoParentElement) === null || _k === void 0 ? void 0 : _k.call(_j)) === null || _l === void 0 ? void 0 : _l.parentElement) !== null && _m !== void 0 ? _m : null;
24404
24502
  if (!el)
24405
24503
  return;
24406
- // Clear previous inline choices
24407
24504
  const s = el.style;
24505
+ // Nuke previous inline styles (longhands only; never touch 'background' shorthand here)
24408
24506
  s.removeProperty("background-image");
24409
24507
  s.removeProperty("background-size");
24410
24508
  s.removeProperty("background-repeat");
24411
24509
  s.removeProperty("background-position");
24412
24510
  s.removeProperty("background-color");
24511
+ // Also clear any earlier 'background' inline shorthand that might have been set elsewhere
24512
+ // (we set to 'initial' first, then re-apply longhands)
24513
+ s.setProperty("background", "initial");
24413
24514
  el.classList.remove("aw-splash");
24414
- if (cfg.splashScreenUrl) {
24415
- el.classList.add("aw-splash"); // keeps your global defaults
24416
- // Compute mode (default to 'contain' if not provided)
24417
- const mode = ((_o = cfg.splashScreenMode) !== null && _o !== void 0 ? _o : "contain");
24418
- // Apply sizing/repeat per mode
24515
+ // If neither color nor image is provided, nothing to do
24516
+ const haveColor = !!cfg.splashScreenBgColor;
24517
+ const haveImage = !!cfg.splashScreenUrl;
24518
+ if (!haveColor && !haveImage)
24519
+ return;
24520
+ // Always ensure our class is present when we brand
24521
+ el.classList.add("aw-splash");
24522
+ // Apply color with !important so external 'background: ... !important' can't wipe it
24523
+ const bgColor = (_o = cfg.splashScreenBgColor) !== null && _o !== void 0 ? _o : "var(--color0)";
24524
+ s.setProperty("background-color", bgColor, "important");
24525
+ if (haveImage) {
24526
+ // Mode → size/repeat mapping
24527
+ const mode = ((_p = cfg.splashScreenMode) !== null && _p !== void 0 ? _p : "contain");
24419
24528
  switch (mode) {
24420
24529
  case "contain":
24421
24530
  s.backgroundSize = "contain";
@@ -24430,17 +24539,25 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
24430
24539
  s.backgroundRepeat = "no-repeat";
24431
24540
  break;
24432
24541
  case "repeat":
24433
- s.backgroundSize = "auto"; // keep intrinsic px
24542
+ s.backgroundSize = "auto"; // intrinsic
24434
24543
  s.backgroundRepeat = "repeat";
24435
24544
  break;
24436
24545
  }
24437
- // Position & color (optional)
24546
+ // Position
24438
24547
  s.backgroundPosition = cfg.splashScreenPosition || "center center";
24439
- s.backgroundColor = cfg.splashScreenBgColor || "var(--color0)";
24548
+ // Image last (longhand so it won't reset color)
24549
+ // Use quotes to be safe with URLs containing parentheses/spaces
24440
24550
  s.backgroundImage = `url("${cfg.splashScreenUrl}")`;
24441
24551
  }
24552
+ else {
24553
+ // No image → ensure any previous image is cleared
24554
+ s.backgroundImage = "none";
24555
+ s.backgroundRepeat = "no-repeat";
24556
+ s.backgroundPosition = "center center";
24557
+ s.backgroundSize = "auto";
24558
+ }
24442
24559
  }
24443
- catch (_q) { }
24560
+ catch (_r) { }
24444
24561
  }
24445
24562
  }
24446
24563
 
@@ -24454,68 +24571,70 @@ __webpack_require__.r(__webpack_exports__);
24454
24571
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24455
24572
  /* harmony export */ "ArcwareSettingsSchema": () => (/* binding */ ArcwareSettingsSchema)
24456
24573
  /* harmony export */ });
24457
- /* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1604);
24574
+ /* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1604);
24458
24575
  /* harmony import */ var _arcware_cloud_shared_pixelstreaming_websdk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7910);
24576
+ /* harmony import */ var _features_ZWhiteLabel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(467);
24577
+
24459
24578
 
24460
24579
 
24461
24580
  /** Arcware Settings. */
24462
- const ArcwareSettingsSchema = zod__WEBPACK_IMPORTED_MODULE_1__.z.object({
24581
+ const ArcwareSettingsSchema = zod__WEBPACK_IMPORTED_MODULE_2__.z.object({
24463
24582
  /** Overwrites the Session-Tool and uses the provided session instead. */
24464
- session: zod__WEBPACK_IMPORTED_MODULE_1__.z.string().optional(),
24583
+ session: zod__WEBPACK_IMPORTED_MODULE_2__.z.string().optional(),
24465
24584
  /** Can be used to be added to the request in order to verify access to private projects.
24466
24585
  * For internal use only. => Preview page.
24467
24586
  */
24468
- token: zod__WEBPACK_IMPORTED_MODULE_1__.z.string().optional(),
24587
+ token: zod__WEBPACK_IMPORTED_MODULE_2__.z.string().optional(),
24469
24588
  /** @deprecated in there for legacy use. Can only be used when token is provided. */
24470
- bypass: zod__WEBPACK_IMPORTED_MODULE_1__.z.boolean().optional(),
24589
+ bypass: zod__WEBPACK_IMPORTED_MODULE_2__.z.boolean().optional(),
24471
24590
  // /** Configure DirectFlow Token. */
24472
24591
  // directFlow: z.string().optional(),
24473
24592
  /** Handler for server side error messages. */
24474
- errorHandler: zod__WEBPACK_IMPORTED_MODULE_1__.z["function"]().args(_arcware_cloud_shared_pixelstreaming_websdk__WEBPACK_IMPORTED_MODULE_0__.Messages.ZErrorMessage).returns(zod__WEBPACK_IMPORTED_MODULE_1__.z["void"]()).optional(),
24593
+ errorHandler: zod__WEBPACK_IMPORTED_MODULE_2__.z["function"]().args(_arcware_cloud_shared_pixelstreaming_websdk__WEBPACK_IMPORTED_MODULE_0__.Messages.ZErrorMessage).returns(zod__WEBPACK_IMPORTED_MODULE_2__.z["void"]()).optional(),
24475
24594
  /** Handler for queue events. */
24476
- queueHandler: zod__WEBPACK_IMPORTED_MODULE_1__.z["function"]().args(_arcware_cloud_shared_pixelstreaming_websdk__WEBPACK_IMPORTED_MODULE_0__.Messages.ZQueue).returns(zod__WEBPACK_IMPORTED_MODULE_1__.z["void"]()).optional(),
24595
+ queueHandler: zod__WEBPACK_IMPORTED_MODULE_2__.z["function"]().args(_arcware_cloud_shared_pixelstreaming_websdk__WEBPACK_IMPORTED_MODULE_0__.Messages.ZQueue).returns(zod__WEBPACK_IMPORTED_MODULE_2__.z["void"]()).optional(),
24477
24596
  /** Handler for sessionId message. */
24478
- sessionIdHandler: zod__WEBPACK_IMPORTED_MODULE_1__.z["function"]().args(zod__WEBPACK_IMPORTED_MODULE_1__.z.string()).returns(zod__WEBPACK_IMPORTED_MODULE_1__.z["void"]()).optional(),
24597
+ sessionIdHandler: zod__WEBPACK_IMPORTED_MODULE_2__.z["function"]().args(zod__WEBPACK_IMPORTED_MODULE_2__.z.string()).returns(zod__WEBPACK_IMPORTED_MODULE_2__.z["void"]()).optional(),
24479
24598
  /** Handler for love letters.
24480
24599
  * "LoveLetters" are send from backend to the SDK to state what phase the connection currently is in. */
24481
- loveLetterHandler: zod__WEBPACK_IMPORTED_MODULE_1__.z["function"]().args(_arcware_cloud_shared_pixelstreaming_websdk__WEBPACK_IMPORTED_MODULE_0__.Messages.ZLoveLetter).returns(zod__WEBPACK_IMPORTED_MODULE_1__.z["void"]()).optional(),
24600
+ loveLetterHandler: zod__WEBPACK_IMPORTED_MODULE_2__.z["function"]().args(_arcware_cloud_shared_pixelstreaming_websdk__WEBPACK_IMPORTED_MODULE_0__.Messages.ZLoveLetter).returns(zod__WEBPACK_IMPORTED_MODULE_2__.z["void"]()).optional(),
24482
24601
  /** Show or hide the fullscreen button. */
24483
- fullscreenButton: zod__WEBPACK_IMPORTED_MODULE_1__.z.boolean().optional(),
24602
+ fullscreenButton: zod__WEBPACK_IMPORTED_MODULE_2__.z.boolean().optional(),
24484
24603
  /** Show or hide the settings button. */
24485
- settingsButton: zod__WEBPACK_IMPORTED_MODULE_1__.z.boolean().optional(),
24604
+ settingsButton: zod__WEBPACK_IMPORTED_MODULE_2__.z.boolean().optional(),
24486
24605
  /** Show or hide the info button. */
24487
- infoButton: zod__WEBPACK_IMPORTED_MODULE_1__.z.boolean().optional(),
24606
+ infoButton: zod__WEBPACK_IMPORTED_MODULE_2__.z.boolean().optional(),
24488
24607
  /** Show or hide the audio button. */
24489
- audioButton: zod__WEBPACK_IMPORTED_MODULE_1__.z.boolean().optional(),
24608
+ audioButton: zod__WEBPACK_IMPORTED_MODULE_2__.z.boolean().optional(),
24490
24609
  /** Show or hide the microphone button. */
24491
- micButton: zod__WEBPACK_IMPORTED_MODULE_1__.z.boolean().optional(),
24610
+ micButton: zod__WEBPACK_IMPORTED_MODULE_2__.z.boolean().optional(),
24492
24611
  /** Show or hide the microphone button. */
24493
- stopButton: zod__WEBPACK_IMPORTED_MODULE_1__.z.boolean().optional(),
24612
+ stopButton: zod__WEBPACK_IMPORTED_MODULE_2__.z.boolean().optional(),
24494
24613
  /** Show or hide the connectionStrengthIcon button. */
24495
- connectionStrengthIcon: zod__WEBPACK_IMPORTED_MODULE_1__.z.boolean().optional(),
24614
+ connectionStrengthIcon: zod__WEBPACK_IMPORTED_MODULE_2__.z.boolean().optional(),
24496
24615
  /** ShareId, used for sharing your project.
24497
24616
  * Using ArcwareInit will set this required property for you. */
24498
- shareId: zod__WEBPACK_IMPORTED_MODULE_1__.z.string().startsWith("share-").optional(),
24617
+ shareId: zod__WEBPACK_IMPORTED_MODULE_2__.z.string().startsWith("share-").optional(),
24499
24618
  /** Id of your project, only required if your shareId refers to multiple projects.
24500
24619
  * Using ArcwareInit will set this required property for you. */
24501
- projectId: zod__WEBPACK_IMPORTED_MODULE_1__.z.string().optional(),
24620
+ projectId: zod__WEBPACK_IMPORTED_MODULE_2__.z.string().optional(),
24502
24621
  /** Enable/Disable LoveLetter logging to the console. */
24503
- loveLetterLogging: zod__WEBPACK_IMPORTED_MODULE_1__.z.boolean().optional(),
24622
+ loveLetterLogging: zod__WEBPACK_IMPORTED_MODULE_2__.z.boolean().optional(),
24504
24623
  /** Enable/Disable Connection Identifier logging to the console. */
24505
- connectionIdentifierLoggingDisabled: zod__WEBPACK_IMPORTED_MODULE_1__.z.boolean().optional(),
24624
+ connectionIdentifierLoggingDisabled: zod__WEBPACK_IMPORTED_MODULE_2__.z.boolean().optional(),
24506
24625
  /** Width with which instance should be started */
24507
- startWidth: zod__WEBPACK_IMPORTED_MODULE_1__.z.number().optional(),
24626
+ startWidth: zod__WEBPACK_IMPORTED_MODULE_2__.z.number().optional(),
24508
24627
  /** Height with which instance should be started */
24509
- startHeight: zod__WEBPACK_IMPORTED_MODULE_1__.z.number().optional(),
24628
+ startHeight: zod__WEBPACK_IMPORTED_MODULE_2__.z.number().optional(),
24510
24629
  /** Zoom functionality */
24511
- orientationZoom: zod__WEBPACK_IMPORTED_MODULE_1__.z.object({
24512
- landscape: zod__WEBPACK_IMPORTED_MODULE_1__.z.number(),
24513
- portrait: zod__WEBPACK_IMPORTED_MODULE_1__.z.number()
24630
+ orientationZoom: zod__WEBPACK_IMPORTED_MODULE_2__.z.object({
24631
+ landscape: zod__WEBPACK_IMPORTED_MODULE_2__.z.number(),
24632
+ portrait: zod__WEBPACK_IMPORTED_MODULE_2__.z.number()
24514
24633
  })
24515
24634
  .strict()
24516
24635
  .optional(),
24517
24636
  /** Loader customization */
24518
- whiteLabelling: _arcware_cloud_shared_pixelstreaming_websdk__WEBPACK_IMPORTED_MODULE_0__.ZWhiteLabel.optional()
24637
+ whiteLabelling: _features_ZWhiteLabel__WEBPACK_IMPORTED_MODULE_1__.ZWhiteLabel.optional()
24519
24638
  });
24520
24639
 
24521
24640
 
@@ -25316,6 +25435,39 @@ class DiagnosticsCollector {
25316
25435
  }
25317
25436
 
25318
25437
 
25438
+ /***/ }),
25439
+
25440
+ /***/ 467:
25441
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25442
+
25443
+ __webpack_require__.r(__webpack_exports__);
25444
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25445
+ /* harmony export */ "ZWhiteLabel": () => (/* binding */ ZWhiteLabel)
25446
+ /* harmony export */ });
25447
+ /* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1604);
25448
+
25449
+ /** Absolute HTTPS URL (no http) */
25450
+ const AbsoluteHttpsUrl = zod__WEBPACK_IMPORTED_MODULE_0__.z.string()
25451
+ .url()
25452
+ .refine((u) => u.startsWith("https://"), { message: "URL must use https://" });
25453
+ /** Relative path (no scheme like http:, data:, javascript:, etc.) */
25454
+ const RelativePath = zod__WEBPACK_IMPORTED_MODULE_0__.z.string()
25455
+ .min(1)
25456
+ .refine((s) => !/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(s), { message: "Expected a relative path without a URL scheme" });
25457
+ /** Image URL can be absolute (https) or relative (e.g. /assets/logo.png, ./img.png) */
25458
+ const ImageUrl = zod__WEBPACK_IMPORTED_MODULE_0__.z.union([AbsoluteHttpsUrl, RelativePath]);
25459
+ /** Strict allowlist for white-label brand fields coming from the URL */
25460
+ const ZWhiteLabel = zod__WEBPACK_IMPORTED_MODULE_0__.z.object({
25461
+ loadingIconUrl: ImageUrl.optional(),
25462
+ loadingIconFadeMs: zod__WEBPACK_IMPORTED_MODULE_0__.z.number().int().positive().optional(),
25463
+ splashScreenUrl: ImageUrl.optional(),
25464
+ splashScreenMode: zod__WEBPACK_IMPORTED_MODULE_0__.z["enum"](["contain", "cover", "stretch", "repeat"]).optional(),
25465
+ splashScreenPosition: zod__WEBPACK_IMPORTED_MODULE_0__.z.string().optional(),
25466
+ splashScreenBgColor: zod__WEBPACK_IMPORTED_MODULE_0__.z.string().optional()
25467
+ })
25468
+ .strict();
25469
+
25470
+
25319
25471
  /***/ }),
25320
25472
 
25321
25473
  /***/ 2483:
@@ -25453,7 +25605,7 @@ __webpack_require__.r(__webpack_exports__);
25453
25605
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25454
25606
  /* harmony export */ "readWhiteLabelFromQuery": () => (/* binding */ readWhiteLabelFromQuery)
25455
25607
  /* harmony export */ });
25456
- /* harmony import */ var _arcware_cloud_shared_pixelstreaming_websdk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7910);
25608
+ /* harmony import */ var _ZWhiteLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(467);
25457
25609
 
25458
25610
  function decodeBase64OrBase64Url(raw) {
25459
25611
  const normalized = raw.replace(/-/g, "+").replace(/_/g, "/");
@@ -25465,14 +25617,13 @@ function decodeBase64OrBase64Url(raw) {
25465
25617
  }
25466
25618
  /** Parse ?wl=... (or ?whitelabel=...) → validated partial settings */
25467
25619
  function readWhiteLabelFromQuery(qs) {
25468
- var _a;
25469
25620
  try {
25470
- const raw = (_a = qs.get("wl")) !== null && _a !== void 0 ? _a : qs.get("whitelabel");
25621
+ const raw = qs.get("wl");
25471
25622
  if (!raw)
25472
25623
  return undefined;
25473
25624
  const jsonStr = decodeBase64OrBase64Url(raw);
25474
25625
  const obj = JSON.parse(jsonStr);
25475
- const parsed = _arcware_cloud_shared_pixelstreaming_websdk__WEBPACK_IMPORTED_MODULE_0__.ZWhiteLabel.safeParse(obj);
25626
+ const parsed = _ZWhiteLabel__WEBPACK_IMPORTED_MODULE_0__.ZWhiteLabel.safeParse(obj);
25476
25627
  if (!parsed.success) {
25477
25628
  //console.warn("[ArcwareConfig] Invalid wl payload:", parsed.error?.flatten?.());
25478
25629
  return undefined;
@@ -26737,8 +26888,7 @@ class StopIcon {
26737
26888
 
26738
26889
  __webpack_require__.r(__webpack_exports__);
26739
26890
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
26740
- /* harmony export */ "Messages": () => (/* reexport safe */ _lib__WEBPACK_IMPORTED_MODULE_0__.Messages),
26741
- /* harmony export */ "ZWhiteLabel": () => (/* reexport safe */ _lib__WEBPACK_IMPORTED_MODULE_0__.ZWhiteLabel)
26891
+ /* harmony export */ "Messages": () => (/* reexport safe */ _lib__WEBPACK_IMPORTED_MODULE_0__.Messages)
26742
26892
  /* harmony export */ });
26743
26893
  /* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(318);
26744
26894
 
@@ -27221,39 +27371,6 @@ const Send = {
27221
27371
  };
27222
27372
 
27223
27373
 
27224
- /***/ }),
27225
-
27226
- /***/ 6750:
27227
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27228
-
27229
- __webpack_require__.r(__webpack_exports__);
27230
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27231
- /* harmony export */ "ZWhiteLabel": () => (/* binding */ ZWhiteLabel)
27232
- /* harmony export */ });
27233
- /* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1604);
27234
-
27235
- /** Absolute HTTPS URL (no http) */
27236
- const AbsoluteHttpsUrl = zod__WEBPACK_IMPORTED_MODULE_0__.z.string()
27237
- .url()
27238
- .refine((u) => u.startsWith("https://"), { message: "URL must use https://" });
27239
- /** Relative path (no scheme like http:, data:, javascript:, etc.) */
27240
- const RelativePath = zod__WEBPACK_IMPORTED_MODULE_0__.z.string()
27241
- .min(1)
27242
- .refine((s) => !/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(s), { message: "Expected a relative path without a URL scheme" });
27243
- /** Image URL can be absolute (https) or relative (e.g. /assets/logo.png, ./img.png) */
27244
- const ImageUrl = zod__WEBPACK_IMPORTED_MODULE_0__.z.union([AbsoluteHttpsUrl, RelativePath]);
27245
- /** Strict allowlist for white-label brand fields coming from the URL */
27246
- const ZWhiteLabel = zod__WEBPACK_IMPORTED_MODULE_0__.z.object({
27247
- loadingIconUrl: ImageUrl.optional(),
27248
- loadingIconFadeMs: zod__WEBPACK_IMPORTED_MODULE_0__.z.number().int().positive().optional(),
27249
- splashScreenUrl: ImageUrl.optional(),
27250
- splashScreenMode: zod__WEBPACK_IMPORTED_MODULE_0__.z["enum"](["contain", "cover", "stretch", "repeat"]).optional(),
27251
- splashScreenPosition: zod__WEBPACK_IMPORTED_MODULE_0__.z.string().optional(),
27252
- splashScreenBgColor: zod__WEBPACK_IMPORTED_MODULE_0__.z.string().optional()
27253
- })
27254
- .strict();
27255
-
27256
-
27257
27374
  /***/ }),
27258
27375
 
27259
27376
  /***/ 318:
@@ -27261,12 +27378,9 @@ const ZWhiteLabel = zod__WEBPACK_IMPORTED_MODULE_0__.z.object({
27261
27378
 
27262
27379
  __webpack_require__.r(__webpack_exports__);
27263
27380
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27264
- /* harmony export */ "Messages": () => (/* reexport module object */ _Messages__WEBPACK_IMPORTED_MODULE_0__),
27265
- /* harmony export */ "ZWhiteLabel": () => (/* reexport safe */ _Types_ZWhiteLabel__WEBPACK_IMPORTED_MODULE_1__.ZWhiteLabel)
27381
+ /* harmony export */ "Messages": () => (/* reexport module object */ _Messages__WEBPACK_IMPORTED_MODULE_0__)
27266
27382
  /* harmony export */ });
27267
27383
  /* harmony import */ var _Messages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5387);
27268
- /* harmony import */ var _Types_ZWhiteLabel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6750);
27269
-
27270
27384
 
27271
27385
 
27272
27386