@3dsource/angular-unreal-module 0.0.1

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 (147) hide show
  1. package/README.md +64 -0
  2. package/fesm2022/3dsource-angular-unreal-module.mjs +6226 -0
  3. package/fesm2022/3dsource-angular-unreal-module.mjs.map +1 -0
  4. package/index.d.ts +5 -0
  5. package/lib/components/clickable-overlay/clickable-overlay.component.d.ts +14 -0
  6. package/lib/components/freeze-frame/freeze-frame.component.d.ts +8 -0
  7. package/lib/components/index.d.ts +12 -0
  8. package/lib/components/low-bandwidth-indicator/DataFlowConstants.d.ts +66 -0
  9. package/lib/components/low-bandwidth-indicator/filter-settings/filter-settings.component.d.ts +37 -0
  10. package/lib/components/low-bandwidth-indicator/index.d.ts +2 -0
  11. package/lib/components/low-bandwidth-indicator/low-bandwidth-detector.component.d.ts +38 -0
  12. package/lib/components/low-bandwidth-modal/low-bandwidth-modal.component.d.ts +8 -0
  13. package/lib/components/pdf/components/generator/pdf-base-page.component.d.ts +20 -0
  14. package/lib/components/pdf/components/generator/pdf-generator.component.d.ts +26 -0
  15. package/lib/components/pdf/components/templates/general/header/header-pdf.component.d.ts +8 -0
  16. package/lib/components/pdf/components/templates/general/image-pdf/image-pdf.component.d.ts +7 -0
  17. package/lib/components/pdf/components/templates/general/intro-pdf/intro-pdf.component.d.ts +6 -0
  18. package/lib/components/pdf/components/templates/general/materials-page-pdf/materials-page-pdf.component.d.ts +6 -0
  19. package/lib/components/pdf/components/templates/general/materials-pdf/materials-pdf.component.d.ts +8 -0
  20. package/lib/components/pdf/components/templates/general/page-number/page-number.component.d.ts +8 -0
  21. package/lib/components/pdf/constants/pdf.d.ts +5 -0
  22. package/lib/components/pdf/container/pdf.component.d.ts +13 -0
  23. package/lib/components/pdf/directives/insertion.directive.d.ts +7 -0
  24. package/lib/components/pdf/helpers/generate-pdf-schema.d.ts +2 -0
  25. package/lib/components/pdf/helpers/get-pdf-url.d.ts +1 -0
  26. package/lib/components/pdf/index.d.ts +1 -0
  27. package/lib/components/pdf/interfaces/pdf.interface.d.ts +53 -0
  28. package/lib/components/pdf/store/pdf.component.store.d.ts +44 -0
  29. package/lib/components/screen-locker/afk-restart-screen-locker.component.d.ts +25 -0
  30. package/lib/components/show-case/components/source-slider/source-slider.component.d.ts +42 -0
  31. package/lib/components/show-case/components/source-slider/user-interact.directive.d.ts +33 -0
  32. package/lib/components/show-case/constants/icons/fullscreen-out.d.ts +2 -0
  33. package/lib/components/show-case/constants/icons/fullscreen.d.ts +2 -0
  34. package/lib/components/show-case/constants/icons/pause-circle.d.ts +2 -0
  35. package/lib/components/show-case/constants/icons/pause-icon.d.ts +2 -0
  36. package/lib/components/show-case/constants/icons/play-icon.d.ts +2 -0
  37. package/lib/components/show-case/constants/icons/player-boomerang.d.ts +2 -0
  38. package/lib/components/show-case/constants/icons/player-laps.d.ts +2 -0
  39. package/lib/components/show-case/constants/icons/player-next.d.ts +2 -0
  40. package/lib/components/show-case/constants/icons/player-prev.d.ts +2 -0
  41. package/lib/components/show-case/constants/index.d.ts +7 -0
  42. package/lib/components/show-case/constants/show-case.icons.d.ts +1 -0
  43. package/lib/components/show-case/container/show-case.component.d.ts +98 -0
  44. package/lib/components/show-case/helpers/mapOnInitSequenceData.d.ts +3 -0
  45. package/lib/components/show-case/index.d.ts +1 -0
  46. package/lib/components/show-case/interfaces/showcase-status.d.ts +20 -0
  47. package/lib/components/show-case/store/show-case.component.interface.d.ts +32 -0
  48. package/lib/components/show-case/store/show-case.component.store.d.ts +37 -0
  49. package/lib/components/stat-graph/stat-graph.component.d.ts +28 -0
  50. package/lib/components/unreal-scene/unreal-scene.component.d.ts +50 -0
  51. package/lib/components/unreal-status/unreal-status.component.d.ts +24 -0
  52. package/lib/components/video-locker/video-locker.component.d.ts +14 -0
  53. package/lib/components/video-stats/video-stats.component.d.ts +36 -0
  54. package/lib/components/webrtc-error-modal/webrtc-error-modal.component.d.ts +10 -0
  55. package/lib/constants/ButtonsAndCodes.d.ts +23 -0
  56. package/lib/constants/EControlSchemeType.d.ts +6 -0
  57. package/lib/constants/EMessageType.d.ts +25 -0
  58. package/lib/constants/EToClientMessageType.d.ts +12 -0
  59. package/lib/constants/InputOptions.d.ts +2 -0
  60. package/lib/constants/UnrealStatusMessage.d.ts +4 -0
  61. package/lib/constants/index.d.ts +11 -0
  62. package/lib/constants/initial-config.d.ts +3 -0
  63. package/lib/constants/mix-panel.constant.d.ts +11 -0
  64. package/lib/constants/struct.d.ts +5553 -0
  65. package/lib/constants/timeout.constant.d.ts +6 -0
  66. package/lib/constants/unreal.constant.d.ts +11 -0
  67. package/lib/constants/unreal.providers.d.ts +15 -0
  68. package/lib/helpers/CommandObserver.d.ts +8 -0
  69. package/lib/helpers/DataDecoder.d.ts +1 -0
  70. package/lib/helpers/DataFlowMonitor.d.ts +39 -0
  71. package/lib/helpers/EventWrapper.d.ts +18 -0
  72. package/lib/helpers/FromStreamerHandlers/AnswerHandler.d.ts +3 -0
  73. package/lib/helpers/FromStreamerHandlers/ConfigHandler.d.ts +3 -0
  74. package/lib/helpers/FromStreamerHandlers/IceCandidateHandler.d.ts +4 -0
  75. package/lib/helpers/FromStreamerHandlers/InstanceReadyHandler.d.ts +3 -0
  76. package/lib/helpers/FromStreamerHandlers/InstanceReservedHandler.d.ts +3 -0
  77. package/lib/helpers/FromStreamerHandlers/PingHandler.d.ts +2 -0
  78. package/lib/helpers/FromStreamerHandlers/PlayerCountHandler.d.ts +3 -0
  79. package/lib/helpers/FromStreamerHandlers/SSInfoHandler.d.ts +3 -0
  80. package/lib/helpers/FromStreamerHandlers/index.d.ts +8 -0
  81. package/lib/helpers/GetNextUrl.d.ts +1 -0
  82. package/lib/helpers/KalmanFilter1D.d.ts +20 -0
  83. package/lib/helpers/LatencyTimings.d.ts +13 -0
  84. package/lib/helpers/TouchEmulator.d.ts +24 -0
  85. package/lib/helpers/VideoRecorder.d.ts +8 -0
  86. package/lib/helpers/WsHandlers/OnCloseHandler.d.ts +2 -0
  87. package/lib/helpers/WsHandlers/OnErrorHandler.d.ts +2 -0
  88. package/lib/helpers/WsHandlers/OnMessageHandler.d.ts +2 -0
  89. package/lib/helpers/WsHandlers/OpenHandler.d.ts +2 -0
  90. package/lib/helpers/WsHandlers/index.d.ts +4 -0
  91. package/lib/helpers/clamp-and-keep-max-percents.d.ts +2 -0
  92. package/lib/helpers/deepEqual.d.ts +1 -0
  93. package/lib/helpers/dispatchResize.d.ts +2 -0
  94. package/lib/helpers/error-codes.d.ts +1 -0
  95. package/lib/helpers/float-to-smooth-percents.d.ts +2 -0
  96. package/lib/helpers/get-image-from-video-stream.d.ts +3 -0
  97. package/lib/helpers/index.d.ts +21 -0
  98. package/lib/helpers/mapQpToQuality.d.ts +2 -0
  99. package/lib/helpers/prepare-commands.d.ts +52 -0
  100. package/lib/helpers/remove-exile-commands.d.ts +10 -0
  101. package/lib/helpers/resetAfk.d.ts +1 -0
  102. package/lib/helpers/resize-observer.d.ts +2 -0
  103. package/lib/interfaces/CloseReason.d.ts +5 -0
  104. package/lib/interfaces/CustomCloseCodes.d.ts +6 -0
  105. package/lib/interfaces/LBMStats.d.ts +6 -0
  106. package/lib/interfaces/SignalingData.d.ts +8 -0
  107. package/lib/interfaces/SignalingMessage.d.ts +77 -0
  108. package/lib/interfaces/TelemetryEvent.d.ts +1 -0
  109. package/lib/interfaces/disconnect-reasons.d.ts +9 -0
  110. package/lib/interfaces/errors.interface.d.ts +5 -0
  111. package/lib/interfaces/freeze-frame-message.interface.d.ts +4 -0
  112. package/lib/interfaces/index.d.ts +16 -0
  113. package/lib/interfaces/initial-config.d.ts +8 -0
  114. package/lib/interfaces/input.interface.d.ts +19 -0
  115. package/lib/interfaces/mix-panel-events.d.ts +8 -0
  116. package/lib/interfaces/quality.interface.d.ts +1 -0
  117. package/lib/interfaces/stream-config.interface.d.ts +5 -0
  118. package/lib/interfaces/stream-resolution.interface.d.ts +4 -0
  119. package/lib/interfaces/unreal-internal-signal-events.interface.d.ts +83 -0
  120. package/lib/pipes/index.d.ts +1 -0
  121. package/lib/pipes/safe-html.pipe.d.ts +9 -0
  122. package/lib/services/afk.service.d.ts +38 -0
  123. package/lib/services/aggregator.service.d.ts +53 -0
  124. package/lib/services/command-telemetry.service.d.ts +71 -0
  125. package/lib/services/console-extensions.service.d.ts +10 -0
  126. package/lib/services/dev-mode.service.d.ts +7 -0
  127. package/lib/services/freeze-frame.service.d.ts +16 -0
  128. package/lib/services/image-capture.service.d.ts +30 -0
  129. package/lib/services/index.d.ts +17 -0
  130. package/lib/services/input.service.d.ts +53 -0
  131. package/lib/services/mix-panel.service.d.ts +11 -0
  132. package/lib/services/regions-ping.service.d.ts +34 -0
  133. package/lib/services/signalling.service.d.ts +41 -0
  134. package/lib/services/stream-status-telemetry.service.d.ts +11 -0
  135. package/lib/services/sub.service.d.ts +5 -0
  136. package/lib/services/unreal-communicator.service.d.ts +38 -0
  137. package/lib/services/video-stream-status.service.d.ts +24 -0
  138. package/lib/services/video.service.d.ts +17 -0
  139. package/lib/services/web-rtc-player.service.d.ts +44 -0
  140. package/lib/store/index.d.ts +5 -0
  141. package/lib/store/unreal.actions.d.ts +196 -0
  142. package/lib/store/unreal.effects.d.ts +79 -0
  143. package/lib/store/unreal.feature.d.ts +35 -0
  144. package/lib/store/unreal.reducer.d.ts +56 -0
  145. package/lib/store/unreal.selectors.d.ts +36 -0
  146. package/package.json +36 -0
  147. package/public-api.d.ts +7 -0
