@arcware-cloud/pixelstreaming-websdk 0.1.1-beta → 0.1.3

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.
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 CloudRT Services. Heavily based on the '@epicgames-ps' library.",
4
- "version": "0.1.1-beta",
4
+ "version": "0.1.3",
5
5
  "type": "commonjs",
6
6
  "main": "./index.umd.js",
7
7
  "module": "./index.umd.js",
@@ -15,6 +15,12 @@ export declare class ArcwareApplication extends Application {
15
15
  constructor(options: UIOptions & {
16
16
  stream: ArcwarePixelStreaming;
17
17
  });
18
+ /** Set's and resets hidden state of "additional" UI Elements.
19
+ * For example buttons or connection icon.
20
+ * These will fade in through css animation upon the videoInitialized event.
21
+ * At this point in time the streamInfo is already processed.
22
+ */
23
+ private uiElementsVisibility;
18
24
  private adjustSettingsPanel;
19
25
  private createAudioToggleButton;
20
26
  private createMicToggleButton;
@@ -27,7 +27,7 @@ export declare class ArcwareConfig extends Config {
27
27
  readonly session: Session;
28
28
  readonly settings: Settings;
29
29
  private _initialSettings;
30
- readonly VERSION = "0.1.1-beta";
30
+ readonly VERSION = "0.1.3";
31
31
  constructor(config: ArcwareConfigParams);
32
32
  /** Setup connection string. */
33
33
  get urlFlags(): string;
@@ -15,9 +15,11 @@ export declare class ArcwarePixelStreaming extends PixelStreaming {
15
15
  private loveLettersQueue;
16
16
  private isProcessingQueue;
17
17
  private microphoneOverlay;
18
- get videoStartTime(): number | undefined;
18
+ /** Returns a list of WebSocketStates of all PixelStreaming Instances generated. */
19
19
  get WebsocketStates(): WebsocketState[];
20
+ /** Counts all active PixelStreaming Instances generated. (CONNECTING & CONNECTED) */
20
21
  get ActiveInstances(): () => number;
22
+ /** Returns this PixelStreaming Instances websocket state. */
21
23
  get websocketState(): WebsocketState;
22
24
  constructor(config: ArcwareConfig, overrides?: PixelStreamingOverrides);
23
25
  /** Getter for the session object. */
@@ -84,7 +86,7 @@ export declare class ArcwarePixelStreaming extends PixelStreaming {
84
86
  private handleMouseLock;
85
87
  private initLoveLettersContainer;
86
88
  private pushLetter;
87
- private processQueue;
89
+ private processLoveLetterQueue;
88
90
  private handleRemoveLoveLetters;
89
91
  toggleAudio(videoElement: HTMLVideoElement, enabled: boolean): void;
90
92
  private createMicrophoneOverlay;
@@ -47,6 +47,16 @@ export declare const ArcwareStyles: {
47
47
  transition: string;
48
48
  background: string;
49
49
  };
50
+ "#playerUI, #videoElementParent": {
51
+ position: string;
52
+ width: string;
53
+ height: string;
54
+ top: number;
55
+ right: number;
56
+ bottom: number;
57
+ left: number;
58
+ margin: string;
59
+ };
50
60
  "#uiFeatures #controls": {
51
61
  top: string;
52
62
  left: string;
@@ -384,5 +394,14 @@ export declare const ArcwareStyles: {
384
394
  scale: number;
385
395
  };
386
396
  };
397
+ ".hidden": {
398
+ display: string;
399
+ opacity: number;
400
+ };
401
+ ".visible": {
402
+ display: string;
403
+ opacity: number;
404
+ transition: string;
405
+ };
387
406
  };
388
407
  };
@@ -37,6 +37,116 @@ export declare const ZStreamInfo: z.ZodObject<{
37
37
  version?: string | undefined;
38
38
  mouseLock?: boolean | undefined;
39
39
  }>>;
40
+ webSdkSettings: z.ZodOptional<z.ZodObject<{
41
+ conf: z.ZodOptional<z.ZodObject<{
42
+ fullscreenButton: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
43
+ stopButton: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
44
+ audioButton: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
45
+ infoButton: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
46
+ micButton: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
47
+ settingsButton: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
48
+ connectionStrengthIcon: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ fullscreenButton?: boolean | undefined;
51
+ stopButton?: boolean | undefined;
52
+ audioButton?: boolean | undefined;
53
+ infoButton?: boolean | undefined;
54
+ micButton?: boolean | undefined;
55
+ settingsButton?: boolean | undefined;
56
+ connectionStrengthIcon?: boolean | undefined;
57
+ }, {
58
+ fullscreenButton?: boolean | undefined;
59
+ stopButton?: boolean | undefined;
60
+ audioButton?: boolean | undefined;
61
+ infoButton?: boolean | undefined;
62
+ micButton?: boolean | undefined;
63
+ settingsButton?: boolean | undefined;
64
+ connectionStrengthIcon?: boolean | undefined;
65
+ }>>;
66
+ init: z.ZodOptional<z.ZodObject<{
67
+ KeyboardInput: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
68
+ MouseInput: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
69
+ GamepadInput: z.ZodOptional<z.ZodBoolean>;
70
+ TouchInput: z.ZodOptional<z.ZodBoolean>;
71
+ XRControllerInput: z.ZodOptional<z.ZodBoolean>;
72
+ UseMic: z.ZodOptional<z.ZodBoolean>;
73
+ FakeMouseWithTouches: z.ZodOptional<z.ZodBoolean>;
74
+ ForceMonoAudio: z.ZodOptional<z.ZodBoolean>;
75
+ HoveringMouse: z.ZodOptional<z.ZodBoolean>;
76
+ MatchViewportRes: z.ZodOptional<z.ZodBoolean>;
77
+ SuppressBrowserKeys: z.ZodOptional<z.ZodBoolean>;
78
+ }, "strip", z.ZodTypeAny, {
79
+ KeyboardInput?: boolean | undefined;
80
+ MouseInput?: boolean | undefined;
81
+ GamepadInput?: boolean | undefined;
82
+ TouchInput?: boolean | undefined;
83
+ XRControllerInput?: boolean | undefined;
84
+ UseMic?: boolean | undefined;
85
+ FakeMouseWithTouches?: boolean | undefined;
86
+ ForceMonoAudio?: boolean | undefined;
87
+ HoveringMouse?: boolean | undefined;
88
+ MatchViewportRes?: boolean | undefined;
89
+ SuppressBrowserKeys?: boolean | undefined;
90
+ }, {
91
+ KeyboardInput?: boolean | undefined;
92
+ MouseInput?: boolean | undefined;
93
+ GamepadInput?: boolean | undefined;
94
+ TouchInput?: boolean | undefined;
95
+ XRControllerInput?: boolean | undefined;
96
+ UseMic?: boolean | undefined;
97
+ FakeMouseWithTouches?: boolean | undefined;
98
+ ForceMonoAudio?: boolean | undefined;
99
+ HoveringMouse?: boolean | undefined;
100
+ MatchViewportRes?: boolean | undefined;
101
+ SuppressBrowserKeys?: boolean | undefined;
102
+ }>>;
103
+ }, "strict", z.ZodTypeAny, {
104
+ conf?: {
105
+ fullscreenButton?: boolean | undefined;
106
+ stopButton?: boolean | undefined;
107
+ audioButton?: boolean | undefined;
108
+ infoButton?: boolean | undefined;
109
+ micButton?: boolean | undefined;
110
+ settingsButton?: boolean | undefined;
111
+ connectionStrengthIcon?: boolean | undefined;
112
+ } | undefined;
113
+ init?: {
114
+ KeyboardInput?: boolean | undefined;
115
+ MouseInput?: boolean | undefined;
116
+ GamepadInput?: boolean | undefined;
117
+ TouchInput?: boolean | undefined;
118
+ XRControllerInput?: boolean | undefined;
119
+ UseMic?: boolean | undefined;
120
+ FakeMouseWithTouches?: boolean | undefined;
121
+ ForceMonoAudio?: boolean | undefined;
122
+ HoveringMouse?: boolean | undefined;
123
+ MatchViewportRes?: boolean | undefined;
124
+ SuppressBrowserKeys?: boolean | undefined;
125
+ } | undefined;
126
+ }, {
127
+ conf?: {
128
+ fullscreenButton?: boolean | undefined;
129
+ stopButton?: boolean | undefined;
130
+ audioButton?: boolean | undefined;
131
+ infoButton?: boolean | undefined;
132
+ micButton?: boolean | undefined;
133
+ settingsButton?: boolean | undefined;
134
+ connectionStrengthIcon?: boolean | undefined;
135
+ } | undefined;
136
+ init?: {
137
+ KeyboardInput?: boolean | undefined;
138
+ MouseInput?: boolean | undefined;
139
+ GamepadInput?: boolean | undefined;
140
+ TouchInput?: boolean | undefined;
141
+ XRControllerInput?: boolean | undefined;
142
+ UseMic?: boolean | undefined;
143
+ FakeMouseWithTouches?: boolean | undefined;
144
+ ForceMonoAudio?: boolean | undefined;
145
+ HoveringMouse?: boolean | undefined;
146
+ MatchViewportRes?: boolean | undefined;
147
+ SuppressBrowserKeys?: boolean | undefined;
148
+ } | undefined;
149
+ }>>;
40
150
  afk: z.ZodOptional<z.ZodObject<{
41
151
  enabled: z.ZodBoolean;
42
152
  warn: z.ZodNumber;
@@ -69,6 +179,30 @@ export declare const ZStreamInfo: z.ZodObject<{
69
179
  version?: string | undefined;
70
180
  mouseLock?: boolean | undefined;
71
181
  } | undefined;
182
+ webSdkSettings?: {
183
+ conf?: {
184
+ fullscreenButton?: boolean | undefined;
185
+ stopButton?: boolean | undefined;
186
+ audioButton?: boolean | undefined;
187
+ infoButton?: boolean | undefined;
188
+ micButton?: boolean | undefined;
189
+ settingsButton?: boolean | undefined;
190
+ connectionStrengthIcon?: boolean | undefined;
191
+ } | undefined;
192
+ init?: {
193
+ KeyboardInput?: boolean | undefined;
194
+ MouseInput?: boolean | undefined;
195
+ GamepadInput?: boolean | undefined;
196
+ TouchInput?: boolean | undefined;
197
+ XRControllerInput?: boolean | undefined;
198
+ UseMic?: boolean | undefined;
199
+ FakeMouseWithTouches?: boolean | undefined;
200
+ ForceMonoAudio?: boolean | undefined;
201
+ HoveringMouse?: boolean | undefined;
202
+ MatchViewportRes?: boolean | undefined;
203
+ SuppressBrowserKeys?: boolean | undefined;
204
+ } | undefined;
205
+ } | undefined;
72
206
  afk?: {
73
207
  error: number;
74
208
  enabled: boolean;
@@ -91,6 +225,30 @@ export declare const ZStreamInfo: z.ZodObject<{
91
225
  version?: string | undefined;
92
226
  mouseLock?: boolean | undefined;
93
227
  } | undefined;
228
+ webSdkSettings?: {
229
+ conf?: {
230
+ fullscreenButton?: boolean | undefined;
231
+ stopButton?: boolean | undefined;
232
+ audioButton?: boolean | undefined;
233
+ infoButton?: boolean | undefined;
234
+ micButton?: boolean | undefined;
235
+ settingsButton?: boolean | undefined;
236
+ connectionStrengthIcon?: boolean | undefined;
237
+ } | undefined;
238
+ init?: {
239
+ KeyboardInput?: boolean | undefined;
240
+ MouseInput?: boolean | undefined;
241
+ GamepadInput?: boolean | undefined;
242
+ TouchInput?: boolean | undefined;
243
+ XRControllerInput?: boolean | undefined;
244
+ UseMic?: boolean | undefined;
245
+ FakeMouseWithTouches?: boolean | undefined;
246
+ ForceMonoAudio?: boolean | undefined;
247
+ HoveringMouse?: boolean | undefined;
248
+ MatchViewportRes?: boolean | undefined;
249
+ SuppressBrowserKeys?: boolean | undefined;
250
+ } | undefined;
251
+ } | undefined;
94
252
  afk?: {
95
253
  error: number;
96
254
  enabled: boolean;
@@ -116,6 +274,30 @@ export declare const ZStreamInfo: z.ZodObject<{
116
274
  version?: string | undefined;
117
275
  mouseLock?: boolean | undefined;
118
276
  } | undefined;
277
+ webSdkSettings?: {
278
+ conf?: {
279
+ fullscreenButton?: boolean | undefined;
280
+ stopButton?: boolean | undefined;
281
+ audioButton?: boolean | undefined;
282
+ infoButton?: boolean | undefined;
283
+ micButton?: boolean | undefined;
284
+ settingsButton?: boolean | undefined;
285
+ connectionStrengthIcon?: boolean | undefined;
286
+ } | undefined;
287
+ init?: {
288
+ KeyboardInput?: boolean | undefined;
289
+ MouseInput?: boolean | undefined;
290
+ GamepadInput?: boolean | undefined;
291
+ TouchInput?: boolean | undefined;
292
+ XRControllerInput?: boolean | undefined;
293
+ UseMic?: boolean | undefined;
294
+ FakeMouseWithTouches?: boolean | undefined;
295
+ ForceMonoAudio?: boolean | undefined;
296
+ HoveringMouse?: boolean | undefined;
297
+ MatchViewportRes?: boolean | undefined;
298
+ SuppressBrowserKeys?: boolean | undefined;
299
+ } | undefined;
300
+ } | undefined;
119
301
  afk?: {
120
302
  error: number;
121
303
  enabled: boolean;
@@ -141,6 +323,30 @@ export declare const ZStreamInfo: z.ZodObject<{
141
323
  version?: string | undefined;
142
324
  mouseLock?: boolean | undefined;
143
325
  } | undefined;
326
+ webSdkSettings?: {
327
+ conf?: {
328
+ fullscreenButton?: boolean | undefined;
329
+ stopButton?: boolean | undefined;
330
+ audioButton?: boolean | undefined;
331
+ infoButton?: boolean | undefined;
332
+ micButton?: boolean | undefined;
333
+ settingsButton?: boolean | undefined;
334
+ connectionStrengthIcon?: boolean | undefined;
335
+ } | undefined;
336
+ init?: {
337
+ KeyboardInput?: boolean | undefined;
338
+ MouseInput?: boolean | undefined;
339
+ GamepadInput?: boolean | undefined;
340
+ TouchInput?: boolean | undefined;
341
+ XRControllerInput?: boolean | undefined;
342
+ UseMic?: boolean | undefined;
343
+ FakeMouseWithTouches?: boolean | undefined;
344
+ ForceMonoAudio?: boolean | undefined;
345
+ HoveringMouse?: boolean | undefined;
346
+ MatchViewportRes?: boolean | undefined;
347
+ SuppressBrowserKeys?: boolean | undefined;
348
+ } | undefined;
349
+ } | undefined;
144
350
  afk?: {
145
351
  error: number;
146
352
  enabled: boolean;
@@ -1,12 +1,12 @@
1
1
  import { z } from "zod";
2
2
  export declare const ZVersion: z.ZodObject<{
3
3
  type: z.ZodLiteral<"version">;
4
- version: z.ZodString;
4
+ version: z.ZodOptional<z.ZodString>;
5
5
  }, "strip", z.ZodTypeAny, {
6
6
  type: "version";
7
- version: string;
7
+ version?: string | undefined;
8
8
  }, {
9
9
  type: "version";
10
- version: string;
10
+ version?: string | undefined;
11
11
  }>;
12
12
  export type Version = z.infer<typeof ZVersion>;
@@ -0,0 +1,111 @@
1
+ import { z } from "zod";
2
+ export declare const WebSdkSettings: z.ZodObject<{
3
+ conf: z.ZodOptional<z.ZodObject<{
4
+ fullscreenButton: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
5
+ stopButton: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
6
+ audioButton: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
7
+ infoButton: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
8
+ micButton: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
9
+ settingsButton: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
10
+ connectionStrengthIcon: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ fullscreenButton?: boolean | undefined;
13
+ stopButton?: boolean | undefined;
14
+ audioButton?: boolean | undefined;
15
+ infoButton?: boolean | undefined;
16
+ micButton?: boolean | undefined;
17
+ settingsButton?: boolean | undefined;
18
+ connectionStrengthIcon?: boolean | undefined;
19
+ }, {
20
+ fullscreenButton?: boolean | undefined;
21
+ stopButton?: boolean | undefined;
22
+ audioButton?: boolean | undefined;
23
+ infoButton?: boolean | undefined;
24
+ micButton?: boolean | undefined;
25
+ settingsButton?: boolean | undefined;
26
+ connectionStrengthIcon?: boolean | undefined;
27
+ }>>;
28
+ init: z.ZodOptional<z.ZodObject<{
29
+ KeyboardInput: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
30
+ MouseInput: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
31
+ GamepadInput: z.ZodOptional<z.ZodBoolean>;
32
+ TouchInput: z.ZodOptional<z.ZodBoolean>;
33
+ XRControllerInput: z.ZodOptional<z.ZodBoolean>;
34
+ UseMic: z.ZodOptional<z.ZodBoolean>;
35
+ FakeMouseWithTouches: z.ZodOptional<z.ZodBoolean>;
36
+ ForceMonoAudio: z.ZodOptional<z.ZodBoolean>;
37
+ HoveringMouse: z.ZodOptional<z.ZodBoolean>;
38
+ MatchViewportRes: z.ZodOptional<z.ZodBoolean>;
39
+ SuppressBrowserKeys: z.ZodOptional<z.ZodBoolean>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ KeyboardInput?: boolean | undefined;
42
+ MouseInput?: boolean | undefined;
43
+ GamepadInput?: boolean | undefined;
44
+ TouchInput?: boolean | undefined;
45
+ XRControllerInput?: boolean | undefined;
46
+ UseMic?: boolean | undefined;
47
+ FakeMouseWithTouches?: boolean | undefined;
48
+ ForceMonoAudio?: boolean | undefined;
49
+ HoveringMouse?: boolean | undefined;
50
+ MatchViewportRes?: boolean | undefined;
51
+ SuppressBrowserKeys?: boolean | undefined;
52
+ }, {
53
+ KeyboardInput?: boolean | undefined;
54
+ MouseInput?: boolean | undefined;
55
+ GamepadInput?: boolean | undefined;
56
+ TouchInput?: boolean | undefined;
57
+ XRControllerInput?: boolean | undefined;
58
+ UseMic?: boolean | undefined;
59
+ FakeMouseWithTouches?: boolean | undefined;
60
+ ForceMonoAudio?: boolean | undefined;
61
+ HoveringMouse?: boolean | undefined;
62
+ MatchViewportRes?: boolean | undefined;
63
+ SuppressBrowserKeys?: boolean | undefined;
64
+ }>>;
65
+ }, "strict", z.ZodTypeAny, {
66
+ conf?: {
67
+ fullscreenButton?: boolean | undefined;
68
+ stopButton?: boolean | undefined;
69
+ audioButton?: boolean | undefined;
70
+ infoButton?: boolean | undefined;
71
+ micButton?: boolean | undefined;
72
+ settingsButton?: boolean | undefined;
73
+ connectionStrengthIcon?: boolean | undefined;
74
+ } | undefined;
75
+ init?: {
76
+ KeyboardInput?: boolean | undefined;
77
+ MouseInput?: boolean | undefined;
78
+ GamepadInput?: boolean | undefined;
79
+ TouchInput?: boolean | undefined;
80
+ XRControllerInput?: boolean | undefined;
81
+ UseMic?: boolean | undefined;
82
+ FakeMouseWithTouches?: boolean | undefined;
83
+ ForceMonoAudio?: boolean | undefined;
84
+ HoveringMouse?: boolean | undefined;
85
+ MatchViewportRes?: boolean | undefined;
86
+ SuppressBrowserKeys?: boolean | undefined;
87
+ } | undefined;
88
+ }, {
89
+ conf?: {
90
+ fullscreenButton?: boolean | undefined;
91
+ stopButton?: boolean | undefined;
92
+ audioButton?: boolean | undefined;
93
+ infoButton?: boolean | undefined;
94
+ micButton?: boolean | undefined;
95
+ settingsButton?: boolean | undefined;
96
+ connectionStrengthIcon?: boolean | undefined;
97
+ } | undefined;
98
+ init?: {
99
+ KeyboardInput?: boolean | undefined;
100
+ MouseInput?: boolean | undefined;
101
+ GamepadInput?: boolean | undefined;
102
+ TouchInput?: boolean | undefined;
103
+ XRControllerInput?: boolean | undefined;
104
+ UseMic?: boolean | undefined;
105
+ FakeMouseWithTouches?: boolean | undefined;
106
+ ForceMonoAudio?: boolean | undefined;
107
+ HoveringMouse?: boolean | undefined;
108
+ MatchViewportRes?: boolean | undefined;
109
+ SuppressBrowserKeys?: boolean | undefined;
110
+ } | undefined;
111
+ }>;
@@ -6,6 +6,7 @@ export * from "./Stats";
6
6
  export * from "./Ping";
7
7
  export * from "./Queue";
8
8
  export * from "./Version";
9
+ export * from "./WebSdkSettings";
9
10
  export declare const Send: {
10
11
  stats: import("zod").ZodObject<{
11
12
  type: import("zod").ZodLiteral<"stats">;