@arcware-cloud/pixelstreaming-websdk 1.3.39 → 1.4.4

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.
Files changed (74) hide show
  1. package/LICENSE.md +0 -2
  2. package/README.md +0 -2
  3. package/core.cjs +19343 -0
  4. package/core.mjs +1 -0
  5. package/core.umd.cjs +19352 -0
  6. package/index.cjs +3710 -7812
  7. package/index.mjs +1 -32858
  8. package/index.umd.cjs +3710 -7812
  9. package/package.json +13 -5
  10. package/report.html +39 -0
  11. package/stats.json +118354 -0
  12. package/types/{lib → core}/ArcwareConfig.d.ts +10 -4
  13. package/types/core/ArcwarePixelStreaming.d.ts +268 -0
  14. package/types/core/CoreSetup.d.ts +10 -0
  15. package/types/core/Messages/ErrorMessage.d.ts +11 -0
  16. package/types/core/Messages/LoveLetter.d.ts +11 -0
  17. package/types/core/Messages/Ping.d.ts +10 -0
  18. package/types/core/Messages/Queue.d.ts +23 -0
  19. package/types/core/Messages/Render.d.ts +8 -0
  20. package/types/core/Messages/SessionId.d.ts +9 -0
  21. package/types/core/Messages/Stats.d.ts +34 -0
  22. package/types/core/Messages/StreamInfo.d.ts +30 -0
  23. package/types/core/Messages/Version.d.ts +9 -0
  24. package/types/core/Messages/WebSdkSettings.d.ts +31 -0
  25. package/types/core/Messages/index.d.ts +17 -0
  26. package/types/core/domain/ArcwareSettingsSchema.d.ts +61 -0
  27. package/types/core/domain/CustomizationSchema.d.ts +15 -0
  28. package/types/core/domain/Session.d.ts +31 -0
  29. package/types/core/domain/Stats.d.ts +7 -0
  30. package/types/core/features/ArcwareFileTransferUtil.d.ts +8 -0
  31. package/types/{lib → core}/features/DiagnosticsCollector.d.ts +1 -1
  32. package/types/core/features/IWhiteLabel.d.ts +16 -0
  33. package/types/{lib → core}/features/whiteLabelling.d.ts +2 -3
  34. package/types/core.d.ts +5 -0
  35. package/types/index.d.ts +7 -3
  36. package/types/{lib → ui}/ArcwareApplication.d.ts +41 -8
  37. package/types/{lib → ui}/ArcwareInit.d.ts +3 -3
  38. package/types/{lib/ui → ui/components}/AudioButton/index.d.ts +1 -1
  39. package/types/{lib/ui → ui/components}/MicButton/index.d.ts +1 -1
  40. package/types/{lib/ui → ui/components}/MicrophoneOverlay/index.d.ts +1 -1
  41. package/types/{lib/ui → ui/components}/StopButton/index.d.ts +1 -1
  42. package/types/{lib → ui}/styles/ArcwarePixelStreamingApplicationStyles.d.ts +45 -46
  43. package/types/lib/ArcwarePixelStreaming.d.ts +0 -140
  44. package/types/lib/MessageTypes.d.ts +0 -4
  45. package/types/lib/domain/ArcwareSettingsSchema.d.ts +0 -273
  46. package/types/lib/domain/Session.d.ts +0 -29
  47. package/types/lib/domain/Stats.d.ts +0 -36
  48. package/types/lib/features/ArcwareFileTransferUtil.d.ts +0 -13
  49. package/types/lib/features/ZWhiteLabel.d.ts +0 -31
  50. package/types/lib/index.d.ts +0 -6
  51. package/types/shared/index.d.ts +0 -1
  52. package/types/shared/lib/Messages/ErrorMessage.d.ts +0 -18
  53. package/types/shared/lib/Messages/LoveLetter.d.ts +0 -18
  54. package/types/shared/lib/Messages/Ping.d.ts +0 -15
  55. package/types/shared/lib/Messages/Queue.d.ts +0 -58
  56. package/types/shared/lib/Messages/Render.d.ts +0 -9
  57. package/types/shared/lib/Messages/SessionId.d.ts +0 -12
  58. package/types/shared/lib/Messages/Stats.d.ts +0 -174
  59. package/types/shared/lib/Messages/StreamInfo.d.ts +0 -338
  60. package/types/shared/lib/Messages/Version.d.ts +0 -12
  61. package/types/shared/lib/Messages/WebSdkSettings.d.ts +0 -96
  62. package/types/shared/lib/Messages/index.d.ts +0 -185
  63. package/types/shared/lib/index.d.ts +0 -1
  64. /package/types/{lib → core}/ApplyUrlHack.d.ts +0 -0
  65. /package/types/{lib → core}/domain/EventHandler.d.ts +0 -0
  66. /package/types/{lib → core}/domain/debounce.d.ts +0 -0
  67. /package/types/{lib → core}/features/ArcwareEventUtil.d.ts +0 -0
  68. /package/types/{lib → core}/features/common.d.ts +0 -0
  69. /package/types/{lib/ui → ui/components}/ArcwareLogoLoader/index.d.ts +0 -0
  70. /package/types/{lib/ui → ui/components}/AudioButton/AudioIcon.d.ts +0 -0
  71. /package/types/{lib/ui → ui/components}/LoveLetters/index.d.ts +0 -0
  72. /package/types/{lib/ui → ui/components}/MicIcon/index.d.ts +0 -0
  73. /package/types/{lib/ui → ui/components}/PlayIcon/index.d.ts +0 -0
  74. /package/types/{lib/ui → ui/components}/StopIcon/index.d.ts +0 -0
