@arcware-cloud/pixelstreaming-websdk 1.3.21 → 1.3.23

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.
Files changed (48) hide show
  1. package/README.md +4 -0
  2. package/index.cjs.js +27490 -27086
  3. package/index.esm.js +27747 -27375
  4. package/index.umd.js +27489 -27085
  5. package/package.json +1 -1
  6. package/types/index.d.ts +0 -3
  7. package/types/lib/ApplyUrlHack.d.ts +0 -2
  8. package/types/lib/ArcwareApplication.d.ts +0 -54
  9. package/types/lib/ArcwareConfig.d.ts +0 -44
  10. package/types/lib/ArcwareInit.d.ts +0 -19
  11. package/types/lib/ArcwarePixelStreaming.d.ts +0 -140
  12. package/types/lib/MessageTypes.d.ts +0 -4
  13. package/types/lib/domain/ArcwareSettingsSchema.d.ts +0 -274
  14. package/types/lib/domain/EventHandler.d.ts +0 -11
  15. package/types/lib/domain/Session.d.ts +0 -29
  16. package/types/lib/domain/Stats.d.ts +0 -36
  17. package/types/lib/domain/debounce.d.ts +0 -1
  18. package/types/lib/features/ArcwareEventUtil.d.ts +0 -28
  19. package/types/lib/features/ArcwareFileTransferUtil.d.ts +0 -13
  20. package/types/lib/features/DiagnosticsCollector.d.ts +0 -181
  21. package/types/lib/features/ZWhiteLabel.d.ts +0 -31
  22. package/types/lib/features/common.d.ts +0 -17
  23. package/types/lib/features/whiteLabelling.d.ts +0 -4
  24. package/types/lib/index.d.ts +0 -6
  25. package/types/lib/styles/ArcwarePixelStreamingApplicationStyles.d.ts +0 -543
  26. package/types/lib/ui/ArcwareLogoLoader/index.d.ts +0 -14
  27. package/types/lib/ui/AudioButton/AudioIcon.d.ts +0 -7
  28. package/types/lib/ui/AudioButton/index.d.ts +0 -15
  29. package/types/lib/ui/LoveLetters/index.d.ts +0 -6
  30. package/types/lib/ui/MicButton/index.d.ts +0 -14
  31. package/types/lib/ui/MicIcon/index.d.ts +0 -7
  32. package/types/lib/ui/MicrophoneOverlay/index.d.ts +0 -11
  33. package/types/lib/ui/PlayIcon/index.d.ts +0 -5
  34. package/types/lib/ui/StopButton/index.d.ts +0 -16
  35. package/types/lib/ui/StopIcon/index.d.ts +0 -5
  36. package/types/shared/index.d.ts +0 -1
  37. package/types/shared/lib/Messages/ErrorMessage.d.ts +0 -18
  38. package/types/shared/lib/Messages/LoveLetter.d.ts +0 -18
  39. package/types/shared/lib/Messages/Ping.d.ts +0 -15
  40. package/types/shared/lib/Messages/Queue.d.ts +0 -58
  41. package/types/shared/lib/Messages/Render.d.ts +0 -9
  42. package/types/shared/lib/Messages/SessionId.d.ts +0 -12
  43. package/types/shared/lib/Messages/Stats.d.ts +0 -182
  44. package/types/shared/lib/Messages/StreamInfo.d.ts +0 -338
  45. package/types/shared/lib/Messages/Version.d.ts +0 -12
  46. package/types/shared/lib/Messages/WebSdkSettings.d.ts +0 -96
  47. package/types/shared/lib/Messages/index.d.ts +0 -193
  48. package/types/shared/lib/index.d.ts +0 -1
