@arcware-cloud/pixelstreaming-websdk 1.2.18 → 1.3.0
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/index.cjs.js +957 -697
- package/index.esm.js +969 -702
- package/index.umd.js +957 -697
- package/package.json +1 -1
- package/types/lib/ArcwareApplication.d.ts +4 -0
- package/types/lib/ArcwareConfig.d.ts +1 -1
- package/types/lib/ArcwarePixelStreaming.d.ts +7 -1
- package/types/lib/features/ArcwareEventUtil.d.ts +28 -0
- package/types/lib/features/ArcwareFileTransferUtil.d.ts +13 -0
- package/types/lib/features/common.d.ts +13 -0
- /package/types/lib/{DiagnosticsCollector.d.ts → features/DiagnosticsCollector.d.ts} +0 -0
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.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./index.umd.js",
|
|
7
7
|
"module": "./index.umd.js",
|
|
@@ -9,6 +9,8 @@ export declare class ArcwareApplication extends Application {
|
|
|
9
9
|
private videoElementParent;
|
|
10
10
|
private parentElement;
|
|
11
11
|
private responseCallback;
|
|
12
|
+
private analyticsEventCallback;
|
|
13
|
+
private fileDownloadCallback;
|
|
12
14
|
private webRtcController;
|
|
13
15
|
get rootElement(): HTMLElement;
|
|
14
16
|
private ArcwareSection;
|
|
@@ -45,4 +47,6 @@ export declare class ArcwareApplication extends Application {
|
|
|
45
47
|
*/
|
|
46
48
|
emitUIInteraction(descriptor: object | string): void;
|
|
47
49
|
private addTextToConnectOverlay;
|
|
50
|
+
analyticsEvent(response: unknown): void;
|
|
51
|
+
private fileDownload;
|
|
48
52
|
}
|
|
@@ -26,7 +26,7 @@ export declare class ArcwareConfig extends Config {
|
|
|
26
26
|
readonly session: Session;
|
|
27
27
|
readonly settings: Settings;
|
|
28
28
|
private _initialSettings;
|
|
29
|
-
readonly VERSION = "1.
|
|
29
|
+
readonly VERSION = "1.3.0";
|
|
30
30
|
constructor(config: ArcwareConfigParams);
|
|
31
31
|
/** Setup connection string. */
|
|
32
32
|
get urlFlags(): string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Messages } from "@arcware-cloud/shared-pixelstreaming-websdk";
|
|
2
2
|
import { PixelStreaming, PixelStreamingOverrides } from "@epicgames-ps/lib-pixelstreamingfrontend-ue5.5";
|
|
3
|
+
import { z } from "zod";
|
|
3
4
|
import { ArcwareConfig } from "./ArcwareConfig";
|
|
4
5
|
import { EventHandler } from "./domain/EventHandler";
|
|
5
6
|
import { Session } from "./domain/Session";
|
|
@@ -79,7 +80,12 @@ export declare class ArcwarePixelStreaming extends PixelStreaming {
|
|
|
79
80
|
* * * * * *
|
|
80
81
|
*/
|
|
81
82
|
private sendStats;
|
|
82
|
-
|
|
83
|
+
send<T extends {
|
|
84
|
+
type: string;
|
|
85
|
+
}>(message: T): void;
|
|
86
|
+
send<K extends keyof typeof Messages.Send>(message: {
|
|
87
|
+
type: K;
|
|
88
|
+
} & z.infer<(typeof Messages.Send)[K]>): void;
|
|
83
89
|
private handleResolutionChange;
|
|
84
90
|
private applyResolutionIfPlaying;
|
|
85
91
|
removePlayer(): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ZFileTransfer: z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"fileTransfer">;
|
|
4
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
type?: "fileTransfer";
|
|
7
|
+
filename?: string;
|
|
8
|
+
}, {
|
|
9
|
+
type?: "fileTransfer";
|
|
10
|
+
filename?: string;
|
|
11
|
+
}>;
|
|
12
|
+
export type FileTransferMsg = z.infer<typeof ZFileTransfer>;
|
|
13
|
+
export declare function parseControl<T extends z.ZodTypeAny>(input: unknown, schema: T): z.infer<T>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Conservative normalizer: accepts object, strict JSON string, or JSON-ish like {foo: "bar"} */
|
|
2
|
+
export declare function parseUnknownToObject(input: unknown, opts?: {
|
|
3
|
+
allowJsonish?: boolean;
|
|
4
|
+
}): Record<string, unknown>;
|
|
5
|
+
/** Byte-safe string truncation (no broken unicode) */
|
|
6
|
+
export declare function truncateByBytes(input: string, maxBytes: number): string;
|
|
7
|
+
/** Cross-platform safe filename */
|
|
8
|
+
export declare function sanitizeFilename(input: string): string;
|
|
9
|
+
/** MIME -> extension */
|
|
10
|
+
export declare function extFromMime(mime: string): string;
|
|
11
|
+
/** Short random fallback */
|
|
12
|
+
export declare function randomHash(): string;
|
|
13
|
+
export declare function normalizeType(v: unknown): string;
|
|
File without changes
|