@@ -1,12 +1,14 @@
1
1
  import { Config, ConfigParams } from "@epicgames-ps/lib-pixelstreamingfrontend-ue5.5";
2
2
  import { Session } from "./domain/Session";
3
3
  import { Settings } from "./domain/ArcwareSettingsSchema";
4
- import { WhiteLabel } from "./features/ZWhiteLabel";
4
+ import { WhiteLabel } from "./features/IWhiteLabel";
5
5
  import { EventHandler } from "./domain/EventHandler";
6
+ import { Customization } from "./domain/CustomizationSchema";
6
7
  /** Default arcware signalling endpoint. */
7
8
  export declare const DefaultUrl: "wss://signalling-client.ragnarok.arcware.cloud";
8
9
  export interface ArcwareConfigParams extends ConfigParams {
9
- settings: Settings;
10
+ settings?: Partial<Settings>;
11
+ customization?: Partial<Customization>;
10
12
  envName?: string;
11
13
  }
12
14
  export declare class ArcwareConfig extends Config {
@@ -28,13 +30,17 @@ export declare class ArcwareConfig extends Config {
28
30
  static PickIdsOfUrl(): Pick<Settings, "shareId" | "projectId">;
29
31
  readonly session: Session;
30
32
  readonly settings: Settings;
33
+ readonly customization: Customization;
31
34
  private _initialSettings;
32
- readonly VERSION = "1.3.39";
35
+ readonly VERSION = "1.4.4";
33
36
  readonly whiteLabellingChanged: EventHandler<{
34
- next: WhiteLabel;
37
+ next: Partial<WhiteLabel>;
35
38
  changed: boolean;
36
39
  }>;
37
40
  private signallingWlURL;
41
+ private static readonly DEFAULT_INITIAL_SETTINGS;
42
+ private static readonly DEFAULT_SETTINGS;
43
+ private static readonly DEFAULT_CUSTOMIZATION;
38
44
  constructor(config: ArcwareConfigParams);
39
45
  getWhiteLabelling(ShareId: string): Promise<WhiteLabel | undefined>;
40
46
  /** Setup connection string. */
@@ -0,0 +1,268 @@
1
+ import { PixelStreaming, PixelStreamingOverrides } from "@epicgames-ps/lib-pixelstreamingfrontend-ue5.5";
2
+ import { FileTemplate } from "@epicgames-ps/lib-pixelstreamingfrontend-ue5.5/dist/types/Util/FileUtil";
3
+ import { ArcwareConfig } from "./ArcwareConfig";
4
+ import * as Messages from "./Messages";
5
+ import { EventHandler } from "./domain/EventHandler";
6
+ import { Session } from "./domain/Session";
7
+ import { AnalyticsEvent } from "./features/ArcwareEventUtil";
8
+ import { WhiteLabel } from "./features/IWhiteLabel";
9
+ type OutboundByKey<K extends keyof typeof Messages.Send> = {
10
+ type: K;
11
+ } & Record<string, unknown>;
12
+ export declare enum WebsocketState {
13
+ CONNECTING = 0,
14
+ OPEN = 1,
15
+ CLOSING = 2,
16
+ CLOSED = 3
17
+ }
18
+ /**
19
+ * Core streaming class extending Epic's PixelStreaming.
20
+ *
21
+ * Adds:
22
+ * - Identity-aware lifecycle handling
23
+ * - Analytics proxying
24
+ * - File transfer support
25
+ * - White-label branding hooks
26
+ * - Extended event system
27
+ */
28
+ export declare class ArcwarePixelStreaming extends PixelStreaming {
29
+ /**
30
+ * * * * * * *
31
+ * PROPERTIES / GETTERS / SETTERS
32
+ * * * * * * *
33
+ */
34
+ /** Core identity & state (Properties, Getters, Setters) */
35
+ private outbox;
36
+ private videoInitializedSent;
37
+ private _postInitSideEffectsDone;
38
+ config: ArcwareConfig;
39
+ streamInfo?: Messages.StreamInfo;
40
+ get session(): Session;
41
+ /** WebSocket / transport lifecycle (Properties, Getters, Setters) */
42
+ private _boundTransport?;
43
+ private _onWsOpen?;
44
+ private _onWsClose?;
45
+ private _transportWatchTimer?;
46
+ private get isWsOpen();
47
+ get websocketState(): WebsocketState;
48
+ /** Signaling & messaging (Properties, Getters, Setters) */
49
+ /** Event emitters (core signals) (Properties, Getters, Setters) */
50
+ /**
51
+ * Emits queue status updates from the backend.
52
+ *
53
+ * Triggered when the user enters or progresses in a streaming queue.
54
+ * The payload contains queue position and related metadata.
55
+ */
56
+ readonly queueHandler: EventHandler<Messages.Queue>;
57
+ /**
58
+ * Emits errors received from the signalling server or backend.
59
+ *
60
+ * This includes:
61
+ * - Stream termination errors
62
+ * - Backend rejection errors
63
+ * - Custom Unreal error messages
64
+ *
65
+ * Non-retryable errors may stop automatic reconnection.
66
+ */
67
+ readonly errorHandler: EventHandler<Messages.ErrorMessage>;
68
+ /**
69
+ * Emits informational messages ("Love Letters") sent from Unreal Engine.
70
+ *
71
+ * These are typically used to display user-facing messages
72
+ * such as loading hints or system notifications.
73
+ */
74
+ readonly loveLetterHandler: EventHandler<Messages.LoveLetter>;
75
+ /**
76
+ * Emits when a session ID is assigned by the backend.
77
+ *
78
+ * The session ID is used for reconnection and tracking.
79
+ */
80
+ readonly sessionIdHandler: EventHandler<string>;
81
+ /**
82
+ * Emits once when the first video frame is successfully rendered.
83
+ *
84
+ * This guarantees that:
85
+ * - WebRTC connection is active
86
+ * - Video dimensions are available
87
+ * - Stream is visually ready
88
+ */
89
+ readonly videoInitializedHandler: EventHandler<never>;
90
+ /**
91
+ * Emits when the underlying WebSocket connection closes.
92
+ *
93
+ * Provides the native CloseEvent from the browser.
94
+ */
95
+ readonly websocketOnCloseHandler: EventHandler<CloseEvent>;
96
+ /**
97
+ * Emits when white-labelling configuration changes.
98
+ *
99
+ * This can occur:
100
+ * - After fetching remote branding settings
101
+ * - When settings are modified at runtime
102
+ *
103
+ * `next` contains the updated branding values.
104
+ * `changed` indicates whether values were actually modified.
105
+ */
106
+ readonly whiteLabellingChangedHandler: EventHandler<{
107
+ next: Partial<WhiteLabel>;
108
+ changed: boolean;
109
+ }>;
110
+ /**
111
+ * Emits after initial stream side-effects have been applied.
112
+ *
113
+ * This occurs after:
114
+ * - First frame detection
115
+ * - Resolution synchronization
116
+ * - Mouse lock adjustments
117
+ *
118
+ * Useful for UI adjustments that depend on a fully initialized stream.
119
+ */
120
+ readonly postInitSideEffectsHandler: EventHandler<never>;
121
+ /**
122
+ * Emits when microphone usage is toggled.
123
+ *
124
+ * The event is triggered when `toggleMic()` is called.
125
+ */
126
+ readonly micToggleHandler: EventHandler<{
127
+ enabled: boolean;
128
+ }>;
129
+ /**
130
+ * Emits whenever an analytics event is dispatched
131
+ * (either from Unreal Engine or via `sendAnalyticsEvent`).
132
+ */
133
+ readonly analyticsEventHandler: EventHandler<AnalyticsEvent>;
134
+ /**
135
+ * Emits when Unreal Engine signals a file transfer.
136
+ *
137
+ * The actual file data can be retrieved via `getIncomingFile()`.
138
+ * If using ArcwareApplication, downloads are handled automatically.
139
+ */
140
+ readonly fileTransferHandler: EventHandler<{
141
+ filename?: string;
142
+ }>;
143
+ /**
144
+ * Emits raw Unreal Engine responses that are not handled internally
145
+ * (e.g. analytics events and file transfers).
146
+ *
147
+ * Use this to receive custom responses from your UE application.
148
+ */
149
+ readonly applicationResponseHandler: EventHandler<string>;
150
+ /** First-frame / stream readiness detection (Properties, Getters, Setters) */
151
+ private _rVFCsupported;
152
+ private _rvfcHandle?;
153
+ private _rVFCArmedForElement?;
154
+ private _mo?;
155
+ /** Resolution & stream behavior (Properties, Getters, Setters) */
156
+ /** Diagnostics & stats (Properties, Getters, Setters) */
157
+ private diagnosticsCollector;
158
+ /** Core utility (Properties, Getters, Setters) */
159
+ /**
160
+ * * * * * * *
161
+ * CONSTRUCTOR
162
+ * * * * * * *
163
+ */
164
+ constructor(config: ArcwareConfig, overrides?: PixelStreamingOverrides);
165
+ /**
166
+ * * * * * * *
167
+ * METHODS
168
+ * * * * * * *
169
+ */
170
+ /** WebSocket / transport lifecycle (Methods) */
171
+ private bindTransportEvents;
172
+ private startTransportWatcher;
173
+ private stopTransportWatcher;
174
+ private isRetryableClose;
175
+ reconnect(): void;
176
+ removePlayer(): void;
177
+ private onVersion;
178
+ /** Signaling & messaging (Methods) */
179
+ private addMessageHandler;
180
+ private _dispatchOrBuffer;
181
+ private flushOutbox;
182
+ private sendStats;
183
+ private onPing;
184
+ private onStreamInfo;
185
+ private onRender;
186
+ private onQueue;
187
+ private onError;
188
+ private onSessionId;
189
+ private onLoveLetter;
190
+ send<K extends keyof typeof Messages.Send>(message: OutboundByKey<K>): void;
191
+ send(type: string, payload?: Record<string, unknown>): void;
192
+ send(message: {
193
+ type: string;
194
+ } & Record<string, unknown>): void;
195
+ private handleUEResponse;
196
+ /**
197
+ * Sends an analytics event to the backend.
198
+ *
199
+ * This method can be used to emit analytics events from the frontend.
200
+ * Events coming from Unreal Engine are automatically proxied.
201
+ *
202
+ * The payload will be validated and truncated to the maximum allowed size.
203
+ *
204
+ * @param event - The analytics event object.
205
+ *
206
+ * @example
207
+ * stream.sendAnalyticsEvent({
208
+ * type: "event",
209
+ * customName: "button_clicked",
210
+ * payload: JSON.stringify({ id: 42 })
211
+ * });
212
+ */
213
+ sendAnalyticsEvent(event: AnalyticsEvent): void;
214
+ private handleAnalyticsFromUnreal;
215
+ private _dispatchAnalytics;
216
+ /**
217
+ * Returns the most recently received file from Unreal Engine.
218
+ *
219
+ * This is populated when a file transfer message is received.
220
+ * Use together with `fileTransferHandler`.
221
+ *
222
+ * @returns The raw file object or undefined if no file is available.
223
+ */
224
+ getIncomingFile(): FileTemplate;
225
+ /**
226
+ * Triggers a browser download for the most recently received file.
227
+ *
228
+ * If no file is available, the method does nothing.
229
+ *
230
+ * @param filename - Optional custom filename (without extension).
231
+ */
232
+ fileDownload(filename?: string): void;
233
+ /** First-frame / stream readiness detection (Methods) */
234
+ private attachFirstRenderedFrameOnce;
235
+ private cancelFirstRenderedFrameHook;
236
+ private watchVideoElementReplacement;
237
+ private waitForFirstFrameWithTimeout;
238
+ private isVideoRenderingNow;
239
+ private sendVideoInitializedOnce;
240
+ private onVideoInitialized;
241
+ /** Resolution & stream behavior (Methods) */
242
+ private handleResolutionChange;
243
+ private handleMouseLock;
244
+ setAudioEnabled(enabled: boolean): void;
245
+ /** Diagnostics & stats (Methods) */
246
+ /** Core utility (Methods) */
247
+ private resetInitGuardsAndHooks;
248
+ static clearSessionId(): void;
249
+ private runPostInitSideEffectsOnce;
250
+ toggleAudio(videoElement: HTMLVideoElement, enabled: boolean): void;
251
+ /**
252
+ * Enables or disables microphone usage.
253
+ *
254
+ * When changed manually (isDefault = false), the stream reconnects
255
+ * to apply the new microphone configuration.
256
+ */
257
+ toggleMic(enable: boolean, isDefault: boolean): void;
258
+ /**
259
+ * Registers a callback that is invoked when streaming state changes.
260
+ *
261
+ * The callback is triggered on:
262
+ * - Video play
263
+ * - Video pause
264
+ * - Stream transport open/close
265
+ */
266
+ onStreamingStateChange(callback: (isStreaming: boolean) => void): void;
267
+ }
268
+ export {};
@@ -0,0 +1,10 @@
1
+ import { PixelStreamingOverrides } from "@epicgames-ps/lib-pixelstreamingfrontend-ue5.5";
2
+ import { ArcwareConfig } from "./ArcwareConfig";
3
+ import { ArcwarePixelStreaming } from "./ArcwarePixelStreaming";
4
+ export declare function CoreSetup(config: ArcwareConfig, overrides?: PixelStreamingOverrides, options?: {
5
+ forceRefresh?: boolean;
6
+ allowMultipleInstances?: boolean;
7
+ }): {
8
+ PixelStreaming: ArcwarePixelStreaming;
9
+ Config: ArcwareConfig;
10
+ };
@@ -0,0 +1,11 @@
1
+ export interface ErrorMessage {
2
+ type: "error";
3
+ code: number;
4
+ reason: string;
5
+ verbosity: number;
6
+ }
7
+ /**
8
+ * Parse and validate an ErrorMessage payload.
9
+ * Throws on invalid input (mirrors previous Zod.parse behavior).
10
+ */
11
+ export declare function parseErrorMessage(input: unknown): ErrorMessage;
@@ -0,0 +1,11 @@
1
+ export interface LoveLetter {
2
+ type: "letter";
3
+ reason: string;
4
+ code: number;
5
+ verbosity: number;
6
+ }
7
+ /**
8
+ * Parse and validate a LoveLetter payload.
9
+ * Throws on invalid input (mirrors previous Zod.parse behavior).
10
+ */
11
+ export declare function parseLoveLetter(input: unknown): LoveLetter;
@@ -0,0 +1,10 @@
1
+ export interface Ping {
2
+ type: "ping";
3
+ message?: string;
4
+ time: number;
5
+ }
6
+ /**
7
+ * Parse and validate a Ping payload.
8
+ * Throws on invalid input (mirrors previous Zod.parse behavior).
9
+ */
10
+ export declare function parsePing(input: unknown): Ping;
@@ -0,0 +1,23 @@
1
+ export type QueueValueType = "milliseconds" | "seconds" | "minutes" | "hours" | "days";
2
+ export interface Queue {
3
+ type: "queue";
4
+ queue: {
5
+ /** Position in queue (zero based). */
6
+ index?: number;
7
+ /** Length of the queue. */
8
+ queueLength?: number;
9
+ /** Already waited for. */
10
+ waited?: number;
11
+ /** Estimated wait time. */
12
+ estimatedWaitTime?: number | null;
13
+ /** Average wait time. */
14
+ averageWaitTime?: number | null;
15
+ /** Type of all time-values in the queue. */
16
+ valueType: QueueValueType;
17
+ };
18
+ }
19
+ /**
20
+ * Parse and validate a Queue payload.
21
+ * Throws on invalid input (mirrors previous Zod.parse behavior).
22
+ */
23
+ export declare function parseQueue(input: unknown): Queue;
@@ -0,0 +1,8 @@
1
+ export interface Render {
2
+ type: "render";
3
+ }
4
+ /**
5
+ * Parse and validate a Render payload.
6
+ * Throws on invalid input (mirrors previous Zod.parse behavior).
7
+ */
8
+ export declare function parseRender(input: unknown): Render;
@@ -0,0 +1,9 @@
1
+ export interface SessionId {
2
+ type: "sessionId";
3
+ sessionId: string;
4
+ }
5
+ /**
6
+ * Parse and validate a SessionId payload.
7
+ * Throws on invalid input (mirrors previous Zod.parse behavior).
8
+ */
9
+ export declare function parseSessionId(input: unknown): SessionId;
@@ -0,0 +1,34 @@
1
+ import { AggregatedStats } from "@epicgames-ps/lib-pixelstreamingfrontend-ue5.5";
2
+ export interface Stats {
3
+ type: "stats";
4
+ stats?: {
5
+ codecs?: AggregatedStats["codecs"];
6
+ candidatePair?: AggregatedStats["candidatePairs"];
7
+ localCandidates?: AggregatedStats["localCandidates"];
8
+ remoteCandidates?: AggregatedStats["remoteCandidates"];
9
+ DataChannelStats?: AggregatedStats["datachannelStats"];
10
+ bytesReceived?: number;
11
+ packetsLost?: number;
12
+ frameWidth?: number;
13
+ frameHeight?: number;
14
+ framesDecoded?: number;
15
+ framesPerSecond?: number;
16
+ framesDropped?: number;
17
+ videoCodec?: string;
18
+ audioCodec?: string;
19
+ browserInfo?: {
20
+ userAgent?: string;
21
+ platform?: string | null;
22
+ language?: string;
23
+ [key: string]: unknown;
24
+ };
25
+ currentRTT?: number;
26
+ sessionRunTime?: string;
27
+ controlsStreamInput?: "true" | "false";
28
+ videoEncoderAvgQP?: number;
29
+ videoBitrate?: number;
30
+ audioBitrate?: number;
31
+ [key: string]: unknown;
32
+ };
33
+ }
34
+ export declare function parseStats(input: unknown): Stats;
@@ -0,0 +1,30 @@
1
+ import { WebSdkSettingsType } from "./WebSdkSettings";
2
+ export interface StreamInfo {
3
+ type: "streamInfo";
4
+ streamInfo: {
5
+ guid: string;
6
+ autoPlay?: boolean;
7
+ touchCapable?: boolean;
8
+ resolution?: {
9
+ width: number;
10
+ height: number;
11
+ dynamic?: boolean;
12
+ fixed?: boolean;
13
+ };
14
+ meta?: {
15
+ friendlyName?: string;
16
+ isTrial?: boolean;
17
+ mouseLock?: boolean;
18
+ poweredBy?: boolean;
19
+ version?: string;
20
+ };
21
+ webSdkSettings?: WebSdkSettingsType;
22
+ afk?: {
23
+ enabled: boolean;
24
+ warn: number;
25
+ error: number;
26
+ action: number;
27
+ };
28
+ };
29
+ }
30
+ export declare function parseStreamInfo(input: unknown): StreamInfo;
@@ -0,0 +1,9 @@
1
+ export interface Version {
2
+ type: "version";
3
+ version?: string;
4
+ }
5
+ /**
6
+ * Parse and validate a Version payload.
7
+ * Throws on invalid input (mirrors previous Zod.parse behavior).
8
+ */
9
+ export declare function parseVersion(input: unknown): Version;
@@ -0,0 +1,31 @@
1
+ export interface WebSdkSettingsType {
2
+ conf?: {
3
+ fullscreenButton?: boolean;
4
+ stopButton?: boolean;
5
+ audioButton?: boolean;
6
+ infoButton?: boolean;
7
+ micButton?: boolean;
8
+ settingsButton?: boolean;
9
+ connectionStrengthIcon?: boolean;
10
+ };
11
+ init?: {
12
+ KeyboardInput?: boolean;
13
+ MouseInput?: boolean;
14
+ GamepadInput?: boolean;
15
+ TouchInput?: boolean;
16
+ XRControllerInput?: boolean;
17
+ FakeMouseWithTouches?: boolean;
18
+ ForceMonoAudio?: boolean;
19
+ HoveringMouse?: boolean;
20
+ };
21
+ customization?: {
22
+ buttons_position?: "Bottom-Right" | "Bottom-Left" | "Top-Left" | "Top-Right";
23
+ buttons_orientation?: "Vertical" | "Horizontal";
24
+ buttons_reverse?: boolean;
25
+ };
26
+ }
27
+ /**
28
+ * Parse and validate WebSdkSettings.
29
+ * Throws on invalid input (mirrors previous Zod.parse behavior).
30
+ */
31
+ export declare function parseWebSdkSettings(input: unknown): WebSdkSettingsType;
@@ -0,0 +1,17 @@
1
+ export * from "./ErrorMessage";
2
+ export * from "./LoveLetter";
3
+ export * from "./SessionId";
4
+ export * from "./StreamInfo";
5
+ export * from "./Stats";
6
+ export * from "./Ping";
7
+ export * from "./Queue";
8
+ export * from "./Version";
9
+ export * from "./WebSdkSettings";
10
+ export * from "./Render";
11
+ import { parseStats } from "./Stats";
12
+ export declare const Send: {
13
+ readonly stats: {
14
+ readonly parse: typeof parseStats;
15
+ };
16
+ };
17
+ export type SendType = keyof typeof Send | "onVideoInitialized";
@@ -0,0 +1,61 @@
1
+ import * as Messages from "../Messages";
2
+ import { WhiteLabel } from "../features/IWhiteLabel";
3
+ /** Orientation zoom configuration */
4
+ export interface OrientationZoom {
5
+ landscape: number;
6
+ portrait: number;
7
+ }
8
+ /** Arcware Settings. */
9
+ export interface Settings {
10
+ /** Overwrites the Session-Tool and uses the provided session instead. */
11
+ session?: string;
12
+ /** Can be used to be added to the request in order to verify access to private projects.
13
+ * For internal use only. => Preview page.
14
+ */
15
+ token?: string;
16
+ /** @deprecated in there for legacy use. Can only be used when token is provided. */
17
+ bypass?: boolean;
18
+ /** Handler for server side error messages. */
19
+ errorHandler?: (msg: Messages.ErrorMessage) => void;
20
+ /** Handler for queue events. */
21
+ queueHandler?: (msg: Messages.Queue) => void;
22
+ /** Handler for sessionId message. */
23
+ sessionIdHandler?: (sessionId: string) => void;
24
+ /** Handler for love letters.
25
+ * "LoveLetters" are send from backend to the SDK to state what phase the connection currently is in.
26
+ */
27
+ loveLetterHandler?: (msg: Messages.LoveLetter) => void;
28
+ /** Show or hide the fullscreen button. */
29
+ fullscreenButton?: boolean;
30
+ /** Show or hide the settings button. */
31
+ settingsButton?: boolean;
32
+ /** Show or hide the info button. */
33
+ infoButton?: boolean;
34
+ /** Show or hide the audio button. */
35
+ audioButton?: boolean;
36
+ /** Show or hide the microphone button. */
37
+ micButton?: boolean;
38
+ /** Show or hide the stop button. */
39
+ stopButton?: boolean;
40
+ /** Show or hide the connectionStrengthIcon button. */
41
+ connectionStrengthIcon?: boolean;
42
+ /** ShareId, used for sharing your project.
43
+ * Using ArcwareInit will set this required property for you.
44
+ */
45
+ shareId?: string;
46
+ /** Id of your project, only required if your shareId refers to multiple projects.
47
+ * Using ArcwareInit will set this required property for you.
48
+ */
49
+ projectId?: string;
50
+ /** Enable/Disable LoveLetter logging to the console. */
51
+ loveLetterLogging?: boolean;
52
+ /** Width with which instance should be started */
53
+ startWidth?: number;
54
+ /** Height with which instance should be started */
55
+ startHeight?: number;
56
+ /** Zoom functionality */
57
+ orientationZoom?: OrientationZoom;
58
+ /** Loader customization */
59
+ whiteLabelling?: WhiteLabel;
60
+ fetchRemoteWhiteLabelling?: boolean;
61
+ }
@@ -0,0 +1,15 @@
1
+ import { z } from "zod";
2
+ export declare const ZCustomizationSchema: z.ZodOptional<z.ZodObject<{
3
+ buttons_position: z.ZodOptional<z.ZodEnum<["Bottom-Right", "Bottom-Left", "Top-Left", "Top-Right"]>>;
4
+ buttons_orientation: z.ZodOptional<z.ZodEnum<["Vertical", "Horizontal"]>>;
5
+ buttons_reverse: z.ZodOptional<z.ZodBoolean>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ buttons_position?: "Bottom-Right" | "Bottom-Left" | "Top-Left" | "Top-Right";
8
+ buttons_orientation?: "Vertical" | "Horizontal";
9
+ buttons_reverse?: boolean;
10
+ }, {
11
+ buttons_position?: "Bottom-Right" | "Bottom-Left" | "Top-Left" | "Top-Right";
12
+ buttons_orientation?: "Vertical" | "Horizontal";
13
+ buttons_reverse?: boolean;
14
+ }>>;
15
+ export type Customization = z.infer<typeof ZCustomizationSchema>;
@@ -0,0 +1,31 @@
1
+ interface Options {
2
+ localStorageKey: string;
3
+ /** seconds */
4
+ keepSession: number;
5
+ }
6
+ /**
7
+ * The sessionId is stored in the localStorage to allow for reconnection and
8
+ * to prevent spamming start requests of instances, when smashing F5.
9
+ */
10
+ export declare class Session {
11
+ private _current?;
12
+ get current(): string;
13
+ get noSession(): boolean;
14
+ get id(): string | null;
15
+ private options;
16
+ private get localStorageKey();
17
+ constructor(options?: Partial<Options>);
18
+ /** Set's the session with creation date for the given storage key to the localStorage. */
19
+ set(sessionId: string): void;
20
+ /** Removes a session from the localStorage. */
21
+ unset(): void;
22
+ /**
23
+ * Try reading the session from localStorage; if blocked (3rd-party / privacy) fall back to sessionStorage.
24
+ */
25
+ private readSessionString;
26
+ /**
27
+ * Persist session id with graceful fallback when localStorage is blocked.
28
+ */
29
+ private writeSessionString;
30
+ }
31
+ export {};
@@ -0,0 +1,7 @@
1
+ import * as Messages from "../Messages";
2
+ import { AggregatedStats } from "@epicgames-ps/lib-pixelstreamingfrontend-ue5.5";
3
+ /**
4
+ * Build a Stats message payload from AggregatedStats.
5
+ * Keeps the same public API as before: Stats(stats)
6
+ */
7
+ export declare function Stats(stats: AggregatedStats): Messages.Stats["stats"];
@@ -0,0 +1,8 @@
1
+ export interface FileTransferMsg {
2
+ type: "fileTransfer";
3
+ filename?: string;
4
+ }
5
+ /**
6
+ * Normalized parse + validate for fileTransfer control messages
7
+ */
8
+ export declare function parseFileTransfer(input: unknown): FileTransferMsg;
@@ -13,7 +13,7 @@
13
13
  */
14
14
  /**
15
15
  * These interfaces need to be copied manually from ITicket.ts for now if the interface changes there
16
- * The way how webpack, rollup and this whole mono repo is setup up, I cannot just import it......
16
+ * The way how webpack and this whole mono repo is setup up, I cannot just import it......
17
17
  */
18
18
  export interface IDiagnostics {
19
19
  device?: Device;