@@ -0,0 +1,83 @@
1
+ import type { MetaBoxCommandPacket } from '@struct';
2
+ import type { Quality } from './quality.interface';
3
+ import type { DataFlowCheckResult } from '../helpers/DataFlowMonitor';
4
+ export declare const UnrealInternalSignalEvents: {
5
+ readonly OnVideoInitialized: "OnVideoInitialized";
6
+ readonly RestAfkTimer: "RestAfkTimer";
7
+ readonly FreezeFrameStart: "FreezeFrameStart";
8
+ readonly UnrealCallback: "UnrealCallback";
9
+ readonly ClickableOverlay: "ClickableOverlay";
10
+ readonly VideoPlayClick: "VideoPlayClick";
11
+ readonly ShowPlayButton: "ShowPlayButton";
12
+ readonly ForceResizeViewport: "ForceResizeViewport";
13
+ readonly VideoAdaptedToContainer: "VideoAdaptedToContainer";
14
+ readonly TelemetryStart: "TelemetryStart";
15
+ readonly TelemetryStop: "TelemetryStop";
16
+ readonly TelemetryReset: "TelemetryReset";
17
+ };
18
+ export interface SignalDescriptor {
19
+ [UnrealInternalSignalEvents.UnrealCallback]: {
20
+ json: UnrealCallBackJson;
21
+ };
22
+ [UnrealInternalSignalEvents.ClickableOverlay]: {
23
+ message: string;
24
+ className: string;
25
+ isActivityDetected: boolean;
26
+ onOverlayClick: () => void;
27
+ } | void;
28
+ [UnrealInternalSignalEvents.VideoPlayClick]: {
29
+ text: string;
30
+ };
31
+ [UnrealInternalSignalEvents.ForceResizeViewport]: void;
32
+ [UnrealInternalSignalEvents.OnVideoInitialized]: HTMLVideoElement;
33
+ [UnrealInternalSignalEvents.VideoAdaptedToContainer]: void;
34
+ [UnrealInternalSignalEvents.ShowPlayButton]: {
35
+ text: string;
36
+ callback: () => boolean;
37
+ };
38
+ [UnrealInternalSignalEvents.RestAfkTimer]: void;
39
+ [UnrealInternalSignalEvents.FreezeFrameStart]: void;
40
+ [UnrealInternalSignalEvents.TelemetryReset]: void;
41
+ [UnrealInternalSignalEvents.TelemetryStart]: {
42
+ externalId: string;
43
+ };
44
+ [UnrealInternalSignalEvents.TelemetryStop]: {
45
+ externalId: string;
46
+ payload?: {
47
+ multi?: boolean;
48
+ };
49
+ };
50
+ [key: string]: any;
51
+ }
52
+ export type UnrealCallBackJson = MetaBoxCommandPacket | WrappedMetaBoxCommandPacket;
53
+ export interface WrappedMetaBoxCommandPacket {
54
+ commandCallback: MetaBoxCommandPacket;
55
+ }
56
+ export interface IAggregatedStat {
57
+ quality: Quality;
58
+ aggregatedStats: InboundVideoStats;
59
+ }
60
+ export interface InboundVideoStats extends RTCInboundRtpStreamStats {
61
+ VideoEncoderQP: number;
62
+ runTime: number;
63
+ pixelRatio: number;
64
+ bytesReceivedStart: number;
65
+ framesDecodedStart: number;
66
+ timestampStart: number;
67
+ videoCodec: string;
68
+ avgBitrate: number;
69
+ avgFrameRate: number;
70
+ currentRoundTripTime: number;
71
+ codecs: Record<string, string>;
72
+ receiveToCompositeMs: number;
73
+ bitrate: number;
74
+ kalmanBitrate: number;
75
+ bitrateDrop: number;
76
+ dataFlowCheckResult: DataFlowCheckResult;
77
+ dataFlowBitrate: DataFlowCheckResult;
78
+ }
79
+ export interface AwsInstance {
80
+ wsUrl: string | null;
81
+ pollingUrl: string | null;
82
+ instanceName: string | null;
83
+ }
@@ -0,0 +1 @@
1
+ export * from './safe-html.pipe';
@@ -0,0 +1,9 @@
1
+ import type { PipeTransform } from '@angular/core';
2
+ import type { SafeHtml, SafeResourceUrl, SafeScript, SafeStyle, SafeUrl } from '@angular/platform-browser';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SafePipe implements PipeTransform {
5
+ private sanitizer;
6
+ transform(value: any, type: string): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<SafePipe, never>;
8
+ static ɵpipe: i0.ɵɵPipeDeclaration<SafePipe, "safe", true>;
9
+ }
@@ -0,0 +1,38 @@
1
+ import { SubService } from './sub.service';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AFKService extends SubService {
4
+ private enabled;
5
+ private closeTimeout;
6
+ private active;
7
+ private warnTimer;
8
+ private countdown;
9
+ private countdownTimer;
10
+ private selectWarnTimeout;
11
+ constructor();
12
+ initAfk(): void;
13
+ init(): void;
14
+ private hideOverlay;
15
+ /**
16
+ * Start a timer which when elapsed will warn the user they are inactive.
17
+ */
18
+ private startAfkWarningTimer;
19
+ /**
20
+ * If the user interacts, then reset the warning timer.
21
+ */
22
+ private resetAfkWarningTimer;
23
+ /**
24
+ * Update the count-down spans number for the overlay
25
+ * @param countdown the count down number to be inserted into the span for updating
26
+ */
27
+ private updateCountDown;
28
+ /**
29
+ * Update the text overlays inner text
30
+ * @param message the update text to be inserted into the overlay
31
+ */
32
+ private dispatchMessage;
33
+ private stop;
34
+ private reset;
35
+ private showAfkOverlay;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<AFKService, never>;
37
+ static ɵprov: i0.ɵɵInjectableDeclaration<AFKService>;
38
+ }
@@ -0,0 +1,53 @@
1
+ import type { Observable } from 'rxjs';
2
+ import { Subject } from 'rxjs';
3
+ import { FreezeFrameService } from './freeze-frame.service';
4
+ import { SignallingService } from './signalling.service';
5
+ import { Store } from '@ngrx/store';
6
+ import { VideoService } from './video.service';
7
+ import { VideoStreamStatusService } from './video-stream-status.service';
8
+ import { WebRtcPlayerService } from './web-rtc-player.service';
9
+ import * as i0 from "@angular/core";
10
+ export declare class AggregatorService {
11
+ readonly store: Store<any>;
12
+ readonly selectStreamConfig: import("@angular/core").Signal<import("@3dsource/angular-unreal-module").StreamConfig | undefined>;
13
+ readonly videoService: VideoService;
14
+ readonly webrtcPlayer: WebRtcPlayerService;
15
+ readonly freezeFrame: FreezeFrameService;
16
+ readonly signallingSrv: SignallingService;
17
+ readonly stats: VideoStreamStatusService;
18
+ /**
19
+ * /Never called for now
20
+ * @
21
+ */
22
+ destroy$: Subject<void>;
23
+ responseEventListeners: Map<string, (data: unknown) => void>;
24
+ disconnect$: Observable<boolean>;
25
+ unlockViewport$: Observable<boolean>;
26
+ constructor();
27
+ init(): void;
28
+ private initialize;
29
+ /**
30
+ * @deprecated
31
+ * Hack for 3DS platform;
32
+ * TODO remove ASAP, use {@link BasicConfiguratorApiService.toMetaBoxHandlers.watchCallbacks}
33
+ * Add external responses to the list of responses
34
+ */
35
+ private addExternalResponses;
36
+ addResponseEventListener(name: string, listener: (data: unknown) => void): void;
37
+ showOnScreenKeyboard<T extends {
38
+ showOnScreenKeyboard: boolean;
39
+ }>(command: T): void;
40
+ exposeApi(): void;
41
+ removeLoadScreen(): void;
42
+ startListenCallbacks(): void;
43
+ private showMessageFromUnreal;
44
+ resetResponseList(): void;
45
+ listenSignaling(): void;
46
+ listenWebRTC(): void;
47
+ dataChannelMessageHandler(data: number[]): void;
48
+ static ɵfac: i0.ɵɵFactoryDeclaration<AggregatorService, never>;
49
+ static ɵprov: i0.ɵɵInjectableDeclaration<AggregatorService>;
50
+ }
51
+ export declare const filteredLogs: {
52
+ command: string;
53
+ }[];
@@ -0,0 +1,71 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class CommandTelemetryService {
3
+ private readonly appId;
4
+ private commandsSent;
5
+ private exileTimout;
6
+ private pollingTime;
7
+ private commandSequenceNumber;
8
+ /**
9
+ * The time the telemetry service was started.
10
+ * Initialized at a moment when connectToSignaling() was called.
11
+ * @private
12
+ */
13
+ private startTime;
14
+ private lastTime;
15
+ private uuid;
16
+ private viewId;
17
+ private readonly sessionId;
18
+ private readonly userId;
19
+ private payloads;
20
+ private readonly httpClient;
21
+ private readonly unrealInitialConfig;
22
+ constructor();
23
+ private get timeNow();
24
+ private get sessionTime();
25
+ private get canSkipSending();
26
+ decorate(funcToDecorate: IToBeDecorated): (data: any) => void;
27
+ private start;
28
+ private reset;
29
+ private trackStartCommand;
30
+ private trackStopCommand;
31
+ private pushStatToBuffer;
32
+ private trackTime;
33
+ private send;
34
+ /**
35
+ * Listens for Unreal Engine callbacks.
36
+ * Subscribes to the Unreal Engine event loop back and filters out events that do not have a tracking ID.
37
+ * When a callback with a tracking ID is received,
38
+ * it stops tracking the time for that command and filters out commands
39
+ * that have exceeded the timeout limit.
40
+ */
41
+ private listenCallbacks;
42
+ private pushData;
43
+ /**
44
+ * Removes commands that have exceeded the timeout limit.
45
+ * Iterates over all the commands sent and checks if the difference between the current time
46
+ * and the time the command was sent is greater than the timeout limit.
47
+ * If it is, the command is marked for deletion.
48
+ * After checking all commands, those marked for deletion are removed from the commands sent.
49
+ * This method is used to ensure that commands that are not responded to within a certain time frame
50
+ * do not remain in the commandsSent object indefinitely, which could lead to memory leaks over time.
51
+ */
52
+ private removeExileCommands;
53
+ /**
54
+ * Wraps the provided function with telemetry tracking.
55
+ * Generates a unique tracking ID and adds it to the data object.
56
+ * Pushes the command sent to the payloads with the tracking ID.
57
+ * Starts tracking the time for the command.
58
+ * Finally, calls the provided function with the modified data object.
59
+ *
60
+ * @param {IToBeDecorated} funcToDecorate - The function to be decorated with telemetry tracking.
61
+ * @param {any} data - The data object to be passed to the function. It will be augmented with a unique tracking ID.
62
+ */
63
+ private wrapper;
64
+ static ɵfac: i0.ɵɵFactoryDeclaration<CommandTelemetryService, never>;
65
+ static ɵprov: i0.ɵɵInjectableDeclaration<CommandTelemetryService>;
66
+ }
67
+ type IToBeDecorated = (data: any) => unknown;
68
+ export declare function TelemetryStart(externalId: string): void;
69
+ export declare function TelemetryStop(externalId: string, payload?: any): void;
70
+ export declare function ResetTelemetry(): void;
71
+ export {};
@@ -0,0 +1,10 @@
1
+ import { SubService } from '../services/sub.service';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ConsoleExtensionsService extends SubService {
4
+ private httpClient;
5
+ private isDevMode;
6
+ init(): void;
7
+ private unrealHelp;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleExtensionsService, never>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<ConsoleExtensionsService>;
10
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class DevModeService {
3
+ get isDevMode(): boolean;
4
+ setDevMode(value: boolean): void;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<DevModeService, never>;
6
+ static ɵprov: i0.ɵɵInjectableDeclaration<DevModeService>;
7
+ }
@@ -0,0 +1,16 @@
1
+ import { SubService } from './sub.service';
2
+ import * as i0 from "@angular/core";
3
+ export declare class FreezeFrameService extends SubService {
4
+ receiving: boolean;
5
+ private size;
6
+ private jpeg;
7
+ private freezeFrameOverlay;
8
+ init(): void;
9
+ setData(view: Uint8Array): void;
10
+ private dispatchInProgress;
11
+ start(view: Uint8Array): void;
12
+ invalidate(): void;
13
+ private showFreezeFrame;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<FreezeFrameService, never>;
15
+ static ɵprov: i0.ɵɵInjectableDeclaration<FreezeFrameService>;
16
+ }
@@ -0,0 +1,30 @@
1
+ import type { FVector2DJson } from '@struct';
2
+ import type { Observable } from 'rxjs';
3
+ import type { ImageOutputValues } from '@3dsource/utils';
4
+ import type { StreamResolutionProps } from '../interfaces/stream-resolution.interface';
5
+ import * as i0 from "@angular/core";
6
+ interface CameraEntity {
7
+ id: string;
8
+ label: string;
9
+ order: number;
10
+ }
11
+ export declare class ImageCaptureService {
12
+ #private;
13
+ getCurrentCamera(imageOutput: ImageOutputValues, lockViewPortWithVideoFreeze?: boolean, resolution?: FVector2DJson): Observable<string | null>;
14
+ captureCameras(imageOutput: ImageOutputValues, cameraList: CameraEntity[]): Observable<string[]>;
15
+ /**
16
+ * Get freeze-frame image from Unreal
17
+ * @param totalImages - total images in queue will be shown in progress bar
18
+ * @param index
19
+ */
20
+ getFreezeImage(index: number, totalImages: number): Observable<string | null>;
21
+ /**
22
+ * Get freeze-frame image from Unreal;
23
+ * No progress bar will be shown
24
+ */
25
+ getFreezeImage(): Observable<string | null>;
26
+ getVideoSnapshot(imageOutput?: ImageOutputValues, resolution?: StreamResolutionProps): string | null;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<ImageCaptureService, never>;
28
+ static ɵprov: i0.ɵɵInjectableDeclaration<ImageCaptureService>;
29
+ }
30
+ export {};
@@ -0,0 +1,17 @@
1
+ export * from './afk.service';
2
+ export * from './aggregator.service';
3
+ export * from './command-telemetry.service';
4
+ export * from './console-extensions.service';
5
+ export * from './dev-mode.service';
6
+ export * from './freeze-frame.service';
7
+ export * from './image-capture.service';
8
+ export * from './input.service';
9
+ export * from './mix-panel.service';
10
+ export * from './regions-ping.service';
11
+ export * from './signalling.service';
12
+ export * from './stream-status-telemetry.service';
13
+ export * from './sub.service';
14
+ export * from './unreal-communicator.service';
15
+ export * from './video.service';
16
+ export * from './video-stream-status.service';
17
+ export * from './web-rtc-player.service';
@@ -0,0 +1,53 @@
1
+ import type { IKeyCode } from '@3dsource/utils';
2
+ import { SubService } from '../services/sub.service';
3
+ export declare class InputService extends SubService {
4
+ private commandsSender;
5
+ private isDevMode;
6
+ readonly defaultKeys: (17 | 37 | 38 | 39 | 40 | 46 | 65 | 68 | 83 | 87 | 107 | 109 | 187 | 189)[];
7
+ private availableKeys;
8
+ private options;
9
+ private reInit$;
10
+ private deactivatedVideoTrigger$;
11
+ private normalizeAndQuantizeUnsigned;
12
+ private unQuantizeAndDenormalizeUnsigned;
13
+ private normalizeAndQuantizeSigned;
14
+ video: HTMLVideoElement;
15
+ videoBoundingRect: DOMRect;
16
+ fingerIds: Map<any, any>;
17
+ maxByteValue: number;
18
+ fingers: number[];
19
+ private offsetParams;
20
+ constructor();
21
+ useKeyboardKeys(keys: IKeyCode[]): void;
22
+ private setup;
23
+ /**
24
+ * We use `object-fit: cover` on the video element. Since the video can have
25
+ * a different aspect ratio from its container (and potentially be larger),
26
+ * we need to calculate offsets and scale factors to map container (e.g., mouse)
27
+ * coordinates back to the actual video coordinates.
28
+ *
29
+ * @param videoElement The video element whose scaling and positioning we need
30
+ * @returns Object containing offset and scale info for coordinate normalization
31
+ * @private
32
+ */
33
+ private getObjectFitOffset;
34
+ private setupNormalizeAndQuantize;
35
+ private sendInputData;
36
+ private registerInputs;
37
+ private getTouchPositionWithOffset;
38
+ private getMousePositionWithOffset;
39
+ private registerTouchEvents;
40
+ focusWindow(): void;
41
+ emitMouseMove(x: number, y: number, deltaX: number, deltaY: number): void;
42
+ emitMouseDown(button: number, x: number, y: number): void;
43
+ emitMouseUp(button: number, x: number, y: number): void;
44
+ emitMouseWheel(delta: number, x: number, y: number): void;
45
+ private releaseMouseButtons;
46
+ private pressMouseButtons;
47
+ private registerHoveringMouseEvents;
48
+ private registerMouseEnterAndLeaveEvents;
49
+ private isKeyCodeBrowserKey;
50
+ private getKeyCode;
51
+ private registerKeyboardEvents;
52
+ private startListenKeys;
53
+ }
@@ -0,0 +1,11 @@
1
+ import type { MixPanelEventsValues } from '../interfaces/mix-panel-events';
2
+ import type { Dict } from 'mixpanel-browser';
3
+ import * as i0 from "@angular/core";
4
+ export declare class MixPanelService {
5
+ #private;
6
+ init(): void;
7
+ trackMetabox(event: MixPanelEventsValues | string, data?: Dict): void;
8
+ trackStream(event: MixPanelEventsValues | string, data?: Dict): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<MixPanelService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<MixPanelService>;
11
+ }
@@ -0,0 +1,34 @@
1
+ import type { Observable } from 'rxjs';
2
+ import * as i0 from "@angular/core";
3
+ export declare class RegionsPingService {
4
+ private httpClient;
5
+ private unrealInitialConfig;
6
+ config: {
7
+ ping_count: number;
8
+ ping_timeout: number;
9
+ max_parallel_requests: number;
10
+ bust_cache: boolean;
11
+ };
12
+ getFastest(regionListUrl?: string): Observable<string | undefined>;
13
+ getPingResult(providers: ProvidersData): Observable<PingResult | null>;
14
+ getProviders(regionList?: string): Observable<ProvidersData>;
15
+ private startPinging;
16
+ private checkLatency;
17
+ private fetchWithTimeout;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<RegionsPingService, never>;
19
+ static ɵprov: i0.ɵɵInjectableDeclaration<RegionsPingService>;
20
+ }
21
+ interface ProvidersData {
22
+ timeout?: number;
23
+ regions: Region[];
24
+ }
25
+ interface Region {
26
+ region_code: string;
27
+ url: string;
28
+ timeout?: number;
29
+ }
30
+ interface PingResult {
31
+ region_code: string | undefined;
32
+ result: number[];
33
+ }
34
+ export {};
@@ -0,0 +1,41 @@
1
+ import { Subject } from 'rxjs';
2
+ import { SubService } from './sub.service';
3
+ import type { CloseReason } from '../interfaces/CloseReason';
4
+ import type { ConfigMessage, MessageBase } from '../interfaces/SignalingMessage';
5
+ import * as i0 from "@angular/core";
6
+ export declare class SignallingService extends SubService {
7
+ private readonly httpClient;
8
+ private readonly regionsPingService;
9
+ onConfig$: Subject<ConfigMessage>;
10
+ onWebRtcIce$: Subject<RTCIceCandidate>;
11
+ onWebRtcAnswer$: Subject<RTCSessionDescriptionInit | null>;
12
+ private ws;
13
+ protected wsTimeoutHandler: ReturnType<typeof setTimeout>;
14
+ private wsMsgHandlers;
15
+ protected correlationId: string;
16
+ protected environmentId: string;
17
+ private establishingConnection;
18
+ private isCirrusConnected;
19
+ private establishingConnectionDrop$;
20
+ constructor();
21
+ protected initEstablishingConnection(): void;
22
+ private stopEstablishingConnection;
23
+ private connectToSignaling;
24
+ private connectToSignalingAfterPing;
25
+ showStatusMessage(message: string | null): void;
26
+ /**
27
+ * Close the connection with the signaling server
28
+ * @param data
29
+ */
30
+ close(data: CloseReason | void): void;
31
+ send(data: string | object): void;
32
+ protected watchTimeoutOrErrorAndReconnectLater(): void;
33
+ protected stopRetryTimer(): void;
34
+ private initWebSocket;
35
+ private httpUrlToWs;
36
+ private clearWs;
37
+ protected handleMessage(msg: MessageBase): void;
38
+ private setHandlersFromStream;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<SignallingService, never>;
40
+ static ɵprov: i0.ɵɵInjectableDeclaration<SignallingService>;
41
+ }
@@ -0,0 +1,11 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class StreamStatusTelemetryService {
3
+ #private;
4
+ constructor();
5
+ private mapEventData;
6
+ private initTelemetry;
7
+ private trackEventToMixPanel;
8
+ init(): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<StreamStatusTelemetryService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<StreamStatusTelemetryService>;
11
+ }
@@ -0,0 +1,5 @@
1
+ import { Store } from '@ngrx/store';
2
+ export declare class SubService {
3
+ store: Store<any>;
4
+ disconnect$: import("rxjs").Observable<false>;
5
+ }
@@ -0,0 +1,38 @@
1
+ import type { MetaBoxCommandPacket } from '@struct';
2
+ import * as i0 from "@angular/core";
3
+ export declare class UnrealCommunicatorService {
4
+ private telemetry;
5
+ private afkService;
6
+ private freezeFrame;
7
+ private webrtcPlayer;
8
+ private videoService;
9
+ private consoleExtensions;
10
+ private store;
11
+ private destroy$;
12
+ private cirrusConnected;
13
+ constructor();
14
+ destroy(): void;
15
+ sendCommandToUnreal(data: MetaBoxCommandPacket): void;
16
+ emitUIInteraction(descriptor: MetaBoxCommandPacket): void;
17
+ /**
18
+ A build-in command can be sent to the UE4 client. The commands are defined by a
19
+ JSON descriptor and will be executed automatically.
20
+ The currently supported commands are:
21
+
22
+ 1. A command to run any console command:
23
+ "{ ConsoleCommand: <string> }"
24
+
25
+ 2. A command to change the resolution to the given width and height.
26
+ "{ Resolution.Width: <value>, Resolution.Height: <value> } }"
27
+ */
28
+ emitCommand(descriptor: MetaBoxCommandPacket): void;
29
+ sendInputData(data: ArrayBuffer): void;
30
+ private emitDescriptor;
31
+ private requestInitialSettings;
32
+ private requestQualityControl;
33
+ private listenVideo;
34
+ private prepareScreen;
35
+ private showPlayOverlay;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<UnrealCommunicatorService, never>;
37
+ static ɵprov: i0.ɵɵInjectableDeclaration<UnrealCommunicatorService>;
38
+ }
@@ -0,0 +1,24 @@
1
+ import type { IAggregatedStat } from '../interfaces/unreal-internal-signal-events.interface';
2
+ import type { Observable } from 'rxjs';
3
+ import { LatencyTimings } from '../helpers/LatencyTimings';
4
+ import { SubService } from './sub.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class VideoStreamStatusService extends SubService {
7
+ readonly latencyTestTimings: LatencyTimings;
8
+ private readonly webrtcPlayer;
9
+ private aggregatedStats;
10
+ private VideoEncoderQP;
11
+ private kalmanFilter1D;
12
+ readonly videoStats$: Observable<IAggregatedStat>;
13
+ constructor();
14
+ /**
15
+ * Aggregate video stats and emit it as videoStats$
16
+ */
17
+ private aggregateStats;
18
+ setEncoder(data: any): void;
19
+ private getStats;
20
+ private generateAggregatedStatsFunction;
21
+ private onAggregatedStats;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<VideoStreamStatusService, never>;
23
+ static ɵprov: i0.ɵɵInjectableDeclaration<VideoStreamStatusService>;
24
+ }
@@ -0,0 +1,17 @@
1
+ import { SubService } from './sub.service';
2
+ import * as i0 from "@angular/core";
3
+ export declare class VideoService extends SubService {
4
+ video: HTMLVideoElement | null;
5
+ audio: HTMLAudioElement | null;
6
+ container: HTMLDivElement | null;
7
+ create(): void;
8
+ private destroy;
9
+ private createWebRtcVideo;
10
+ attachVideoStream(stream: MediaStream): void;
11
+ attachAudioStream(stream: MediaStream): void;
12
+ private createWebRtcAudio;
13
+ private playAudio;
14
+ play(): void;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<VideoService, never>;
16
+ static ɵprov: i0.ɵɵInjectableDeclaration<VideoService>;
17
+ }
@@ -0,0 +1,44 @@
1
+ import { Subject } from 'rxjs';
2
+ import { SubService } from './sub.service';
3
+ import type { ConfigMessage } from '../interfaces/SignalingMessage';
4
+ import * as i0 from "@angular/core";
5
+ export declare class WebRtcPlayerService extends SubService {
6
+ pcClient: RTCPeerConnection | null;
7
+ onAudioTrack$: Subject<MediaStream>;
8
+ onVideoTrack$: Subject<MediaStream>;
9
+ onDataChannelMessage$: Subject<number[]>;
10
+ onWebRtcCandidate$: Subject<RTCIceCandidate>;
11
+ onWebRtcOffer$: Subject<RTCSessionDescriptionInit>;
12
+ private cfg;
13
+ private useMic;
14
+ private forceTURN;
15
+ private preferSFU;
16
+ private autoPlayAudio;
17
+ private startVideoMuted;
18
+ private forceMonoAudio;
19
+ private forceMaxBundle;
20
+ private dcClient;
21
+ private sdpConstraints;
22
+ private dataChannelOptions;
23
+ private webRtcErrorTimeout;
24
+ createWebRtcOffer(): Promise<void>;
25
+ private dispatchWebRtcError;
26
+ private createOffer;
27
+ createDataChannel(pc: RTCPeerConnection, label: string, options: RTCDataChannelInit): RTCDataChannel | null;
28
+ private setupTransceiversAsync;
29
+ private setupDataChannelCallbacks;
30
+ private onDataChannelConnected;
31
+ private handleCreateOffer;
32
+ receiveAnswer(answer: RTCSessionDescriptionInit): void;
33
+ handleCandidateFromServer(iceCandidate: RTCIceCandidate): void;
34
+ mungeSDP(offer: RTCSessionDescriptionInit): void;
35
+ /**
36
+ * Closes existing PeerConnection
37
+ */
38
+ closePC(): void;
39
+ canSend(): boolean | null;
40
+ send(data: ArrayBuffer): void;
41
+ setConfig(parOptions?: ConfigMessage): void;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<WebRtcPlayerService, never>;
43
+ static ɵprov: i0.ɵɵInjectableDeclaration<WebRtcPlayerService>;
44
+ }
@@ -0,0 +1,5 @@
1
+ export * from './unreal.actions';
2
+ export * from './unreal.effects';
3
+ export * from './unreal.feature';
4
+ export * from './unreal.reducer';
5
+ export * from './unreal.selectors';