@3dsource/angular-unreal-module 0.0.35 → 0.0.36

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.d.ts CHANGED
@@ -7,7 +7,7 @@ import { Store } from '@ngrx/store';
7
7
  import * as rxjs from 'rxjs';
8
8
  import { Observable, Subject } from 'rxjs';
9
9
  import { MetaBoxCommandList, MetaBoxCommandPacket, FResetControlClampsCommand, FCameraRecenterCommand, FUnLoadAllLevelsCommand, FDragCommand, FUnselectAllProductsCommand, FPauseSequenceCommand, FStopSequenceCommand, FUnLoadAllProductsCommand, FRequestCameraPresetCommand, FLoopBackCommand, FExecuteConsoleCommandCommand, FBoolPayload, FFreezeFrameCommand, FDragSequencePayload, FDragSequenceCommand, FAlignProductsToPlanePayload, FAlignProductsToPlaneCommand, FCameraPresetPayload, FApplyCameraPresetCommand, FLoadSceneStatePayload, FLoadSceneStateCommand, FClickSnapCommand, FControlCameraModePayload, FSetControlCameraModeCommand, FCameraClampsPayload, FSetCameraControlClampsCommand, FSetPawnMovementModePayload, FSetPawnMovementModeCommand, FEnableTeleportCommand, FEnableSceneStateCallbackCommand, FApplyZoomPayload, FApplyZoomCommand, FFVectorPayload, FCameraBoxCommand, FDropPayload, FDropCommand, FSelectProductByObjectNamePayload, FSelectProductByObjectNameCommand, FGizmoTypePayload, FChangeGizmoTypeCommand, FWeatherPayload, FWeatherCommand, FFitToObjectsPayload, FFitToObjectsCommand, FSetProductsLocationPayload, FSetProductsLocationCommand, FResolutionPayload, FChangeResolutionCommand, FEnableSpinnerModeCommand, FControlSensitivityPayload, FControlSensitivityCommand, FCameraSettingsPayload, FCameraSettingsCommand, FDebugModeCommand, FEnableControlsCommand, FFStringPayload, FInitSequenceByObjectNamePayload, FInitSequenceByObjectNameCommand, FPlaySequencePayload, FPlaySequenceCommand, FJumpToSequencePayload, FJumpToSequenceCommand, FMoveSelectedPayload, FMoveSelectedCommand, FRotatePayload, FRotateSelectedCommand, FRenderPayload, FTakeRenderCommand, FTakeSpinnerRenderPreviewCommand, FTakeSpinnerRenderCommand, FSetMaterialPayload, FSetMaterialCommand, FProductPayload, FLoadProductCommand, FUnLoadProductByObjectNameCommand, FLevelPayload, FLoadLevelCommand, FComposurePayload, FEnableComposureCommand, FFStringsPayload, FClampPanToProductsCommand, FSettingsSequencePayload, FSetSettingsSequenceCommand } from '@3dsource/types-unreal';
10
- import { ImageOutputValues, IKeyCode } from '@3dsource/utils';
10
+ import { IKeyCode, ImageOutputValues } from '@3dsource/utils';
11
11
  import { SafeHtml, SafeStyle, SafeScript, SafeUrl, SafeResourceUrl } from '@angular/platform-browser';
12
12
  import * as _ngrx_effects from '@ngrx/effects';
13
13
 
@@ -23,7 +23,7 @@ declare class ClickableOverlayComponent {
23
23
  }
24
24
 
