@wvdsh/api 0.1.66 → 0.1.68
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.
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
export type DeviceFingerprint = {
|
|
2
|
-
country?: string | undefined;
|
|
3
2
|
browser?: string | undefined;
|
|
3
|
+
browserType?: string | undefined;
|
|
4
4
|
browserVersion?: string | undefined;
|
|
5
|
-
|
|
5
|
+
country?: string | undefined;
|
|
6
6
|
deviceType?: string | undefined;
|
|
7
|
-
language?: string | undefined;
|
|
8
7
|
gpu?: {
|
|
9
8
|
adapter?: {
|
|
10
|
-
vendor?: string | undefined;
|
|
11
9
|
architecture?: string | undefined;
|
|
12
|
-
device?: string | undefined;
|
|
13
10
|
description?: string | undefined;
|
|
11
|
+
device?: string | undefined;
|
|
12
|
+
vendor?: string | undefined;
|
|
14
13
|
} | undefined;
|
|
15
14
|
tier?: {
|
|
16
|
-
gpu?: string | undefined;
|
|
17
15
|
device?: string | undefined;
|
|
18
|
-
isMobile?: boolean | undefined;
|
|
19
16
|
fps?: number | undefined;
|
|
20
|
-
|
|
17
|
+
gpu?: string | undefined;
|
|
18
|
+
isMobile?: boolean | undefined;
|
|
21
19
|
tier: number;
|
|
20
|
+
type: string;
|
|
22
21
|
} | undefined;
|
|
23
22
|
} | undefined;
|
|
23
|
+
language?: string | undefined;
|
|
24
|
+
os?: string | undefined;
|
|
24
25
|
};
|
|
25
26
|
/**
|
|
26
27
|
* Default values used by Game SDKs
|
|
@@ -117,6 +118,8 @@ export declare const GAME_AUTHORITY: {
|
|
|
117
118
|
export declare const IFRAME_MESSAGE_TYPE: {
|
|
118
119
|
readonly PROGRESS_UPDATE: "ProgressUpdate";
|
|
119
120
|
readonly LOADING_COMPLETE: "LoadingComplete";
|
|
121
|
+
readonly LOADING_FAILED: "LoadingFailed";
|
|
122
|
+
readonly FRAME_BOOTED: "FrameBooted";
|
|
120
123
|
readonly TOGGLE_OVERLAY: "ToggleOverlay";
|
|
121
124
|
readonly TAKE_FOCUS: "TakeFocus";
|
|
122
125
|
readonly LOBBY_JOINED: "LobbyJoined";
|
|
@@ -136,17 +139,13 @@ export declare const IFRAME_MESSAGE_TYPE: {
|
|
|
136
139
|
readonly ENTITLEMENTS_GRANTED: "EntitlementsGranted";
|
|
137
140
|
readonly LINK_COPIED: "LinkCopied";
|
|
138
141
|
};
|
|
142
|
+
export declare const GAME_ISOLATION_ERROR_PATTERN: RegExp;
|
|
139
143
|
export declare const SERVICE_WORKER_MESSAGE_TYPE: {
|
|
140
144
|
readonly EMBED_CONFIGURE: "embed.configure";
|
|
141
145
|
readonly EMBED_CONFIGURE_ACK: "embed.configure:ack";
|
|
142
146
|
readonly EMBED_CREDS_REQUEST: "embed.creds-request";
|
|
143
147
|
readonly EMBED_CREDS_RESPONSE: "embed.creds-response";
|
|
144
148
|
};
|
|
145
|
-
export declare const SW_PRELOAD_MESSAGE_TYPE: {
|
|
146
|
-
readonly PROGRESS: "sw-progress";
|
|
147
|
-
readonly READY: "sw-ready";
|
|
148
|
-
readonly FAILED: "sw-failed";
|
|
149
|
-
};
|
|
150
149
|
export interface IFrameResponse<T> {
|
|
151
150
|
requestId: string;
|
|
152
151
|
requestType: (typeof IFRAME_MESSAGE_TYPE)[keyof typeof IFRAME_MESSAGE_TYPE];
|
|
@@ -204,6 +203,12 @@ export type IFrameEventPayloadMap = {
|
|
|
204
203
|
[IFRAME_MESSAGE_TYPE.ENTITLEMENTS_GRANTED]: {
|
|
205
204
|
contentIdentifiers: string[];
|
|
206
205
|
};
|
|
206
|
+
[IFRAME_MESSAGE_TYPE.LOADING_FAILED]: {
|
|
207
|
+
message: string;
|
|
208
|
+
crossOriginIsolated: boolean;
|
|
209
|
+
reason?: 'auth';
|
|
210
|
+
};
|
|
211
|
+
[IFRAME_MESSAGE_TYPE.FRAME_BOOTED]: void;
|
|
207
212
|
};
|
|
208
213
|
export declare const LAUNCH_PARAM_PREFIX = "wvdsh_";
|
|
209
214
|
export interface GameLaunchParams {
|
|
@@ -98,6 +98,8 @@ export const GAME_AUTHORITY = {
|
|
|
98
98
|
export const IFRAME_MESSAGE_TYPE = {
|
|
99
99
|
PROGRESS_UPDATE: 'ProgressUpdate',
|
|
100
100
|
LOADING_COMPLETE: 'LoadingComplete',
|
|
101
|
+
LOADING_FAILED: 'LoadingFailed',
|
|
102
|
+
FRAME_BOOTED: 'FrameBooted',
|
|
101
103
|
TOGGLE_OVERLAY: 'ToggleOverlay',
|
|
102
104
|
TAKE_FOCUS: 'TakeFocus',
|
|
103
105
|
LOBBY_JOINED: 'LobbyJoined',
|
|
@@ -117,17 +119,17 @@ export const IFRAME_MESSAGE_TYPE = {
|
|
|
117
119
|
ENTITLEMENTS_GRANTED: 'EntitlementsGranted',
|
|
118
120
|
LINK_COPIED: 'LinkCopied'
|
|
119
121
|
};
|
|
122
|
+
// Errors that mean a threaded build ran without cross-origin isolation, only meaningful when crossOriginIsolated is false.
|
|
123
|
+
// Godot: "SharedArrayBuffer is not defined" / "Cross Origin Isolation"; Unity: "does not support multithreading";
|
|
124
|
+
// Safari/Firefox posting shared wasm memory to a worker: "DataCloneError: The object can not be cloned".
|
|
125
|
+
// Deliberately not a bare "thread": engines mention their main thread in unrelated errors and warnings
|
|
126
|
+
export const GAME_ISOLATION_ERROR_PATTERN = /SharedArrayBuffer|shared memory|isolat|threading|DataCloneError|be cloned/i;
|
|
120
127
|
export const SERVICE_WORKER_MESSAGE_TYPE = {
|
|
121
128
|
EMBED_CONFIGURE: 'embed.configure',
|
|
122
129
|
EMBED_CONFIGURE_ACK: 'embed.configure:ack',
|
|
123
130
|
EMBED_CREDS_REQUEST: 'embed.creds-request',
|
|
124
131
|
EMBED_CREDS_RESPONSE: 'embed.creds-response'
|
|
125
132
|
};
|
|
126
|
-
export const SW_PRELOAD_MESSAGE_TYPE = {
|
|
127
|
-
PROGRESS: 'sw-progress',
|
|
128
|
-
READY: 'sw-ready',
|
|
129
|
-
FAILED: 'sw-failed'
|
|
130
|
-
};
|
|
131
133
|
// Launch params passed from URL query params to the game SDK
|
|
132
134
|
export const LAUNCH_PARAM_PREFIX = 'wvdsh_';
|
|
133
135
|
// URL params referenced by external consumers
|