@3dsource/angular-unreal-module 0.0.75 → 0.0.77-dev.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.
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, Injectable, signal, makeEnvironmentProviders,
|
|
2
|
+
import { InjectionToken, inject, Injectable, signal, makeEnvironmentProviders, ChangeDetectionStrategy, Component, Pipe, ElementRef, input, HostListener, Input, ViewChild, DestroyRef, computed, viewChild, effect, untracked, output } from '@angular/core';
|
|
3
3
|
import { filter, withLatestFrom, distinctUntilChanged, switchMap, catchError, timeout, tap, map as map$1, takeUntil, exhaustMap, debounceTime, takeWhile, delay, skip as skip$1 } from 'rxjs/operators';
|
|
4
4
|
import { createAction, props, Store, provideState, createReducer, on, createFeature, createSelector } from '@ngrx/store';
|
|
5
5
|
import { Actions, ofType, provideEffects, createEffect } from '@ngrx/effects';
|
|
6
6
|
import { skip, share, merge, Subject, interval, of, map, from, take, fromEvent, timer, throwError, defer, Observable, switchMap as switchMap$1, retry, timeout as timeout$1, tap as tap$1, startWith, combineLatestWith, takeUntil as takeUntil$1, auditTime, EMPTY, debounceTime as debounceTime$1, mergeMap, scan, concatMap, animationFrameScheduler, BehaviorSubject, distinctUntilChanged as distinctUntilChanged$1, concat } from 'rxjs';
|
|
7
7
|
import { Falsy, Truthy, Logger, calculateMedian, clampf, Signal, tapLog, generateUuid, COLOR_CODES, where, KeyboardNumericCode, InvertedKeyMap, Semaphore, lerp, getCanvasCached, getSnapshot, whereNot, HEXtoRGB, RGBtoHSV, inverseLerp, HSVtoRGB, RGBtoHEX, fpIsASameAsB, fitIntoRectangle } from '@3dsource/utils';
|
|
8
8
|
import { HttpClient } from '@angular/common/http';
|
|
9
|
-
import { toSignal, takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
10
9
|
import { DialogRef, DIALOG_DATA, Dialog } from '@angular/cdk/dialog';
|
|
11
10
|
import { ScrollStrategyOptions } from '@angular/cdk/overlay';
|
|
12
11
|
import { MetaBoxCommand } from '@3dsource/types-unreal';
|
|
13
12
|
import { SourceButtonComponent, SourceLoadingComponent } from '@3dsource/source-ui-native';
|
|
14
13
|
import * as i1 from '@angular/common';
|
|
15
14
|
import { CommonModule, NgOptimizedImage, AsyncPipe, JsonPipe } from '@angular/common';
|
|
15
|
+
import { toSignal, takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
16
16
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
17
17
|
import * as i1$1 from '@angular/forms';
|
|
18
18
|
import { FormsModule } from '@angular/forms';
|
|
@@ -297,7 +297,7 @@ class SubService {
|
|
|
297
297
|
|
|
298
298
|
class AFKService extends SubService {
|
|
299
299
|
constructor() {
|
|
300
|
-
super();
|
|
300
|
+
super(...arguments);
|
|
301
301
|
// Optionally detect if the user is not interacting (AFK) and disconnect them.
|
|
302
302
|
this.enabled = true; // Set to true to enable the AFK system.
|
|
303
303
|
this.closeTimeout = DEFAULT_AFK_TIMEOUT_PERIOD; // The time after the warning when we disconnect the user.
|
|
@@ -305,7 +305,6 @@ class AFKService extends SubService {
|
|
|
305
305
|
this.countdown = 0; // The inactivity warning overlay has a countdown to show time until disconnect.
|
|
306
306
|
this.selectWarnTimeout = this.store.selectSignal(selectWarnTimeout);
|
|
307
307
|
this.isViewportReady = this.store.selectSignal(unrealFeature.selectViewportReady);
|
|
308
|
-
this.init();
|
|
309
308
|
}
|
|
310
309
|
init() {
|
|
311
310
|
merge(this.store.select(selectWarnTimeout), fromSignal(UnrealInternalSignalEvents.RestAfkTimer))
|
|
@@ -399,22 +398,22 @@ class AFKService extends SubService {
|
|
|
399
398
|
}
|
|
400
399
|
}, 1000);
|
|
401
400
|
}
|
|
402
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AFKService, deps:
|
|
401
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AFKService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
403
402
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AFKService }); }
|
|
404
403
|
}
|
|
405
404
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AFKService, decorators: [{
|
|
406
405
|
type: Injectable
|
|
407
|
-
}]
|
|
406
|
+
}] });
|
|
408
407
|
|
|
409
408
|
class FreezeFrameService extends SubService {
|
|
410
409
|
constructor() {
|
|
411
|
-
super();
|
|
410
|
+
super(...arguments);
|
|
412
411
|
this.receiving = false;
|
|
413
412
|
this.size = 0;
|
|
414
413
|
this.freezeFrameOverlay = new Image();
|
|
415
|
-
this.init();
|
|
416
414
|
}
|
|
417
415
|
init() {
|
|
416
|
+
console.log('DEBUG: FreezeFrameService init');
|
|
418
417
|
this.store
|
|
419
418
|
.select(unrealFeature.selectViewportReady)
|
|
420
419
|
.pipe(filter(Truthy))
|
|
@@ -478,12 +477,12 @@ class FreezeFrameService extends SubService {
|
|
|
478
477
|
progress: 1,
|
|
479
478
|
}));
|
|
480
479
|
}
|
|
481
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FreezeFrameService, deps:
|
|
480
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FreezeFrameService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
482
481
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FreezeFrameService }); }
|
|
483
482
|
}
|
|
484
483
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FreezeFrameService, decorators: [{
|
|
485
484
|
type: Injectable
|
|
486
|
-
}]
|
|
485
|
+
}] });
|
|
487
486
|
|
|
488
487
|
class DataFlowMonitor {
|
|
489
488
|
/**
|
|
@@ -610,6 +609,7 @@ class VideoService extends SubService {
|
|
|
610
609
|
this.init();
|
|
611
610
|
}
|
|
612
611
|
init() {
|
|
612
|
+
console.log('DEBUG: VideoService init');
|
|
613
613
|
Signal.on('setKalmanParams').subscribe((data) => {
|
|
614
614
|
this.kalmanFilter1D.config(data);
|
|
615
615
|
BITRATE_MONITOR.config(data);
|
|
@@ -873,6 +873,7 @@ class CommandTelemetryService {
|
|
|
873
873
|
this.init();
|
|
874
874
|
}
|
|
875
875
|
init() {
|
|
876
|
+
console.log('DEBUG: CommandTelemetryService init');
|
|
876
877
|
if (!this.unrealInitialConfig?.commandTelemetryReceiver) {
|
|
877
878
|
return;
|
|
878
879
|
}
|
|
@@ -1198,6 +1199,7 @@ class SignallingService extends SubService {
|
|
|
1198
1199
|
this.init();
|
|
1199
1200
|
}
|
|
1200
1201
|
init() {
|
|
1202
|
+
console.log('DEBUG: SignallingService init');
|
|
1201
1203
|
this.setHandlersFromStream();
|
|
1202
1204
|
this.store
|
|
1203
1205
|
.select(unrealFeature.selectDataChannelConnected)
|
|
@@ -1509,6 +1511,7 @@ class WebRtcPlayerService extends SubService {
|
|
|
1509
1511
|
this.init();
|
|
1510
1512
|
}
|
|
1511
1513
|
init() {
|
|
1514
|
+
console.log('DEBUG: WebRtcPlayerService init');
|
|
1512
1515
|
const iceCandidateBuffer = [];
|
|
1513
1516
|
const processBuffer = () => {
|
|
1514
1517
|
iceCandidateBuffer.forEach((cnd) => {
|
|
@@ -1585,10 +1588,10 @@ class WebRtcPlayerService extends SubService {
|
|
|
1585
1588
|
}
|
|
1586
1589
|
mungeSDP(offer) {
|
|
1587
1590
|
let audioSDP = '';
|
|
1588
|
-
// set max bitrate to highest bitrate Opus supports
|
|
1591
|
+
// set max bitrate to the highest bitrate Opus supports
|
|
1589
1592
|
audioSDP += 'maxaveragebitrate=510000;';
|
|
1590
1593
|
if (this.useMic) {
|
|
1591
|
-
// set the max capture rate to 48khz (so we can send high
|
|
1594
|
+
// set the max capture rate to 48khz (so we can send high-quality audio from mic)
|
|
1592
1595
|
audioSDP += 'sprop-maxcapturerate=48000;';
|
|
1593
1596
|
}
|
|
1594
1597
|
// Force mono or stereo based on whether ?forceMono was passed or not
|
|
@@ -1893,6 +1896,7 @@ class FileReceiverService extends SubService {
|
|
|
1893
1896
|
this.init();
|
|
1894
1897
|
}
|
|
1895
1898
|
init() {
|
|
1899
|
+
console.log('DEBUG: FileReceiverService init');
|
|
1896
1900
|
this.store
|
|
1897
1901
|
.select(unrealFeature.selectViewportReady)
|
|
1898
1902
|
.pipe(filter(Truthy))
|
|
@@ -1906,14 +1910,14 @@ class FileReceiverService extends SubService {
|
|
|
1906
1910
|
this.chunks = 0;
|
|
1907
1911
|
this.data = [];
|
|
1908
1912
|
this.timestampStart = new Date().getTime();
|
|
1909
|
-
//Logger.info('Received file state');
|
|
1913
|
+
// Logger.info('Received file state');
|
|
1910
1914
|
}
|
|
1911
1915
|
resetOnStart() {
|
|
1912
1916
|
this.reset();
|
|
1913
1917
|
this.receiving = true;
|
|
1914
1918
|
}
|
|
1915
1919
|
/**
|
|
1916
|
-
* Processes a
|
|
1920
|
+
* Processes a file extension when received over data channel
|
|
1917
1921
|
* @param view - the file extension data
|
|
1918
1922
|
*/
|
|
1919
1923
|
setExtensionFromBytes(view) {
|
|
@@ -1921,12 +1925,11 @@ class FileReceiverService extends SubService {
|
|
|
1921
1925
|
if (!this.receiving) {
|
|
1922
1926
|
this.resetOnStart();
|
|
1923
1927
|
}
|
|
1924
|
-
const extensionAsString = new TextDecoder('utf-16').decode(view.slice(1));
|
|
1925
1928
|
//Logger.info(extensionAsString);
|
|
1926
|
-
this.extension =
|
|
1929
|
+
this.extension = new TextDecoder('utf-16').decode(view.slice(1));
|
|
1927
1930
|
}
|
|
1928
1931
|
/**
|
|
1929
|
-
* Processes a
|
|
1932
|
+
* Processes a file mime type when received over data channel
|
|
1930
1933
|
* @param view - the file mime type data
|
|
1931
1934
|
*/
|
|
1932
1935
|
setMimeTypeFromBytes(view) {
|
|
@@ -1935,7 +1938,7 @@ class FileReceiverService extends SubService {
|
|
|
1935
1938
|
this.resetOnStart();
|
|
1936
1939
|
}
|
|
1937
1940
|
const mimeAsString = new TextDecoder('utf-16').decode(view.slice(1));
|
|
1938
|
-
//Logger.info(mimeAsString);
|
|
1941
|
+
// Logger.info(mimeAsString);
|
|
1939
1942
|
this.mimetype = mimeAsString;
|
|
1940
1943
|
}
|
|
1941
1944
|
/*-------------------------------------------------------------------------------------------*/
|
|
@@ -1948,12 +1951,12 @@ class FileReceiverService extends SubService {
|
|
|
1948
1951
|
const maxMessageSize = 16 * 1024;
|
|
1949
1952
|
const headerSize = typeSize + intSize;
|
|
1950
1953
|
const maxPayloadSize = maxMessageSize - headerSize;
|
|
1951
|
-
// Calculate total number of chunks from the total this size
|
|
1954
|
+
// Calculate the total number of chunks from the total this size
|
|
1952
1955
|
this.chunks = Math.ceil(new DataView(view.slice(typeSize, headerSize).buffer).getInt32(0, true) /
|
|
1953
1956
|
maxPayloadSize);
|
|
1954
1957
|
// Get the file part of the payload
|
|
1955
1958
|
const thisBytes = view.slice(headerSize);
|
|
1956
|
-
// Append to existing data that holds
|
|
1959
|
+
// Append to existing data that holds this
|
|
1957
1960
|
this.data.push(thisBytes);
|
|
1958
1961
|
// Uncomment for debug
|
|
1959
1962
|
// Logger.info(`Received this chunk: ${this.data.length}/${this.chunks}`);
|
|
@@ -1995,8 +1998,8 @@ const filteredLogs = [
|
|
|
1995
1998
|
];
|
|
1996
1999
|
class AggregatorService extends SubService {
|
|
1997
2000
|
constructor() {
|
|
1998
|
-
super();
|
|
1999
|
-
this.selectStreamConfig =
|
|
2001
|
+
super(...arguments);
|
|
2002
|
+
this.selectStreamConfig = this.store.selectSignal(selectStreamConfig);
|
|
2000
2003
|
this.videoService = inject(VideoService);
|
|
2001
2004
|
this.webrtcPlayer = inject(WebRtcPlayerService);
|
|
2002
2005
|
this.freezeFrame = inject(FreezeFrameService);
|
|
@@ -2007,9 +2010,9 @@ class AggregatorService extends SubService {
|
|
|
2007
2010
|
* Never called for now
|
|
2008
2011
|
*/
|
|
2009
2012
|
this.destroy$ = new Subject();
|
|
2010
|
-
this.init();
|
|
2011
2013
|
}
|
|
2012
2014
|
init() {
|
|
2015
|
+
console.log('DEBUG: AggregatorService init');
|
|
2013
2016
|
this.listenWebRTC();
|
|
2014
2017
|
this.initialize();
|
|
2015
2018
|
}
|
|
@@ -2177,21 +2180,18 @@ class AggregatorService extends SubService {
|
|
|
2177
2180
|
Logger.warn(`unrecognized data received, packet ID ${view[0]}`);
|
|
2178
2181
|
}
|
|
2179
2182
|
}
|
|
2180
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AggregatorService, deps:
|
|
2183
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AggregatorService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2181
2184
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AggregatorService }); }
|
|
2182
2185
|
}
|
|
2183
2186
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AggregatorService, decorators: [{
|
|
2184
2187
|
type: Injectable
|
|
2185
|
-
}]
|
|
2188
|
+
}] });
|
|
2186
2189
|
|
|
2187
2190
|
class ConsoleExtensionsService extends SubService {
|
|
2188
2191
|
#httpClient = inject(HttpClient);
|
|
2189
2192
|
#isDevMode = inject(DevModeService).isDevMode;
|
|
2190
|
-
constructor() {
|
|
2191
|
-
super();
|
|
2192
|
-
this.init();
|
|
2193
|
-
}
|
|
2194
2193
|
init() {
|
|
2194
|
+
console.log('DEBUG: ConsoleExtensionsService init');
|
|
2195
2195
|
if (!this.#isDevMode) {
|
|
2196
2196
|
return;
|
|
2197
2197
|
}
|
|
@@ -2233,12 +2233,12 @@ class ConsoleExtensionsService extends SubService {
|
|
|
2233
2233
|
Logger.info('setWarnTime() => set time to appear the AFK window.');
|
|
2234
2234
|
Logger.info('emitCommand(command) => send command to Unreal Engine.');
|
|
2235
2235
|
}
|
|
2236
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConsoleExtensionsService, deps:
|
|
2236
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConsoleExtensionsService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2237
2237
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConsoleExtensionsService }); }
|
|
2238
2238
|
}
|
|
2239
2239
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConsoleExtensionsService, decorators: [{
|
|
2240
2240
|
type: Injectable
|
|
2241
|
-
}]
|
|
2241
|
+
}] });
|
|
2242
2242
|
|
|
2243
2243
|
class DevModeService {
|
|
2244
2244
|
get isDevMode() {
|
|
@@ -2419,16 +2419,22 @@ class TouchEmulator {
|
|
|
2419
2419
|
class UnrealCommunicatorService {
|
|
2420
2420
|
constructor() {
|
|
2421
2421
|
this.store = inject(Store);
|
|
2422
|
-
this.
|
|
2423
|
-
this.
|
|
2424
|
-
this.
|
|
2422
|
+
this.commandTelemetryService = inject(CommandTelemetryService);
|
|
2423
|
+
this.freezeFrameService = inject(FreezeFrameService);
|
|
2424
|
+
this.webRtcPlayerService = inject(WebRtcPlayerService);
|
|
2425
2425
|
this.videoService = inject(VideoService);
|
|
2426
2426
|
this.destroy$ = new Subject();
|
|
2427
|
-
this.
|
|
2427
|
+
this.afkService = inject(AFKService);
|
|
2428
|
+
this.consoleExtensionsService = inject(ConsoleExtensionsService);
|
|
2429
|
+
this.cirrusConnected = this.store.selectSignal(unrealFeature.selectCirrusConnected);
|
|
2428
2430
|
this.init();
|
|
2429
2431
|
}
|
|
2430
2432
|
init() {
|
|
2431
|
-
this.
|
|
2433
|
+
this.consoleExtensionsService.init();
|
|
2434
|
+
this.afkService.init();
|
|
2435
|
+
this.freezeFrameService.init();
|
|
2436
|
+
console.log('DEBUG: UnrealCommunicatorService init');
|
|
2437
|
+
this.emitUIInteraction = this.commandTelemetryService.decorate(this.emitUIInteraction.bind(this));
|
|
2432
2438
|
this.listenVideo();
|
|
2433
2439
|
this.store
|
|
2434
2440
|
.select(unrealFeature.selectDataChannelConnected)
|
|
@@ -2443,7 +2449,7 @@ class UnrealCommunicatorService {
|
|
|
2443
2449
|
this.destroy$.complete();
|
|
2444
2450
|
}
|
|
2445
2451
|
sendCommandToUnreal(data) {
|
|
2446
|
-
if (this.
|
|
2452
|
+
if (this.webRtcPlayerService.canSend()) {
|
|
2447
2453
|
const uniqId = data?.correlationId ?? generateUuid();
|
|
2448
2454
|
const sendData = { ...data, correlationId: uniqId };
|
|
2449
2455
|
Logger.colored(...COLOR_CODES.TO_UNREAL, sendData);
|
|
@@ -2471,7 +2477,7 @@ class UnrealCommunicatorService {
|
|
|
2471
2477
|
sendInputData(data) {
|
|
2472
2478
|
try {
|
|
2473
2479
|
resetAfk();
|
|
2474
|
-
this.
|
|
2480
|
+
this.webRtcPlayerService.send(data);
|
|
2475
2481
|
}
|
|
2476
2482
|
catch (error) {
|
|
2477
2483
|
if (this.cirrusConnected()) {
|
|
@@ -2507,7 +2513,7 @@ class UnrealCommunicatorService {
|
|
|
2507
2513
|
}
|
|
2508
2514
|
prepareScreen() {
|
|
2509
2515
|
this.showPlayOverlay();
|
|
2510
|
-
this.
|
|
2516
|
+
this.freezeFrameService.invalidate();
|
|
2511
2517
|
}
|
|
2512
2518
|
showPlayOverlay() {
|
|
2513
2519
|
const callback = () => {
|
|
@@ -2532,7 +2538,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
2532
2538
|
|
|
2533
2539
|
class InputService extends SubService {
|
|
2534
2540
|
constructor() {
|
|
2535
|
-
super();
|
|
2541
|
+
super(...arguments);
|
|
2536
2542
|
this.commandsSender = inject(UnrealCommunicatorService);
|
|
2537
2543
|
this.isDevMode = inject(DevModeService).isDevMode;
|
|
2538
2544
|
this.defaultKeys = [
|
|
@@ -2565,6 +2571,9 @@ class InputService extends SubService {
|
|
|
2565
2571
|
offsetByY: 0,
|
|
2566
2572
|
offsetByX: 0,
|
|
2567
2573
|
};
|
|
2574
|
+
}
|
|
2575
|
+
init() {
|
|
2576
|
+
console.log('DEBUG: InputService init');
|
|
2568
2577
|
const visibilityHiddenTrigger$ = fromEvent(document, 'visibilitychange').pipe(map$1(() => document.visibilityState === 'hidden'), filter(Truthy));
|
|
2569
2578
|
const visibilityVisibleTrigger$ = fromEvent(document, 'visibilitychange').pipe(map$1(() => document.visibilityState === 'visible'), filter(Truthy), startWith(true));
|
|
2570
2579
|
this.deactivatedVideoTrigger$ = merge(this.disconnect$, this.reInit$, visibilityHiddenTrigger$);
|
|
@@ -3114,14 +3123,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
3114
3123
|
}], ctorParameters: () => [] });
|
|
3115
3124
|
|
|
3116
3125
|
class StreamStatusTelemetryService {
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
this.videoService = inject(VideoService);
|
|
3120
|
-
this.init();
|
|
3121
|
-
}
|
|
3126
|
+
#store = inject(Store);
|
|
3127
|
+
#videoService = inject(VideoService);
|
|
3122
3128
|
init() {
|
|
3123
|
-
|
|
3124
|
-
|
|
3129
|
+
console.log('DEBUG: StreamStatusTelemetryService init');
|
|
3130
|
+
this.#videoService.videoStats$
|
|
3131
|
+
.pipe(withLatestFrom(this.#store.select(unrealFeature.selectAwsInstance), this.#store.select(unrealFeature.selectLowBandwidth), this.#store.select(unrealFeature.selectLowBandwidthStats), this.#store.select(unrealFeature.selectCirrusConnected)), auditTime(5000), filter(([, , , , cirrusConnected]) => cirrusConnected), map$1(([data, signalingServer, isLowBandwidth, lbmStats]) => this.mapEventData(data, signalingServer, isLowBandwidth, lbmStats)))
|
|
3125
3132
|
.subscribe((data) => this.trackEventToMixPanel(data));
|
|
3126
3133
|
}
|
|
3127
3134
|
mapEventData(data, signalingServer, isLowBandwidth, lbmStats) {
|
|
@@ -3144,14 +3151,14 @@ class StreamStatusTelemetryService {
|
|
|
3144
3151
|
};
|
|
3145
3152
|
}
|
|
3146
3153
|
trackEventToMixPanel(data) {
|
|
3147
|
-
this
|
|
3154
|
+
this.#store.dispatch(trackMixpanelEvent({ event: 'streamStatus', data }));
|
|
3148
3155
|
}
|
|
3149
3156
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: StreamStatusTelemetryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3150
3157
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: StreamStatusTelemetryService }); }
|
|
3151
3158
|
}
|
|
3152
3159
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: StreamStatusTelemetryService, decorators: [{
|
|
3153
3160
|
type: Injectable
|
|
3154
|
-
}]
|
|
3161
|
+
}] });
|
|
3155
3162
|
|
|
3156
3163
|
class AfkPlaywrightService extends AFKService {
|
|
3157
3164
|
init() {
|
|
@@ -3263,6 +3270,17 @@ class FileReceiverPlaywrightService extends FileReceiverService {
|
|
|
3263
3270
|
}
|
|
3264
3271
|
}
|
|
3265
3272
|
|
|
3273
|
+
class InputPlaywrightService extends InputService {
|
|
3274
|
+
init() {
|
|
3275
|
+
return;
|
|
3276
|
+
}
|
|
3277
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: InputPlaywrightService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3278
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: InputPlaywrightService }); }
|
|
3279
|
+
}
|
|
3280
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: InputPlaywrightService, decorators: [{
|
|
3281
|
+
type: Injectable
|
|
3282
|
+
}] });
|
|
3283
|
+
|
|
3266
3284
|
/*
|
|
3267
3285
|
* Copyright (c) 2025.
|
|
3268
3286
|
* 3DSource.com. Sergii Karanda steve@3dsource.com. All Rights Reserved.
|
|
@@ -3307,8 +3325,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
3307
3325
|
type: Injectable
|
|
3308
3326
|
}] });
|
|
3309
3327
|
|
|
3310
|
-
function
|
|
3311
|
-
return [
|
|
3328
|
+
function provideAngularUnrealModule(config) {
|
|
3329
|
+
return makeEnvironmentProviders([
|
|
3330
|
+
provideState(unrealFeature),
|
|
3331
|
+
provideEffects([UnrealEffects]),
|
|
3332
|
+
ConsoleExtensionsService,
|
|
3333
|
+
InputService,
|
|
3334
|
+
VideoService,
|
|
3335
|
+
WebRtcPlayerService,
|
|
3336
|
+
RegionsPingService,
|
|
3337
|
+
FileReceiverService,
|
|
3338
|
+
FileHandlerService,
|
|
3312
3339
|
{
|
|
3313
3340
|
provide: StreamStatusTelemetryService,
|
|
3314
3341
|
useClass: config?.playwright
|
|
@@ -3361,28 +3388,6 @@ function providePlaywrightProviders(config) {
|
|
|
3361
3388
|
? FileReceiverPlaywrightService
|
|
3362
3389
|
: FileReceiverService,
|
|
3363
3390
|
},
|
|
3364
|
-
];
|
|
3365
|
-
}
|
|
3366
|
-
|
|
3367
|
-
function provideAngularUnrealModule(config) {
|
|
3368
|
-
return makeEnvironmentProviders([
|
|
3369
|
-
provideState(unrealFeature),
|
|
3370
|
-
provideEffects([UnrealEffects]),
|
|
3371
|
-
ConsoleExtensionsService,
|
|
3372
|
-
InputService,
|
|
3373
|
-
VideoService,
|
|
3374
|
-
WebRtcPlayerService,
|
|
3375
|
-
RegionsPingService,
|
|
3376
|
-
FileReceiverService,
|
|
3377
|
-
FileHandlerService,
|
|
3378
|
-
providePlaywrightProviders(config),
|
|
3379
|
-
provideEnvironmentInitializer(() => {
|
|
3380
|
-
inject(AggregatorService);
|
|
3381
|
-
inject(StreamStatusTelemetryService);
|
|
3382
|
-
inject(ConsoleExtensionsService);
|
|
3383
|
-
inject(AFKService);
|
|
3384
|
-
inject(FreezeFrameService);
|
|
3385
|
-
}),
|
|
3386
3391
|
]);
|
|
3387
3392
|
}
|
|
3388
3393
|
|
|
@@ -3647,16 +3652,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
3647
3652
|
|
|
3648
3653
|
class UnrealEffects {
|
|
3649
3654
|
constructor() {
|
|
3655
|
+
this.actions$ = inject(Actions);
|
|
3650
3656
|
this.dialog = inject(Dialog);
|
|
3651
3657
|
this.http = inject(HttpClient);
|
|
3652
3658
|
this.store = inject(Store);
|
|
3653
3659
|
this.isDevMode = inject(DevModeService).isDevMode;
|
|
3654
|
-
this.unrealInitialConfig = inject(UNREAL_CONFIG, { optional: true });
|
|
3655
|
-
this.actions$ = inject(Actions);
|
|
3656
|
-
this.player = inject(WebRtcPlayerService);
|
|
3657
|
-
this.signallingService = inject(SignallingService);
|
|
3658
3660
|
this.scrollStrategy = inject(ScrollStrategyOptions).block();
|
|
3661
|
+
this.unrealInitialConfig = inject(UNREAL_CONFIG);
|
|
3662
|
+
this.webRtcPlayerService = inject(WebRtcPlayerService);
|
|
3659
3663
|
this.commandsSender = inject(UnrealCommunicatorService);
|
|
3664
|
+
this.signallingService = inject(SignallingService);
|
|
3660
3665
|
this.videoService = inject(VideoService);
|
|
3661
3666
|
this.dataChannelConnectionTimeout = this.unrealInitialConfig?.dataChannelConnectionTimeout ??
|
|
3662
3667
|
DATA_CHANNEL_CONNECTION_TIMEOUT;
|
|
@@ -3688,7 +3693,7 @@ class UnrealEffects {
|
|
|
3688
3693
|
code: WSCloseCode_FORCE_CIRRUS_CLOSE,
|
|
3689
3694
|
reason,
|
|
3690
3695
|
});
|
|
3691
|
-
this.
|
|
3696
|
+
this.webRtcPlayerService.closePC();
|
|
3692
3697
|
}), filter(({ reason }) => reason === DisconnectReason.DropConnection), map(() => dropConnection()));
|
|
3693
3698
|
});
|
|
3694
3699
|
this.webrtcErrorModalComponent$ = createEffect(() => {
|
|
@@ -4832,6 +4837,9 @@ class UnrealSceneComponent {
|
|
|
4832
4837
|
this.width = FULL_HD_WIDTH;
|
|
4833
4838
|
this.height = FULL_HD_HEIGHT;
|
|
4834
4839
|
this.store = inject(Store);
|
|
4840
|
+
this.streamStatusTelemetryService = inject(StreamStatusTelemetryService);
|
|
4841
|
+
this.aggregatorService = inject(AggregatorService);
|
|
4842
|
+
this.inputService = inject(InputService);
|
|
4835
4843
|
this.isDevMode = inject(DevModeService).isDevMode;
|
|
4836
4844
|
this.lightMode = this.store.selectSignal(unrealFeature.selectLowBandwidth);
|
|
4837
4845
|
this.isFreezeFrameLoading = this.store.selectSignal(selectIsFreezeFrameLoading);
|
|
@@ -4861,6 +4869,9 @@ class UnrealSceneComponent {
|
|
|
4861
4869
|
}
|
|
4862
4870
|
ngAfterViewInit() {
|
|
4863
4871
|
this.videoService.setContainer(this.container.nativeElement);
|
|
4872
|
+
this.streamStatusTelemetryService.init();
|
|
4873
|
+
this.aggregatorService.init();
|
|
4874
|
+
this.inputService.useKeyboardKeys(this.inputService.defaultKeys);
|
|
4864
4875
|
fromEvent(this.element.nativeElement, 'contextmenu')
|
|
4865
4876
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
4866
4877
|
.subscribe((event) => event.preventDefault());
|
|
@@ -5208,5 +5219,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
5208
5219
|
* Generated bundle index. Do not edit.
|
|
5209
5220
|
*/
|
|
5210
5221
|
|
|
5211
|
-
export { AFKService, AfkPlaywrightService, AggregatorPlaywrightService, AggregatorService, AnswerHandler, CONSOLE_COMMAND_DISABLE_MESSAGES, CONSOLE_COMMAND_ENABLE_MESSAGES, CONSOLE_COMMAND_PIXEL_QUALITY, ClickableOverlayComponent, CommandTelemetryPlaywrightService, CommandTelemetryService, ConfigHandler, ConsoleExtensionsPlaywrightService, ConsoleExtensionsService, DATA_CHANNEL_CONNECTION_TIMEOUT, DEBOUNCE_TO_MANY_RESIZE_CALLS, DEFAULT_AFK_TIMEOUT, DEFAULT_AFK_TIMEOUT_PERIOD, DataFlowMonitor, DevModeService, DisconnectReason, EControlSchemeType, EMessageType, EToClientMessageType, FULL_HD_HEIGHT, FULL_HD_WIDTH, FileHandlerService, FileReceiverPlaywrightService, FileReceiverService, FilterSettingsComponent, FreezeFrameComponent, FreezeFramePlaywrightService, FreezeFrameService, IceCandidateHandler, ImageLoadingSrcComponent, InputOptions, InputService, InstanceReadyHandler, InstanceReservedHandler, IntroSrcComponent, KalmanFilter1D, LatencyTimings, LowBandwidthDetectorComponent, LowBandwidthModalComponent, MINIMAL_FPS, MouseButton, MouseButtonsMask, OnCloseHandler, OnErrorHandler, OnMessageHandler, OnOpenHandler, OrchestrationMessageTypes, POLLING_TIME, PingHandler, PlayerCountHandler, RegionsPingService, ResetTelemetry, SAME_SIZE_THRESHOLD, SCREEN_LOCKER_CONTAINER_ID, SIGNALLING_PERCENT_VALUE, SSInfoHandler, STREAMING_VIDEO_ID, SafePipe, SignallingPlaywrightService, SignallingService, SpecialKeyCodes, StatGraphComponent, StreamStatusTelemetryPlaywrightService, StreamStatusTelemetryService, SubService, TelemetryStart, TelemetryStop, UNREAL_CONFIG, UnrealCommunicatorPlaywrightService, UnrealCommunicatorService, UnrealEffects, UnrealInternalSignalEvents, UnrealSceneComponent, UnrealStatusMessage, VideoRecorder, VideoService, VideoStatsComponent, WSCloseCode_CIRRUS_ABNORMAL_CLOSURE, WSCloseCode_CIRRUS_MAX_PLAYERS_ERROR, WSCloseCode_CIRRUS_PLAYER_DISCONNECTED, WSCloseCode_CIRRUS_STREAMER_KIKED_PLAYER, WSCloseCode_FORCE_CIRRUS_CLOSE, WSCloseCode_NORMAL_AFK_TIMEOUT, WSCloseCode_NORMAL_CLOSURE, WSCloseCode_NORMAL_MANUAL_DISCONNECT, WSCloseCode_UNKNOWN, WSCloseCodes, WS_OPEN_STATE, WS_TIMEOUT, WebRtcPlayerService, WebrtcErrorModalComponent, abortEstablishingConnection, changeLowBandwidth, changeStatusMainVideoOnScene, changeStreamResolutionAction, changeStreamResolutionSuccessAction, commandCompleted, commandStarted, decodeData, destroyRemoteConnections, destroyUnrealScene, disconnectStream, dispatchResize, dropConnection, floatToSmoothPercents, forceResizeUnrealVideo, fromResizeObserver, fromSignal, fromUnrealCallBackSignal, getActiveUrl, getImageFromVideoStream, getRtcErrorMessage, initSignalling, initialState, isLoaderScreenVisible, keepMaxUntilReset, mapQpToQuality, observeCommandResponse, provideAngularUnrealModule, removeExileCommands, resetAfk, resetAfkAction, resetConfig, resetIntroSrc, resetWarnTimeout, selectClientAndViewIds, selectCommandProgress, selectCommandsInProgress, selectFreezeFrameCombinedDataUrl, selectFreezeFrameDataUrl, selectFreezeFrameDataUrlFromVideo, selectFreezeFrameProgressMessageFromVideo, selectIsAutostart, selectIsExistMatchUrls, selectIsFreezeFrameLoading, selectIsVideoPlayingAndDataChannelConnected, selectLastCommandInProgress, selectLoaderCommands, selectShowLoader, selectShowReconnectPopup, selectSignalingParameters, selectStreamConfig, selectTotalProgress, selectWarnTimeout, sendSignal, setAfkTimerHide, setAfkTimerVisible, setAwsInstance, setCirrusConnected, setCirrusDisconnected, setConfig, setDataChannelConnected, setEstablishingConnection, setFreezeFrame, setFreezeFrameFromVideo, setIntroImageSrc, setIntroVideoSrc, setLoadingImageSrc, setLoopBackCommandIsCompleted, setMaxFps, setOrchestrationContext, setOrchestrationMessage, setOrchestrationParameters, setOrchestrationProgress, setSignalingName, setStatusMessage, setStatusPercentSignallingServer, setStreamClientCompanyId, setStreamViewId, setUnrealPlaywrightConfig, setViewportNotReady, setViewportReady, showPopupWithoutAutoStart, showUnrealErrorMessage, smoothTransition, startStream, trackMixpanelEvent, unrealFeature, unrealReducer, updateCirrusInfo };
|
|
5222
|
+
export { AFKService, AfkPlaywrightService, AggregatorPlaywrightService, AggregatorService, AnswerHandler, CONSOLE_COMMAND_DISABLE_MESSAGES, CONSOLE_COMMAND_ENABLE_MESSAGES, CONSOLE_COMMAND_PIXEL_QUALITY, ClickableOverlayComponent, CommandTelemetryPlaywrightService, CommandTelemetryService, ConfigHandler, ConsoleExtensionsPlaywrightService, ConsoleExtensionsService, DATA_CHANNEL_CONNECTION_TIMEOUT, DEBOUNCE_TO_MANY_RESIZE_CALLS, DEFAULT_AFK_TIMEOUT, DEFAULT_AFK_TIMEOUT_PERIOD, DataFlowMonitor, DevModeService, DisconnectReason, EControlSchemeType, EMessageType, EToClientMessageType, FULL_HD_HEIGHT, FULL_HD_WIDTH, FileHandlerService, FileReceiverPlaywrightService, FileReceiverService, FilterSettingsComponent, FreezeFrameComponent, FreezeFramePlaywrightService, FreezeFrameService, IceCandidateHandler, ImageLoadingSrcComponent, InputOptions, InputPlaywrightService, InputService, InstanceReadyHandler, InstanceReservedHandler, IntroSrcComponent, KalmanFilter1D, LatencyTimings, LowBandwidthDetectorComponent, LowBandwidthModalComponent, MINIMAL_FPS, MouseButton, MouseButtonsMask, OnCloseHandler, OnErrorHandler, OnMessageHandler, OnOpenHandler, OrchestrationMessageTypes, POLLING_TIME, PingHandler, PlayerCountHandler, RegionsPingService, ResetTelemetry, SAME_SIZE_THRESHOLD, SCREEN_LOCKER_CONTAINER_ID, SIGNALLING_PERCENT_VALUE, SSInfoHandler, STREAMING_VIDEO_ID, SafePipe, SignallingPlaywrightService, SignallingService, SpecialKeyCodes, StatGraphComponent, StreamStatusTelemetryPlaywrightService, StreamStatusTelemetryService, SubService, TelemetryStart, TelemetryStop, UNREAL_CONFIG, UnrealCommunicatorPlaywrightService, UnrealCommunicatorService, UnrealEffects, UnrealInternalSignalEvents, UnrealSceneComponent, UnrealStatusMessage, VideoRecorder, VideoService, VideoStatsComponent, WSCloseCode_CIRRUS_ABNORMAL_CLOSURE, WSCloseCode_CIRRUS_MAX_PLAYERS_ERROR, WSCloseCode_CIRRUS_PLAYER_DISCONNECTED, WSCloseCode_CIRRUS_STREAMER_KIKED_PLAYER, WSCloseCode_FORCE_CIRRUS_CLOSE, WSCloseCode_NORMAL_AFK_TIMEOUT, WSCloseCode_NORMAL_CLOSURE, WSCloseCode_NORMAL_MANUAL_DISCONNECT, WSCloseCode_UNKNOWN, WSCloseCodes, WS_OPEN_STATE, WS_TIMEOUT, WebRtcPlayerService, WebrtcErrorModalComponent, abortEstablishingConnection, changeLowBandwidth, changeStatusMainVideoOnScene, changeStreamResolutionAction, changeStreamResolutionSuccessAction, commandCompleted, commandStarted, decodeData, destroyRemoteConnections, destroyUnrealScene, disconnectStream, dispatchResize, dropConnection, floatToSmoothPercents, forceResizeUnrealVideo, fromResizeObserver, fromSignal, fromUnrealCallBackSignal, getActiveUrl, getImageFromVideoStream, getRtcErrorMessage, initSignalling, initialState, isLoaderScreenVisible, keepMaxUntilReset, mapQpToQuality, observeCommandResponse, provideAngularUnrealModule, removeExileCommands, resetAfk, resetAfkAction, resetConfig, resetIntroSrc, resetWarnTimeout, selectClientAndViewIds, selectCommandProgress, selectCommandsInProgress, selectFreezeFrameCombinedDataUrl, selectFreezeFrameDataUrl, selectFreezeFrameDataUrlFromVideo, selectFreezeFrameProgressMessageFromVideo, selectIsAutostart, selectIsExistMatchUrls, selectIsFreezeFrameLoading, selectIsVideoPlayingAndDataChannelConnected, selectLastCommandInProgress, selectLoaderCommands, selectShowLoader, selectShowReconnectPopup, selectSignalingParameters, selectStreamConfig, selectTotalProgress, selectWarnTimeout, sendSignal, setAfkTimerHide, setAfkTimerVisible, setAwsInstance, setCirrusConnected, setCirrusDisconnected, setConfig, setDataChannelConnected, setEstablishingConnection, setFreezeFrame, setFreezeFrameFromVideo, setIntroImageSrc, setIntroVideoSrc, setLoadingImageSrc, setLoopBackCommandIsCompleted, setMaxFps, setOrchestrationContext, setOrchestrationMessage, setOrchestrationParameters, setOrchestrationProgress, setSignalingName, setStatusMessage, setStatusPercentSignallingServer, setStreamClientCompanyId, setStreamViewId, setUnrealPlaywrightConfig, setViewportNotReady, setViewportReady, showPopupWithoutAutoStart, showUnrealErrorMessage, smoothTransition, startStream, trackMixpanelEvent, unrealFeature, unrealReducer, updateCirrusInfo };
|
|
5212
5223
|
//# sourceMappingURL=3dsource-angular-unreal-module.mjs.map
|