@arcware-cloud/pixelstreaming-websdk 1.3.12 → 1.3.15

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.umd.js CHANGED
@@ -23363,10 +23363,13 @@ exports.ArcwareApplication = ArcwareApplication;
23363
23363
 
23364
23364
  Object.defineProperty(exports, "__esModule", ({ value: true }));
23365
23365
  exports.ArcwareConfig = exports.DefaultUrl = void 0;
23366
+ const tslib_1 = __webpack_require__(655);
23366
23367
  const zod_1 = __webpack_require__(8754);
23367
23368
  const lib_pixelstreamingfrontend_ue5_5_1 = __webpack_require__(693);
23368
23369
  const Session_1 = __webpack_require__(2469);
23369
23370
  const ArcwareSettingsSchema_1 = __webpack_require__(5602);
23371
+ const whiteLabelling_1 = __webpack_require__(3545);
23372
+ const ZWhiteLabel_1 = __webpack_require__(467);
23370
23373
  /** Default arcware signalling endpoint. */
23371
23374
  exports.DefaultUrl = `wss://signalling-client.ragnarok.arcware.cloud`;
23372
23375
  // The below Logger overrides can likely be removed as PSInfra 5.5 logger supports setting log verbosity
@@ -23409,7 +23412,7 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
23409
23412
  };
23410
23413
  }
23411
23414
  constructor(config) {
23412
- var _a, _b;
23415
+ var _a, _b, _c;
23413
23416
  const dfToken = new URL(window.location.href).search
23414
23417
  .slice(1)
23415
23418
  .split("&")
@@ -23430,7 +23433,7 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
23430
23433
  if (!config.initialSettings.ss)
23431
23434
  config.initialSettings.ss = exports.DefaultUrl;
23432
23435
  super(config);
23433
- this.VERSION = "1.3.12";
23436
+ this.VERSION = "1.3.15";
23434
23437
  this.settings = settings;
23435
23438
  this.session = new Session_1.Session();
23436
23439
  this._initialSettings = config.initialSettings;
@@ -23439,6 +23442,72 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
23439
23442
  // IMPORTANT NOTE: The feature BrowserSendOffer is no longer supported in PSInfra 5.5.
23440
23443
  // The offer is now expected to come from UE. Ensure that your signalling server supports this behaviour.
23441
23444
  //this.setFlagEnabled(Flags.BrowserSendOffer, true);
23445
+ if (this.useUrlParams) {
23446
+ // Get the query string from URL
23447
+ const qs = new URLSearchParams(window.location.search);
23448
+ if (qs.has("wl") && qs.get("wl") !== "") {
23449
+ // Retrieve image loading from there
23450
+ const wlParsed = this.useUrlParams ? (0, whiteLabelling_1.readWhiteLabelFromQuery)(qs) : undefined; // respect useUrlParams
23451
+ if (wlParsed) {
23452
+ this.settings.whiteLabelling = Object.assign(Object.assign({}, ((_c = this.settings.whiteLabelling) !== null && _c !== void 0 ? _c : {})), wlParsed);
23453
+ }
23454
+ }
23455
+ this.settings.infoButton = qs.has("i") || qs.has("info");
23456
+ }
23457
+ }
23458
+ static getWhiteLabelling(ShareId, URL = "https://signalling-client.arcware.cloud/whiteLabel/") {
23459
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
23460
+ const qs = new URLSearchParams(window.location.search);
23461
+ if (qs.has("wl") && qs.get("wl") === "") {
23462
+ // Build final URL safely (trim trailing slashes, encode ShareId)
23463
+ const base = URL.replace(/\/+$/, "");
23464
+ const requestUrl = `${base}/${encodeURIComponent(ShareId)}`;
23465
+ const controller = new AbortController();
23466
+ const timeoutId = setTimeout(() => controller.abort(), 1000);
23467
+ try {
23468
+ const res = yield fetch(requestUrl, {
23469
+ method: "GET",
23470
+ signal: controller.signal,
23471
+ headers: { Accept: "application/json, text/plain" },
23472
+ credentials: "omit"
23473
+ });
23474
+ if (!res.ok) {
23475
+ // Non-2xx: treat as “no white label”
23476
+ return undefined;
23477
+ }
23478
+ // We read as text first to detect empty-string payloads
23479
+ const text = yield res.text();
23480
+ if (!text || text.trim() === "") {
23481
+ return undefined;
23482
+ }
23483
+ // If there is content, try to parse JSON
23484
+ let json;
23485
+ try {
23486
+ json = JSON.parse(text);
23487
+ }
23488
+ catch (_a) {
23489
+ // Not valid JSON → ignore
23490
+ return undefined;
23491
+ }
23492
+ // Validate against the allowlisted schema
23493
+ const parsed = ZWhiteLabel_1.ZWhiteLabel.safeParse(json);
23494
+ if (!parsed.success) {
23495
+ // Optionally log parsed.error for diagnostics
23496
+ return undefined;
23497
+ }
23498
+ return parsed.data;
23499
+ }
23500
+ catch (err) {
23501
+ // Abort or network error → treat as “no white label”
23502
+ // if (err?.name !== "AbortError") console.warn("getWhiteLabelling failed", err);
23503
+ return undefined;
23504
+ }
23505
+ finally {
23506
+ clearTimeout(timeoutId);
23507
+ }
23508
+ }
23509
+ return undefined;
23510
+ });
23442
23511
  }
23443
23512
  /** Setup connection string. */