@@ -1,13 +0,0 @@
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>;
@@ -1,181 +0,0 @@
1
- /**
2
- * DiagnosticsCollector.ts
3
- * Lightweight, privacy-aware client diagnostics for troubleshooting + analytics.
4
- * WebRTC collection intentionally omitted (to add later).
5
- *
6
- * Notes:
7
- * - Some fields are best-effort due to browser restrictions; they're nullable.
8
- * - Bandwidth probe requires a small binary served with:
9
- * Content-Type: application/octet-stream
10
- * Content-Encoding: identity
11
- * Cache-Control: no-store
12
- * Default location: /diag/probe.bin
13
- */
14
- /**
15
- * These interfaces need to be copied manually from ITicket.ts for now if the interface changes there
16
- * The way how webpack, rollup and this whole mono repo is setup up, I cannot just import it......
17
- */
18
- export interface IDiagnostics {
19
- device?: Device;
20
- network?: Network;
21
- powerHints?: PowerHints;
22
- runtime?: Runtime;
23
- timestamps?: Timestamps;
24
- webrtc?: Webrtc;
25
- }
26
- export interface Device {
27
- architecture?: null | string;
28
- bitness?: null | string;
29
- codecs?: Codecs;
30
- deviceMemory?: number | null;
31
- hardwareConcurrency?: number | null;
32
- model?: null | string;
33
- orientation?: Orientation | null;
34
- touchSupport?: boolean;
35
- type?: Type;
36
- vendor?: null | string;
37
- webgl?: boolean | null;
38
- }
39
- export interface Codecs {
40
- h264?: boolean;
41
- hevc?: boolean;
42
- }
43
- export declare enum Orientation {
44
- Landscape = "landscape",
45
- Portrait = "portrait"
46
- }
47
- export declare enum Type {
48
- Desktop = "desktop",
49
- Mobile = "mobile",
50
- Tablet = "tablet"
51
- }
52
- export interface Network {
53
- downlinkMbps?: number | null;
54
- effectiveType?: null | string;
55
- measuredDownlinkMbps?: number | null;
56
- rttMs?: number | null;
57
- type?: null | string;
58
- }
59
- export interface PowerHints {
60
- prefersReducedData?: boolean | null;
61
- prefersReducedMotion?: boolean | null;
62
- saveData?: boolean | null;
63
- }
64
- export interface Runtime {
65
- browser?: Browser;
66
- os?: OS;
67
- }
68
- export interface Browser {
69
- family?: string;
70
- version?: null | string;
71
- }
72
- export interface OS {
73
- family?: string;
74
- version?: null | string;
75
- }
76
- export interface Timestamps {
77
- collectedAt?: number;
78
- }
79
- export interface Webrtc {
80
- candidatePairId?: null | string;
81
- dtlsCipher?: null | string;
82
- localCandidateType?: null | string;
83
- networkType?: null | string;
84
- protocol?: null | string;
85
- remoteCandidateType?: null | string;
86
- }
87
- /**
88
- * Options that control how the DiagnosticsCollector behaves.
89
- *
90
- * You don’t *need* to set these for a basic Pixel Streaming website — the defaults
91
- * are good enough. But in production, these knobs let you control cost, UX impact,
92
- * and flexibility without changing the code.
93
- */
94
- export interface DiagnosticsCollectorOptions {
95
- /**
96
- * Run a synthetic bandwidth probe? (default: true)
97
- *
98
- * - When true: the collector fetches a small binary file (see `probeUrl`)
99
- * and measures download speed to estimate available bandwidth.
100
- * - Why it matters: gives you a ground-truth Mbps measurement that the
101
- * browser doesn’t always expose.
102
- * - Downsides: adds one extra network request per session.
103
- * - When to disable: if you want *zero* extra traffic (e.g. privacy-sensitive
104
- * deployments, embedded use cases).
105
- */
106
- enableBandwidthProbe?: boolean;
107
- /**
108
- * URL of the probe file used for bandwidth measurement. (default: "/diag/probe.bin")
109
- *
110
- * - Must be served as raw binary with headers:
111
- * Content-Type: application/octet-stream
112
- * Content-Encoding: identity
113
- * Cache-Control: no-store
114
- * - Size: keep small (200–500 KB) for quick, accurate tests.
115
- * - Why you’d override: if you host assets on a CDN or want different probe
116
- * files per region/environment.
117
- */
118
- probeUrl?: string;
119
- /**
120
- * Respect the user’s "Data Saver" mode? (default: true)
121
- *
122
- * - The browser exposes `navigator.connection.saveData`.
123
- * - When true: if saveData === true, the collector skips the bandwidth probe
124
- * (to avoid wasting data).
125
- * - Why it matters: good UX and respectful to users on metered/limited data.
126
- * - When to disable: if accurate bandwidth numbers are critical even for
127
- * Data Saver users (rare).
128
- */
129
- respectSaveData?: boolean;
130
- /**
131
- * Sampling rate for diagnostics collection. (range: 0.0–1.0, default: 1.0)
132
- *
133
- * - 1.0 (100%): collect diagnostics for every session (ideal in dev/beta).
134
- * - 0.1 (10%): collect for ~10% of sessions (reduces storage & processing costs).
135
- * - Why it matters: in production, detailed telemetry from *every* session
136
- * may be too costly or noisy. Sampling still gives you trends.
137
- * - How it works: collector rolls a random number per session; only collects
138
- * if value < sampleRate.
139
- */
140
- sampleRate?: number;
141
- }
142
- /**
143
- * DiagnosticsCollector
144
- */
145
- export declare class DiagnosticsCollector {
146
- private opts;
147
- constructor(opts?: DiagnosticsCollectorOptions);
148
- /**
149
- * Collect the diagnostics payload.
150
- */
151
- collect(): Promise<IDiagnostics>;
152
- /**
153
- * Collect a safe subset of WebRTC stats once PC is connected.
154
- */
155
- collectWebRTC(pc: RTCPeerConnection): Promise<IDiagnostics["webrtc"]>;
156
- /**
157
- * Helper to embed diagnostics in a hello envelope.
158
- */
159
- buildHelloEnvelope(base: Record<string, any>, pc?: RTCPeerConnection): Promise<{
160
- ext: {
161
- diag: IDiagnostics;
162
- };
163
- }>;
164
- private shouldSample;
165
- private hasTouch;
166
- private getOrientation;
167
- private hasWebGL;
168
- /**
169
- * Heuristic device type: best-effort only.
170
- * Tries UA-CH, then UA fallback, then touch + screen size heuristics.
171
- */
172
- private inferDeviceType;
173
- private getPowerHints;
174
- private getNetworkInfo;
175
- private maybeMeasureBandwidth;
176
- private withCacheBuster;
177
- private getCodecSupport;
178
- private supportsCodec;
179
- private uaInfoCache;
180
- private getUAInfo;
181
- }
@@ -1,31 +0,0 @@
1
- import { z } from "zod";
2
- /** Strict allowlist for white-label brand fields coming from the URL */
3
- export declare const ZWhiteLabel: z.ZodObject<{
4
- loadingIconUrl: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>>;
5
- loadingIconFadeMs: z.ZodOptional<z.ZodNumber>;
6
- splashScreenUrl: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>>;
7
- splashScreenMode: z.ZodOptional<z.ZodEnum<["contain", "cover", "stretch", "repeat"]>>;
8
- splashScreenPosition: z.ZodOptional<z.ZodString>;
9
- splashScreenBgColor: z.ZodOptional<z.ZodString>;
10
- hideLoveLetters: z.ZodOptional<z.ZodBoolean>;
11
- hideAfkOverlay: z.ZodOptional<z.ZodBoolean>;
12
- }, "strict", z.ZodTypeAny, {
13
- loadingIconUrl?: string;
14
- loadingIconFadeMs?: number;
15
- splashScreenUrl?: string;
16
- splashScreenMode?: "repeat" | "contain" | "cover" | "stretch";
17
- splashScreenPosition?: string;
18
- splashScreenBgColor?: string;
19
- hideLoveLetters?: boolean;
20
- hideAfkOverlay?: boolean;
21
- }, {
22
- loadingIconUrl?: string;
23
- loadingIconFadeMs?: number;
24
- splashScreenUrl?: string;
25
- splashScreenMode?: "repeat" | "contain" | "cover" | "stretch";
26
- splashScreenPosition?: string;
27
- splashScreenBgColor?: string;
28
- hideLoveLetters?: boolean;
29
- hideAfkOverlay?: boolean;
30
- }>;
31
- export type WhiteLabel = z.infer<typeof ZWhiteLabel>;
@@ -1,17 +0,0 @@
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;
14
- export declare function waitForElement(selector: string, { root, timeout }?: {
15
- root?: Document;
16
- timeout?: number;
17
- }): Promise<any>;
@@ -1,4 +0,0 @@
1
- import { ZWhiteLabel } from "./ZWhiteLabel";
2
- import { z } from "zod";
3
- /** Parse ?wl=... (or ?whitelabel=...) → validated partial settings */
4
- export declare function readWhiteLabelFromQuery(qs: URLSearchParams): Partial<z.infer<typeof ZWhiteLabel>> | undefined;
@@ -1,6 +0,0 @@
1
- export * from "./ArcwareApplication";
2
- export * from "./ArcwareConfig";
3
- export * from "./ArcwarePixelStreaming";
4
- export * from "./ArcwareInit";
5
- export type * from "./MessageTypes";
6
- export * from "./styles/ArcwarePixelStreamingApplicationStyles";