@wvdsh/api 0.1.66 → 0.1.67
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,6 +139,7 @@ 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";
|
|
@@ -204,6 +208,12 @@ export type IFrameEventPayloadMap = {
|
|
|
204
208
|
[IFRAME_MESSAGE_TYPE.ENTITLEMENTS_GRANTED]: {
|
|
205
209
|
contentIdentifiers: string[];
|
|
206
210
|
};
|
|
211
|
+
[IFRAME_MESSAGE_TYPE.LOADING_FAILED]: {
|
|
212
|
+
message: string;
|
|
213
|
+
crossOriginIsolated: boolean;
|
|
214
|
+
reason?: 'auth';
|
|
215
|
+
};
|
|
216
|
+
[IFRAME_MESSAGE_TYPE.FRAME_BOOTED]: void;
|
|
207
217
|
};
|
|
208
218
|
export declare const LAUNCH_PARAM_PREFIX = "wvdsh_";
|
|
209
219
|
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,6 +119,11 @@ 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',
|