23444
23513
  get urlFlags() {
@@ -23546,7 +23615,14 @@ function ArcwareInit({ shareId, projectId }, configuration, forceRefresh = false
23546
23615
  useUrlParams: (configuration === null || configuration === void 0 ? void 0 : configuration.useUrlParams) === true,
23547
23616
  initialSettings: Object.assign({ ss: ArcwareConfig_1.DefaultUrl, AutoConnect: false, StartVideoMuted: true, AutoPlayVideo: true, KeyboardInput: true, MouseInput: true, GamepadInput: true, TouchInput: true, XRControllerInput: true, UseMic: true, SuppressBrowserKeys: true, FakeMouseWithTouches: false, ForceMonoAudio: false, HoveringMouse: true }, configuration === null || configuration === void 0 ? void 0 : configuration.initialSettings),
23548
23617
  settings: Object.assign({ shareId,
23549
- projectId, fullscreenButton: true, audioButton: true, stopButton: false, infoButton: false, micButton: false, settingsButton: false, connectionStrengthIcon: false, connectionIdentifierLoggingDisabled: undefined, errorHandler: undefined, loveLetterHandler: undefined, loveLetterLogging: undefined, queueHandler: undefined, sessionIdHandler: undefined, startHeight: undefined, startWidth: undefined, orientationZoom: undefined }, configuration === null || configuration === void 0 ? void 0 : configuration.settings)
23618
+ projectId, fullscreenButton: true, audioButton: true, stopButton: false, infoButton: false, micButton: false, settingsButton: false, connectionStrengthIcon: false, connectionIdentifierLoggingDisabled: undefined, errorHandler: undefined, loveLetterHandler: undefined, loveLetterLogging: undefined, queueHandler: undefined, sessionIdHandler: undefined, startHeight: undefined, startWidth: undefined, orientationZoom: undefined, whiteLabelling: {
23619
+ splashScreenUrl: undefined,
23620
+ loadingIconFadeMs: undefined,
23621
+ loadingIconUrl: undefined,
23622
+ splashScreenMode: undefined,
23623
+ splashScreenPosition: undefined,
23624
+ splashScreenBgColor: undefined
23625
+ } }, configuration === null || configuration === void 0 ? void 0 : configuration.settings)
23550
23626
  });
23551
23627
  const PixelStreaming = new ArcwarePixelStreaming_1.ArcwarePixelStreaming(Config);
23552
23628
  const Application = new ArcwareApplication_1.ArcwareApplication({ stream: PixelStreaming });
@@ -23895,6 +23971,7 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
23895
23971
  });
23896
23972
  }
23897
23973
  }
23974
+ this.applyBrandingFromSettings();
23898
23975
  this.handleMouseLock();
23899
23976
  this.injectCustomUI();
23900
23977
  }
@@ -24142,12 +24219,12 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
24142
24219
  // Zoom level for orientation change if provided
