@wvdsh/api 0.1.65 → 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
|
|
@@ -38,6 +39,7 @@ export declare const GAME_ENGINE: {
|
|
|
38
39
|
readonly RENPY: "RENPY";
|
|
39
40
|
readonly CUSTOM: "CUSTOM";
|
|
40
41
|
};
|
|
42
|
+
export declare const MAX_LOBBY_USERS = 100;
|
|
41
43
|
export declare const LOBBY_DEFAULTS: {
|
|
42
44
|
readonly MAX_PLAYERS: 100;
|
|
43
45
|
readonly EXPIRY_HOURS: 24;
|
|
@@ -116,6 +118,8 @@ export declare const GAME_AUTHORITY: {
|
|
|
116
118
|
export declare const IFRAME_MESSAGE_TYPE: {
|
|
117
119
|
readonly PROGRESS_UPDATE: "ProgressUpdate";
|
|
118
120
|
readonly LOADING_COMPLETE: "LoadingComplete";
|
|
121
|
+
readonly LOADING_FAILED: "LoadingFailed";
|
|
122
|
+
readonly FRAME_BOOTED: "FrameBooted";
|
|
119
123
|
readonly TOGGLE_OVERLAY: "ToggleOverlay";
|
|
120
124
|
readonly TAKE_FOCUS: "TakeFocus";
|
|
121
125
|
readonly LOBBY_JOINED: "LobbyJoined";
|
|
@@ -135,6 +139,7 @@ export declare const IFRAME_MESSAGE_TYPE: {
|
|
|
135
139
|
readonly ENTITLEMENTS_GRANTED: "EntitlementsGranted";
|
|
136
140
|
readonly LINK_COPIED: "LinkCopied";
|
|
137
141
|
};
|
|
142
|
+
export declare const GAME_ISOLATION_ERROR_PATTERN: RegExp;
|
|
138
143
|
export declare const SERVICE_WORKER_MESSAGE_TYPE: {
|
|
139
144
|
readonly EMBED_CONFIGURE: "embed.configure";
|
|
140
145
|
readonly EMBED_CONFIGURE_ACK: "embed.configure:ack";
|
|
@@ -203,6 +208,12 @@ export type IFrameEventPayloadMap = {
|
|
|
203
208
|
[IFRAME_MESSAGE_TYPE.ENTITLEMENTS_GRANTED]: {
|
|
204
209
|
contentIdentifiers: string[];
|
|
205
210
|
};
|
|
211
|
+
[IFRAME_MESSAGE_TYPE.LOADING_FAILED]: {
|
|
212
|
+
message: string;
|
|
213
|
+
crossOriginIsolated: boolean;
|
|
214
|
+
reason?: 'auth';
|
|
215
|
+
};
|
|
216
|
+
[IFRAME_MESSAGE_TYPE.FRAME_BOOTED]: void;
|
|
206
217
|
};
|
|
207
218
|
export declare const LAUNCH_PARAM_PREFIX = "wvdsh_";
|
|
208
219
|
export interface GameLaunchParams {
|
|
@@ -12,8 +12,9 @@ export const GAME_ENGINE = {
|
|
|
12
12
|
};
|
|
13
13
|
// ========== LOBBIES ==========
|
|
14
14
|
const LOBBY_EXPIRY_HOURS = 24;
|
|
15
|
+
export const MAX_LOBBY_USERS = 100;
|
|
15
16
|
export const LOBBY_DEFAULTS = {
|
|
16
|
-
MAX_PLAYERS:
|
|
17
|
+
MAX_PLAYERS: MAX_LOBBY_USERS,
|
|
17
18
|
EXPIRY_HOURS: LOBBY_EXPIRY_HOURS,
|
|
18
19
|
EXPIRY_MS: LOBBY_EXPIRY_HOURS * 60 * 60 * 1000
|
|
19
20
|
};
|
|
@@ -97,6 +98,8 @@ export const GAME_AUTHORITY = {
|
|
|
97
98
|
export const IFRAME_MESSAGE_TYPE = {
|
|
98
99
|
PROGRESS_UPDATE: 'ProgressUpdate',
|
|
99
100
|
LOADING_COMPLETE: 'LoadingComplete',
|
|
101
|
+
LOADING_FAILED: 'LoadingFailed',
|
|
102
|
+
FRAME_BOOTED: 'FrameBooted',
|
|
100
103
|
TOGGLE_OVERLAY: 'ToggleOverlay',
|
|
101
104
|
TAKE_FOCUS: 'TakeFocus',
|
|
102
105
|
LOBBY_JOINED: 'LobbyJoined',
|
|
@@ -116,6 +119,11 @@ export const IFRAME_MESSAGE_TYPE = {
|
|
|
116
119
|
ENTITLEMENTS_GRANTED: 'EntitlementsGranted',
|
|
117
120
|
LINK_COPIED: 'LinkCopied'
|
|
118
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;
|
|
119
127
|
export const SERVICE_WORKER_MESSAGE_TYPE = {
|
|
120
128
|
EMBED_CONFIGURE: 'embed.configure',
|
|
121
129
|
EMBED_CONFIGURE_ACK: 'embed.configure:ack',
|