25
25
  declare class FreezeFrameComponent {
26
- #private;
26
+ private store;
27
27
  freezeFrameProgressMessageFromVideo: i0.Signal<number | null | undefined>;
28
28
  combinedFreeze: i0.Signal<string | null | undefined>;
29
29
  static ɵfac: i0.ɵɵFactoryDeclaration<FreezeFrameComponent, never>;
@@ -79,6 +79,118 @@ declare class AFKService extends SubService {
79
79
  static ɵprov: i0.ɵɵInjectableDeclaration<AFKService>;
80
80
  }
81
81
 
82
+ declare class AggregatorService extends SubService {
83
+ private readonly selectStreamConfig;
84
+ private readonly videoService;
85
+ private readonly webrtcPlayer;
86
+ private readonly freezeFrame;
87
+ private readonly unrealInitialConfig;
88
+ private readonly responseEventListeners;
89
+ /**
90
+ * Never called for now
91
+ */
92
+ private readonly destroy$;
93
+ constructor();
94
+ init(): void;
95
+ private initialize;
96
+ private addResponseEventListener;
97
+ private showOnScreenKeyboard;
98
+ private removeLoadScreen;
99
+ private startListenCallbacks;
100
+ private showMessageFromUnreal;
101
+ private resetResponseList;
102
+ private listenWebRTC;
103
+ private dataChannelMessageHandler;
104
+ static ɵfac: i0.ɵɵFactoryDeclaration<AggregatorService, never>;
105
+ static ɵprov: i0.ɵɵInjectableDeclaration<AggregatorService>;
106
+ }
107
+
108
+ declare class CommandTelemetryService {
109
+ private readonly appId;
110
+ private commandsSent;
111
+ private exileTimout;
112
+ private pollingTime;
113
+ private commandSequenceNumber;
114
+ /**
115
+ * The time the telemetry service was started.
116
+ * Initialized at a moment when connectToSignaling() was called.
117
+ * @private
118
+ */
119
+ private startTime;
120
+ private lastTime;
121
+ private uuid;
122
+ private viewId;
123
+ private readonly sessionId;
124
+ private readonly userId;
125
+ private payloads;
126
+ private readonly httpClient;
127
+ private readonly unrealInitialConfig;
128
+ constructor();
129
+ private get timeNow();
130
+ private get sessionTime();
131
+ private get canSkipSending();
132
+ decorate(funcToDecorate: IToBeDecorated): (data: any) => void;
133
+ private start;
134
+ private reset;
135
+ private trackStartCommand;
136
+ private trackStopCommand;
137
+ private pushStatToBuffer;
138
+ private trackTime;
139
+ private send;
140
+ /**
141
+ * Listens for Unreal Engine callbacks.
142
+ * Subscribes to the Unreal Engine event loop back and filters out events that do not have a tracking ID.
143
+ * When a callback with a tracking ID is received,
144
+ * it stops tracking the time for that command and filters out commands
145
+ * that have exceeded the timeout limit.
146
+ */
147
+ private listenCallbacks;
148
+ private pushData;
149
+ /**
150
+ * Removes commands that have exceeded the timeout limit.
151
+ * Iterates over all the commands sent and checks if the difference between the current time
152
+ * and the time the command was sent is greater than the timeout limit.
153
+ * If it is, the command is marked for deletion.
154
+ * After checking all commands, those marked for deletion are removed from the commands sent.
155
+ * This method is used to ensure that commands that are not responded to within a certain time frame
156
+ * do not remain in the commandsSent object indefinitely, which could lead to memory leaks over time.
157
+ */
158
+ private removeExileCommands;
159
+ /**
160
+ * Wraps the provided function with telemetry tracking.
161
+ * Generates a unique tracking ID and adds it to the data object.
162
+ * Pushes the command sent to the payloads with the tracking ID.
163
+ * Starts tracking the time for the command.
164
+ * Finally, calls the provided function with the modified data object.
165
+ *
166
+ * @param {IToBeDecorated} funcToDecorate - The function to be decorated with telemetry tracking.
167
+ * @param {any} data - The data object to be passed to the function. It will be augmented with a unique tracking ID.
168
+ */
169
+ private wrapper;
170
+ static ɵfac: i0.ɵɵFactoryDeclaration<CommandTelemetryService, never>;
171
+ static ɵprov: i0.ɵɵInjectableDeclaration<CommandTelemetryService>;
172
+ }
173
+ type IToBeDecorated = (data: any) => unknown;
174
+ declare function TelemetryStart(externalId: string): void;
175
+ declare function TelemetryStop(externalId: string, payload?: any): void;
176
+ declare function ResetTelemetry(): void;
177
+
178
+ declare class ConsoleExtensionsService extends SubService {
179
+ private httpClient;
180
+ private isDevMode;
181
+ init(): void;
182
+ private unrealHelp;
183
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleExtensionsService, never>;
184
+ static ɵprov: i0.ɵɵInjectableDeclaration<ConsoleExtensionsService>;
185
+ }
186
+
187
+ declare class DevModeService {
188
+ get isDevMode(): boolean;
189
+ setDevMode(value: boolean): void;
190
+ static ɵfac: i0.ɵɵFactoryDeclaration<DevModeService, never>;
191
+ static ɵprov: i0.ɵɵInjectableDeclaration<DevModeService>;
192
+ }
193
+
82
194
  declare class FreezeFrameService extends SubService {
83
195
  receiving: boolean;
84
196
  private size;
@@ -94,6 +206,91 @@ declare class FreezeFrameService extends SubService {
94
206
  static ɵprov: i0.ɵɵInjectableDeclaration<FreezeFrameService>;
95
207
  }
96
208
 
209
+ declare class InputService extends SubService {
210
+ private commandsSender;
211
+ private isDevMode;
212
+ readonly defaultKeys: (17 | 37 | 38 | 39 | 40 | 46 | 65 | 68 | 83 | 87 | 107 | 109 | 187 | 189)[];
213
+ private availableKeys;
214
+ private options;
215
+ private reInit$;
216
+ private deactivatedVideoTrigger$;
217
+ private normalizeAndQuantizeUnsigned;
218
+ private unQuantizeAndDenormalizeUnsigned;
219
+ private normalizeAndQuantizeSigned;
220
+ video: HTMLVideoElement;
221
+ videoBoundingRect: DOMRect;
222
+ fingerIds: Map<any, any>;
223
+ maxByteValue: number;
224
+ fingers: number[];
225
+ private offsetParams;
226
+ constructor();
227
+ useKeyboardKeys(keys: IKeyCode[]): void;
228
+ private setup;
229
+ /**
230
+ * We use `object-fit: cover` on the video element. Since the video can have
231
+ * a different aspect ratio from its container (and potentially be larger),
232
+ * we need to calculate offsets and scale factors to map container (e.g., mouse)
233
+ * coordinates back to the actual video coordinates.
234
+ *
235
+ * @param videoElement The video element whose scaling and positioning we need
236
+ * @returns Object containing offset and scale info for coordinate normalization
237
+ * @private
238
+ */
239
+ private getObjectFitOffset;
240
+ private setupNormalizeAndQuantize;
241
+ private sendInputData;
242
+ private registerInputs;
243
+ private getTouchPositionWithOffset;
244
+ private getMousePositionWithOffset;
245
+ private registerTouchEvents;
246
+ focusWindow(): void;
247
+ emitMouseMove(x: number, y: number, deltaX: number, deltaY: number): void;
248
+ emitMouseDown(button: number, x: number, y: number): void;
249
+ emitMouseUp(button: number, x: number, y: number): void;
250
+ emitMouseWheel(delta: number, x: number, y: number): void;
251
+ private releaseMouseButtons;
252
+ private pressMouseButtons;
253
+ private registerHoveringMouseEvents;
254
+ private registerMouseEnterAndLeaveEvents;
255
+ private isKeyCodeBrowserKey;
256
+ private getKeyCode;
257
+ private registerKeyboardEvents;
258
+ private startListenKeys;
259
+ }
260
+
261
+ declare class RegionsPingService {
262
+ private httpClient;
263
+ private unrealInitialConfig;
264
+ config: {
265
+ ping_count: number;
266
+ ping_timeout: number;
267
+ max_parallel_requests: number;
268
+ bust_cache: boolean;
269
+ };
270
+ constructor();
271
+ getFastest(regionListUrl?: string): Observable<string | undefined>;
272
+ getPingResult(providers: ProvidersData): Observable<PingResult | null>;
273
+ getProviders(regionList?: string): Observable<ProvidersData>;
274
+ private startPinging;
275
+ private checkLatency;
276
+ private fetchWithTimeout;
277
+ static ɵfac: i0.ɵɵFactoryDeclaration<RegionsPingService, never>;
278
+ static ɵprov: i0.ɵɵInjectableDeclaration<RegionsPingService>;
279
+ }
280
+ interface ProvidersData {
281
+ timeout?: number;
282
+ regions: Region[];
283
+ }
284
+ interface Region {
285
+ region_code: string;
286
+ url: string;
287
+ timeout?: number;
288
+ }
289
+ interface PingResult {
290
+ region_code: string | undefined;
291
+ result: number[];
292
+ }
293
+
97
294
  declare const WSCloseCode_NORMAL_CLOSURE = 3000;
98
295
  declare const WSCloseCode_NORMAL_AFK_TIMEOUT = 3001;
99
296
  declare const WSCloseCode_NORMAL_MANUAL_DISCONNECT = 3002;
@@ -248,7 +445,7 @@ interface InputProps {
248
445
  fakeMouseWithTouches: boolean;
249
446
  }
250
447
 
251
- declare function AnswerHandler(this: SignallingService, msg: AnswerMessage): void;
448
+ declare function AnswerHandler(this: SignallingService, msg: RTCSessionDescriptionInit): void;
252
449
 
253
450
  declare function ConfigHandler(this: SignallingService, msg: ConfigMessage): void;
254
451
 
@@ -657,7 +854,7 @@ declare class UnrealEffects {
657
854
  private signallingService;
658
855
  private scrollStrategy;
659
856
  private commandsSender;
660
- private videoStatGenerator;
857
+ private videoService;
661
858
  cirrusDisconnectEffect$: rxjs.Observable<_ngrx_store.Action<string>> & _ngrx_effects.CreateEffectMetadata;
662
859
  destroyConnections$: rxjs.Observable<{
663
860
  disconnectReason: _3dsource_angular_unreal_module.DisconnectType;
@@ -891,9 +1088,6 @@ interface StreamerListMessage extends MessageBase {
891
1088
  type: 'streamerList';
892
1089
  ids: string[];
893
1090
  }
894
- interface AnswerMessage extends RTCSessionDescriptionInit {
895
- type: 'answer';
896
- }
897
1091
  interface ConfigMessage extends MessageBase, UnknownFields {
898
1092
  type: 'config';
899
1093
  peerConnectionOptions: RTCConfiguration;
@@ -907,9 +1101,6 @@ interface PingMessage extends MessageBase {
907
1101
  playerId: string;
908
1102
  appConnectionCounter: number;
909
1103
  }
910
- interface OfferMessage extends RTCSessionDescriptionInit {
911
- type: 'offer';
912
- }
913
1104
  type UnknownFields = Record<string, unknown>;
914
1105
  declare const OrchestrationMessageTypes: {
915
1106
  readonly streamerList: "streamerList";
@@ -929,13 +1120,13 @@ interface SignalingMessageMap {
929
1120
  [OrchestrationMessageTypes.streamerList]: StreamerListMessage;
930
1121
  [OrchestrationMessageTypes.ssInfo]: SSInfo;
931
1122
  [OrchestrationMessageTypes.playerCount]: PlayerCountMessage;
932
- [OrchestrationMessageTypes.answer]: AnswerMessage;
1123
+ [OrchestrationMessageTypes.answer]: RTCSessionDescriptionInit;
933
1124
  [OrchestrationMessageTypes.config]: ConfigMessage;
934
1125
  [OrchestrationMessageTypes.iceCandidate]: CandidateMessage;
935
1126
  [OrchestrationMessageTypes.instanceReady]: InstanceReady;
936
1127
  [OrchestrationMessageTypes.instanceReserved]: InstanceReserved;
937
1128
  [OrchestrationMessageTypes.ping]: PingMessage;
938
- [OrchestrationMessageTypes.offer]: OfferMessage;
1129
+ [OrchestrationMessageTypes.offer]: RTCSessionDescriptionInit;
939
1130
  }
940
1131
  type OrchestrationMessageType = keyof SignalingMessageMap;
941
1132
  type SignalingMessageHandler<T extends keyof SignalingMessageMap> = (msg: SignalingMessageMap[T]) => void;
@@ -1048,7 +1239,7 @@ interface AwsInstance {
1048
1239
  declare class SignallingService extends SubService {
1049
1240
  private readonly httpClient;
1050
1241
  private readonly regionsPingService;
1051
- onOffer$: Subject<OfferMessage>;
1242
+ onOffer$: Subject<RTCSessionDescriptionInit>;
1052
1243
  onConfig$: Subject<ConfigMessage>;
1053
1244
  onWebRtcIce$: Subject<RTCIceCandidate>;
1054
1245
  onWebRtcAnswer$: Subject<RTCSessionDescriptionInit | null>;
@@ -1083,300 +1274,9 @@ declare class SignallingService extends SubService {
1083
1274
  static ɵprov: i0.ɵɵInjectableDeclaration<SignallingService>;
1084
1275
  }
1085
1276
 
1086
- declare class VideoService extends SubService {
1087
- video: HTMLVideoElement | null;
1088
- audio: HTMLAudioElement | null;
1089
- container: HTMLDivElement | null;
1090
- create(): void;
1091
- private destroy;
1092
- private createWebRtcVideo;
1093
- attachVideoStream(stream: MediaStream): void;
1094
- attachAudioStream(stream: MediaStream): void;
1095
- private createWebRtcAudio;
1096
- private playAudio;
1097
- play(): void;
1098
- static ɵfac: i0.ɵɵFactoryDeclaration<VideoService, never>;
1099
- static ɵprov: i0.ɵɵInjectableDeclaration<VideoService>;
1100
- }
1101
-
1102
- declare class VideoStreamStatusService extends SubService {
1103
- readonly latencyTestTimings: LatencyTimings;
1104
- private readonly webrtcPlayer;
1105
- private aggregatedStats;
1106
- private VideoEncoderQP;
1107
- private kalmanFilter1D;
1108
- readonly videoStats$: Observable<IAggregatedStat>;
1109
- constructor();
1110
- /**
1111
- * Aggregate video stats and emit it as videoStats$
1112
- */
1113
- private aggregateStats;
1114
- setEncoder(data: any): void;
1115
- private getStats;
1116
- private generateAggregatedStatsFunction;
1117
- private onAggregatedStats;
1118
- static ɵfac: i0.ɵɵFactoryDeclaration<VideoStreamStatusService, never>;
1119
- static ɵprov: i0.ɵɵInjectableDeclaration<VideoStreamStatusService>;
1120
- }
1121
-
1122
- declare class WebRtcPlayerService extends SubService {
1123
- pcClient: RTCPeerConnection | null;
1124
- onAudioTrack$: Subject<MediaStream>;
1125
- onVideoTrack$: Subject<MediaStream>;
1126
- onDataChannelMessage$: Subject<number[]>;
1127
- onWebRtcCandidate$: Subject<RTCIceCandidate>;
1128
- onWebRtcOffer$: Subject<RTCSessionDescriptionInit>;
1129
- private cfg;
1130
- private useMic;
1131
- private forceTURN;
1132
- private preferSFU;
1133
- private autoPlayAudio;
1134
- private startVideoMuted;
1135
- private forceMonoAudio;
1136
- private forceMaxBundle;
1137
- private dcClient;
1138
- private sdpConstraints;
1139
- private dataChannelOptions;
1140
- private webRtcErrorTimeout;
1141
- createWebRtcOffer(): Promise<void>;
1142
- createDataChannel(pc: RTCPeerConnection, label: string, options: RTCDataChannelInit): RTCDataChannel | null;
1143
- receiveAnswer(answer: RTCSessionDescriptionInit): void;
1144
- handleCandidateFromServer(iceCandidate: RTCIceCandidate): void;
1145
- mungeSDP(offer: RTCSessionDescriptionInit): void;
1146
- /**
1147
- * Closes existing PeerConnection
1148
- */
1149
- closePC(): void;
1150
- canSend(): boolean | null;
1151
- send(data: ArrayBuffer): void;
1152
- setConfig(parOptions?: ConfigMessage): void;
1153
- private dispatchWebRtcError;
1154
- private createOffer;
1155
- private setupTransceiversAsync;
1156
- private setupDataChannelCallbacks;
1157
- private onDataChannelConnected;
1158
- private handleCreateOffer;
1159
- static ɵfac: i0.ɵɵFactoryDeclaration<WebRtcPlayerService, never>;
1160
- static ɵprov: i0.ɵɵInjectableDeclaration<WebRtcPlayerService>;
1161
- }
1162
-
1163
- declare class AggregatorService extends SubService {
1164
- #private;
1165
- readonly selectStreamConfig: i0.Signal<_3dsource_angular_unreal_module.StreamConfig | undefined>;
1166
- readonly videoService: VideoService;
1167
- readonly webrtcPlayer: WebRtcPlayerService;
1168
- readonly freezeFrame: FreezeFrameService;
1169
- readonly signallingSrv: SignallingService;
1170
- readonly stats: VideoStreamStatusService;
1171
- /**
1172
- * /Never called for now
1173
- * @
1174
- */
1175
- destroy$: Subject<void>;
1176
- responseEventListeners: Map<string, (data: unknown) => void>;
1177
- unlockViewport$: Observable<boolean>;
1178
- constructor();
1179
- init(): void;
1180
- private initialize;
1181
- /**
1182
- * @deprecated
1183
- * Hack for 3DS platform;
1184
- * TODO remove ASAP, use {@link BasicConfiguratorApiService.toMetaBoxHandlers.watchCallbacks}
1185
- * Add external responses to the list of responses
1186
- */
1187
- private addExternalResponses;
1188
- addResponseEventListener(name: string, listener: (data: unknown) => void): void;
1189
- showOnScreenKeyboard<T extends {
1190
- showOnScreenKeyboard: boolean;
1191
- }>(command: T): void;
1192
- exposeApi(): void;
1193
- removeLoadScreen(): void;
1194
- startListenCallbacks(): void;
1195
- private showMessageFromUnreal;
1196
- resetResponseList(): void;
1197
- listenSignaling(): void;
1198
- listenWebRTC(): void;
1199
- dataChannelMessageHandler(data: number[]): void;
1200
- static ɵfac: i0.ɵɵFactoryDeclaration<AggregatorService, never>;
1201
- static ɵprov: i0.ɵɵInjectableDeclaration<AggregatorService>;
1202
- }
1203
- declare const filteredLogs: {
1204
- command: string;
1205
- }[];
1206
-
1207
- declare class CommandTelemetryService {
1208
- private readonly appId;
1209
- private commandsSent;
1210
- private exileTimout;
1211
- private pollingTime;
1212
- private commandSequenceNumber;
1213
- /**
1214
- * The time the telemetry service was started.
1215
- * Initialized at a moment when connectToSignaling() was called.
1216
- * @private
1217
- */
1218
- private startTime;
1219
- private lastTime;
1220
- private uuid;
1221
- private viewId;
1222
- private readonly sessionId;
1223
- private readonly userId;
1224
- private payloads;
1225
- private readonly httpClient;
1226
- private readonly unrealInitialConfig;
1227
- constructor();
1228
- private get timeNow();
1229
- private get sessionTime();
1230
- private get canSkipSending();
1231
- decorate(funcToDecorate: IToBeDecorated): (data: any) => void;
1232
- private start;
1233
- private reset;
1234
- private trackStartCommand;
1235
- private trackStopCommand;
1236
- private pushStatToBuffer;
1237
- private trackTime;
1238
- private send;
1239
- /**
1240
- * Listens for Unreal Engine callbacks.
1241
- * Subscribes to the Unreal Engine event loop back and filters out events that do not have a tracking ID.
1242
- * When a callback with a tracking ID is received,
1243
- * it stops tracking the time for that command and filters out commands
1244
- * that have exceeded the timeout limit.
1245
- */
1246
- private listenCallbacks;
1247
- private pushData;
1248
- /**
1249
- * Removes commands that have exceeded the timeout limit.
1250
- * Iterates over all the commands sent and checks if the difference between the current time
1251
- * and the time the command was sent is greater than the timeout limit.
1252
- * If it is, the command is marked for deletion.
1253
- * After checking all commands, those marked for deletion are removed from the commands sent.
1254
- * This method is used to ensure that commands that are not responded to within a certain time frame
1255
- * do not remain in the commandsSent object indefinitely, which could lead to memory leaks over time.
1256
- */
1257
- private removeExileCommands;
1258
- /**
1259
- * Wraps the provided function with telemetry tracking.
1260
- * Generates a unique tracking ID and adds it to the data object.
1261
- * Pushes the command sent to the payloads with the tracking ID.
1262
- * Starts tracking the time for the command.
1263
- * Finally, calls the provided function with the modified data object.
1264
- *
1265
- * @param {IToBeDecorated} funcToDecorate - The function to be decorated with telemetry tracking.
1266
- * @param {any} data - The data object to be passed to the function. It will be augmented with a unique tracking ID.
1267
- */
1268
- private wrapper;
1269
- static ɵfac: i0.ɵɵFactoryDeclaration<CommandTelemetryService, never>;
1270
- static ɵprov: i0.ɵɵInjectableDeclaration<CommandTelemetryService>;
1271
- }
1272
- type IToBeDecorated = (data: any) => unknown;
1273
- declare function TelemetryStart(externalId: string): void;
1274
- declare function TelemetryStop(externalId: string, payload?: any): void;
1275
- declare function ResetTelemetry(): void;
1276
-
1277
- declare class ConsoleExtensionsService extends SubService {
1278
- private httpClient;
1279
- private isDevMode;
1280
- init(): void;
1281
- private unrealHelp;
1282
- static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleExtensionsService, never>;
1283
- static ɵprov: i0.ɵɵInjectableDeclaration<ConsoleExtensionsService>;
1284
- }
1285
-
1286
- declare class DevModeService {
1287
- get isDevMode(): boolean;
1288
- setDevMode(value: boolean): void;
1289
- static ɵfac: i0.ɵɵFactoryDeclaration<DevModeService, never>;
1290
- static ɵprov: i0.ɵɵInjectableDeclaration<DevModeService>;
1291
- }
1292
-
1293
- declare class InputService extends SubService {
1294
- private commandsSender;
1295
- private isDevMode;
1296
- readonly defaultKeys: (17 | 37 | 38 | 39 | 40 | 46 | 65 | 68 | 83 | 87 | 107 | 109 | 187 | 189)[];
1297
- private availableKeys;
1298
- private options;
1299
- private reInit$;
1300
- private deactivatedVideoTrigger$;
1301
- private normalizeAndQuantizeUnsigned;
1302
- private unQuantizeAndDenormalizeUnsigned;
1303
- private normalizeAndQuantizeSigned;
1304
- video: HTMLVideoElement;
1305
- videoBoundingRect: DOMRect;
1306
- fingerIds: Map<any, any>;
1307
- maxByteValue: number;
1308
- fingers: number[];
1309
- private offsetParams;
1310
- constructor();
1311
- useKeyboardKeys(keys: IKeyCode[]): void;
1312
- private setup;
1313
- /**
1314
- * We use `object-fit: cover` on the video element. Since the video can have
1315
- * a different aspect ratio from its container (and potentially be larger),
1316
- * we need to calculate offsets and scale factors to map container (e.g., mouse)
1317
- * coordinates back to the actual video coordinates.
1318
- *
1319
- * @param videoElement The video element whose scaling and positioning we need
1320
- * @returns Object containing offset and scale info for coordinate normalization
1321
- * @private
1322
- */
1323
- private getObjectFitOffset;
1324
- private setupNormalizeAndQuantize;
1325
- private sendInputData;
1326
- private registerInputs;
1327
- private getTouchPositionWithOffset;
1328
- private getMousePositionWithOffset;
1329
- private registerTouchEvents;
1330
- focusWindow(): void;
1331
- emitMouseMove(x: number, y: number, deltaX: number, deltaY: number): void;
1332
- emitMouseDown(button: number, x: number, y: number): void;
1333
- emitMouseUp(button: number, x: number, y: number): void;
1334
- emitMouseWheel(delta: number, x: number, y: number): void;
1335
- private releaseMouseButtons;
1336
- private pressMouseButtons;
1337
- private registerHoveringMouseEvents;
1338
- private registerMouseEnterAndLeaveEvents;
1339
- private isKeyCodeBrowserKey;
1340
- private getKeyCode;
1341
- private registerKeyboardEvents;
1342
- private startListenKeys;
1343
- }
1344
-
1345
- declare class RegionsPingService {
1346
- private httpClient;
1347
- private unrealInitialConfig;
1348
- config: {
1349
- ping_count: number;
1350
- ping_timeout: number;
1351
- max_parallel_requests: number;
1352
- bust_cache: boolean;
1353
- };
1354
- constructor();
1355
- getFastest(regionListUrl?: string): Observable<string | undefined>;
1356
- getPingResult(providers: ProvidersData): Observable<PingResult | null>;
1357
- getProviders(regionList?: string): Observable<ProvidersData>;
1358
- private startPinging;
1359
- private checkLatency;
1360
- private fetchWithTimeout;
1361
- static ɵfac: i0.ɵɵFactoryDeclaration<RegionsPingService, never>;
1362
- static ɵprov: i0.ɵɵInjectableDeclaration<RegionsPingService>;
1363
- }
1364
- interface ProvidersData {
1365
- timeout?: number;
1366
- regions: Region[];
1367
- }
1368
- interface Region {
1369
- region_code: string;
1370
- url: string;
1371
- timeout?: number;
1372
- }
1373
- interface PingResult {
1374
- region_code: string | undefined;
1375
- result: number[];
1376
- }
1377
-
1378
1277
  declare class StreamStatusTelemetryService {
1379
- #private;
1278
+ private store;
1279
+ private videoService;
1380
1280
  constructor();
1381
1281
  private mapEventData;
1382
1282
  private initTelemetry;
@@ -1423,6 +1323,78 @@ declare class UnrealCommunicatorService {
1423
1323
  static ɵprov: i0.ɵɵInjectableDeclaration<UnrealCommunicatorService>;
1424
1324
  }
1425
1325
 
1326
+ declare class VideoService extends SubService {
1327
+ video: HTMLVideoElement | null;
1328
+ audio: HTMLAudioElement | null;
1329
+ private container;
1330
+ private latencyTestTimings;
1331
+ private videoTrack$;
1332
+ private VideoEncoderQP;
1333
+ private aggregatedStats;
1334
+ private kalmanFilter1D;
1335
+ /**
1336
+ * Aggregate video stats and emit it as videoStats$
1337
+ */
1338
+ videoStats$: rxjs.Observable<IAggregatedStat>;
1339
+ constructor();
1340
+ setContainer(container: HTMLDivElement): void;
1341
+ setLatencyTimings(latencyTimings: string): void;
1342
+ setEncoder(data: any): void;
1343
+ create(): void;
1344
+ attachVideoStream(stream: MediaStream, pcClient: RTCPeerConnection): void;
1345
+ attachAudioStream(stream: MediaStream): void;
1346
+ play(): void;
1347
+ private getStats;
1348
+ private generateAggregatedStatsFunction;
1349
+ private onAggregatedStats;
1350
+ private destroy;
1351
+ private createWebRtcVideo;
1352
+ private createWebRtcAudio;
1353
+ private playAudio;
1354
+ static ɵfac: i0.ɵɵFactoryDeclaration<VideoService, never>;
1355
+ static ɵprov: i0.ɵɵInjectableDeclaration<VideoService>;
1356
+ }
1357
+
1358
+ declare class WebRtcPlayerService extends SubService {
1359
+ onDataChannelMessage$: Subject<number[]>;
1360
+ private pcClient;
1361
+ private signallingSrv;
1362
+ private videoService;
1363
+ private cfg;
1364
+ private useMic;
1365
+ private forceTURN;
1366
+ private forceMonoAudio;
1367
+ private dcClient;
1368
+ private webRtcErrorTimeout;
1369
+ /**
1370
+ * Never called for now
1371
+ */
1372
+ private readonly destroy$;
1373
+ constructor();
1374
+ private listenSignaling;
1375
+ private createWebRtcOffer;
1376
+ private createDataChannel;
1377
+ private receiveAnswer;
1378
+ private handleCandidateFromServer;
1379
+ private mungeSDP;
1380
+ /**
1381
+ * Closes existing PeerConnection
1382
+ */
1383
+ closePC(): void;
1384
+ canSend(): boolean | null;
1385
+ send(data: ArrayBuffer): void;
1386
+ private setConfig;
1387
+ private dispatchWebRtcError;
1388
+ private createPeerConnection;
1389
+ private handlePeerConnectionEvents;
1390
+ private setupTransceiversAsync;
1391
+ private setupDataChannelCallbacks;
1392
+ private onDataChannelConnected;
1393
+ private createOffer;
1394
+ static ɵfac: i0.ɵɵFactoryDeclaration<WebRtcPlayerService, never>;
1395
+ static ɵprov: i0.ɵɵInjectableDeclaration<WebRtcPlayerService>;
1396
+ }
1397
+
1426
1398
  declare class AfkRestartScreenLockerComponent implements AfterViewInit, OnInit {
1427
1399
  store: Store<any>;
1428
1400
  videoService: VideoService;
@@ -1489,7 +1461,6 @@ declare class UnrealSceneComponent implements AfterViewInit, OnInit, OnDestroy {
1489
1461
  private commandsSender;
1490
1462
  private inputService;
1491
1463
  private videoService;
1492
- private stats;
1493
1464
  private streamTelemetryService;
1494
1465
  private element;
1495
1466
  private destroyRef;
@@ -1533,7 +1504,7 @@ declare class VideoLockerComponent implements AfterViewInit, OnInit {
1533
1504
  declare class VideoStatsComponent implements OnInit {
1534
1505
  collapsed: boolean;
1535
1506
  private store;
1536
- private videoStatGenerator;
1507
+ private videoService;
1537
1508
  private isDevMode;
1538
1509
  private obs$;
1539
1510
  viewportReady: i0.Signal<boolean | undefined>;
@@ -1565,8 +1536,8 @@ declare class VideoStatsComponent implements OnInit {
1565
1536
  }
1566
1537
 
1567
1538
  declare class WebrtcErrorModalComponent {
1568
- #private;
1569
- dialogRef: DialogRef<any, any>;
1539
+ private dialogRef;
1540
+ private store;
1570
1541
  close(): void;
1571
1542
  closeModalWithCirrusDisconnect(): void;
1572
1543
  static ɵfac: i0.ɵɵFactoryDeclaration<WebrtcErrorModalComponent, never>;
@@ -1612,7 +1583,7 @@ declare class LowBandwidthDetectorComponent implements OnInit {
1612
1583
  private readonly store;
1613
1584
  private readonly dialog;
1614
1585
  private readonly destroyRef;
1615
- private readonly videoStatGenerator;
1586
+ private readonly videoService;
1616
1587
  readonly devModeService: DevModeService;
1617
1588
  private readonly viewportReady$;
1618
1589
  private readonly isLowBandwidth$;
@@ -1650,5 +1621,5 @@ declare class SafePipe implements PipeTransform {
1650
1621
  static ɵpipe: i0.ɵɵPipeDeclaration<SafePipe, "safe", true>;
1651
1622
  }
1652
1623
 
1653
- export { AFKService, AfkRestartScreenLockerComponent, AggregatorService, AnswerHandler, CONSOLE_COMMAND_DISABLE_MESSAGES, CONSOLE_COMMAND_ENABLE_MESSAGES, CONSOLE_COMMAND_PIXEL_QUALITY, ClickableOverlayComponent, CommandTelemetryService, ConfigHandler, ConsoleExtensionsService, DATA_CHANNEL_CONNECTION_TIMEOUT, DEBOUNCE_TO_MANY_RESIZE_CALLS, DEFAULT_TIMEOUT_PERIOD, DEFAULT_WARN_TIMEOUT, DataFlowMonitor, DevModeService, DisconnectReason, EControlSchemeType, EMessageType, EToClientMessageType, FULL_HD_HEIGHT, FULL_HD_WIDTH, FilterSettingsComponent, FreezeFrameComponent, FreezeFrameService, IceCandidateHandler, InputOptions, InputService, InstanceReadyHandler, InstanceReservedHandler, KalmanFilter1D, LatencyTimings, LowBandwidthDetectorComponent, LowBandwidthModalComponent, MINIMAL_FPS, MouseButton, MouseButtonsMask, OnCloseHandler, OnErrorHandler, OnMessageHandler, OnOpenHandler, OrchestrationMessageTypes, PingHandler, PlayerCountHandler, RegionsPingService, ResetTelemetry, SAME_SIZE_THRESHOLD, SCREEN_LOCKER_CONTAINER_ID, SSInfoHandler, STREAMING_VIDEO_ID, SafePipe, SignallingService, SpecialKeyCodes, StatGraphComponent, StreamStatusTelemetryService, SubService, TelemetryStart, TelemetryStop, UNREAL_CONFIG, UnrealCommunicatorService, UnrealEffects, UnrealInternalSignalEvents, UnrealSceneComponent, UnrealStatusMessage, VideoLockerComponent, VideoRecorder, VideoService, VideoStatsComponent, VideoStreamStatusService, WSCloseCode_NORMAL_AFK_TIMEOUT, WSCloseCode_NORMAL_CIRRUS_CLOSED, WSCloseCode_NORMAL_CLOSURE, WSCloseCode_NORMAL_MANUAL_DISCONNECT, WSCloseCodes, WS_OPEN_STATE, WS_TIMEOUT, WebRtcPlayerService, WebrtcErrorModalComponent, alignProductsToPlaneCommand, changeLowBandwidth, changeStatusMainVideoOnScene, changeStreamResolutionAction, changeStreamResolutionSuccessAction, clampAndKeepMaxPercents, clampPanToProductsCommand, commandCompleted, commandStarted, decodeData, destroyConnectionsAndResetState, destroyRemoteConnections, dispatchResize, filteredLogs, floatToSmoothPercents, forceResizeUnrealVideo, fromResizeObserver, fromSignal, fromUnrealCallBackSignal, getActiveUrl, getApplyCameraPresetCommand, getApplyZoomCommand, getCameraBoxCommand, getCameraRecenterCommand, getCameraSettingsCommand, getChangeGizmoTypeCommand, getChangeResolutionCommand, getClickSnapCommand, getControlSensitivityCommand, getDebugModeCommand, getDragCommand, getDragSequenceCommand, getDropCommand, getEnableComposureCommand, getEnableControlsCommand, getEnableSceneStateCallbackCommand, getEnableSpinnerModeCommand, getEnableTeleportCommand, getExecuteConsoleCommand, getFitToObjectsCommand, getFreezeFrameCommand, getImageFromVideoStream, getInitSequenceByObjectNameCommand, getJumpToSequenceCommand, getLoadLevelCommand, getLoadProductCommand, getLoadSceneStateCommand, getLoopBackCommand, getMoveSelectedCommand, getPauseSequenceCommand, getPlaySequenceCommand, getRequestCameraPresetCommand, getResetControlClampsCommand, getRotateSelectedCommand, getRtcErrorMessage, getSelectProductByObjectNameCommand, getSetCameraControlClampsCommand, getSetControlCameraModeCommand, getSetFpsCommand, getSetMaterialCommand, getSetPawnMovementModeCommand, getSetSettingsSequenceCommand, getStopSequenceCommand, getTakeRenderCommand, getTakeSpinnerRenderCommand, getTakeSpinnerRenderPreviewCommand, getUnLoadAllProductsCommand, getUnLoadProductByObjectNameCommand, getUnselectAllProductsCommand, getWeatherCommand, initSignalling, initialState, mapQpToQuality, observeCommandResponse, removeExileCommands, resetAfk, resetAfkAction, resetConfig, resetIntroSrc, resetUnrealState, resetUnrealStateAction, resetWarnTimeout, selectCommandProgress, selectCommandsInProgress, selectFreezeFrameCombinedDataUrl, selectFreezeFrameDataUrl, selectFreezeFrameDataUrlFromVideo, selectFreezeFrameProgressMessageFromVideo, selectIsAutostart, selectIsFreezeFrameLoading, selectIsVideoPlayingAndDataChannelConnected, selectLastCommandInProgress, selectLoaderCommands, selectMatchUrls, selectShowLoader, selectShowReconnectPopup, selectSignalingParameters, selectStreamConfig, selectTotalProgress, selectWarnTimeout, selectWsUrl, sendSignal, setAwsInstance, setCirrusConnected, setCirrusDisconnected, setConfig, setDataChannelConnected, setErrorMessage, setEstablishingConnection, setFreezeFrame, setFreezeFrameFromVideo, setIntroImageSrc, setIntroVideoSrc, setLoadingImageSrc, setLoopBackCommandIsCompleted, setMatchUrls, setMaxFps, setProductsLocationCommand, setSignalingName, setStatusMessage, setStatusPercentSignallingServer, setStreamClientCompanyId, setStreamViewId, setViewportReady, showUnrealErrorMessage, trackMixpanelEvent, unLoadAllLevelsCommand, unrealFeature, unrealReducer, updateCirrusInfo };
1654
- export type { AnswerMessage, AwsInstance, CandidateMessage, CloseReason, CommandsLoaderState, ConfigMessage, DataFlowCheckResult, DisconnectType, EControlSchemeTypeValues, EMessageTypeValues, FreezeFrameMessage, IAggregatedStat, InboundVideoStats, InputProps, InstanceReady, InstanceReserved, LBMStats, MessageBase, NormalizeAndQuantizeSignedValue, NormalizeAndQuantizeUnsignedValue, ObservedCallbackResponse, OfferMessage, OrchestrationMessageType, PingMessage, PlayerCountMessage, PollingOrchestrationMessage, Quality, SSInfo, SignalDescriptor, SignalingData, SignalingMessageHandler, SignalingMessageMap, StreamConfig, StreamResolutionProps, StreamerListMessage, TelemetryType, UnknownFields, UnquantizeAndDenormalizeUnsignedValue, UnrealCallBackJson, UnrealError, UnrealErrorType, UnrealInitialConfig, UnrealState, WSCloseCodesValues, WrappedMetaBoxCommandPacket };
1624
+ export { AFKService, AfkRestartScreenLockerComponent, AggregatorService, AnswerHandler, CONSOLE_COMMAND_DISABLE_MESSAGES, CONSOLE_COMMAND_ENABLE_MESSAGES, CONSOLE_COMMAND_PIXEL_QUALITY, ClickableOverlayComponent, CommandTelemetryService, ConfigHandler, ConsoleExtensionsService, DATA_CHANNEL_CONNECTION_TIMEOUT, DEBOUNCE_TO_MANY_RESIZE_CALLS, DEFAULT_TIMEOUT_PERIOD, DEFAULT_WARN_TIMEOUT, DataFlowMonitor, DevModeService, DisconnectReason, EControlSchemeType, EMessageType, EToClientMessageType, FULL_HD_HEIGHT, FULL_HD_WIDTH, FilterSettingsComponent, FreezeFrameComponent, FreezeFrameService, IceCandidateHandler, InputOptions, InputService, InstanceReadyHandler, InstanceReservedHandler, KalmanFilter1D, LatencyTimings, LowBandwidthDetectorComponent, LowBandwidthModalComponent, MINIMAL_FPS, MouseButton, MouseButtonsMask, OnCloseHandler, OnErrorHandler, OnMessageHandler, OnOpenHandler, OrchestrationMessageTypes, PingHandler, PlayerCountHandler, RegionsPingService, ResetTelemetry, SAME_SIZE_THRESHOLD, SCREEN_LOCKER_CONTAINER_ID, SSInfoHandler, STREAMING_VIDEO_ID, SafePipe, SignallingService, SpecialKeyCodes, StatGraphComponent, StreamStatusTelemetryService, SubService, TelemetryStart, TelemetryStop, UNREAL_CONFIG, UnrealCommunicatorService, UnrealEffects, UnrealInternalSignalEvents, UnrealSceneComponent, UnrealStatusMessage, VideoLockerComponent, VideoRecorder, VideoService, VideoStatsComponent, WSCloseCode_NORMAL_AFK_TIMEOUT, WSCloseCode_NORMAL_CIRRUS_CLOSED, WSCloseCode_NORMAL_CLOSURE, WSCloseCode_NORMAL_MANUAL_DISCONNECT, WSCloseCodes, WS_OPEN_STATE, WS_TIMEOUT, WebRtcPlayerService, WebrtcErrorModalComponent, alignProductsToPlaneCommand, changeLowBandwidth, changeStatusMainVideoOnScene, changeStreamResolutionAction, changeStreamResolutionSuccessAction, clampAndKeepMaxPercents, clampPanToProductsCommand, commandCompleted, commandStarted, decodeData, destroyConnectionsAndResetState, destroyRemoteConnections, dispatchResize, floatToSmoothPercents, forceResizeUnrealVideo, fromResizeObserver, fromSignal, fromUnrealCallBackSignal, getActiveUrl, getApplyCameraPresetCommand, getApplyZoomCommand, getCameraBoxCommand, getCameraRecenterCommand, getCameraSettingsCommand, getChangeGizmoTypeCommand, getChangeResolutionCommand, getClickSnapCommand, getControlSensitivityCommand, getDebugModeCommand, getDragCommand, getDragSequenceCommand, getDropCommand, getEnableComposureCommand, getEnableControlsCommand, getEnableSceneStateCallbackCommand, getEnableSpinnerModeCommand, getEnableTeleportCommand, getExecuteConsoleCommand, getFitToObjectsCommand, getFreezeFrameCommand, getImageFromVideoStream, getInitSequenceByObjectNameCommand, getJumpToSequenceCommand, getLoadLevelCommand, getLoadProductCommand, getLoadSceneStateCommand, getLoopBackCommand, getMoveSelectedCommand, getPauseSequenceCommand, getPlaySequenceCommand, getRequestCameraPresetCommand, getResetControlClampsCommand, getRotateSelectedCommand, getRtcErrorMessage, getSelectProductByObjectNameCommand, getSetCameraControlClampsCommand, getSetControlCameraModeCommand, getSetFpsCommand, getSetMaterialCommand, getSetPawnMovementModeCommand, getSetSettingsSequenceCommand, getStopSequenceCommand, getTakeRenderCommand, getTakeSpinnerRenderCommand, getTakeSpinnerRenderPreviewCommand, getUnLoadAllProductsCommand, getUnLoadProductByObjectNameCommand, getUnselectAllProductsCommand, getWeatherCommand, initSignalling, initialState, mapQpToQuality, observeCommandResponse, removeExileCommands, resetAfk, resetAfkAction, resetConfig, resetIntroSrc, resetUnrealState, resetUnrealStateAction, resetWarnTimeout, selectCommandProgress, selectCommandsInProgress, selectFreezeFrameCombinedDataUrl, selectFreezeFrameDataUrl, selectFreezeFrameDataUrlFromVideo, selectFreezeFrameProgressMessageFromVideo, selectIsAutostart, selectIsFreezeFrameLoading, selectIsVideoPlayingAndDataChannelConnected, selectLastCommandInProgress, selectLoaderCommands, selectMatchUrls, selectShowLoader, selectShowReconnectPopup, selectSignalingParameters, selectStreamConfig, selectTotalProgress, selectWarnTimeout, selectWsUrl, sendSignal, setAwsInstance, setCirrusConnected, setCirrusDisconnected, setConfig, setDataChannelConnected, setErrorMessage, setEstablishingConnection, setFreezeFrame, setFreezeFrameFromVideo, setIntroImageSrc, setIntroVideoSrc, setLoadingImageSrc, setLoopBackCommandIsCompleted, setMatchUrls, setMaxFps, setProductsLocationCommand, setSignalingName, setStatusMessage, setStatusPercentSignallingServer, setStreamClientCompanyId, setStreamViewId, setViewportReady, showUnrealErrorMessage, trackMixpanelEvent, unLoadAllLevelsCommand, unrealFeature, unrealReducer, updateCirrusInfo };
1625
+ export type { AwsInstance, CandidateMessage, CloseReason, CommandsLoaderState, ConfigMessage, DataFlowCheckResult, DisconnectType, EControlSchemeTypeValues, EMessageTypeValues, FreezeFrameMessage, IAggregatedStat, InboundVideoStats, InputProps, InstanceReady, InstanceReserved, LBMStats, MessageBase, NormalizeAndQuantizeSignedValue, NormalizeAndQuantizeUnsignedValue, ObservedCallbackResponse, OrchestrationMessageType, PingMessage, PlayerCountMessage, PollingOrchestrationMessage, Quality, SSInfo, SignalDescriptor, SignalingData, SignalingMessageHandler, SignalingMessageMap, StreamConfig, StreamResolutionProps, StreamerListMessage, TelemetryType, UnknownFields, UnquantizeAndDenormalizeUnsignedValue, UnrealCallBackJson, UnrealError, UnrealErrorType, UnrealInitialConfig, UnrealState, WSCloseCodesValues, WrappedMetaBoxCommandPacket };