24143
24220
  if (orientationZoom) {
24144
24221
  if (browserWidth < browserHeight) {
24145
- if (orientationZoom.hasOwnProperty('portrait'))
24222
+ if (orientationZoom.hasOwnProperty("portrait"))
24146
24223
  (_a = this === null || this === void 0 ? void 0 : this.webRtcController) === null || _a === void 0 ? void 0 : _a.emitUIInteraction({
24147
24224
  zoom: orientationZoom.portrait
24148
24225
  });
24149
24226
  }
24150
- else if (orientationZoom.hasOwnProperty('landscape')) {
24227
+ else if (orientationZoom.hasOwnProperty("landscape")) {
24151
24228
  (_b = this === null || this === void 0 ? void 0 : this.webRtcController) === null || _b === void 0 ? void 0 : _b.emitUIInteraction({
24152
24229
  zoom: orientationZoom.landscape
24153
24230
  });
@@ -24217,26 +24294,27 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
24217
24294
  initLoveLettersContainer() {
24218
24295
  var _a;
24219
24296
  const logoLoader = new ArcwareLogoLoader_1.ArcwareLogoLoader();
24297
+ this.logoLoader = logoLoader;
24220
24298
  if (!this.loveLettersContainer) {
24221
- const loveLettersContainer = document === null || document === void 0 ? void 0 : document.createElement("div");
24222
- const { videoPlayer } = this === null || this === void 0 ? void 0 : this.webRtcController;
24299
+ const loveLettersContainer = document.createElement("div");
24300
+ this.loveLettersContainer = loveLettersContainer; // keep the ref
24301
+ const { videoPlayer } = this.webRtcController;
24223
24302
  const videoElementParent = videoPlayer.getVideoParentElement();
24224
- (_a = loveLettersContainer === null || loveLettersContainer === void 0 ? void 0 : loveLettersContainer.classList) === null || _a === void 0 ? void 0 : _a.add("love-letters-box-root");
24225
- videoElementParent === null || videoElementParent === void 0 ? void 0 : videoElementParent.appendChild(loveLettersContainer);
24226
- const lettersBlock = document === null || document === void 0 ? void 0 : document.createElement("div");
24303
+ loveLettersContainer.classList.add("love-letters-box-root");
24304
+ videoElementParent.appendChild(loveLettersContainer);
24305
+ const lettersBlock = document.createElement("div");
24227
24306
  lettersBlock.id = "letters-block";
24228
- const lettersWrapper = document === null || document === void 0 ? void 0 : document.createElement("div");
24307
+ const lettersWrapper = document.createElement("div");
24229
24308
  lettersWrapper.id = "letters-wrapper";
24230
- if (loveLettersContainer) {
24231
- lettersBlock === null || lettersBlock === void 0 ? void 0 : lettersBlock.appendChild(logoLoader === null || logoLoader === void 0 ? void 0 : logoLoader.arcwareLogoLoader);
24232
- loveLettersContainer === null || loveLettersContainer === void 0 ? void 0 : loveLettersContainer.appendChild(lettersBlock);
24233
- lettersBlock === null || lettersBlock === void 0 ? void 0 : lettersBlock.appendChild(lettersWrapper);
24234
- }
24235
- lettersBlock.innerHTML = "";
24236
- if (lettersBlock) {
24237
- lettersBlock === null || lettersBlock === void 0 ? void 0 : lettersBlock.appendChild(logoLoader === null || logoLoader === void 0 ? void 0 : logoLoader.arcwareLogoLoader);
24238
- lettersBlock === null || lettersBlock === void 0 ? void 0 : lettersBlock.appendChild(lettersWrapper);
24239
- }
24309
+ // append your existing loader root (with SVG) into the lettersBlock
24310
+ const loaderRoot = logoLoader.arcwareLogoLoader; // your existing getter
24311
+ lettersBlock.appendChild(loaderRoot);
24312
+ // ensure the loader knows its host
24313
+ (_a = logoLoader.setHostElement) === null || _a === void 0 ? void 0 : _a.call(logoLoader, loaderRoot);
24314
+ loveLettersContainer.appendChild(lettersBlock);
24315
+ lettersBlock.appendChild(lettersWrapper);
24316
+ // apply current (local) settings immediately
24317
+ this.applyBrandingFromSettings();
24240
24318
  }
24241
24319
  }
24242
24320
  pushLetter(letter) {
@@ -24342,8 +24420,7 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
24342
24420
  }
24343
24421
  }
24344
24422
  injectCustomUI() {
24345
- (0, common_1.waitForElement)('#stream-ui')
24346
- .then(el => {
24423
+ (0, common_1.waitForElement)("#stream-ui").then((el) => {
24347
24424
  var _a;
24348
24425
  const videoElementParent = (_a = this === null || this === void 0 ? void 0 : this.videoElementParent) === null || _a === void 0 ? void 0 : _a.parentElement;
24349
24426
  if (videoElementParent) {
@@ -24351,6 +24428,80 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
24351
24428
  }
24352
24429
  });
24353
24430
  }
24431
+ applyBrandingFromSettings() {
24432
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
24433
+ 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 : {});
24434
+ // Loader image + fade
24435
+ try {
24436
+ if (this.logoLoader) {
24437
+ (_d = (_c = this.logoLoader).setImage) === null || _d === void 0 ? void 0 : _d.call(_c, cfg.loadingIconUrl);
24438
+ (_f = (_e = this.logoLoader).setFade) === null || _f === void 0 ? void 0 : _f.call(_e, cfg.loadingIconFadeMs);
24439
+ }
24440
+ }
24441
+ catch (_q) { }
24442
+ // Pick splash host: loveLettersContainer (preferred) or player parent
24443
+ try {
24444
+ 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;
24445
+ if (!el)
24446
+ return;
24447
+ const s = el.style;
24448
+ // Nuke previous inline styles (longhands only; never touch 'background' shorthand here)
24449
+ s.removeProperty("background-image");
24450
+ s.removeProperty("background-size");
24451
+ s.removeProperty("background-repeat");
24452
+ s.removeProperty("background-position");
24453
+ s.removeProperty("background-color");
24454
+ // Also clear any earlier 'background' inline shorthand that might have been set elsewhere
24455
+ // (we set to 'initial' first, then re-apply longhands)
24456
+ s.setProperty("background", "initial");
24457
+ el.classList.remove("aw-splash");
24458
+ // If neither color nor image is provided, nothing to do
24459
+ const haveColor = !!cfg.splashScreenBgColor;
24460
+ const haveImage = !!cfg.splashScreenUrl;
24461
+ if (!haveColor && !haveImage)
24462
+ return;
24463
+ // Always ensure our class is present when we brand
24464
+ el.classList.add("aw-splash");
24465
+ // Apply color with !important so external 'background: ... !important' can't wipe it
24466
+ const bgColor = (_o = cfg.splashScreenBgColor) !== null && _o !== void 0 ? _o : "var(--color0)";
24467
+ s.setProperty("background-color", bgColor, "important");
24468
+ if (haveImage) {
24469
+ // Mode → size/repeat mapping
24470
+ const mode = ((_p = cfg.splashScreenMode) !== null && _p !== void 0 ? _p : "contain");
24471
+ switch (mode) {
24472
+ case "contain":
24473
+ s.backgroundSize = "contain";
24474
+ s.backgroundRepeat = "no-repeat";
24475
+ break;
24476
+ case "cover":
24477
+ s.backgroundSize = "cover";
24478
+ s.backgroundRepeat = "no-repeat";
24479
+ break;
24480
+ case "stretch":
24481
+ s.backgroundSize = "100% 100%";
24482
+ s.backgroundRepeat = "no-repeat";
24483
+ break;
24484
+ case "repeat":
24485
+ s.backgroundSize = "auto"; // intrinsic
24486
+ s.backgroundRepeat = "repeat";
24487
+ break;
24488
+ }
24489
+ // Position
24490
+ s.backgroundPosition = cfg.splashScreenPosition || "center center";
24491
+ // Image last (longhand so it won't reset color)
24492
+ // Use quotes to be safe with URLs containing parentheses/spaces
24493
+ s.backgroundImage = `url("${cfg.splashScreenUrl}")`;
24494
+ }
24495
+ else {
24496
+ // No image → ensure any previous image is cleared
24497
+ s.backgroundImage = "none";
24498
+ s.backgroundRepeat = "no-repeat";
24499
+ s.backgroundPosition = "center center";
24500
+ s.backgroundSize = "auto";
24501
+ }
24502
+ }
24503
+ catch (_r) { }
24504
+ }
24354
24505
  }
24355
24506
  exports.ArcwarePixelStreaming = ArcwarePixelStreaming;
24356
24507
 
@@ -24365,6 +24516,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
24365
24516
  exports.ArcwareSettingsSchema = void 0;
24366
24517
  const zod_1 = __webpack_require__(8754);
24367
24518
  const shared_pixelstreaming_websdk_1 = __webpack_require__(7910);
24519
+ const ZWhiteLabel_1 = __webpack_require__(467);
24368
24520
  /** Arcware Settings. */
24369
24521
  exports.ArcwareSettingsSchema = zod_1.z.object({
24370
24522
  /** Overwrites the Session-Tool and uses the provided session instead. */
@@ -24415,10 +24567,15 @@ exports.ArcwareSettingsSchema = zod_1.z.object({
24415
24567
  /** Height with which instance should be started */
24416
24568
  startHeight: zod_1.z.number().optional(),
24417
24569
  /** Zoom functionality */
24418
- orientationZoom: zod_1.z.object({
24570
+ orientationZoom: zod_1.z
24571
+ .object({
24419
24572
  landscape: zod_1.z.number(),
24420
- portrait: zod_1.z.number(),
24421
- }).strict().optional()
24573
+ portrait: zod_1.z.number()
24574
+ })
24575
+ .strict()
24576
+ .optional(),
24577
+ /** Loader customization */
24578
+ whiteLabelling: ZWhiteLabel_1.ZWhiteLabel.optional()
24422
24579
  });
24423
24580
 
24424
24581
 
@@ -25209,6 +25366,40 @@ class DiagnosticsCollector {
25209
25366
  exports.DiagnosticsCollector = DiagnosticsCollector;
25210
25367
 
25211
25368
 
25369
+ /***/ }),
25370
+
25371
+ /***/ 467:
25372
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
25373
+
25374
+
25375
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
25376
+ exports.ZWhiteLabel = void 0;
25377
+ const zod_1 = __webpack_require__(8754);
25378
+ /** Absolute HTTPS URL (no http) */
25379
+ const AbsoluteHttpsUrl = zod_1.z
25380
+ .string()
25381
+ .url()
25382
+ .refine((u) => u.startsWith("https://"), { message: "URL must use https://" });
25383
+ /** Relative path (no scheme like http:, data:, javascript:, etc.) */
25384
+ const RelativePath = zod_1.z
25385
+ .string()
25386
+ .min(1)
25387
+ .refine((s) => !/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(s), { message: "Expected a relative path without a URL scheme" });
25388
+ /** Image URL can be absolute (https) or relative (e.g. /assets/logo.png, ./img.png) */
25389
+ const ImageUrl = zod_1.z.union([AbsoluteHttpsUrl, RelativePath]);
25390
+ /** Strict allowlist for white-label brand fields coming from the URL */
25391
+ exports.ZWhiteLabel = zod_1.z
25392
+ .object({
25393
+ loadingIconUrl: ImageUrl.optional(),
25394
+ loadingIconFadeMs: zod_1.z.number().int().positive().optional(),
25395
+ splashScreenUrl: ImageUrl.optional(),
25396
+ splashScreenMode: zod_1.z.enum(["contain", "cover", "stretch", "repeat"]).optional(),
25397
+ splashScreenPosition: zod_1.z.string().optional(),
25398
+ splashScreenBgColor: zod_1.z.string().optional()
25399
+ })
25400
+ .strict();
25401
+
25402
+
25212
25403
  /***/ }),
25213
25404
 
25214
25405
  /***/ 2483:
@@ -25337,6 +25528,46 @@ function waitForElement(selector, { root = document, timeout = 3000 } = {}) {
25337
25528
  exports.waitForElement = waitForElement;
25338
25529
 
25339
25530
 
25531
+ /***/ }),
25532
+
25533
+ /***/ 3545:
25534
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
25535
+
25536
+
25537
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
25538
+ exports.readWhiteLabelFromQuery = void 0;
25539
+ const ZWhiteLabel_1 = __webpack_require__(467);
25540
+ function decodeBase64OrBase64Url(raw) {
25541
+ const normalized = raw.replace(/-/g, "+").replace(/_/g, "/");
25542
+ const padded = normalized + "===".slice((normalized.length + 3) % 4);
25543
+ if (typeof atob === "function")
25544
+ return atob(padded);
25545
+ // @ts-ignore (Node fallback if this runs server-side)
25546
+ return Buffer.from(padded, "base64").toString("utf-8");
25547
+ }
25548
+ /** Parse ?wl=... (or ?whitelabel=...) → validated partial settings */
25549
+ function readWhiteLabelFromQuery(qs) {
25550
+ try {
25551
+ const raw = qs.get("wl");
25552
+ if (!raw)
25553
+ return undefined;
25554
+ const jsonStr = decodeBase64OrBase64Url(raw);
25555
+ const obj = JSON.parse(jsonStr);
25556
+ const parsed = ZWhiteLabel_1.ZWhiteLabel.safeParse(obj);
25557
+ if (!parsed.success) {
25558
+ //console.warn("[ArcwareConfig] Invalid wl payload:", parsed.error?.flatten?.());
25559
+ return undefined;
25560
+ }
25561
+ return parsed.data;
25562
+ }
25563
+ catch (e) {
25564
+ //console.warn("[ArcwareConfig] Failed to parse wl payload:", e);
25565
+ return undefined;
25566
+ }
25567
+ }
25568
+ exports.readWhiteLabelFromQuery = readWhiteLabelFromQuery;
25569
+
25570
+
25340
25571
  /***/ }),
