@arcware-cloud/pixelstreaming-websdk 1.3.22 → 1.3.24

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,10 @@ For more detailed examples and advanced usage, please refer to our documentation
80
80
 
81
81
  # Changelog
82
82
 
83
+ ### 1.3.24
84
+
85
+ - allowing json type payload for upcoming events feature
86
+
83
87
  ### 1.3.20
84
88
 
85
89
  - polished types a bit and aligned with documentation
package/index.cjs.js CHANGED
@@ -15744,7 +15744,7 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
15744
15744
  if (!config.initialSettings.ss)
15745
15745
  config.initialSettings.ss = exports.DefaultUrl;
15746
15746
  super(config);
15747
- this.VERSION = "1.3.22";
15747
+ this.VERSION = "1.3.24";
15748
15748
  this.whiteLabellingChanged = new EventHandler_1.EventHandler();
15749
15749
  this.signallingWlURL = "https://signalling-client.arcware.cloud/whiteLabel/";
15750
15750
  if (config.envName) {
@@ -21181,7 +21181,7 @@ class ArcwareApplication extends lib_pixelstreamingfrontend_ui_ue5_5_1.Applicati
21181
21181
  const t = (0, common_1.normalizeType)(obj["type"]);
21182
21182
  // route to exactly one callback
21183
21183
  if (t === "event") {
21184
- (_c = this.analyticsEventCallback) === null || _c === void 0 ? void 0 : _c.call(this, response);
21184
+ (_c = this.analyticsEventCallback) === null || _c === void 0 ? void 0 : _c.call(this, JSON.stringify(obj));
21185
21185
  return;
21186
21186
  }
21187
21187
  if (t === "filetransfer" || t === "createscreenshot") {
@@ -25710,8 +25710,18 @@ function toAnalyticsEvent(input, opts = {}) {
25710
25710
  if (!customNameVal)
25711
25711
  return { ok: false, error: "`customName` must be a non-empty string." };
25712
25712
  let payloadStr;
25713
- if ("payload" in obj && typeof obj["payload"] === "string") {
25714
- payloadStr = (0, common_1.truncateByBytes)(obj["payload"], maxBytes);
25713
+ if ("payload" in obj) {
25714
+ if (typeof obj["payload"] === "string") {
25715
+ payloadStr = (0, common_1.truncateByBytes)(obj["payload"], maxBytes);
25716
+ }
25717
+ else {
25718
+ try {
25719
+ payloadStr = (0, common_1.truncateByBytes)(JSON.stringify(obj["payload"]), maxBytes);
25720
+ }
25721
+ catch (_d) {
25722
+ // non-serializable payload → drop it
25723
+ }
25724
+ }
25715
25725
  }
25716
25726
  const value = payloadStr !== undefined
25717
25727
  ? { type: typeVal, customName: customNameVal, payload: payloadStr }
package/index.esm.js CHANGED
@@ -15654,7 +15654,7 @@ class ArcwareConfig extends _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBP
15654
15654
  if (!config.initialSettings.ss)
15655
15655
  config.initialSettings.ss = DefaultUrl;
15656
15656
  super(config);
15657
- this.VERSION = "1.3.22";
15657
+ this.VERSION = "1.3.24";
15658
15658
  this.whiteLabellingChanged = new _domain_EventHandler__WEBPACK_IMPORTED_MODULE_8__.EventHandler();
15659
15659
  this.signallingWlURL = "https://signalling-client.arcware.cloud/whiteLabel/";
15660
15660
  if (config.envName) {
@@ -21249,7 +21249,7 @@ class ArcwareApplication extends _epicgames_ps_lib_pixelstreamingfrontend_ui_ue5
21249
21249
  const t = (0,_features_common__WEBPACK_IMPORTED_MODULE_13__.normalizeType)(obj["type"]);
21250
21250
  // route to exactly one callback
21251
21251
  if (t === "event") {
21252
- (_c = this.analyticsEventCallback) === null || _c === void 0 ? void 0 : _c.call(this, response);
21252
+ (_c = this.analyticsEventCallback) === null || _c === void 0 ? void 0 : _c.call(this, JSON.stringify(obj));
21253
21253
  return;
21254
21254
  }
21255
21255
  if (t === "filetransfer" || t === "createscreenshot") {
@@ -25610,8 +25610,18 @@ function toAnalyticsEvent(input, opts = {}) {
25610
25610
  if (!customNameVal)
25611
25611
  return { ok: false, error: "`customName` must be a non-empty string." };
25612
25612
  let payloadStr;
25613
- if ("payload" in obj && typeof obj["payload"] === "string") {
25614
- payloadStr = (0,_common__WEBPACK_IMPORTED_MODULE_0__.truncateByBytes)(obj["payload"], maxBytes);
25613
+ if ("payload" in obj) {
25614
+ if (typeof obj["payload"] === "string") {
25615
+ payloadStr = (0,_common__WEBPACK_IMPORTED_MODULE_0__.truncateByBytes)(obj["payload"], maxBytes);
25616
+ }
25617
+ else {
25618
+ try {
25619
+ payloadStr = (0,_common__WEBPACK_IMPORTED_MODULE_0__.truncateByBytes)(JSON.stringify(obj["payload"]), maxBytes);
25620
+ }
25621
+ catch (_d) {
25622
+ // non-serializable payload → drop it
25623
+ }
25624
+ }
25615
25625
  }
25616
25626
  const value = payloadStr !== undefined
25617
25627
  ? { type: typeVal, customName: customNameVal, payload: payloadStr }
package/index.umd.js CHANGED
@@ -15754,7 +15754,7 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
15754
15754
  if (!config.initialSettings.ss)
15755
15755
  config.initialSettings.ss = exports.DefaultUrl;
15756
15756
  super(config);
15757
- this.VERSION = "1.3.22";
15757
+ this.VERSION = "1.3.24";
15758
15758
  this.whiteLabellingChanged = new EventHandler_1.EventHandler();
15759
15759
  this.signallingWlURL = "https://signalling-client.arcware.cloud/whiteLabel/";
15760
15760
  if (config.envName) {
@@ -21191,7 +21191,7 @@ class ArcwareApplication extends lib_pixelstreamingfrontend_ui_ue5_5_1.Applicati
21191
21191
  const t = (0, common_1.normalizeType)(obj["type"]);
21192
21192
  // route to exactly one callback
21193
21193
  if (t === "event") {
21194
- (_c = this.analyticsEventCallback) === null || _c === void 0 ? void 0 : _c.call(this, response);
21194
+ (_c = this.analyticsEventCallback) === null || _c === void 0 ? void 0 : _c.call(this, JSON.stringify(obj));
21195
21195
  return;
21196
21196
  }
21197
21197
  if (t === "filetransfer" || t === "createscreenshot") {
@@ -25720,8 +25720,18 @@ function toAnalyticsEvent(input, opts = {}) {
25720
25720
  if (!customNameVal)
25721
25721
  return { ok: false, error: "`customName` must be a non-empty string." };
25722
25722
  let payloadStr;
25723
- if ("payload" in obj && typeof obj["payload"] === "string") {
25724
- payloadStr = (0, common_1.truncateByBytes)(obj["payload"], maxBytes);
25723
+ if ("payload" in obj) {
25724
+ if (typeof obj["payload"] === "string") {
25725
+ payloadStr = (0, common_1.truncateByBytes)(obj["payload"], maxBytes);
25726
+ }
25727
+ else {
25728
+ try {
25729
+ payloadStr = (0, common_1.truncateByBytes)(JSON.stringify(obj["payload"]), maxBytes);
25730
+ }
25731
+ catch (_d) {
25732
+ // non-serializable payload → drop it
25733
+ }
25734
+ }
25725
25735
  }
25726
25736
  const value = payloadStr !== undefined
25727
25737
  ? { type: typeVal, customName: customNameVal, payload: payloadStr }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arcware-cloud/pixelstreaming-websdk",
3
3
  "description": "WebSDK for easy implementation of pixel streaming with Arcware Cloud Services. Heavily based on the '@epicgames-ps' library.",
4
- "version": "1.3.22",
4
+ "version": "1.3.24",
5
5
  "type": "commonjs",
6
6
  "main": "./index.umd.js",
7
7
  "module": "./index.esm.js",