@arcware-cloud/pixelstreaming-websdk 1.3.21 → 1.3.23

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 (48) hide show
  1. package/README.md +4 -0
  2. package/index.cjs.js +27490 -27086
  3. package/index.esm.js +27747 -27375
  4. package/index.umd.js +27489 -27085
  5. package/package.json +1 -1
  6. package/types/index.d.ts +0 -3
  7. package/types/lib/ApplyUrlHack.d.ts +0 -2
  8. package/types/lib/ArcwareApplication.d.ts +0 -54
  9. package/types/lib/ArcwareConfig.d.ts +0 -44
  10. package/types/lib/ArcwareInit.d.ts +0 -19
  11. package/types/lib/ArcwarePixelStreaming.d.ts +0 -140
  12. package/types/lib/MessageTypes.d.ts +0 -4
  13. package/types/lib/domain/ArcwareSettingsSchema.d.ts +0 -274
  14. package/types/lib/domain/EventHandler.d.ts +0 -11
  15. package/types/lib/domain/Session.d.ts +0 -29
  16. package/types/lib/domain/Stats.d.ts +0 -36
  17. package/types/lib/domain/debounce.d.ts +0 -1
  18. package/types/lib/features/ArcwareEventUtil.d.ts +0 -28
  19. package/types/lib/features/ArcwareFileTransferUtil.d.ts +0 -13
  20. package/types/lib/features/DiagnosticsCollector.d.ts +0 -181
  21. package/types/lib/features/ZWhiteLabel.d.ts +0 -31
  22. package/types/lib/features/common.d.ts +0 -17
  23. package/types/lib/features/whiteLabelling.d.ts +0 -4
  24. package/types/lib/index.d.ts +0 -6
  25. package/types/lib/styles/ArcwarePixelStreamingApplicationStyles.d.ts +0 -543
  26. package/types/lib/ui/ArcwareLogoLoader/index.d.ts +0 -14
  27. package/types/lib/ui/AudioButton/AudioIcon.d.ts +0 -7
  28. package/types/lib/ui/AudioButton/index.d.ts +0 -15
  29. package/types/lib/ui/LoveLetters/index.d.ts +0 -6
  30. package/types/lib/ui/MicButton/index.d.ts +0 -14
  31. package/types/lib/ui/MicIcon/index.d.ts +0 -7
  32. package/types/lib/ui/MicrophoneOverlay/index.d.ts +0 -11
  33. package/types/lib/ui/PlayIcon/index.d.ts +0 -5
  34. package/types/lib/ui/StopButton/index.d.ts +0 -16
  35. package/types/lib/ui/StopIcon/index.d.ts +0 -5
  36. package/types/shared/index.d.ts +0 -1
  37. package/types/shared/lib/Messages/ErrorMessage.d.ts +0 -18
  38. package/types/shared/lib/Messages/LoveLetter.d.ts +0 -18
  39. package/types/shared/lib/Messages/Ping.d.ts +0 -15
  40. package/types/shared/lib/Messages/Queue.d.ts +0 -58
  41. package/types/shared/lib/Messages/Render.d.ts +0 -9
  42. package/types/shared/lib/Messages/SessionId.d.ts +0 -12
  43. package/types/shared/lib/Messages/Stats.d.ts +0 -182
  44. package/types/shared/lib/Messages/StreamInfo.d.ts +0 -338
  45. package/types/shared/lib/Messages/Version.d.ts +0 -12
  46. package/types/shared/lib/Messages/WebSdkSettings.d.ts +0 -96
  47. package/types/shared/lib/Messages/index.d.ts +0 -193
  48. package/types/shared/lib/index.d.ts +0 -1
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.21",
4
+ "version": "1.3.23",
5
5
  "type": "commonjs",
6
6
  "main": "./index.umd.js",
7
7
  "module": "./index.esm.js",