25341
25572
 
25342
25573
  /***/ 9399:
@@ -25377,16 +25608,27 @@ exports.ArcwareStyles = {
25377
25608
  "--color11": "rgba(65,0,139,1) !important",
25378
25609
  "--color12": "#222224 !important",
25379
25610
  "--color13": "#f0f0f2 !important",
25380
- "--colorBoxShadow": "rgba(0, 0, 0, 0.20) !important",
25611
+ "--colorBoxShadow": "rgba(0, 0, 0, 0.20) !important"
25612
+ },
25613
+ ".aw-splash": {
25614
+ backgroundRepeat: "no-repeat",
25615
+ backgroundPosition: "center center",
25616
+ backgroundSize: "contain",
25617
+ backgroundColor: "var(--color0)"
25618
+ },
25619
+ "@keyframes aw-loader-fade": {
25620
+ from: { opacity: 0.25 },
25621
+ to: { opacity: 1 }
25381
25622
  },
25623
+ /* ---------- /NEW ---------- */
25382
25624
  "#playerUI *": {
25383
- fontFamily: "system-ui",
25625
+ fontFamily: "system-ui"
25384
25626
  },
25385
25627
  "#shared-stream-container": {
25386
- boxSizing: "border-box",
25628
+ boxSizing: "border-box"
25387
25629
  },
25388
25630
  "#shared-stream-container::-webkit-scrollbar": {
25389
- width: "10px",
25631
+ width: "10px"
25390
25632
  },
25391
25633
  "#shared-stream-container::-webkit-scrollbar-track": {
25392
25634
  background: "var(--color13)",
@@ -25395,10 +25637,10 @@ exports.ArcwareStyles = {
25395
25637
  borderTop: "20px solid var(--color0)",
25396
25638
  borderRight: "5px solid var(--color0)",
25397
25639
  borderBottom: "20px solid var(--color0)",
25398
- borderLeft: "5px solid var(--color0)",
25640
+ borderLeft: "5px solid var(--color0)"
25399
25641
  },
25400
25642
  "#shared-stream-container::-webkit-scrollbar-track-piece": {
25401
- background: "transparent",
25643
+ background: "transparent"
25402
25644
  },
25403
25645
  "#shared-stream-container::-webkit-scrollbar-thumb": {
25404
25646
  background: "var(--color13)",
@@ -25406,11 +25648,11 @@ exports.ArcwareStyles = {
25406
25648
  borderRight: "2px solid var(--color0)",
25407
25649
  borderLeft: "2px solid var(--color0)",
25408
25650
  transition: "all ease-in-out 0.3s",
25409
- borderRadius: "7px",
25651
+ borderRadius: "7px"
25410
25652
  },
25411
25653
  "#shared-stream-container::-webkit-scrollbar-thumb:hover": {
25412
25654
  transition: "all ease-in-out 0.3s",
25413
- background: "var(--color3)",
25655
+ background: "var(--color3)"
25414
25656
  },
25415
25657
  "#playerUI, #videoElementParent": {
25416
25658
  position: "absolute",
@@ -25424,13 +25666,13 @@ exports.ArcwareStyles = {
25424
25666
  left: 0,
25425
25667
  margin: "auto",
25426
25668
  boxSizing: "border-box",
25427
- pointerEvents: "all",
25669
+ pointerEvents: "all"
25428
25670
  },
25429
25671
  "#streamingVideo": {
25430
25672
  maxWidth: "100%",
25431
25673
  maxHeight: "100%",
25432
25674
  boxSizing: "border-box",
25433
- background: "#18181A",
25675
+ background: "#18181A"
25434
25676
  },
25435
25677
  "#uiFeatures #controls": {
25436
25678
  top: "auto",
@@ -25438,13 +25680,13 @@ exports.ArcwareStyles = {
25438
25680
  bottom: "10px",
25439
25681
  right: "20px",
25440
25682
  display: "flex",
25441
- flexDirection: "column-reverse",
25683
+ flexDirection: "column-reverse"
25442
25684
  },
25443
25685
  "#uiFeatures #connection": {
25444
25686
  bottom: "5px",
25445
25687
  left: "10px",
25446
25688
  width: "2.5rem",
25447
- heihgt: "2.5rem",
25689
+ heihgt: "2.5rem"
25448
25690
  },
25449
25691
  "#uiFeatures button": {
25450
25692
  backgroundColor: "var(--color12)",
@@ -25461,23 +25703,23 @@ exports.ArcwareStyles = {
25461
25703
  alignItems: "center",
25462
25704
  boxShadow: "0px 0px 24px 0px var(--colorBoxShadow)",
25463
25705
  borderRadius: "3px",
25464
- outline: "none",
25706
+ outline: "none"
25465
25707
  },
25466
25708
  "#uiFeatures button:hover, #uiFeatures button:active": {
25467
25709
  padding: "0 !important",
25468
- border: "none",
25710
+ border: "none"
25469
25711
  },
25470
25712
  "#uiFeatures button #audioIconMuted, #uiFeatures button #audioIconUnmuted, #uiFeatures button #micIconMuted, #uiFeatures button #micIconUnmuted": {
25471
25713
  width: "31px",
25472
- height: "28px",
25714
+ height: "28px"
25473
25715
  },
25474
25716
  "#uiFeatures button #maximizeIcon, #uiFeatures button #minimizeIcon": {
25475
25717
  width: "25px",
25476
- height: "25px",
25718
+ height: "25px"
25477
25719
  },
25478
25720
  "#stopIcon, #playIcon": {
25479
25721
  width: "30px",
25480
- height: "30px",
25722
+ height: "30px"
25481
25723
  },
25482
25724
  "#uiFeatures button .tooltiptext": {
25483
25725
  right: "125%",
@@ -25486,35 +25728,35 @@ exports.ArcwareStyles = {
25486
25728
  borderRadius: "3px",
25487
25729
  backgroundColor: "var(--color12)",
25488
25730
  width: "95px",
25489
- visibility: "hidden!important",
25731
+ visibility: "hidden!important"
25490
25732
  },
25491
25733
  "@media (hover: hover) and (pointer: fine)": {
25492
25734
  "#uiFeatures button:hover .tooltiptext": {
25493
- visibility: "visible!important",
25494
- },
25735
+ visibility: "visible!important"
25736
+ }
25495
25737
  },
25496
25738
  "#controls>*": {
25497
25739
  marginBottom: "0.5rem",
25498
25740
  display: "block",
25499
25741
  lineHeight: "1.75rem",
25500
25742
  padding: "0.5rem",
25501
- backgroundColor: "var(--color12)",
25743
+ backgroundColor: "var(--color12)"
25502
25744
  },
25503
25745
  "#uiFeatures #settingsIcon, #uiFeatures #statsIcon": {
25504
25746
  width: "27px",
25505
- height: "27px",
25747
+ height: "27px"
25506
25748
  },
25507
25749
  ".svgIcon": {
25508
- fill: "var(--color13)",
25750
+ fill: "var(--color13)"
25509
25751
  },
25510
25752
  "#uiFeatures button:hover .svgIcon, #uiFeatures button:active .svgIcon": {
25511
- fill: "var(--color12)",
25753
+ fill: "var(--color12)"
25512
25754
  },
25513
25755
  ".tgl-switch .tgl-slider, .tgl-flat:checked+.tgl-slider": {
25514
- border: "3px solid transparent",
25756
+ border: "3px solid transparent"
25515
25757
  },
25516
25758
  ".tgl-switch .tgl-slider": {
25517
- background: "none",
25759
+ background: "none"
25518
25760
  },
25519
25761
  ".tgl-switch .tgl-slider::before": {
25520
25762
  content: "''",
@@ -25528,18 +25770,18 @@ exports.ArcwareStyles = {
25528
25770
  top: "0",
25529
25771
  bottom: "0",
25530
25772
  left: "0",
25531
- right: "0",
25773
+ right: "0"
25532
25774
  },
25533
25775
  ".tgl-switch .tgl-slider::after": {
25534
25776
  height: "13px",
25535
25777
  width: "13px",
25536
25778
  borderRadius: "50%",
25537
25779
  top: "-2px",
25538
- left: "-1%",
25780
+ left: "-1%"
25539
25781
  },
25540
25782
  ".tgl-flat:checked+.tgl-slider:after": {
25541
25783
  left: "62%",
25542
- background: "var(--color3)",
25784
+ background: "var(--color3)"
25543
25785
  },
25544
25786
  ".form-control": {
25545
25787
  backgroundColor: "transparent",
@@ -25548,7 +25790,7 @@ exports.ArcwareStyles = {
25548
25790
  color: "var(--color13)",
25549
25791
  textAlign: "left",
25550
25792
  fontFamily: "inherit",
25551
- padding: "5px 15px ",
25793
+ padding: "5px 15px "
25552
25794
  },
25553
25795
  ".btn-flat": {
25554
25796
  background: "var(--color3)",
@@ -25558,31 +25800,62 @@ exports.ArcwareStyles = {
25558
25800
  cursor: "pointer",
25559
25801
  borderRadius: "4px",
25560
25802
  textTransform: "uppercase",
25561
- minWidth: "175px",
25803
+ minWidth: "175px"
25562
25804
  },
25563
25805
  ".btn-flat:disabled": {
25564
25806
  background: "var(--color7)",
25565
25807
  borderColor: "var(--color3)",
25566
25808
  color: "var(--color3)",
25567
- cursor: "default",
25809
+ cursor: "default"
25568
25810
  },
25569
25811
  ".btn-flat:focus": {
25570
- outline: "none",
25812
+ outline: "none"
25571
25813
  },
25572
25814
  ".arcware-logo-loader": {
25573
25815
  position: "relative",
25574
- display: "block",
25816
+ display: "flex",
25817
+ alignItems: "center",
25818
+ justifyContent: "center",
25575
25819
  width: "12.5%",
25576
25820
  height: "12.5%",
25821
+ margin: "0 auto",
25822
+ boxSizing: "border-box"
25823
+ },
25824
+ // image rendering + centering inside the box
25825
+ ".arcware-logo-loader img": {
25826
+ maxWidth: "40%",
25827
+ maxHeight: "40%",
25828
+ objectFit: "contain",
25829
+ objectPosition: "center center",
25830
+ display: "block",
25831
+ margin: 0,
25832
+ verticalAlign: "middle"
25833
+ },
25834
+ // fade stays the same
25835
+ ".arcware-logo-loader.pulse img": {
25836
+ animation: "aw-loader-fade var(--aw-fade,1200ms) ease-in-out infinite alternate"
25837
+ },
25838
+ ".arcware-logo-loader.aw-custom-loader": {
25839
+ width: "auto !important",
25840
+ height: "auto !important"
25841
+ },
25842
+ ".arcware-logo-loader.aw-custom-loader img": {
25843
+ display: "block",
25844
+ width: "auto",
25845
+ height: "auto",
25846
+ maxWidth: "80%",
25847
+ maxHeight: "80%",
25848
+ objectFit: "contain",
25849
+ margin: "0 auto" // ensure horizontal centering inside the loader
25577
25850
  },
25578
25851
  "#playOverlay img#playButton": {
25579
- width: "5%",
25852
+ width: "5%"
25580
25853
  },
25581
25854
  "#disconnectOverlay, #errorOverlay": {
25582
25855
  textTransform: "initial",
25583
25856
  textAlign: "center",
25584
25857
  fontSize: "20px",
25585
- lineHeight: 2.5,
25858
+ lineHeight: 2.5
25586
25859
  },
25587
25860
  "#disconnectOverlay .clickableState": {
25588
25861
  textTransform: "initial",
@@ -25592,13 +25865,13 @@ exports.ArcwareStyles = {
25592
25865
  fontSize: "18px",
25593
25866
  border: "1px solid #DAF693",
25594
25867
  margin: "25px auto 0",
25595
- width: "180px",
25868
+ width: "180px"
25596
25869
  },
25597
25870
  "#afkOverlay": {
25598
25871
  background: "none",
25599
25872
  transition: "all ease-in-out 0.5s",
25600
25873
  opacity: 1,
25601
- pointerEvents: "initial",
25874
+ pointerEvents: "initial"
25602
25875
  },
25603
25876
  "#afkOverlayInner": {
25604
25877
  textTransform: "initial",
@@ -25607,18 +25880,18 @@ exports.ArcwareStyles = {
25607
25880
  fontSize: "18px",
25608
25881
  width: "360px",
25609
25882
  textAlign: "center",
25610
- lineHeight: 2.5,
25883
+ lineHeight: 2.5
25611
25884
  },
25612
25885
  "#afkOverlayInner center::first-line": {
25613
25886
  textTransform: "uppercase",
25614
25887
  color: "#FF8461",
25615
25888
  fontWeight: "bold",
25616
- fontSize: "24px",
25889
+ fontSize: "24px"
25617
25890
  },
25618
25891
  "#afkOverlayInner #afkCountDownNumber": {
25619
25892
  color: "#DAF693",
25620
25893
  fontSize: "26px",
25621
- lineHeight: "22px",
25894
+ lineHeight: "22px"
25622
25895
  },
25623
25896
  "#afkOverlayInner center .retry-button": {
25624
25897
  textTransform: "initial",
@@ -25628,7 +25901,7 @@ exports.ArcwareStyles = {
25628
25901
  fontSize: "18px",
25629
25902
  border: "1px solid #DAF693",
25630
25903
  margin: "25px auto 0",
25631
- width: "180px",
25904
+ width: "180px"
25632
25905
  },
25633
25906
  "#connectOverlay #connectButton": {
25634
25907
  textTransform: "initial",
@@ -25638,33 +25911,33 @@ exports.ArcwareStyles = {
25638
25911
  fontSize: "18px",
25639
25912
  border: "1px solid #DAF693",
25640
25913
  margin: "25px auto 0",
25641
- width: "180px",
25914
+ width: "180px"
25642
25915
  },
25643
25916
  "#connectOverlay .connection-text": {
25644
25917
  textTransform: "initial",
25645
25918
  textAlign: "center",
25646
- margin: "25px auto 0",
25919
+ margin: "25px auto 0"
25647
25920
  },
25648
25921
  "#connectOverlay .connection-text .title": {
25649
25922
  color: "#ffffff",
25650
25923
  fontSize: "18px",
25651
- margin: "5px 0",
25924
+ margin: "5px 0"
25652
25925
  },
25653
25926
  "#connectOverlay .connection-text .subtitle": {
25654
25927
  color: "#ffffff",
25655
25928
  opacity: 0.5,
25656
25929
  fontSize: "12px",
25657
- margin: "10px 0",
25930
+ margin: "10px 0"
25658
25931
  },
25659
25932
  "#infoOverlay.hiddenState": {
25660
- display: "none",
25933
+ display: "none"
25661
25934
  },
25662
25935
  "#disconnectOverlay, #playOverlay, #errorOverlay, #microphoneOverlay, #connectOverlay": {
25663
25936
  background: "#18181A",
25664
25937
  display: "flex",
25665
25938
  transition: "all ease-in-out 0.5s",
25666
25939
  opacity: 1,
25667
- pointerEvents: "initial",
25940
+ pointerEvents: "initial"
25668
25941
  },
25669
25942
  "#microphoneOverlay": {
25670
25943
  textTransform: "initial",
@@ -25683,51 +25956,51 @@ exports.ArcwareStyles = {
25683
25956
  justifyContent: "center",
25684
25957
  alignItems: "center",
25685
25958
  flexDirection: "column",
25686
- zIndex: 99999,
25959
+ zIndex: 99999
25687
25960
  },
25688
25961
  "#microphoneOverlay .title": {
25689
25962
  fontSize: "24px",
25690
25963
  position: "relative",
25691
25964
  marginBottom: "20px",
25692
- color: "#F0F0F2",
25965
+ color: "#F0F0F2"
25693
25966
  },
25694
25967
  "#microphoneOverlay .title:after": {
25695
25968
  content: "''",
25696
25969
  display: "inline-block",
25697
25970
  animation: "dotty steps(1,end) 1s infinite",
25698
- position: "absolute",
25971
+ position: "absolute"
25699
25972
  },
25700
25973
  "#microphoneOverlay p": {
25701
25974
  margin: 0,
25702
- color: "#858588",
25975
+ color: "#858588"
25703
25976
  },
25704
25977
  "#microphoneOverlay svg": {
25705
25978
  height: "65px",
25706
25979
  marginBottom: "15px",
25707
- marginTop: "-5px",
25980
+ marginTop: "-5px"
25708
25981
  },
25709
25982
  "#microphoneOverlay .svgIcon": {
25710
- fill: "#DAF693",
25983
+ fill: "#DAF693"
25711
25984
  },
25712
25985
  "#disconnectOverlay.hiddenState, #playOverlay.hiddenState, #errorOverlay.hiddenState, #afkOverlay.hiddenState, #microphoneOverlay.hiddenState": {
25713
25986
  opacity: 0,
25714
- pointerEvents: "none",
25987
+ pointerEvents: "none"
25715
25988
  },
25716
25989
  "#disconnectOverlay.mic-overlay-is-visible, #errorOverlay.mic-overlay-is-visible, #infoOverlay.mic-overlay-is-visible": {
25717
25990
  opacity: 0,
25718
- pointerEvents: "none",
25991
+ pointerEvents: "none"
25719
25992
  },
25720
25993
  "#infoOverlay.hiddenState, #connectOverlay.hiddenState": {
25721
- display: "none",
25994
+ display: "none"
25722
25995
  },
25723
25996
  "#connectOverlay": {
25724
25997
  display: "flex",
25725
25998
  flexDirection: "column-reverse",
25726
25999
  alignItems: "center",
25727
- justifyContent: "center",
26000
+ justifyContent: "center"
25728
26001
  },
25729
26002
  "#infoOverlay": {
25730
- display: "none",
26003
+ display: "none"
25731
26004
  },
25732
26005
  ".love-letters-box-root": {
25733
26006
  display: "flex",
@@ -25739,11 +26012,11 @@ exports.ArcwareStyles = {
25739
26012
  alignItems: "center",
25740
26013
  flexDirection: "column",
25741
26014
  background: "#18181A",
25742
- zIndex: 1,
26015
+ zIndex: 1
25743
26016
  },
25744
26017
  ".love-letters-box-root.fade-out": {
25745
26018
  opacity: 0,
25746
- transition: "opacity 0.5s",
26019
+ transition: "opacity 0.5s"
25747
26020
  },
25748
26021
  "#letters-block": {
25749
26022
  position: "absolute",
@@ -25760,7 +26033,7 @@ exports.ArcwareStyles = {
25760
26033
  alignItems: "center",
25761
26034
  fontSize: "16px",
25762
26035
  textTransform: "initial",
25763
- textAlign: "center",
26036
+ textAlign: "center"
25764
26037
  },
25765
26038
  "#letters-wrapper": {
25766
26039
  height: "77px",
@@ -25771,62 +26044,88 @@ exports.ArcwareStyles = {
25771
26044
  alignItems: "center",
25772
26045
  justifyContent: "flex-end",
25773
26046
  marginTop: "10px",
25774
- paddingBottom: "2px",
26047
+ paddingBottom: "2px"
25775
26048
  },
25776
26049
  "#letters-wrapper p": {
25777
26050
  textAlign: "center",
25778
26051
  lineHeight: 1.25,
25779
- fontSize: "16px",
26052
+ fontSize: "16px"
25780
26053
  },
25781
26054
  ".letter-animation:nth-last-of-type(1)::after": {
25782
26055
  display: "inline-block",
25783
26056
  animation: "dotty steps(1,end) 1s infinite",
25784
26057
  content: "''",
25785
- position: "absolute",
26058
+ position: "absolute"
25786
26059
  },
25787
26060
  ".letter-animation": {
25788
26061
  transition: "all 0.5s ease-in-out",
25789
26062
  transformOrigin: "bottom",
25790
- margin: "0 auto",
26063
+ margin: "0 auto"
25791
26064
  },
25792
26065
  ".letter-animation-enter": {
25793
- animation: "fadeInUp 0.75s ease-out",
26066
+ animation: "fadeInUp 0.75s ease-out"
25794
26067
  },
25795
26068
  ".letter-animation-exit": {
25796
26069
  opacity: 0,
25797
26070
  scale: 0.9,
25798
26071
  transition: "all ease-in-out 1s",
25799
- margin: 0,
26072
+ margin: 0
25800
26073
  },
25801
26074
  "@keyframes dotty": {
25802
26075
  "0%": { content: "''" },
25803
26076
  "25%": { content: "'.'" },
25804
26077
  "50%": { content: "'..'" },
25805
26078
  "75%": { content: "'...'" },
25806
- "100%": { content: "''" },
26079
+ "100%": { content: "''" }
25807
26080
  },
25808
26081
  "@keyframes fadeInUp": {
25809
26082
  from: {
25810
26083
  opacity: 0,
25811
26084
  transform: " translateY(5px)",
25812
- scale: 0.9,
26085
+ scale: 0.9
25813
26086
  },
25814
26087
  to: {
25815
26088
  opacity: 1,
25816
26089
  transform: "translateY(0)",
25817
- scale: 1,
25818
- },
26090
+ scale: 1
26091
+ }
25819
26092
  },
25820
26093
  ".hidden": {
25821
26094
  display: "none",
25822
- opacity: 0,
26095
+ opacity: 0
25823
26096
  },
25824
26097
  ".visible": {
25825
26098
  display: "block",
25826
26099
  opacity: 1,
25827
- transition: "opacity 1s ease-out",
26100
+ transition: "opacity 1s ease-out"
25828
26101
  },
25829
- },
26102
+ // Make the host a flex centering box
26103
+ ".love-letters-box-root .arcware-logo-loader": {
26104
+ display: "flex",
26105
+ alignItems: "center",
26106
+ justifyContent: "center"
26107
+ },
26108
+ // When a custom image is active, ignore the legacy 12.5% box
26109
+ ".love-letters-box-root .arcware-logo-loader.aw-custom-loader": {
26110
+ width: "auto !important",
26111
+ height: "auto !important"
26112
+ },
26113
+ // Size & center the <img> itself (independent of host size)
26114
+ ".love-letters-box-root .arcware-logo-loader.aw-custom-loader img": {
26115
+ display: "block",
26116
+ margin: "0 auto",
26117
+ width: "min(40vmin, 40vw)",
26118
+ height: "auto",
26119
+ objectFit: "contain",
26120
+ objectPosition: "center center"
26121
+ },
26122
+ // (optional) If you prefer the old “percentage of container” behavior:
26123
+ ".love-letters-box-root .arcware-logo-loader.aw-custom-loader img.alt-40pct": {
26124
+ width: "40%",
26125
+ maxWidth: "100%",
26126
+ height: "auto"
26127
+ }
26128
+ }
25830
26129
  };
25831
26130
 
25832
26131
 
@@ -25848,6 +26147,56 @@ class ArcwareLogoLoader {
25848
26147
  arcwareLogoLoader.innerHTML = this.getSvg();
25849
26148
  return arcwareLogoLoader;
25850
26149
  }
26150
+ /** Call this once after you create the wrapper/root that contains the SVG */
26151
+ setHostElement(el) {
26152
+ this._hostEl = el;
26153
+ }
26154
+ /** Swap the loader image at runtime; pass undefined to go back to SVG */
26155
+ setImage(url) {
26156
+ var _a, _b;
26157
+ if (!this._hostEl)
26158
+ return;
26159
+ // lazily create <img> once
26160
+ if (!this._imgEl) {
26161
+ const img = document.createElement("img");
26162
+ img.alt = "Loading";
26163
+ img.style.display = "none"; // hidden until we set a URL
26164
+ this._hostEl.appendChild(img);
26165
+ this._imgEl = img;
26166
+ }
26167
+ if (url && url.trim()) {
26168
+ (_a = this._hostEl) === null || _a === void 0 ? void 0 : _a.classList.add("aw-custom-loader");
26169
+ if (this._imgEl.src !== url)
26170
+ this._imgEl.src = url;
26171
+ // show <img>, hide SVG
26172
+ this._imgEl.style.display = "";
26173
+ const svg = this._hostEl.querySelector("svg");
26174
+ if (svg)
26175
+ svg.style.display = "none";
26176
+ }
26177
+ else {
26178
+ // no url → fall back to SVG
26179
+ (_b = this._hostEl) === null || _b === void 0 ? void 0 : _b.classList.remove("aw-custom-loader");
26180
+ this._imgEl.style.display = "none";
26181
+ const svg = this._hostEl.querySelector("svg");
26182
+ if (svg)
26183
+ svg.style.display = "";
26184
+ }
26185
+ }
26186
+ /** Enable/disable pulsing fade in ms; 0 disables */
26187
+ setFade(ms) {
26188
+ if (!this._hostEl)
26189
+ return;
26190
+ const n = Number(ms) || 0;
26191
+ if (n > 0) {
26192
+ this._hostEl.style.setProperty("--aw-fade", `${n}ms`);
26193
+ this._hostEl.classList.add("pulse"); // uses #aw-loader.pulse styles you added
26194
+ }
26195
+ else {
26196
+ this._hostEl.classList.remove("pulse");
26197
+ this._hostEl.style.removeProperty("--aw-fade");
26198
+ }
26199
+ }
25851
26200
  getSvg() {
25852
26201
  return `
25853
26202
  <svg width="42" height="80" viewBox="0 0 42 80" xmlns="http://www.w3.org/2000/svg">