package/types/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from "@epicgames-ps/lib-pixelstreamingfrontend-ue5.5";
2
- export * from "@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5";
3
- export * from "./lib";
@@ -1,2 +0,0 @@
1
- export declare function UrlBuilder(input: () => string, urlFlags?: string): string;
2
- export declare function ApplyUrlHack(): void;
@@ -1,54 +0,0 @@
1
- import { Application, UIOptions } from "@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5";
2
- import { ArcwarePixelStreaming } from "./ArcwarePixelStreaming";
3
- export declare class ArcwareApplication extends Application {
4
- static Flags: {
5
- new (): {};
6
- noSession: "noSession";
7
- };
8
- private baseShowAfkOverlay;
9
- stream: ArcwarePixelStreaming;
10
- private videoElementParent;
11
- private parentElement;
12
- private responseCallback;
13
- private analyticsEventCallback;
14
- private fileDownloadCallback;
15
- private webRtcController;
16
- get rootElement(): HTMLElement;
17
- private ArcwareSection;
18
- constructor(options: UIOptions & {
19
- stream: ArcwarePixelStreaming;
20
- });
21
- addLoveLetterhandler(): void;
22
- /** Set's and resets hidden state of "additional" UI Elements.
23
- * For example buttons or connection icon.
24
- * These will fade in through css animation upon the videoInitialized event.
25
- * At this point in time the streamInfo is already processed.
26
- */
27
- private uiElementsVisibility;
28
- private adjustSettingsPanel;
29
- private createAudioToggleButton;
30
- private createMicToggleButton;
31
- private createStopButton;
32
- private uiDefaultButtonVisibilty;
33
- private preventDefaultKeyboardEvents;
34
- private autoPlayHandler;
35
- /** Request a response from you UE Application.
36
- * The returned response depends on the implementation of your UE Application.
37
- * It can be used to request information from the application, such as:
38
- * - a state to update your custom ui
39
- * - get the url to the pdf it uploaded to some remote service of yours
40
- * - the id of the save-game
41
- * .. anything else you could imagine.
42
- */
43
- getApplicationResponse(callback: (response: string) => void): void;
44
- applicationResponse(response: string): void;
45
- private applyArcwareStyles;
46
- /** Emit an event towards the UE Application.
47
- * Mainly used to bubble events like a button press or other command inputs towards the UE Application.
48
- */
49
- emitUIInteraction(descriptor: object | string): void;
50
- private addTextToConnectOverlay;
51
- analyticsEvent(response: unknown): void;
52
- private fileDownload;
53
- private syncAfkOverlayFromWhiteLabelling;
54
- }
@@ -1,44 +0,0 @@
1
- import { Config, ConfigParams } from "@epicgames-ps/lib-pixelstreamingfrontend-ue5.5";
2
- import { Session } from "./domain/Session";
3
- import { Settings } from "./domain/ArcwareSettingsSchema";
4
- import { WhiteLabel } from "./features/ZWhiteLabel";
5
- import { EventHandler } from "./domain/EventHandler";
6
- /** Default arcware signalling endpoint. */
7
- export declare const DefaultUrl: "wss://signalling-client.ragnarok.arcware.cloud";
8
- export interface ArcwareConfigParams extends ConfigParams {
9
- settings: Settings;
10
- envName?: string;
11
- }
12
- export declare class ArcwareConfig extends Config {
13
- /**
14
- * Can be used to fetch projectId and shareId from the current url.
15
- * Example:
16
- * /something/:projectId/:shareId/something?something => { projectId, shareId }
17
- * /:projectId => { projectId }
18
- * /:shareId => { shareId }
19
- * /:shareId/:projectId => { projectId, shareId }
20
- *
21
- * The projectId must be uuidv4.
22
- * The shareId must be "shareId-" prefixed.
23
- *
24
- * Usage:
25
- * // This will spread the projectId and the shareId into the settings. Define anything you want to override after the spread operation.
26
- * new ArcwareConfig({ settings: { ...ArcwareConfig.PickIdsOfUrl() } });
27
- */
28
- static PickIdsOfUrl(): Pick<Settings, "shareId" | "projectId">;
29
- readonly session: Session;
30
- readonly settings: Settings;
31
- private _initialSettings;
32
- readonly VERSION = "1.3.21";
33
- readonly whiteLabellingChanged: EventHandler<{
34
- next: WhiteLabel;
35
- changed: boolean;
36
- }>;
37
- private signallingWlURL;
38
- constructor(config: ArcwareConfigParams);
39
- getWhiteLabelling(ShareId: string): Promise<WhiteLabel | undefined>;
40
- /** Setup connection string. */
41
- get urlFlags(): string;
42
- get initialSettings(): any;
43
- modifyInitialSettings(mouseLock: boolean): void;
44
- }
@@ -1,19 +0,0 @@
1
- import { ArcwareConfig, ArcwareConfigParams } from "./ArcwareConfig";
2
- import { ArcwarePixelStreaming } from "./ArcwarePixelStreaming";
3
- import { ArcwareApplication } from "./ArcwareApplication";
4
- type ArcwareSettings = ArcwareConfigParams["settings"];
5
- export type ArcwareInitConfiguration = Partial<Omit<ArcwareConfigParams, "settings">> & {
6
- settings?: Partial<Omit<ArcwareSettings, "shareId" | "projectId">>;
7
- };
8
- export type ConnectionInfo = {
9
- shareId: string;
10
- projectId?: string;
11
- };
12
- /** What ArcwareInit returns. */
13
- export interface ArcwareInitResult {
14
- Config: ArcwareConfig;
15
- PixelStreaming: ArcwarePixelStreaming;
16
- Application: ArcwareApplication;
17
- }
18
- export declare function ArcwareInit(ids: ConnectionInfo, configuration?: ArcwareInitConfiguration, forceRefresh?: boolean): ArcwareInitResult;
19
- export {};
@@ -1,140 +0,0 @@
1
- import { Messages } from "@arcware-cloud/shared-pixelstreaming-websdk";
2
- import { PixelStreaming, PixelStreamingOverrides } from "@epicgames-ps/lib-pixelstreamingfrontend-ue5.5";
3
- import { z } from "zod";
4
- import { ArcwareConfig } from "./ArcwareConfig";
5
- import { EventHandler } from "./domain/EventHandler";
6
- import { Session } from "./domain/Session";
7
- type OutboundByKey<K extends keyof typeof Messages.Send> = z.input<(typeof Messages.Send)[K]> & {
8
- type: K;
9
- };
10
- export declare enum WebsocketState {
11
- CONNECTING = 0,
12
- OPEN = 1,
13
- CLOSING = 2,
14
- CLOSED = 3
15
- }
16
- export declare class ArcwarePixelStreaming extends PixelStreaming {
17
- /** Override default config with ArcwareConfig. */
18
- config: ArcwareConfig;
19
- streamInfo?: Messages.StreamInfo;
20
- loveLettersContainer: HTMLDivElement | undefined;
21
- private loveLettersList;
22
- private loveLettersQueue;
23
- private isProcessingQueue;
24
- private microphoneOverlay;
25
- private diagnosticsCollector;
26
- private _splashHost?;
27
- private _splashVideo?;
28
- private outbox;
29
- private videoInitializedSent;
30
- private _boundTransport?;
31
- private _onWsOpen?;
32
- private _onWsClose?;
33
- private _transportWatchTimer?;
34
- private _rVFCsupported;
35
- private _rvfcHandle?;
36
- private _rVFCArmedForElement?;
37
- private _mo?;
38
- private _postInitSideEffectsDone;
39
- private logoLoader?;
40
- private resetInitGuardsAndHooks;
41
- reconnect(): void;
42
- private isRetryableClose;
43
- private bindTransportEvents;
44
- private get isWsOpen();
45
- /** Returns this PixelStreaming Instances websocket state. */
46
- get websocketState(): WebsocketState;
47
- constructor(config: ArcwareConfig, overrides?: PixelStreamingOverrides);
48
- /** Getter for the session object. */
49
- get session(): Session;
50
- /**
51
- * * * * * * *
52
- * Listen *
53
- * * * * * * *
54
- */
55
- /** On version requested, the version of the WebSDK would be returned. */
56
- private onVersion;
57
- private isVideoRenderingNow;
58
- private waitForFirstFrameWithTimeout;
59
- private onRender;
60
- /** On ping the session creation timestamp will be updated. */
61
- private onPing;
62
- /** Handle incoming configurations. */
63
- private onStreamInfo;
64
- readonly queueHandler: EventHandler<{
65
- type?: "queue";
66
- queue?: {
67
- index?: number;
68
- queueLength?: number;
69
- waited?: number;
70
- estimatedWaitTime?: number;
71
- averageWaitTime?: number;
72
- valueType?: "milliseconds" | "seconds" | "minutes" | "hours" | "days";
73
- };
74
- }>;
75
- private onQueue;
76
- readonly errorHandler: EventHandler<{
77
- type?: "error";
78
- code?: number;
79
- reason?: string;
80
- verbosity?: number;
81
- }>;
82
- private onError;
83
- readonly loveLetterHandler: EventHandler<{
84
- type?: "letter";
85
- reason?: string;
86
- code?: number;
87
- verbosity?: number;
88
- }>;
89
- private onLoveLetter;
90
- readonly sessionIdHandler: EventHandler<string>;
91
- private onSessionId;
92
- private sendVideoInitializedOnce;
93
- /** VideoInitialized (native Epic event) */
94
- readonly videoInitializedHandler: EventHandler<never>;
95
- private runPostInitSideEffectsOnce;
96
- private onVideoInitialized;
97
- private attachFirstRenderedFrameOnce;
98
- private cancelFirstRenderedFrameHook;
99
- private watchVideoElementReplacement;
100
- readonly websocketOnCloseHandler: EventHandler<CloseEvent>;
101
- /** Adding a zod-safe handler. */
102
- private addMessageHandler;
103
- /**
104
- * * * * * *
105
- * Send *
106
- * * * * * *
107
- */
108
- private sendStats;
109
- send<K extends keyof typeof Messages.Send>(message: OutboundByKey<K>): void;
110
- send(type: string, payload?: Record<string, unknown>): void;
111
- send(message: {
112
- type: string;
113
- } & Record<string, unknown>): void;
114
- private _dispatchOrBuffer;
115
- private flushOutbox;
116
- private handleResolutionChange;
117
- private applyResolutionIfPlaying;
118
- removePlayer(): void;
119
- private startTransportWatcher;
120
- private stopTransportWatcher;
121
- private handleMouseLock;
122
- initLoveLettersContainer(): void;
123
- private pushLetter;
124
- private processLoveLetterQueue;
125
- private handleRemoveLoveLetters;
126
- toggleAudio(videoElement: HTMLVideoElement, enabled: boolean): void;
127
- private createMicrophoneOverlay;
128
- toggleMic(enable: boolean, isDefault: boolean): void;
129
- onStreamingStateChange(callback: (isStreaming: boolean) => void): void;
130
- private removeXRIconIfDisabled;
131
- private injectCustomUI;
132
- private applyBrandingFromSettings;
133
- private ensureSplashHost;
134
- private destroySplashVideo;
135
- private upsertSplashVideo;
136
- private hideSplashVideo;
137
- private isVideoUrl;
138
- static clearSessionId(): void;
139
- }
140
- export {};
@@ -1,4 +0,0 @@
1
- import { Messages } from "@arcware-cloud/shared-pixelstreaming-websdk";
2
- export type ErrorMessage = Messages.ErrorMessage;
3
- export type Queue = Messages.Queue;
4
- export type LoveLetter = Messages.LoveLetter;
@@ -1,274 +0,0 @@
1
- import { z } from "zod";
2
- /** Arcware Settings. */
3
- export declare const ArcwareSettingsSchema: z.ZodObject<{
4
- /** Overwrites the Session-Tool and uses the provided session instead. */
5
- session: z.ZodOptional<z.ZodString>;
6
- /** Can be used to be added to the request in order to verify access to private projects.
7
- * For internal use only. => Preview page.
8
- */
9
- token: z.ZodOptional<z.ZodString>;
10
- /** @deprecated in there for legacy use. Can only be used when token is provided. */
11
- bypass: z.ZodOptional<z.ZodBoolean>;
12
- /** Handler for server side error messages. */
13
- errorHandler: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
14
- type: z.ZodLiteral<"error">;
15
- code: z.ZodNumber;
16
- reason: z.ZodString;
17
- verbosity: z.ZodNumber;
18
- }, "strip", z.ZodTypeAny, {
19
- type?: "error";
20
- code?: number;
21
- reason?: string;
22
- verbosity?: number;
23
- }, {
24
- type?: "error";
25
- code?: number;
26
- reason?: string;
27
- verbosity?: number;
28
- }>], z.ZodUnknown>, z.ZodVoid>>;
29
- /** Handler for queue events. */
30
- queueHandler: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
31
- type: z.ZodLiteral<"queue">;
32
- queue: z.ZodObject<{
33
- index: z.ZodOptional<z.ZodNumber>;
34
- queueLength: z.ZodOptional<z.ZodNumber>;
35
- waited: z.ZodOptional<z.ZodNumber>;
36
- estimatedWaitTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
37
- averageWaitTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
38
- valueType: z.ZodEnum<["milliseconds", "seconds", "minutes", "hours", "days"]>; /** Handler for love letters.
39
- * "LoveLetters" are send from backend to the SDK to state what phase the connection currently is in. */
40
- }, "strip", z.ZodTypeAny, {
41
- index?: number;
42
- queueLength?: number;
43
- waited?: number;
44
- estimatedWaitTime?: number;
45
- averageWaitTime?: number;
46
- valueType?: "milliseconds" | "seconds" | "minutes" | "hours" | "days";
47
- }, {
48
- index?: number;
49
- queueLength?: number;
50
- waited?: number;
51
- estimatedWaitTime?: number;
52
- averageWaitTime?: number;
53
- valueType?: "milliseconds" | "seconds" | "minutes" | "hours" | "days";
54
- }>;
55
- }, "strip", z.ZodTypeAny, {
56
- type?: "queue";
57
- queue?: {
58
- index?: number;
59
- queueLength?: number;
60
- waited?: number;
61
- estimatedWaitTime?: number;
62
- averageWaitTime?: number;
63
- valueType?: "milliseconds" | "seconds" | "minutes" | "hours" | "days";
64
- };
65
- }, {
66
- type?: "queue";
67
- queue?: {
68
- index?: number;
69
- queueLength?: number;
70
- waited?: number;
71
- estimatedWaitTime?: number;
72
- averageWaitTime?: number;
73
- valueType?: "milliseconds" | "seconds" | "minutes" | "hours" | "days";
74
- };
75
- }>], z.ZodUnknown>, z.ZodVoid>>;
76
- /** Handler for sessionId message. */
77
- sessionIdHandler: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
78
- /** Handler for love letters.
79
- * "LoveLetters" are send from backend to the SDK to state what phase the connection currently is in. */
80
- loveLetterHandler: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
81
- type: z.ZodLiteral<"letter">;
82
- reason: z.ZodString;
83
- code: z.ZodNumber;
84
- verbosity: z.ZodNumber;
85
- }, "strip", z.ZodTypeAny, {
86
- type?: "letter";
87
- reason?: string;
88
- code?: number;
89
- verbosity?: number;
90
- }, {
91
- type?: "letter";
92
- reason?: string;
93
- code?: number;
94
- verbosity?: number;
95
- }>], z.ZodUnknown>, z.ZodVoid>>;
96
- /** Show or hide the fullscreen button. */
97
- fullscreenButton: z.ZodOptional<z.ZodBoolean>;
98
- /** Show or hide the settings button. */
99
- settingsButton: z.ZodOptional<z.ZodBoolean>;
100
- /** Show or hide the info button. */
101
- infoButton: z.ZodOptional<z.ZodBoolean>;
102
- /** Show or hide the audio button. */
103
- audioButton: z.ZodOptional<z.ZodBoolean>;
104
- /** Show or hide the microphone button. */
105
- micButton: z.ZodOptional<z.ZodBoolean>;
106
- /** Show or hide the microphone button. */
107
- stopButton: z.ZodOptional<z.ZodBoolean>;
108
- /** Show or hide the connectionStrengthIcon button. */
109
- connectionStrengthIcon: z.ZodOptional<z.ZodBoolean>;
110
- /** ShareId, used for sharing your project.
111
- * Using ArcwareInit will set this required property for you. */
112
- shareId: z.ZodString;
113
- /** Id of your project, only required if your shareId refers to multiple projects.
114
- * Using ArcwareInit will set this required property for you. */
115
- projectId: z.ZodOptional<z.ZodString>;
116
- /** Enable/Disable LoveLetter logging to the console. */
117
- loveLetterLogging: z.ZodOptional<z.ZodBoolean>;
118
- /** Width with which instance should be started */
119
- startWidth: z.ZodOptional<z.ZodNumber>;
120
- /** Height with which instance should be started */
121
- startHeight: z.ZodOptional<z.ZodNumber>;
122
- /** Zoom functionality */
123
- orientationZoom: z.ZodOptional<z.ZodObject<{
124
- landscape: z.ZodNumber;
125
- portrait: z.ZodNumber;
126
- }, "strict", z.ZodTypeAny, {
127
- landscape?: number;
128
- portrait?: number;
129
- }, {
130
- landscape?: number;
131
- portrait?: number;
132
- }>>;
133
- /** Loader customization */
134
- whiteLabelling: z.ZodOptional<z.ZodObject<{
135
- loadingIconUrl: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>>;
136
- loadingIconFadeMs: z.ZodOptional<z.ZodNumber>;
137
- splashScreenUrl: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>>;
138
- splashScreenMode: z.ZodOptional<z.ZodEnum<["contain", "cover", "stretch", "repeat"]>>;
139
- splashScreenPosition: z.ZodOptional<z.ZodString>;
140
- splashScreenBgColor: z.ZodOptional<z.ZodString>;
141
- hideLoveLetters: z.ZodOptional<z.ZodBoolean>;
142
- hideAfkOverlay: z.ZodOptional<z.ZodBoolean>;
143
- }, "strict", z.ZodTypeAny, {
144
- loadingIconUrl?: string;
145
- loadingIconFadeMs?: number;
146
- splashScreenUrl?: string;
147
- splashScreenMode?: "repeat" | "contain" | "cover" | "stretch";
148
- splashScreenPosition?: string;
149
- splashScreenBgColor?: string;
150
- hideLoveLetters?: boolean;
151
- hideAfkOverlay?: boolean;
152
- }, {
153
- loadingIconUrl?: string;
154
- loadingIconFadeMs?: number;
155
- splashScreenUrl?: string;
156
- splashScreenMode?: "repeat" | "contain" | "cover" | "stretch";
157
- splashScreenPosition?: string;
158
- splashScreenBgColor?: string;
159
- hideLoveLetters?: boolean;
160
- hideAfkOverlay?: boolean;
161
- }>>;
162
- fetchRemoteWhiteLabelling: z.ZodOptional<z.ZodBoolean>;
163
- }, "strip", z.ZodTypeAny, {
164
- session?: string;
165
- token?: string;
166
- bypass?: boolean;
167
- errorHandler?: (args_0: {
168
- type?: "error";
169
- code?: number;
170
- reason?: string;
171
- verbosity?: number;
172
- }, ...args_1: unknown[]) => void;
173
- queueHandler?: (args_0: {
174
- type?: "queue";
175
- queue?: {
176
- index?: number;
177
- queueLength?: number;
178
- waited?: number;
179
- estimatedWaitTime?: number;
180
- averageWaitTime?: number;
181
- valueType?: "milliseconds" | "seconds" | "minutes" | "hours" | "days";
182
- };
183
- }, ...args_1: unknown[]) => void;
184
- sessionIdHandler?: (args_0: string, ...args_1: unknown[]) => void;
185
- loveLetterHandler?: (args_0: {
186
- type?: "letter";
187
- reason?: string;
188
- code?: number;
189
- verbosity?: number;
190
- }, ...args_1: unknown[]) => void;
191
- fullscreenButton?: boolean;
192
- settingsButton?: boolean;
193
- infoButton?: boolean;
194
- audioButton?: boolean;
195
- micButton?: boolean;
196
- stopButton?: boolean;
197
- connectionStrengthIcon?: boolean;
198
- shareId?: string;
199
- projectId?: string;
200
- loveLetterLogging?: boolean;
201
- startWidth?: number;
202
- startHeight?: number;
203
- orientationZoom?: {
204
- landscape?: number;
205
- portrait?: number;
206
- };
207
- whiteLabelling?: {
208
- loadingIconUrl?: string;
209
- loadingIconFadeMs?: number;
210
- splashScreenUrl?: string;
211
- splashScreenMode?: "repeat" | "contain" | "cover" | "stretch";
212
- splashScreenPosition?: string;
213
- splashScreenBgColor?: string;
214
- hideLoveLetters?: boolean;
215
- hideAfkOverlay?: boolean;
216
- };
217
- fetchRemoteWhiteLabelling?: boolean;
218
- }, {
219
- session?: string;
220
- token?: string;
221
- bypass?: boolean;
222
- errorHandler?: (args_0: {
223
- type?: "error";
224
- code?: number;
225
- reason?: string;
226
- verbosity?: number;
227
- }, ...args_1: unknown[]) => void;
228
- queueHandler?: (args_0: {
229
- type?: "queue";
230
- queue?: {
231
- index?: number;
232
- queueLength?: number;
233
- waited?: number;
234
- estimatedWaitTime?: number;
235
- averageWaitTime?: number;
236
- valueType?: "milliseconds" | "seconds" | "minutes" | "hours" | "days";
237
- };
238
- }, ...args_1: unknown[]) => void;
239
- sessionIdHandler?: (args_0: string, ...args_1: unknown[]) => void;
240
- loveLetterHandler?: (args_0: {
241
- type?: "letter";
242
- reason?: string;
243
- code?: number;
244
- verbosity?: number;
245
- }, ...args_1: unknown[]) => void;
246
- fullscreenButton?: boolean;
247
- settingsButton?: boolean;
248
- infoButton?: boolean;
249
- audioButton?: boolean;
250
- micButton?: boolean;
251
- stopButton?: boolean;
252
- connectionStrengthIcon?: boolean;
253
- shareId?: string;
254
- projectId?: string;
255
- loveLetterLogging?: boolean;
256
- startWidth?: number;
257
- startHeight?: number;
258
- orientationZoom?: {
259
- landscape?: number;
260
- portrait?: number;
261
- };
262
- whiteLabelling?: {
263
- loadingIconUrl?: string;
264
- loadingIconFadeMs?: number;
265
- splashScreenUrl?: string;
266
- splashScreenMode?: "repeat" | "contain" | "cover" | "stretch";
267
- splashScreenPosition?: string;
268
- splashScreenBgColor?: string;
269
- hideLoveLetters?: boolean;
270
- hideAfkOverlay?: boolean;
271
- };
272
- fetchRemoteWhiteLabelling?: boolean;
273
- }>;
274
- export type Settings = z.infer<typeof ArcwareSettingsSchema>;
@@ -1,11 +0,0 @@
1
- /** A helper class to spread the event to additional event handlers added from external sources. */
2
- export declare class EventHandler<Type> {
3
- private callbacks;
4
- /** Returns the added callback on success or null, if something went wrong. */
5
- add<Callback extends (arg: Type) => void>(callback: Callback): Callback | null;
6
- /** Returns true if the input callback has been found and removed and false if not. */
7
- remove<Callback extends (arg: Type) => void>(callback: Callback): boolean;
8
- constructor();
9
- /** Emits the event-data for each of the existing handlers. */
10
- static Emit<Type>(handler: EventHandler<Type>, event: Type): void;
11
- }
@@ -1,29 +0,0 @@
1
- import { z } from "zod";
2
- declare const ZOptions: z.ZodObject<{
3
- localStorageKey: z.ZodDefault<z.ZodString>;
4
- keepSession: z.ZodDefault<z.ZodNumber>;
5
- }, "strip", z.ZodTypeAny, {
6
- localStorageKey?: string;
7
- keepSession?: number;
8
- }, {
9
- localStorageKey?: string;
10
- keepSession?: number;
11
- }>;
12
- type Options = z.infer<typeof ZOptions>;
13
- /** The sessionId is stored in the localStorage to allow for reconnection and
14
- * to prevent spamming start requests of instances, when smashing F5.
15
- */
16
- export declare class Session {
17
- private _current?;
18
- get current(): string;
19
- get noSession(): boolean;
20
- get id(): string | null;
21
- private options;
22
- private get localStorageKey();
23
- constructor(options?: Options);
24
- /** Set's the session with creation date for the given storage key to the localStorage. */
25
- set(sessionId: string): void;
26
- /** Removes a session from the localStorage. */
27
- unset(): void;
28
- }
29
- export {};
@@ -1,36 +0,0 @@
1
- import { AggregatedStats, CandidatePairStats } from "@epicgames-ps/lib-pixelstreamingfrontend-ue5.5";
2
- export declare function Stats(stats: AggregatedStats): import("zod").objectOutputType<{
3
- codecs: import("zod").ZodOptional<import("zod").ZodType<Map<string, import("@epicgames-ps/lib-pixelstreamingfrontend-ue5.5/dist/types/PeerConnectionController/CodecStats").CodecStats>, import("zod").ZodTypeDef, Map<string, import("@epicgames-ps/lib-pixelstreamingfrontend-ue5.5/dist/types/PeerConnectionController/CodecStats").CodecStats>>>;
4
- candidatePair: import("zod").ZodOptional<import("zod").ZodType<CandidatePairStats[], import("zod").ZodTypeDef, CandidatePairStats[]>>;
5
- localCandidates: import("zod").ZodOptional<import("zod").ZodType<import("@epicgames-ps/lib-pixelstreamingfrontend-ue5.5").CandidateStat[], import("zod").ZodTypeDef, import("@epicgames-ps/lib-pixelstreamingfrontend-ue5.5").CandidateStat[]>>;
6
- remoteCandidates: import("zod").ZodOptional<import("zod").ZodType<import("@epicgames-ps/lib-pixelstreamingfrontend-ue5.5").CandidateStat[], import("zod").ZodTypeDef, import("@epicgames-ps/lib-pixelstreamingfrontend-ue5.5").CandidateStat[]>>;
7
- DataChannelStats: import("zod").ZodOptional<import("zod").ZodType<import("@epicgames-ps/lib-pixelstreamingfrontend-ue5.5").DataChannelStats, import("zod").ZodTypeDef, import("@epicgames-ps/lib-pixelstreamingfrontend-ue5.5").DataChannelStats>>;
8
- bytesReceived: import("zod").ZodOptional<import("zod").ZodNumber>;
9
- packetsLost: import("zod").ZodOptional<import("zod").ZodNumber>;
10
- frameWidth: import("zod").ZodOptional<import("zod").ZodNumber>;
11
- frameHeight: import("zod").ZodOptional<import("zod").ZodNumber>;
12
- framesDecoded: import("zod").ZodOptional<import("zod").ZodNumber>;
13
- framesPerSecond: import("zod").ZodOptional<import("zod").ZodNumber>;
14
- framesDropped: import("zod").ZodOptional<import("zod").ZodNumber>;
15
- videoCodec: import("zod").ZodOptional<import("zod").ZodString>;
16
- audioCodec: import("zod").ZodOptional<import("zod").ZodString>;
17
- browserInfo: import("zod").ZodOptional<import("zod").ZodObject<{
18
- userAgent: import("zod").ZodOptional<import("zod").ZodString>;
19
- platform: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
20
- language: import("zod").ZodOptional<import("zod").ZodString>;
21
- }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
22
- userAgent: import("zod").ZodOptional<import("zod").ZodString>;
23
- platform: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
24
- language: import("zod").ZodOptional<import("zod").ZodString>;
25
- }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
26
- userAgent: import("zod").ZodOptional<import("zod").ZodString>;
27
- platform: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
28
- language: import("zod").ZodOptional<import("zod").ZodString>;
29
- }, import("zod").ZodTypeAny, "passthrough">>>;
30
- currentRTT: import("zod").ZodOptional<import("zod").ZodNumber>;
31
- sessionRunTime: import("zod").ZodOptional<import("zod").ZodString>;
32
- controlsStreamInput: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
33
- videoEncoderAvgQP: import("zod").ZodOptional<import("zod").ZodNumber>;
34
- videoBitrate: import("zod").ZodOptional<import("zod").ZodNumber>;
35
- audioBitrate: import("zod").ZodOptional<import("zod").ZodNumber>;
36
- }, import("zod").ZodTypeAny, "passthrough">;
@@ -1 +0,0 @@
1
- export default function debounce<T extends (...args: any[]) => void>(func: T, wait: number): (...args: Parameters<T>) => void;
@@ -1,28 +0,0 @@
1
- export type AnalyticsEvent = {
2
- type: string;
3
- customName: string;
4
- payload?: string;
5
- };
6
- type Ok<T> = {
7
- ok: true;
8
- value: T;
9
- };
10
- type Err = {
11
- ok: false;
12
- error: string;
13
- };
14
- export type Result<T> = Ok<T> | Err;
15
- /**
16
- * Build an AnalyticsEvent from unknown input.
17
- * - accepts object or JSON/JSON-ish string
18
- * - drops extra fields
19
- * - requires non-empty string `type` and `customName`
20
- * - accepts `payload` only if it's a string; truncates by **bytes**
21
- */
22
- export declare function toAnalyticsEvent(input: unknown, opts?: {
23
- maxPayloadBytes?: number;
24
- allowJsonish?: boolean;
25
- }): Result<AnalyticsEvent>;
26
- /** Type guard */
27
- export declare function isAnalyticsEvent(x: unknown): x is AnalyticsEvent;
28
- export {};