@3dsource/angular-unreal-module 0.0.39 → 0.0.42-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,13 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, inject, Injectable, ChangeDetectionStrategy, Component, Pipe, DestroyRef, signal, ElementRef, input, HostListener, Input, ViewChild, computed, output } from '@angular/core';
|
|
3
3
|
import { filter, withLatestFrom, distinctUntilChanged, switchMap, first, catchError, map as map$1, tap, delay, takeUntil, debounceTime, exhaustMap, takeWhile, skip as skip$1 } from 'rxjs/operators';
|
|
4
|
-
import { createAction, props, createReducer, on, createFeature,
|
|
5
|
-
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
|
4
|
+
import { createAction, props, Store, provideState, createReducer, on, createFeature, createSelector } from '@ngrx/store';
|
|
5
|
+
import { provideEffects, Actions, createEffect, ofType } from '@ngrx/effects';
|
|
6
6
|
import { skip, share, merge, Subject, interval, map, from, take, fromEvent, timer, of, combineLatest, switchMap as switchMap$1, timeout, retryWhen, tap as tap$1, startWith, combineLatestWith, takeUntil as takeUntil$1, auditTime, EMPTY, debounceTime as debounceTime$1, scan, concatMap, animationFrameScheduler, Observable, BehaviorSubject, first as first$1, distinctUntilChanged as distinctUntilChanged$1, concat } from 'rxjs';
|
|
7
|
-
import { concatLatestFrom, mapResponse } from '@ngrx/operators';
|
|
8
7
|
import { Falsy, Truthy, Logger, calculateMedian, clampf, Signal, tapLog, generateUuid, COLOR_CODES, where, KeyboardNumericCode, InvertedKeyMap, Semaphore, isEmpty, lerp, getCanvasCached, getSnapshot, whereNot, HEXtoRGB, RGBtoHSV, inverseLerp, HSVtoRGB, RGBtoHEX, fpIsASameAsB, fitIntoRectangle } from '@3dsource/utils';
|
|
9
|
-
import { toSignal, takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
10
8
|
import { HttpClient } from '@angular/common/http';
|
|
9
|
+
import { toSignal, takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
11
10
|
import { DialogRef, DIALOG_DATA, Dialog } from '@angular/cdk/dialog';
|
|
12
11
|
import { ScrollStrategyOptions } from '@angular/cdk/overlay';
|
|
13
12
|
import { SourceButtonComponent, SourceIconButtonComponent, SourceLoadingComponent } from '@3dsource/source-ui-native';
|
|
@@ -110,6 +109,7 @@ const setFreezeFrameFromVideo = createAction(scoped `set freeze frame from video
|
|
|
110
109
|
const setEstablishingConnection = createAction(scoped `set establishing connection`, props());
|
|
111
110
|
const setDataChannelConnected = createAction(scoped `set data channel connected`, props());
|
|
112
111
|
const setConfig = createAction(scoped `set config`, props());
|
|
112
|
+
const setMatchMakerUrls = createAction(scoped `set match makers urls`, props());
|
|
113
113
|
const setErrorMessage = createAction(scoped `set error message`, props());
|
|
114
114
|
const setViewportReady = createAction(scoped `set viewport ready`, props());
|
|
115
115
|
const changeStreamResolutionAction = createAction(scoped `change stream resolution`, props());
|
|
@@ -121,6 +121,7 @@ const commandCompleted = createAction(scoped `command completed`, props());
|
|
|
121
121
|
const setLoopBackCommandIsCompleted = createAction(scoped `set loopBack command is completed`);
|
|
122
122
|
const showUnrealErrorMessage = createAction(scoped `show unreal error message`, props());
|
|
123
123
|
const initSignalling = createAction(scoped `init signalling`);
|
|
124
|
+
const setIsFreezeLoaderPercents = createAction(scoped `set is freeze loader percents`);
|
|
124
125
|
const resetConfig = createAction(scoped `reset config`);
|
|
125
126
|
const resetAfkAction = createAction(scoped `reset afk action`);
|
|
126
127
|
const resetWarnTimeout = createAction(scoped `reset config warn timeout`);
|
|
@@ -237,261 +238,12 @@ const FULL_HD_WIDTH = 1920;
|
|
|
237
238
|
const FULL_HD_HEIGHT = 1080;
|
|
238
239
|
const WS_TIMEOUT = 2000;
|
|
239
240
|
const WS_OPEN_STATE = 1;
|
|
240
|
-
const
|
|
241
|
-
const
|
|
241
|
+
const DEFAULT_AFK_TIMEOUT_PERIOD = 15;
|
|
242
|
+
const DEFAULT_AFK_TIMEOUT = 120;
|
|
242
243
|
const DATA_CHANNEL_CONNECTION_TIMEOUT = 8000; // 8000 ms;
|
|
243
244
|
const SIGNALLING_PERCENT_VALUE = 56;
|
|
244
245
|
const SCREEN_LOCKER_CONTAINER_ID = '3dsource_start_screen';
|
|
245
246
|
|
|
246
|
-
const initialState = {
|
|
247
|
-
lowBandwidthStats: undefined,
|
|
248
|
-
wasInitialized: false,
|
|
249
|
-
isFirstSuccessLoad: false,
|
|
250
|
-
lowBandwidth: false,
|
|
251
|
-
cirrusConnected: false,
|
|
252
|
-
establishingConnection: false,
|
|
253
|
-
viewportReady: false,
|
|
254
|
-
dataChannelConnected: false,
|
|
255
|
-
isVideoPlaying: false,
|
|
256
|
-
statusPercentSignallingServer: null,
|
|
257
|
-
statusMessage: null,
|
|
258
|
-
errorMessage: null,
|
|
259
|
-
ssInfo: null,
|
|
260
|
-
ssData: null,
|
|
261
|
-
streamResolution: { width: null, height: null },
|
|
262
|
-
freezeFrameFromVideo: { dataUrl: null, progress: null },
|
|
263
|
-
freezeFrame: { dataUrl: null, progress: null },
|
|
264
|
-
disconnectReason: DisconnectReason.none,
|
|
265
|
-
awsInstance: {
|
|
266
|
-
wsUrl: null,
|
|
267
|
-
instanceName: null,
|
|
268
|
-
pollingUrl: null,
|
|
269
|
-
},
|
|
270
|
-
streamConfig: {
|
|
271
|
-
autoStart: true,
|
|
272
|
-
warnTimeout: DEFAULT_WARN_TIMEOUT,
|
|
273
|
-
matchMakerUrls: [],
|
|
274
|
-
},
|
|
275
|
-
loaderCommands: {
|
|
276
|
-
commandsInProgress: [],
|
|
277
|
-
totalCommandsStarted: 0,
|
|
278
|
-
totalCommandsCompleted: 0,
|
|
279
|
-
},
|
|
280
|
-
matchUrls: [],
|
|
281
|
-
streamClientCompanyId: '',
|
|
282
|
-
streamViewId: 'default',
|
|
283
|
-
videoIntroSrc: null,
|
|
284
|
-
imageIntroSrc: null,
|
|
285
|
-
imageLoadingSrc: '',
|
|
286
|
-
};
|
|
287
|
-
const unrealReducer = createReducer(initialState, on(changeLowBandwidth, (state, { lowBandwidth, stats }) => {
|
|
288
|
-
return {
|
|
289
|
-
...state,
|
|
290
|
-
lowBandwidth: lowBandwidth,
|
|
291
|
-
lowBandwidthStats: lowBandwidth ? stats : undefined,
|
|
292
|
-
};
|
|
293
|
-
}), on(changeStatusMainVideoOnScene, (state, { isVideoPlaying }) => {
|
|
294
|
-
return {
|
|
295
|
-
...state,
|
|
296
|
-
isVideoPlaying: isVideoPlaying,
|
|
297
|
-
};
|
|
298
|
-
}), on(setAwsInstance, (state, { instanceName, wsUrl, pollingUrl }) => {
|
|
299
|
-
return {
|
|
300
|
-
...state,
|
|
301
|
-
awsInstance: {
|
|
302
|
-
instanceName,
|
|
303
|
-
wsUrl,
|
|
304
|
-
pollingUrl,
|
|
305
|
-
},
|
|
306
|
-
};
|
|
307
|
-
}), on(setViewportReady, (state, { value }) => {
|
|
308
|
-
return {
|
|
309
|
-
...state,
|
|
310
|
-
viewportReady: value,
|
|
311
|
-
statusMessage: value ? null : state.statusMessage,
|
|
312
|
-
errorMessage: value ? null : state.errorMessage,
|
|
313
|
-
};
|
|
314
|
-
}), on(updateCirrusInfo, (state, { ssInfo, ssData }) => {
|
|
315
|
-
return {
|
|
316
|
-
...state,
|
|
317
|
-
ssInfo: ssInfo, // For back compatibility
|
|
318
|
-
ssData: ssData, // Contains all the data from the ssInfo as object
|
|
319
|
-
};
|
|
320
|
-
}), on(changeStreamResolutionSuccessAction, (state, { width, height }) => {
|
|
321
|
-
return {
|
|
322
|
-
...state,
|
|
323
|
-
streamResolution: {
|
|
324
|
-
width: width,
|
|
325
|
-
height: height,
|
|
326
|
-
},
|
|
327
|
-
};
|
|
328
|
-
}), on(setFreezeFrame, (state, freezeFrame) => {
|
|
329
|
-
return {
|
|
330
|
-
...state,
|
|
331
|
-
freezeFrame: {
|
|
332
|
-
dataUrl: freezeFrame.progress === 0 ||
|
|
333
|
-
freezeFrame.progress === 1 ||
|
|
334
|
-
freezeFrame.progress === null
|
|
335
|
-
? freezeFrame.dataUrl
|
|
336
|
-
: state.freezeFrame.dataUrl,
|
|
337
|
-
progress: freezeFrame.progress || null,
|
|
338
|
-
},
|
|
339
|
-
};
|
|
340
|
-
}), on(setErrorMessage, (state, errorMessage) => {
|
|
341
|
-
if (state.dataChannelConnected) {
|
|
342
|
-
return state;
|
|
343
|
-
}
|
|
344
|
-
return {
|
|
345
|
-
...state,
|
|
346
|
-
errorMessage: errorMessage,
|
|
347
|
-
statusMessage: null,
|
|
348
|
-
};
|
|
349
|
-
}), on(setFreezeFrameFromVideo, (state, freezeFrameFromVideo) => {
|
|
350
|
-
return {
|
|
351
|
-
...state,
|
|
352
|
-
freezeFrameFromVideo: {
|
|
353
|
-
dataUrl: freezeFrameFromVideo.dataUrl,
|
|
354
|
-
progress: freezeFrameFromVideo.progress || null,
|
|
355
|
-
},
|
|
356
|
-
};
|
|
357
|
-
}), on(setStatusMessage, (state, { message }) => {
|
|
358
|
-
return {
|
|
359
|
-
...state,
|
|
360
|
-
statusMessage: message,
|
|
361
|
-
};
|
|
362
|
-
}), on(setEstablishingConnection, (state, { value }) => {
|
|
363
|
-
return {
|
|
364
|
-
...state,
|
|
365
|
-
establishingConnection: value,
|
|
366
|
-
};
|
|
367
|
-
}), on(setStatusPercentSignallingServer, (state, { percent }) => {
|
|
368
|
-
return {
|
|
369
|
-
...state,
|
|
370
|
-
statusPercentSignallingServer: percent,
|
|
371
|
-
};
|
|
372
|
-
}), on(setDataChannelConnected, (state, { value }) => {
|
|
373
|
-
return {
|
|
374
|
-
...state,
|
|
375
|
-
dataChannelConnected: value,
|
|
376
|
-
wasInitialized: value ? true : state.wasInitialized,
|
|
377
|
-
};
|
|
378
|
-
}), on(setConfig, (state, { config }) => {
|
|
379
|
-
return {
|
|
380
|
-
...state,
|
|
381
|
-
streamConfig: { ...state.streamConfig, ...config },
|
|
382
|
-
};
|
|
383
|
-
}), on(resetConfig, (state) => {
|
|
384
|
-
return {
|
|
385
|
-
...state,
|
|
386
|
-
streamConfig: initialState.streamConfig,
|
|
387
|
-
};
|
|
388
|
-
}), on(resetWarnTimeout, (state) => {
|
|
389
|
-
return {
|
|
390
|
-
...state,
|
|
391
|
-
streamConfig: {
|
|
392
|
-
...state.streamConfig,
|
|
393
|
-
warnTimeout: DEFAULT_WARN_TIMEOUT,
|
|
394
|
-
},
|
|
395
|
-
};
|
|
396
|
-
}), on(setCirrusConnected, (state) => {
|
|
397
|
-
return {
|
|
398
|
-
...state,
|
|
399
|
-
cirrusConnected: true,
|
|
400
|
-
};
|
|
401
|
-
}), on(setCirrusDisconnected, (state) => {
|
|
402
|
-
return {
|
|
403
|
-
...state,
|
|
404
|
-
cirrusConnected: false,
|
|
405
|
-
};
|
|
406
|
-
}), on(initSignalling, (state) => {
|
|
407
|
-
return {
|
|
408
|
-
...state,
|
|
409
|
-
disconnectReason: DisconnectReason.none,
|
|
410
|
-
};
|
|
411
|
-
}), on(setSignalingName, (state, { instanceName }) => {
|
|
412
|
-
return {
|
|
413
|
-
...state,
|
|
414
|
-
awsInstance: { ...state.awsInstance, instanceName },
|
|
415
|
-
};
|
|
416
|
-
}), on(setLoopBackCommandIsCompleted, (state) => {
|
|
417
|
-
return {
|
|
418
|
-
...state,
|
|
419
|
-
isFirstSuccessLoad: true,
|
|
420
|
-
};
|
|
421
|
-
}), on(setMatchUrls, (state, { urls }) => {
|
|
422
|
-
return {
|
|
423
|
-
...state,
|
|
424
|
-
matchUrls: urls,
|
|
425
|
-
};
|
|
426
|
-
}), on(setStreamClientCompanyId, (state, { id }) => {
|
|
427
|
-
return {
|
|
428
|
-
...state,
|
|
429
|
-
streamClientCompanyId: id,
|
|
430
|
-
};
|
|
431
|
-
}), on(setStreamViewId, (state, { id }) => {
|
|
432
|
-
return {
|
|
433
|
-
...state,
|
|
434
|
-
streamViewId: id,
|
|
435
|
-
};
|
|
436
|
-
}), on(setIntroImageSrc, (state, { src }) => {
|
|
437
|
-
return {
|
|
438
|
-
...state,
|
|
439
|
-
imageIntroSrc: src,
|
|
440
|
-
};
|
|
441
|
-
}), on(setLoadingImageSrc, (state, { src }) => {
|
|
442
|
-
return {
|
|
443
|
-
...state,
|
|
444
|
-
imageLoadingSrc: src,
|
|
445
|
-
};
|
|
446
|
-
}), on(setIntroVideoSrc, (state, { src }) => {
|
|
447
|
-
return {
|
|
448
|
-
...state,
|
|
449
|
-
videoIntroSrc: src,
|
|
450
|
-
};
|
|
451
|
-
}), on(resetIntroSrc, (state) => {
|
|
452
|
-
return {
|
|
453
|
-
...state,
|
|
454
|
-
imageIntroSrc: '',
|
|
455
|
-
videoIntroSrc: '',
|
|
456
|
-
};
|
|
457
|
-
}), on(commandStarted, (state, { id, command }) => {
|
|
458
|
-
return {
|
|
459
|
-
...state,
|
|
460
|
-
loaderCommands: {
|
|
461
|
-
...state.loaderCommands,
|
|
462
|
-
totalCommandsStarted: state.loaderCommands.totalCommandsStarted + 1,
|
|
463
|
-
commandsInProgress: [
|
|
464
|
-
...state.loaderCommands.commandsInProgress,
|
|
465
|
-
{ id, command, timeStamp: new Date().getTime() },
|
|
466
|
-
],
|
|
467
|
-
},
|
|
468
|
-
};
|
|
469
|
-
}), on(commandCompleted, (state, { id }) => {
|
|
470
|
-
return {
|
|
471
|
-
...state,
|
|
472
|
-
loaderCommands: removeExileCommands(state.loaderCommands, id),
|
|
473
|
-
};
|
|
474
|
-
}), on(resetUnrealState, (state) => {
|
|
475
|
-
return {
|
|
476
|
-
...initialState,
|
|
477
|
-
wasInitialized: state.wasInitialized,
|
|
478
|
-
isFirstSuccessLoad: state.isFirstSuccessLoad,
|
|
479
|
-
matchUrls: state.matchUrls,
|
|
480
|
-
streamClientCompanyId: state.streamClientCompanyId,
|
|
481
|
-
streamViewId: state.streamViewId,
|
|
482
|
-
imageIntroSrc: state.imageIntroSrc,
|
|
483
|
-
videoIntroSrc: state.videoIntroSrc,
|
|
484
|
-
imageLoadingSrc: state.imageLoadingSrc,
|
|
485
|
-
};
|
|
486
|
-
}), on(resetUnrealStateAction, () => {
|
|
487
|
-
return initialState;
|
|
488
|
-
}));
|
|
489
|
-
|
|
490
|
-
const unrealFeature = createFeature({
|
|
491
|
-
name: 'unrealFeature',
|
|
492
|
-
reducer: unrealReducer,
|
|
493
|
-
});
|
|
494
|
-
|
|
495
247
|
class SubService {
|
|
496
248
|
constructor() {
|
|
497
249
|
this.store = inject(Store);
|
|
@@ -506,10 +258,11 @@ class AFKService extends SubService {
|
|
|
506
258
|
super();
|
|
507
259
|
// Optionally detect if the user is not interacting (AFK) and disconnect them.
|
|
508
260
|
this.enabled = true; // Set to true to enable the AFK system.
|
|
509
|
-
this.closeTimeout =
|
|
261
|
+
this.closeTimeout = DEFAULT_AFK_TIMEOUT_PERIOD; // The time after the warning when we disconnect the user.
|
|
510
262
|
this.active = false; // Whether the AFK system is currently looking for inactivity.
|
|
511
263
|
this.countdown = 0; // The inactivity warning overlay has a countdown to show time until disconnect.
|
|
512
|
-
this.selectWarnTimeout =
|
|
264
|
+
this.selectWarnTimeout = this.store.selectSignal(selectWarnTimeout);
|
|
265
|
+
this.isViewportReady = this.store.selectSignal(unrealFeature.selectViewportReady);
|
|
513
266
|
this.initAfk();
|
|
514
267
|
}
|
|
515
268
|
initAfk() {
|
|
@@ -576,6 +329,9 @@ class AFKService extends SubService {
|
|
|
576
329
|
this.startAfkWarningTimer();
|
|
577
330
|
}
|
|
578
331
|
showAfkOverlay() {
|
|
332
|
+
if (!this.isViewportReady()) {
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
579
335
|
// Pause the timer while the user is looking at the inactivity warning overlay.
|
|
580
336
|
this.active = false;
|
|
581
337
|
this.countdown = this.closeTimeout;
|
|
@@ -636,9 +392,6 @@ class FreezeFrameService extends SubService {
|
|
|
636
392
|
}
|
|
637
393
|
else {
|
|
638
394
|
this.dispatchInProgress();
|
|
639
|
-
/* Logger.warn(
|
|
640
|
-
`received next chunk (${view.length} bytes) of freeze frame: ${this.jpeg.length}/${this.size}`,
|
|
641
|
-
);*/
|
|
642
395
|
}
|
|
643
396
|
}
|
|
644
397
|
dispatchInProgress() {
|
|
@@ -1253,7 +1006,7 @@ class SignallingService extends SubService {
|
|
|
1253
1006
|
});
|
|
1254
1007
|
combineLatest([
|
|
1255
1008
|
this.store
|
|
1256
|
-
.select(
|
|
1009
|
+
.select(selectMatchMakerUrls)
|
|
1257
1010
|
.pipe(tapLog('MatchMakerUrls changed:')),
|
|
1258
1011
|
this.store.select(selectIsAutostart).pipe(tapLog('Autostart is:')),
|
|
1259
1012
|
])
|
|
@@ -2061,9 +1814,7 @@ class ConsoleExtensionsService extends SubService {
|
|
|
2061
1814
|
this.store
|
|
2062
1815
|
.select(unrealFeature.selectLowBandwidth)
|
|
2063
1816
|
.pipe(first())
|
|
2064
|
-
.subscribe((isLow) => {
|
|
2065
|
-
this.store.dispatch(changeLowBandwidth({ lowBandwidth: !isLow }));
|
|
2066
|
-
});
|
|
1817
|
+
.subscribe((isLow) => this.store.dispatch(changeLowBandwidth({ lowBandwidth: !isLow })));
|
|
2067
1818
|
return 'LowBandwidth => toggled';
|
|
2068
1819
|
};
|
|
2069
1820
|
window.setMaxFps = (maxFps) => {
|
|
@@ -2076,9 +1827,7 @@ class ConsoleExtensionsService extends SubService {
|
|
|
2076
1827
|
.pipe(first(), filter((data) => !!data.instanceName), tapLog('Instance', `Restart initiated`), switchMap$1((data) => this.httpClient.get(`//${data.instanceName}/restartapp`)), catchError(() => of(null)))
|
|
2077
1828
|
.subscribe();
|
|
2078
1829
|
};
|
|
2079
|
-
window.unrealHelp = () =>
|
|
2080
|
-
this.unrealHelp();
|
|
2081
|
-
};
|
|
1830
|
+
window.unrealHelp = () => this.unrealHelp();
|
|
2082
1831
|
window.setWarnTime = (time) => {
|
|
2083
1832
|
this.store.dispatch(setConfig({ config: { warnTimeout: time } }));
|
|
2084
1833
|
};
|
|
@@ -2998,7 +2747,7 @@ class StreamStatusTelemetryService {
|
|
|
2998
2747
|
}
|
|
2999
2748
|
initTelemetry() {
|
|
3000
2749
|
this.videoService.videoStats$
|
|
3001
|
-
.pipe(withLatestFrom(this.store.select(unrealFeature.selectAwsInstance), this.store.select(unrealFeature.selectLowBandwidth), this.store.select(unrealFeature.selectLowBandwidthStats)), auditTime(5000), map$1(([data, signalingServer, isLowBandwidth, lbmStats]) => this.mapEventData(data, signalingServer, isLowBandwidth, lbmStats)))
|
|
2750
|
+
.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)))
|
|
3002
2751
|
.subscribe((data) => this.trackEventToMixPanel(data));
|
|
3003
2752
|
}
|
|
3004
2753
|
trackEventToMixPanel(data) {
|
|
@@ -3014,6 +2763,286 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
3014
2763
|
type: Injectable
|
|
3015
2764
|
}], ctorParameters: () => [] });
|
|
3016
2765
|
|
|
2766
|
+
// In @3dsource/angular-unreal-module/src/lib/providers.ts
|
|
2767
|
+
function provideAngularUnrealModule() {
|
|
2768
|
+
return [
|
|
2769
|
+
provideState(unrealFeature),
|
|
2770
|
+
provideEffects([UnrealEffects]),
|
|
2771
|
+
AFKService,
|
|
2772
|
+
AggregatorService,
|
|
2773
|
+
CommandTelemetryService,
|
|
2774
|
+
ConsoleExtensionsService,
|
|
2775
|
+
FreezeFrameService,
|
|
2776
|
+
InputService,
|
|
2777
|
+
SignallingService,
|
|
2778
|
+
StreamStatusTelemetryService,
|
|
2779
|
+
UnrealCommunicatorService,
|
|
2780
|
+
VideoService,
|
|
2781
|
+
WebRtcPlayerService,
|
|
2782
|
+
RegionsPingService,
|
|
2783
|
+
];
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2786
|
+
const initialState = {
|
|
2787
|
+
lowBandwidthStats: undefined,
|
|
2788
|
+
wasInitialized: false,
|
|
2789
|
+
isFirstSuccessLoad: false,
|
|
2790
|
+
lowBandwidth: false,
|
|
2791
|
+
cirrusConnected: false,
|
|
2792
|
+
establishingConnection: false,
|
|
2793
|
+
viewportReady: false,
|
|
2794
|
+
dataChannelConnected: false,
|
|
2795
|
+
isVideoPlaying: false,
|
|
2796
|
+
isFreezeLoaderPercents: false,
|
|
2797
|
+
statusPercentSignallingServer: null,
|
|
2798
|
+
statusMessage: null,
|
|
2799
|
+
errorMessage: null,
|
|
2800
|
+
ssInfo: null,
|
|
2801
|
+
ssData: null,
|
|
2802
|
+
streamResolution: { width: null, height: null },
|
|
2803
|
+
freezeFrameFromVideo: { dataUrl: null, progress: null },
|
|
2804
|
+
freezeFrame: { dataUrl: null, progress: null },
|
|
2805
|
+
disconnectReason: DisconnectReason.none,
|
|
2806
|
+
awsInstance: {
|
|
2807
|
+
wsUrl: null,
|
|
2808
|
+
instanceName: null,
|
|
2809
|
+
pollingUrl: null,
|
|
2810
|
+
},
|
|
2811
|
+
streamConfig: {
|
|
2812
|
+
autoStart: true,
|
|
2813
|
+
warnTimeout: DEFAULT_AFK_TIMEOUT,
|
|
2814
|
+
},
|
|
2815
|
+
matchMakerUrls: [],
|
|
2816
|
+
loaderCommands: {
|
|
2817
|
+
commandsInProgress: [],
|
|
2818
|
+
totalCommandsStarted: 0,
|
|
2819
|
+
totalCommandsCompleted: 0,
|
|
2820
|
+
},
|
|
2821
|
+
matchUrls: [],
|
|
2822
|
+
streamClientCompanyId: '',
|
|
2823
|
+
streamViewId: 'default',
|
|
2824
|
+
videoIntroSrc: null,
|
|
2825
|
+
imageIntroSrc: null,
|
|
2826
|
+
imageLoadingSrc: '',
|
|
2827
|
+
};
|
|
2828
|
+
const unrealReducer = createReducer(initialState, on(changeLowBandwidth, (state, { lowBandwidth, stats }) => {
|
|
2829
|
+
return {
|
|
2830
|
+
...state,
|
|
2831
|
+
lowBandwidth: lowBandwidth,
|
|
2832
|
+
lowBandwidthStats: lowBandwidth ? stats : undefined,
|
|
2833
|
+
};
|
|
2834
|
+
}), on(changeStatusMainVideoOnScene, (state, { isVideoPlaying }) => {
|
|
2835
|
+
return {
|
|
2836
|
+
...state,
|
|
2837
|
+
isVideoPlaying: isVideoPlaying,
|
|
2838
|
+
};
|
|
2839
|
+
}), on(setAwsInstance, (state, { instanceName, wsUrl, pollingUrl }) => {
|
|
2840
|
+
return {
|
|
2841
|
+
...state,
|
|
2842
|
+
awsInstance: {
|
|
2843
|
+
instanceName,
|
|
2844
|
+
wsUrl,
|
|
2845
|
+
pollingUrl,
|
|
2846
|
+
},
|
|
2847
|
+
};
|
|
2848
|
+
}), on(setViewportReady, (state, { value }) => {
|
|
2849
|
+
return {
|
|
2850
|
+
...state,
|
|
2851
|
+
viewportReady: value,
|
|
2852
|
+
statusMessage: value ? null : state.statusMessage,
|
|
2853
|
+
errorMessage: value ? null : state.errorMessage,
|
|
2854
|
+
};
|
|
2855
|
+
}), on(updateCirrusInfo, (state, { ssInfo, ssData }) => {
|
|
2856
|
+
return {
|
|
2857
|
+
...state,
|
|
2858
|
+
ssInfo: ssInfo, // For back compatibility
|
|
2859
|
+
ssData: ssData, // Contains all the data from the ssInfo as an object
|
|
2860
|
+
};
|
|
2861
|
+
}), on(changeStreamResolutionSuccessAction, (state, { width, height }) => {
|
|
2862
|
+
return {
|
|
2863
|
+
...state,
|
|
2864
|
+
streamResolution: {
|
|
2865
|
+
width: width,
|
|
2866
|
+
height: height,
|
|
2867
|
+
},
|
|
2868
|
+
};
|
|
2869
|
+
}), on(setFreezeFrame, (state, freezeFrame) => {
|
|
2870
|
+
return {
|
|
2871
|
+
...state,
|
|
2872
|
+
freezeFrame: {
|
|
2873
|
+
dataUrl: freezeFrame.progress === 0 ||
|
|
2874
|
+
freezeFrame.progress === 1 ||
|
|
2875
|
+
freezeFrame.progress === null
|
|
2876
|
+
? freezeFrame.dataUrl
|
|
2877
|
+
: state.freezeFrame.dataUrl,
|
|
2878
|
+
progress: freezeFrame.progress || null,
|
|
2879
|
+
},
|
|
2880
|
+
};
|
|
2881
|
+
}), on(setErrorMessage, (state, errorMessage) => {
|
|
2882
|
+
if (state.dataChannelConnected) {
|
|
2883
|
+
return state;
|
|
2884
|
+
}
|
|
2885
|
+
return {
|
|
2886
|
+
...state,
|
|
2887
|
+
errorMessage: errorMessage,
|
|
2888
|
+
statusMessage: null,
|
|
2889
|
+
};
|
|
2890
|
+
}), on(setFreezeFrameFromVideo, (state, freezeFrameFromVideo) => {
|
|
2891
|
+
return {
|
|
2892
|
+
...state,
|
|
2893
|
+
freezeFrameFromVideo: {
|
|
2894
|
+
dataUrl: freezeFrameFromVideo.dataUrl,
|
|
2895
|
+
progress: freezeFrameFromVideo.progress || null,
|
|
2896
|
+
},
|
|
2897
|
+
};
|
|
2898
|
+
}), on(setStatusMessage, (state, { message }) => {
|
|
2899
|
+
return {
|
|
2900
|
+
...state,
|
|
2901
|
+
statusMessage: message,
|
|
2902
|
+
};
|
|
2903
|
+
}), on(setEstablishingConnection, (state, { value }) => {
|
|
2904
|
+
return {
|
|
2905
|
+
...state,
|
|
2906
|
+
establishingConnection: value,
|
|
2907
|
+
};
|
|
2908
|
+
}), on(setIsFreezeLoaderPercents, (state) => {
|
|
2909
|
+
return {
|
|
2910
|
+
...state,
|
|
2911
|
+
isFreezeLoaderPercents: true,
|
|
2912
|
+
};
|
|
2913
|
+
}), on(setStatusPercentSignallingServer, (state, { percent }) => {
|
|
2914
|
+
return {
|
|
2915
|
+
...state,
|
|
2916
|
+
statusPercentSignallingServer: percent,
|
|
2917
|
+
};
|
|
2918
|
+
}), on(setDataChannelConnected, (state, { value }) => {
|
|
2919
|
+
return {
|
|
2920
|
+
...state,
|
|
2921
|
+
dataChannelConnected: value,
|
|
2922
|
+
wasInitialized: value ? true : state.wasInitialized,
|
|
2923
|
+
};
|
|
2924
|
+
}), on(setConfig, (state, { config }) => {
|
|
2925
|
+
return {
|
|
2926
|
+
...state,
|
|
2927
|
+
streamConfig: { ...state.streamConfig, ...config },
|
|
2928
|
+
};
|
|
2929
|
+
}), on(setMatchMakerUrls, (state, { matchMakerUrls }) => {
|
|
2930
|
+
return {
|
|
2931
|
+
...state,
|
|
2932
|
+
matchMakerUrls,
|
|
2933
|
+
};
|
|
2934
|
+
}), on(resetConfig, (state) => {
|
|
2935
|
+
return {
|
|
2936
|
+
...state,
|
|
2937
|
+
streamConfig: initialState.streamConfig,
|
|
2938
|
+
};
|
|
2939
|
+
}), on(resetWarnTimeout, (state) => {
|
|
2940
|
+
return {
|
|
2941
|
+
...state,
|
|
2942
|
+
streamConfig: {
|
|
2943
|
+
...state.streamConfig,
|
|
2944
|
+
warnTimeout: DEFAULT_AFK_TIMEOUT,
|
|
2945
|
+
},
|
|
2946
|
+
};
|
|
2947
|
+
}), on(setCirrusConnected, (state) => {
|
|
2948
|
+
return {
|
|
2949
|
+
...state,
|
|
2950
|
+
cirrusConnected: true,
|
|
2951
|
+
};
|
|
2952
|
+
}), on(setCirrusDisconnected, (state) => {
|
|
2953
|
+
return {
|
|
2954
|
+
...state,
|
|
2955
|
+
cirrusConnected: false,
|
|
2956
|
+
};
|
|
2957
|
+
}), on(initSignalling, (state) => {
|
|
2958
|
+
return {
|
|
2959
|
+
...state,
|
|
2960
|
+
disconnectReason: DisconnectReason.none,
|
|
2961
|
+
};
|
|
2962
|
+
}), on(setSignalingName, (state, { instanceName }) => {
|
|
2963
|
+
return {
|
|
2964
|
+
...state,
|
|
2965
|
+
awsInstance: { ...state.awsInstance, instanceName },
|
|
2966
|
+
};
|
|
2967
|
+
}), on(setLoopBackCommandIsCompleted, (state) => {
|
|
2968
|
+
return {
|
|
2969
|
+
...state,
|
|
2970
|
+
isFirstSuccessLoad: true,
|
|
2971
|
+
};
|
|
2972
|
+
}), on(setMatchUrls, (state, { urls }) => {
|
|
2973
|
+
return {
|
|
2974
|
+
...state,
|
|
2975
|
+
matchUrls: urls,
|
|
2976
|
+
};
|
|
2977
|
+
}), on(setStreamClientCompanyId, (state, { id }) => {
|
|
2978
|
+
return {
|
|
2979
|
+
...state,
|
|
2980
|
+
streamClientCompanyId: id,
|
|
2981
|
+
};
|
|
2982
|
+
}), on(setStreamViewId, (state, { id }) => {
|
|
2983
|
+
return {
|
|
2984
|
+
...state,
|
|
2985
|
+
streamViewId: id,
|
|
2986
|
+
};
|
|
2987
|
+
}), on(setIntroImageSrc, (state, { src }) => {
|
|
2988
|
+
return {
|
|
2989
|
+
...state,
|
|
2990
|
+
imageIntroSrc: src,
|
|
2991
|
+
};
|
|
2992
|
+
}), on(setLoadingImageSrc, (state, { src }) => {
|
|
2993
|
+
return {
|
|
2994
|
+
...state,
|
|
2995
|
+
imageLoadingSrc: src,
|
|
2996
|
+
};
|
|
2997
|
+
}), on(setIntroVideoSrc, (state, { src }) => {
|
|
2998
|
+
return {
|
|
2999
|
+
...state,
|
|
3000
|
+
videoIntroSrc: src,
|
|
3001
|
+
};
|
|
3002
|
+
}), on(resetIntroSrc, (state) => {
|
|
3003
|
+
return {
|
|
3004
|
+
...state,
|
|
3005
|
+
imageIntroSrc: '',
|
|
3006
|
+
videoIntroSrc: '',
|
|
3007
|
+
};
|
|
3008
|
+
}), on(commandStarted, (state, { id, command }) => {
|
|
3009
|
+
return {
|
|
3010
|
+
...state,
|
|
3011
|
+
loaderCommands: {
|
|
3012
|
+
...state.loaderCommands,
|
|
3013
|
+
totalCommandsStarted: state.loaderCommands.totalCommandsStarted + 1,
|
|
3014
|
+
commandsInProgress: [
|
|
3015
|
+
...state.loaderCommands.commandsInProgress,
|
|
3016
|
+
{ id, command, timeStamp: new Date().getTime() },
|
|
3017
|
+
],
|
|
3018
|
+
},
|
|
3019
|
+
};
|
|
3020
|
+
}), on(commandCompleted, (state, { id }) => {
|
|
3021
|
+
return {
|
|
3022
|
+
...state,
|
|
3023
|
+
loaderCommands: removeExileCommands(state.loaderCommands, id),
|
|
3024
|
+
};
|
|
3025
|
+
}), on(resetUnrealState, (state) => {
|
|
3026
|
+
return {
|
|
3027
|
+
...initialState,
|
|
3028
|
+
wasInitialized: state.wasInitialized,
|
|
3029
|
+
isFirstSuccessLoad: state.isFirstSuccessLoad,
|
|
3030
|
+
matchUrls: state.matchUrls,
|
|
3031
|
+
streamClientCompanyId: state.streamClientCompanyId,
|
|
3032
|
+
streamViewId: state.streamViewId,
|
|
3033
|
+
imageIntroSrc: state.imageIntroSrc,
|
|
3034
|
+
videoIntroSrc: state.videoIntroSrc,
|
|
3035
|
+
imageLoadingSrc: state.imageLoadingSrc,
|
|
3036
|
+
};
|
|
3037
|
+
}), on(resetUnrealStateAction, () => {
|
|
3038
|
+
return initialState;
|
|
3039
|
+
}));
|
|
3040
|
+
|
|
3041
|
+
const unrealFeature = createFeature({
|
|
3042
|
+
name: 'unrealFeature',
|
|
3043
|
+
reducer: unrealReducer,
|
|
3044
|
+
});
|
|
3045
|
+
|
|
3017
3046
|
class UnrealErrorModalComponent {
|
|
3018
3047
|
constructor() {
|
|
3019
3048
|
this.dialogRef = inject(DialogRef);
|
|
@@ -3023,7 +3052,7 @@ class UnrealErrorModalComponent {
|
|
|
3023
3052
|
this.dialogRef.close();
|
|
3024
3053
|
}
|
|
3025
3054
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: UnrealErrorModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3026
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: UnrealErrorModalComponent, isStandalone: true, selector: "app-unreal-error-modal", ngImport: i0, template: "<div class=\"src-modal src-modal--small\">\n <div class=\"src-modal__header\">\n <div\n class=\"src-modal__title\"\n [attr.data-testid]=\"'unreal-error-header-title'\"\n >\n Warning\n </div>\n </div>\n <div class=\"src-modal__body\">\n <div>{{ dialogData.content }}</div>\n </div>\n <div class=\"src-modal__footer\">\n <src-button [colorScheme]=\"'secondary'\" (onClick)=\"close()\">\n Ok\n </src-button>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: SourceButtonComponent, selector: "src-button", inputs: ["type", "appearance", "colorScheme", "size", "customClass", "hasDisclosure", "isFullWidth", "isPressed", "isDisabled", "isLoading", "iconButton", "srcButtonConfig", "formID", "data-testid"], outputs: ["onClick", "onSubmit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3055
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: UnrealErrorModalComponent, isStandalone: true, selector: "app-unreal-error-modal", ngImport: i0, template: "<div class=\"src-modal src-modal--small\">\n <div class=\"src-modal__header\">\n <div\n class=\"src-modal__title\"\n [attr.data-testid]=\"'unreal-error-header-title'\"\n >\n Warning\n </div>\n </div>\n <div class=\"src-modal__body\">\n <div>{{ dialogData.content }}</div>\n </div>\n <div class=\"src-modal__footer\">\n <src-button [colorScheme]=\"'secondary'\" (onClick)=\"close()\">\n Ok\n </src-button>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: SourceButtonComponent, selector: "src-button", inputs: ["type", "appearance", "colorScheme", "size", "state", "customClass", "hasDisclosure", "isFullWidth", "isPressed", "isDisabled", "isLoading", "iconButton", "srcButtonConfig", "formID", "data-testid"], outputs: ["onClick", "onSubmit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3027
3056
|
}
|
|
3028
3057
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: UnrealErrorModalComponent, decorators: [{
|
|
3029
3058
|
type: Component,
|
|
@@ -3064,9 +3093,7 @@ class UnrealEffects {
|
|
|
3064
3093
|
}));
|
|
3065
3094
|
}, { dispatch: false });
|
|
3066
3095
|
this.changeStreamResolution$ = createEffect(() => {
|
|
3067
|
-
return this.actions$.pipe(ofType(changeStreamResolutionAction), filter((size) => !!(size?.width && size?.height)),
|
|
3068
|
-
this.store.select(unrealFeature.selectStreamResolution),
|
|
3069
|
-
]), filter(([newSizes, savedSizes]) => !(newSizes.width === savedSizes.width &&
|
|
3096
|
+
return this.actions$.pipe(ofType(changeStreamResolutionAction), filter((size) => !!(size?.width && size?.height)), withLatestFrom(this.store.select(unrealFeature.selectStreamResolution)), filter(([newSizes, savedSizes]) => !(newSizes.width === savedSizes.width &&
|
|
3070
3097
|
newSizes.height === savedSizes.height)), map(([sizes]) => changeStreamResolutionSuccessAction({
|
|
3071
3098
|
width: sizes.width,
|
|
3072
3099
|
height: sizes.height,
|
|
@@ -3080,11 +3107,7 @@ class UnrealEffects {
|
|
|
3080
3107
|
});
|
|
3081
3108
|
this.sendLbmStat$ = this.store
|
|
3082
3109
|
.select(unrealFeature.selectViewportReady)
|
|
3083
|
-
.pipe(distinctUntilChanged(), filter(Truthy), exhaustMap(() => this.actions$.pipe(ofType(changeLowBandwidth), filter(({ lowBandwidth }) => lowBandwidth),
|
|
3084
|
-
this.store.select(unrealFeature.selectAwsInstance),
|
|
3085
|
-
this.store.select(unrealFeature.selectStreamClientCompanyId),
|
|
3086
|
-
this.store.select(unrealFeature.selectStreamViewId),
|
|
3087
|
-
]), first(), exhaustMap(([, instance, companyId, viewId]) => this.http
|
|
3110
|
+
.pipe(distinctUntilChanged(), filter(Truthy), exhaustMap(() => this.actions$.pipe(ofType(changeLowBandwidth), filter(({ lowBandwidth }) => lowBandwidth), withLatestFrom(this.store.select(unrealFeature.selectAwsInstance), this.store.select(unrealFeature.selectStreamClientCompanyId), this.store.select(unrealFeature.selectStreamViewId)), first(), exhaustMap(([, instance, companyId, viewId]) => this.http
|
|
3088
3111
|
.post(this.unrealInitialConfig?.customErrorsEndpoint || '', {
|
|
3089
3112
|
message: {
|
|
3090
3113
|
type: 'front',
|
|
@@ -3118,13 +3141,7 @@ class UnrealEffects {
|
|
|
3118
3141
|
}, { dispatch: false });
|
|
3119
3142
|
this.setDataChannelTimeoutCheck$ = createEffect(() => {
|
|
3120
3143
|
return this.actions$.pipe(ofType(setAwsInstance), filter(({ wsUrl }) => !!wsUrl), tap(() => Logger.info(`DataChannel timeout check started with next timeout: ${this.dataChannelConnectionTimeout}`)), debounceTime$1(this.dataChannelConnectionTimeout), // Timeout, if not connected, sends an error report, then reconnects
|
|
3121
|
-
|
|
3122
|
-
this.store.select(unrealFeature.selectSsData),
|
|
3123
|
-
this.store.select(unrealFeature.selectCirrusConnected),
|
|
3124
|
-
this.store.select(unrealFeature.selectDataChannelConnected),
|
|
3125
|
-
]), filter(([, , isCirrusConnected, isDataChannelConnected]) => {
|
|
3126
|
-
return isCirrusConnected && !isDataChannelConnected;
|
|
3127
|
-
}), switchMap$1(([awsInstance, ssData]) => {
|
|
3144
|
+
withLatestFrom(this.store.select(unrealFeature.selectSsData), this.store.select(unrealFeature.selectCirrusConnected), this.store.select(unrealFeature.selectDataChannelConnected)), filter(([, , isCirrusConnected, isDataChannelConnected]) => isCirrusConnected && !isDataChannelConnected), switchMap$1(([awsInstance, ssData]) => {
|
|
3128
3145
|
const error = `DataChannel connection timeout ${this.dataChannelConnectionTimeout}ms, requesting new signaling.`;
|
|
3129
3146
|
Logger.error(error);
|
|
3130
3147
|
return this.http
|
|
@@ -3144,7 +3161,7 @@ class UnrealEffects {
|
|
|
3144
3161
|
})));
|
|
3145
3162
|
});
|
|
3146
3163
|
this.destroyConnectionAndRestart$ = createEffect(() => {
|
|
3147
|
-
return this.actions$.pipe(ofType(destroyRemoteConnections), filter(({ disconnectReason }) => disconnectReason === DisconnectReason.dataChannelTimeout), switchMap$1(() => this.actions$.pipe(ofType(resetUnrealState), first())), map(() => initSignalling()));
|
|
3164
|
+
return this.actions$.pipe(ofType(destroyRemoteConnections), filter(({ disconnectReason }) => disconnectReason === DisconnectReason.dataChannelTimeout), tap(() => this.store.dispatch(setIsFreezeLoaderPercents())), switchMap$1(() => this.actions$.pipe(ofType(resetUnrealState), first())), map(() => initSignalling()));
|
|
3148
3165
|
});
|
|
3149
3166
|
this.showUnrealError$ = createEffect(() => {
|
|
3150
3167
|
return this.actions$.pipe(ofType(showUnrealErrorMessage), map(({ code }) => getRtcErrorMessage(code)), distinctUntilChanged(), filter(Truthy), switchMap$1((content) => this.dialog.open(UnrealErrorModalComponent, {
|
|
@@ -3153,11 +3170,7 @@ class UnrealEffects {
|
|
|
3153
3170
|
}).closed), map(() => showUnrealErrorMessage({ code: null })));
|
|
3154
3171
|
});
|
|
3155
3172
|
this.sendStatisticsToUnreal$ = createEffect(() => {
|
|
3156
|
-
return this.actions$.pipe(ofType(showUnrealErrorMessage), filter(({ code }) => code === 404),
|
|
3157
|
-
this.store.select(unrealFeature.selectAwsInstance),
|
|
3158
|
-
this.store.select(unrealFeature.selectStreamClientCompanyId),
|
|
3159
|
-
this.store.select(unrealFeature.selectStreamViewId),
|
|
3160
|
-
]), switchMap$1(([action, instance, companyId, viewId]) => this.http
|
|
3173
|
+
return this.actions$.pipe(ofType(showUnrealErrorMessage), filter(({ code }) => code === 404), withLatestFrom(this.store.select(unrealFeature.selectAwsInstance), this.store.select(unrealFeature.selectStreamClientCompanyId), this.store.select(unrealFeature.selectStreamViewId)), switchMap$1(([action, instance, companyId, viewId]) => this.http
|
|
3161
3174
|
.post(this.unrealInitialConfig?.customErrorsEndpoint || '', {
|
|
3162
3175
|
client: instance.pollingUrl,
|
|
3163
3176
|
session_uuid: companyId,
|
|
@@ -3168,9 +3181,9 @@ class UnrealEffects {
|
|
|
3168
3181
|
info: action?.error ?? '',
|
|
3169
3182
|
},
|
|
3170
3183
|
})
|
|
3171
|
-
.pipe(
|
|
3172
|
-
|
|
3173
|
-
|
|
3184
|
+
.pipe(tap(() => console.log(`successfully send to ${this.unrealInitialConfig?.customErrorsEndpoint}`)), catchError(() => {
|
|
3185
|
+
console.error(`get error from ${this.unrealInitialConfig?.customErrorsEndpoint}`);
|
|
3186
|
+
return EMPTY;
|
|
3174
3187
|
}))));
|
|
3175
3188
|
}, { dispatch: false });
|
|
3176
3189
|
this.initAppBySetDataChannelConnected$ = createEffect(() => {
|
|
@@ -3193,13 +3206,13 @@ class UnrealEffects {
|
|
|
3193
3206
|
?.correlationId), filter(Truthy), map((id) => commandCompleted({ id })))));
|
|
3194
3207
|
});
|
|
3195
3208
|
this.setConfigByInitSignalling$ = createEffect(() => {
|
|
3196
|
-
return this.actions$.pipe(ofType(initSignalling),
|
|
3209
|
+
return this.actions$.pipe(ofType(initSignalling), withLatestFrom(this.store.select(unrealFeature.selectMatchUrls)), switchMap$1(() => this.store
|
|
3197
3210
|
.select(unrealFeature.selectMatchUrls)
|
|
3198
3211
|
.pipe(filter((item) => item?.length > 0))), map((matchMakerUrls) => {
|
|
3199
3212
|
if (isEmpty(matchMakerUrls)) {
|
|
3200
3213
|
throw Error('Signalling URL(s) is empty');
|
|
3201
3214
|
}
|
|
3202
|
-
return
|
|
3215
|
+
return setMatchMakerUrls({ matchMakerUrls });
|
|
3203
3216
|
}));
|
|
3204
3217
|
});
|
|
3205
3218
|
}
|
|
@@ -3218,8 +3231,8 @@ const selectIsFreezeFrameLoading = createSelector(unrealFeature.selectFreezeFram
|
|
|
3218
3231
|
: false);
|
|
3219
3232
|
const selectFreezeFrameCombinedDataUrl = createSelector(selectFreezeFrameDataUrlFromVideo, selectFreezeFrameDataUrl, (dataUrlFromVideo, remoteDataUrl) => dataUrlFromVideo || remoteDataUrl || null);
|
|
3220
3233
|
const selectStreamConfig = createSelector(unrealFeature.selectStreamConfig, (config) => config);
|
|
3221
|
-
const selectWarnTimeout = createSelector(selectStreamConfig, (config) => config?.warnTimeout ||
|
|
3222
|
-
const
|
|
3234
|
+
const selectWarnTimeout = createSelector(selectStreamConfig, (config) => config?.warnTimeout || DEFAULT_AFK_TIMEOUT);
|
|
3235
|
+
const selectMatchMakerUrls = createSelector(unrealFeature.selectMatchMakerUrls, (urls) => (urls || []).filter(Truthy));
|
|
3223
3236
|
const selectIsAutostart = createSelector(selectStreamConfig, (config) => config?.autoStart);
|
|
3224
3237
|
const selectWsUrl = createSelector(unrealFeature.selectAwsInstance, (instance) => instance?.wsUrl);
|
|
3225
3238
|
const selectShowReconnectPopup = createSelector(unrealFeature.selectWasInitialized, unrealFeature.selectCirrusConnected, unrealFeature.selectEstablishingConnection, unrealFeature.selectImageIntroSrc, unrealFeature.selectVideoIntroSrc, (wasInitialized, connected, establishing, imageSrc, videoSrc) => wasInitialized && !connected && !establishing && !imageSrc && !videoSrc);
|
|
@@ -3340,7 +3353,7 @@ function OnOpenHandler() {
|
|
|
3340
3353
|
}
|
|
3341
3354
|
|
|
3342
3355
|
const clampAndKeepMaxPercents = () => {
|
|
3343
|
-
return (source) => source.pipe(scan((
|
|
3356
|
+
return (source) => source.pipe(scan((maxProgress, currentProgress) => currentProgress > maxProgress ? currentProgress : maxProgress, 0));
|
|
3344
3357
|
};
|
|
3345
3358
|
|
|
3346
3359
|
function observeCommandResponse(data, sender, timeOut = 60000, dispatchOnTimeout = true) {
|
|
@@ -3861,7 +3874,7 @@ class ClickableOverlayComponent {
|
|
|
3861
3874
|
this.state = toSignal(fromSignal(UnrealInternalSignalEvents.ClickableOverlay).pipe(map$1((data) => (typeof data === 'object' ? data : null))));
|
|
3862
3875
|
}
|
|
3863
3876
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ClickableOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3864
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: ClickableOverlayComponent, isStandalone: true, selector: "app-clickable-overlay", ngImport: i0, template: "@if (state()) {\n <div\n (click)=\"state()?.onOverlayClick()\"\n [ngClass]=\"state()?.className\"\n id=\"videoPlayOverlay\"\n >\n @if (state()?.isActivityDetected) {\n <div class=\"resume-box\">\n <div aria-hidden=\"true\" class=\"resume-box__pic\" role=\"presentation\">\n <div [innerHTML]=\"state()?.message\" class=\"text-number\"></div>\n </div>\n <div class=\"resume-box__text\">\n <h3 class=\"resume-box__heading\">Session will time out soon</h3>\n <p>\n No activity detected. Press 'Continue' if you wish to keep your\n session active\n </p>\n </div>\n <src-button\n [colorScheme]=\"'primary'\"\n [isFullWidth]=\"true\"\n [size]=\"'large'\"\n [data-testid]=\"'continue-session'\"\n >\n Continue\n </src-button>\n </div>\n }\n </div>\n}\n", styles: ["#videoPlayOverlay{position:absolute;z-index:30;top:0;width:100%;height:100%;font-size:1.8em;font-family:var(--src-font-family-body);background-color:#646464b3}.clickableState{display:flex;justify-content:center;align-items:center;cursor:pointer}.textDisplayState{display:flex}.hiddenState{display:none}.resume-box{width:340px;padding:32px 20px 20px;flex-direction:column;align-items:center;border-radius:var(--src-border-rounded-parent, 8px);background:var(--src-color-bg-default, #fff);box-shadow:0 26px 80px #0003,0 0 1px #0003}.resume-box .resume-box__pic{width:72px;height:72px;margin:0 auto 22px;border-radius:48px;background:#ecf0f2;padding:12px;display:flex;align-items:center;justify-content:center}.resume-box .resume-box__pic .text-number{color:var(--src-colors-text-default, #1f2937);text-align:center;font-family:var(--src-font-family-body);font-size:30px;font-style:normal;font-weight:400;line-height:24px}.resume-box__text{margin-bottom:18px}.resume-box__text p{text-align:center;font-family:var(--src-font-family-body);font-size:var(--src-font-size-sm, 14px);font-style:normal;font-weight:400;line-height:24px;color:var(--src-color-text-default-subdued, #6b7280)}.resume-box__text .resume-box__heading{color:var(--src-color-bg-default, #1f2937);text-align:center;font-family:var(--src-font-family-body);font-size:18px;font-style:normal;font-weight:500;line-height:26px;margin-bottom:8px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SourceButtonComponent, selector: "src-button", inputs: ["type", "appearance", "colorScheme", "size", "customClass", "hasDisclosure", "isFullWidth", "isPressed", "isDisabled", "isLoading", "iconButton", "srcButtonConfig", "formID", "data-testid"], outputs: ["onClick", "onSubmit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3877
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: ClickableOverlayComponent, isStandalone: true, selector: "app-clickable-overlay", ngImport: i0, template: "@if (state()) {\n <div\n (click)=\"state()?.onOverlayClick()\"\n [ngClass]=\"state()?.className\"\n id=\"videoPlayOverlay\"\n >\n @if (state()?.isActivityDetected) {\n <div class=\"resume-box\">\n <div aria-hidden=\"true\" class=\"resume-box__pic\" role=\"presentation\">\n <div [innerHTML]=\"state()?.message\" class=\"text-number\"></div>\n </div>\n <div class=\"resume-box__text\">\n <h3 class=\"resume-box__heading\">Session will time out soon</h3>\n <p>\n No activity detected. Press 'Continue' if you wish to keep your\n session active\n </p>\n </div>\n <src-button\n [colorScheme]=\"'primary'\"\n [isFullWidth]=\"true\"\n [size]=\"'large'\"\n [data-testid]=\"'continue-session'\"\n >\n Continue\n </src-button>\n </div>\n }\n </div>\n}\n", styles: ["#videoPlayOverlay{position:absolute;z-index:30;top:0;width:100%;height:100%;font-size:1.8em;font-family:var(--src-font-family-body);background-color:#646464b3}.clickableState{display:flex;justify-content:center;align-items:center;cursor:pointer}.textDisplayState{display:flex}.hiddenState{display:none}.resume-box{width:340px;padding:32px 20px 20px;flex-direction:column;align-items:center;border-radius:var(--src-border-rounded-parent, 8px);background:var(--src-color-bg-default, #fff);box-shadow:0 26px 80px #0003,0 0 1px #0003}.resume-box .resume-box__pic{width:72px;height:72px;margin:0 auto 22px;border-radius:48px;background:#ecf0f2;padding:12px;display:flex;align-items:center;justify-content:center}.resume-box .resume-box__pic .text-number{color:var(--src-colors-text-default, #1f2937);text-align:center;font-family:var(--src-font-family-body);font-size:30px;font-style:normal;font-weight:400;line-height:24px}.resume-box__text{margin-bottom:18px}.resume-box__text p{text-align:center;font-family:var(--src-font-family-body);font-size:var(--src-font-size-sm, 14px);font-style:normal;font-weight:400;line-height:24px;color:var(--src-color-text-default-subdued, #6b7280)}.resume-box__text .resume-box__heading{color:var(--src-color-bg-default, #1f2937);text-align:center;font-family:var(--src-font-family-body);font-size:18px;font-style:normal;font-weight:500;line-height:26px;margin-bottom:8px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SourceButtonComponent, selector: "src-button", inputs: ["type", "appearance", "colorScheme", "size", "state", "customClass", "hasDisclosure", "isFullWidth", "isPressed", "isDisabled", "isLoading", "iconButton", "srcButtonConfig", "formID", "data-testid"], outputs: ["onClick", "onSubmit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3865
3878
|
}
|
|
3866
3879
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ClickableOverlayComponent, decorators: [{
|
|
3867
3880
|
type: Component,
|
|
@@ -3923,7 +3936,7 @@ class LowBandwidthModalComponent {
|
|
|
3923
3936
|
this.dialogRef.close(value || false);
|
|
3924
3937
|
}
|
|
3925
3938
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LowBandwidthModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3926
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: LowBandwidthModalComponent, isStandalone: true, selector: "app-low-bandwidth-modal", ngImport: i0, template: "<div [attr.data-testid]=\"'low-bandwidth'\" class=\"src-modal src-modal--lbm\">\n <header class=\"src-modal__header\">\n <h6 [attr.data-testid]=\"'title'\" class=\"src-modal__title\">\n Unstable Connection\n </h6>\n </header>\n <section class=\"src-modal__body\">\n <div\n [innerHtml]=\"\n 'Fluid Interactivity Modes were disabled due to an unstable connection. Showcase Gallery Mode is enabled. To regain full functionality, switch to Interactive Mode.'\n | safe: 'html'\n \"\n class=\"src-modal__scroll-box\"\n ></div>\n </section>\n <footer class=\"src-modal__footer\">\n <div class=\"src-modal__buttons\">\n <src-button\n (onClick)=\"close(true)\"\n [data-testid]=\"'switch-to-interactive-mode'\"\n >\n Switch\n </src-button>\n\n <src-button\n (onClick)=\"close()\"\n [data-testid]=\"'close-lbm-modal'\"\n colorScheme=\"primary\"\n >\n Ok\n </src-button>\n </div>\n </footer>\n</div>\n", styles: [".src-modal--lbm{width:360px}.src-modal--lbm .src-modal__body{font-size:14px;line-height:24px}.src-modal--lbm .src-modal__buttons{display:flex;gap:8px}\n"], dependencies: [{ kind: "component", type: SourceButtonComponent, selector: "src-button", inputs: ["type", "appearance", "colorScheme", "size", "customClass", "hasDisclosure", "isFullWidth", "isPressed", "isDisabled", "isLoading", "iconButton", "srcButtonConfig", "formID", "data-testid"], outputs: ["onClick", "onSubmit"] }, { kind: "pipe", type: SafePipe, name: "safe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3939
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: LowBandwidthModalComponent, isStandalone: true, selector: "app-low-bandwidth-modal", ngImport: i0, template: "<div [attr.data-testid]=\"'low-bandwidth'\" class=\"src-modal src-modal--lbm\">\n <header class=\"src-modal__header\">\n <h6 [attr.data-testid]=\"'title'\" class=\"src-modal__title\">\n Unstable Connection\n </h6>\n </header>\n <section class=\"src-modal__body\">\n <div\n [innerHtml]=\"\n 'Fluid Interactivity Modes were disabled due to an unstable connection. Showcase Gallery Mode is enabled. To regain full functionality, switch to Interactive Mode.'\n | safe: 'html'\n \"\n class=\"src-modal__scroll-box\"\n ></div>\n </section>\n <footer class=\"src-modal__footer\">\n <div class=\"src-modal__buttons\">\n <src-button\n (onClick)=\"close(true)\"\n [data-testid]=\"'switch-to-interactive-mode'\"\n >\n Switch\n </src-button>\n\n <src-button\n (onClick)=\"close()\"\n [data-testid]=\"'close-lbm-modal'\"\n colorScheme=\"primary\"\n >\n Ok\n </src-button>\n </div>\n </footer>\n</div>\n", styles: [".src-modal--lbm{width:360px}.src-modal--lbm .src-modal__body{font-size:14px;line-height:24px}.src-modal--lbm .src-modal__buttons{display:flex;gap:8px}\n"], dependencies: [{ kind: "component", type: SourceButtonComponent, selector: "src-button", inputs: ["type", "appearance", "colorScheme", "size", "state", "customClass", "hasDisclosure", "isFullWidth", "isPressed", "isDisabled", "isLoading", "iconButton", "srcButtonConfig", "formID", "data-testid"], outputs: ["onClick", "onSubmit"] }, { kind: "pipe", type: SafePipe, name: "safe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3927
3940
|
}
|
|
3928
3941
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LowBandwidthModalComponent, decorators: [{
|
|
3929
3942
|
type: Component,
|
|
@@ -3967,7 +3980,7 @@ class AfkRestartScreenLockerComponent {
|
|
|
3967
3980
|
this.playCallBack = null;
|
|
3968
3981
|
}
|
|
3969
3982
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AfkRestartScreenLockerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3970
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: AfkRestartScreenLockerComponent, isStandalone: true, selector: "app-afk-restart-screen-locker", ngImport: i0, template: "@if (!isViewportReady()) {\n <div class=\"preload\">\n <div class=\"back\">\n @if (imageLoadingSrc()) {\n <img\n [ngSrc]=\"imageLoadingSrc()!\"\n fill\n loading=\"lazy\"\n alt=\"image loading src\"\n />\n }\n </div>\n\n @if (showReconnectPopup()) {\n <div class=\"stream-message-wrapper\">\n <div class=\"resume-box\">\n @if (isSecondStart()) {\n <div class=\"resume-box__text\">\n Your stream has been paused due to inactivity\n </div>\n }\n\n <src-button\n (onClick)=\"connect()\"\n [isFullWidth]=\"true\"\n [size]=\"'large'\"\n [colorScheme]=\"'primary'\"\n [data-testid]=\"'connect-button'\"\n class=\"connect-button\"\n >\n {{ isSecondStart() ? 'Resume' : 'Start' }}\n </src-button>\n </div>\n </div>\n }\n </div>\n}\n", styles: [".preload{position:absolute;top:0;left:0;width:100%;height:100%;text-align:center}.preload .back{position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;width:100%;height:100%}.preload .back img{width:100%;height:100%;object-fit:cover}.preload .stream-message-wrapper{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:3;display:flex;align-items:center;justify-content:center}.resume-box{padding:16px;position:absolute;bottom:0;left:50%;gap:12px;display:flex;transform:translate(-50%,-50%);flex-direction:column;align-items:center;border-radius:var(--src-border-rounded-parent, 8px);background:var(--src-color-bg-default, #fff);box-shadow:0 26px 80px #0003,0 0 1px #0003}.resume-box .connect-button{width:100%}.resume-box__text{color:var(--src-color-gray-500, #6b7280);text-align:center;font-family:var(--src-font-family-body);font-size:14px;font-style:normal;font-weight:400;line-height:24px}.preload .message-loader{position:absolute;bottom:20px;left:50%;display:block;margin:auto;transform:translate(-50%)}.preload .message-loader>p{margin:0;line-height:1;transition:all ease .35s}.preload .message-loader>p span{font-size:10px;transition:all ease .35s}@media (min-width: 1900px){.preload .message-loader{bottom:40px}}\n"], dependencies: [{ kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }, { kind: "component", type: SourceButtonComponent, selector: "src-button", inputs: ["type", "appearance", "colorScheme", "size", "customClass", "hasDisclosure", "isFullWidth", "isPressed", "isDisabled", "isLoading", "iconButton", "srcButtonConfig", "formID", "data-testid"], outputs: ["onClick", "onSubmit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3983
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: AfkRestartScreenLockerComponent, isStandalone: true, selector: "app-afk-restart-screen-locker", ngImport: i0, template: "@if (!isViewportReady()) {\n <div class=\"preload\">\n <div class=\"back\">\n @if (imageLoadingSrc()) {\n <img\n [ngSrc]=\"imageLoadingSrc()!\"\n fill\n loading=\"lazy\"\n alt=\"image loading src\"\n />\n }\n </div>\n\n @if (showReconnectPopup()) {\n <div class=\"stream-message-wrapper\">\n <div class=\"resume-box\">\n @if (isSecondStart()) {\n <div class=\"resume-box__text\">\n Your stream has been paused due to inactivity\n </div>\n }\n\n <src-button\n (onClick)=\"connect()\"\n [isFullWidth]=\"true\"\n [size]=\"'large'\"\n [colorScheme]=\"'primary'\"\n [data-testid]=\"'connect-button'\"\n class=\"connect-button\"\n >\n {{ isSecondStart() ? 'Resume' : 'Start' }}\n </src-button>\n </div>\n </div>\n }\n </div>\n}\n", styles: [".preload{position:absolute;top:0;left:0;width:100%;height:100%;text-align:center}.preload .back{position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;width:100%;height:100%}.preload .back img{width:100%;height:100%;object-fit:cover}.preload .stream-message-wrapper{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:3;display:flex;align-items:center;justify-content:center}.resume-box{padding:16px;position:absolute;bottom:0;left:50%;gap:12px;display:flex;transform:translate(-50%,-50%);flex-direction:column;align-items:center;border-radius:var(--src-border-rounded-parent, 8px);background:var(--src-color-bg-default, #fff);box-shadow:0 26px 80px #0003,0 0 1px #0003}.resume-box .connect-button{width:100%}.resume-box__text{color:var(--src-color-gray-500, #6b7280);text-align:center;font-family:var(--src-font-family-body);font-size:14px;font-style:normal;font-weight:400;line-height:24px}.preload .message-loader{position:absolute;bottom:20px;left:50%;display:block;margin:auto;transform:translate(-50%)}.preload .message-loader>p{margin:0;line-height:1;transition:all ease .35s}.preload .message-loader>p span{font-size:10px;transition:all ease .35s}@media (min-width: 1900px){.preload .message-loader{bottom:40px}}\n"], dependencies: [{ kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "decoding", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }, { kind: "component", type: SourceButtonComponent, selector: "src-button", inputs: ["type", "appearance", "colorScheme", "size", "state", "customClass", "hasDisclosure", "isFullWidth", "isPressed", "isDisabled", "isLoading", "iconButton", "srcButtonConfig", "formID", "data-testid"], outputs: ["onClick", "onSubmit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3971
3984
|
}
|
|
3972
3985
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AfkRestartScreenLockerComponent, decorators: [{
|
|
3973
3986
|
type: Component,
|
|
@@ -4178,7 +4191,7 @@ class UnrealStatusComponent {
|
|
|
4178
4191
|
this.unrealInitialConfig = inject(UNREAL_CONFIG, {
|
|
4179
4192
|
optional: true,
|
|
4180
4193
|
});
|
|
4181
|
-
this.
|
|
4194
|
+
this.resetLoaderTrigger$ = this.store
|
|
4182
4195
|
.select(unrealFeature.selectCirrusConnected)
|
|
4183
4196
|
.pipe(filter(Falsy));
|
|
4184
4197
|
this.isDevMode = inject(DevModeService).isDevMode;
|
|
@@ -4186,7 +4199,7 @@ class UnrealStatusComponent {
|
|
|
4186
4199
|
/**
|
|
4187
4200
|
* An observable that emits smoothed percentage values from 0 to 100.
|
|
4188
4201
|
*/
|
|
4189
|
-
this.messagePercents$ = toSignal(this.
|
|
4202
|
+
this.messagePercents$ = toSignal(this.resetLoaderTrigger$.pipe(withLatestFrom(this.store.select(unrealFeature.selectIsFreezeLoaderPercents)), filter(([, isFreezeLoaderPercents]) => !isFreezeLoaderPercents), switchMap$1(() => this.store.select(selectTotalProgress).pipe(startWith(0), clampAndKeepMaxPercents(), floatToSmoothPercents(), combineLatestWith(this.store.select(selectShowLoader)), map$1(([progress, showLoader]) => (showLoader ? progress || 0 : null))))));
|
|
4190
4203
|
}
|
|
4191
4204
|
ngOnInit() {
|
|
4192
4205
|
/**
|
|
@@ -4515,7 +4528,7 @@ class VideoLockerComponent {
|
|
|
4515
4528
|
videoContainer.appendChild(videoElement);
|
|
4516
4529
|
}
|
|
4517
4530
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: VideoLockerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4518
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: VideoLockerComponent, isStandalone: true, selector: "app-video-locker", viewQueries: [{ propertyName: "videoElement", first: true, predicate: ["videoPlayerCover"], descendants: true }], ngImport: i0, template: "@if (imageIntroSrc$ | async; as url) {\n <div class=\"backImage\">\n <img [ngSrc]=\"url\" fill alt=\"Loading...\" />\n </div>\n} @else if (videoIntroSrc$ | async) {\n <div #videoPlayerCover class=\"backVideo\"></div>\n}\n", styles: [".backVideo{position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;width:100%;height:100%}.backVideo video{position:absolute;width:100%;height:100%;object-fit:cover}.backImage{position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;width:100%;height:100%}.backImage img{position:absolute;width:100%;height:100%;object-fit:cover}\n"], dependencies: [{ kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4531
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: VideoLockerComponent, isStandalone: true, selector: "app-video-locker", viewQueries: [{ propertyName: "videoElement", first: true, predicate: ["videoPlayerCover"], descendants: true }], ngImport: i0, template: "@if (imageIntroSrc$ | async; as url) {\n <div class=\"backImage\">\n <img [ngSrc]=\"url\" fill alt=\"Loading...\" />\n </div>\n} @else if (videoIntroSrc$ | async) {\n <div #videoPlayerCover class=\"backVideo\"></div>\n}\n", styles: [".backVideo{position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;width:100%;height:100%}.backVideo video{position:absolute;width:100%;height:100%;object-fit:cover}.backImage{position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;width:100%;height:100%}.backImage img{position:absolute;width:100%;height:100%;object-fit:cover}\n"], dependencies: [{ kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "decoding", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4519
4532
|
}
|
|
4520
4533
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: VideoLockerComponent, decorators: [{
|
|
4521
4534
|
type: Component,
|
|
@@ -4545,7 +4558,7 @@ class WebrtcErrorModalComponent {
|
|
|
4545
4558
|
});
|
|
4546
4559
|
}
|
|
4547
4560
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: WebrtcErrorModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4548
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: WebrtcErrorModalComponent, isStandalone: true, selector: "app-webrtc-error-modal", ngImport: i0, template: "<div [attr.data-testid]=\"'webrtc-error-modal'\" class=\"src-modal\">\n <header class=\"src-modal__header\">\n <div [attr.data-testid]=\"'title'\" class=\"src-modal__title\">\n WebRTC error\n </div>\n </header>\n <section class=\"src-modal__body\">\n <div style=\"text-align: left\">\n An internet connection type (WebRTC) appears to be blocked either by your\n browser settings or your current network. If WebRTC is blocked on your\n browser you may be able to adjust these settings yourself based on\n instructions here:\n <a href=\"https://myownconference.com/blog/en/webrtc/\" target=\"blank\"\n >https://myownconference.com/blog/en/webrtc/</a\n >\n <br /><br />\n Trying a different web browser may help confirm this as well. If WebRTC is\n blocked by your network, try switching to a different network if possible\n or contact your network administrator.<br /><br />\n WebRTC is common, safe and increasingly utilised method for streaming real\n time 3D experiences via a web browser. It typically consumes no more\n bandwidth than streaming an HD video.\n </div>\n </section>\n <footer class=\"src-modal__footer\">\n <src-button\n (onClick)=\"closeModalWithCirrusDisconnect()\"\n [data-testid]=\"'close-webrtc-error-modal'\"\n [colorScheme]=\"'primary'\"\n >\n Ok\n </src-button>\n </footer>\n</div>\n", styles: [".src-modal{--modalBodyPadding: 20px 8px 20px 20px;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto}.src-modal ::ng-deep .ng-scroll-content{--_scrollbar-content-width: initial;--_viewport-padding-right: 12px}.src-modal__body{width:100%}.src-modal__body p{color:var(--src-color-bg-default, #1f2937);font-size:14px;font-style:normal;font-weight:400;line-height:24px;margin-top:0}.src-modal__body a{word-wrap:break-word;white-space:normal}\n"], dependencies: [{ kind: "component", type: SourceButtonComponent, selector: "src-button", inputs: ["type", "appearance", "colorScheme", "size", "customClass", "hasDisclosure", "isFullWidth", "isPressed", "isDisabled", "isLoading", "iconButton", "srcButtonConfig", "formID", "data-testid"], outputs: ["onClick", "onSubmit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4561
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: WebrtcErrorModalComponent, isStandalone: true, selector: "app-webrtc-error-modal", ngImport: i0, template: "<div [attr.data-testid]=\"'webrtc-error-modal'\" class=\"src-modal\">\n <header class=\"src-modal__header\">\n <div [attr.data-testid]=\"'title'\" class=\"src-modal__title\">\n WebRTC error\n </div>\n </header>\n <section class=\"src-modal__body\">\n <div style=\"text-align: left\">\n An internet connection type (WebRTC) appears to be blocked either by your\n browser settings or your current network. If WebRTC is blocked on your\n browser you may be able to adjust these settings yourself based on\n instructions here:\n <a href=\"https://myownconference.com/blog/en/webrtc/\" target=\"blank\"\n >https://myownconference.com/blog/en/webrtc/</a\n >\n <br /><br />\n Trying a different web browser may help confirm this as well. If WebRTC is\n blocked by your network, try switching to a different network if possible\n or contact your network administrator.<br /><br />\n WebRTC is common, safe and increasingly utilised method for streaming real\n time 3D experiences via a web browser. It typically consumes no more\n bandwidth than streaming an HD video.\n </div>\n </section>\n <footer class=\"src-modal__footer\">\n <src-button\n (onClick)=\"closeModalWithCirrusDisconnect()\"\n [data-testid]=\"'close-webrtc-error-modal'\"\n [colorScheme]=\"'primary'\"\n >\n Ok\n </src-button>\n </footer>\n</div>\n", styles: [".src-modal{--modalBodyPadding: 20px 8px 20px 20px;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto}.src-modal ::ng-deep .ng-scroll-content{--_scrollbar-content-width: initial;--_viewport-padding-right: 12px}.src-modal__body{width:100%}.src-modal__body p{color:var(--src-color-bg-default, #1f2937);font-size:14px;font-style:normal;font-weight:400;line-height:24px;margin-top:0}.src-modal__body a{word-wrap:break-word;white-space:normal}\n"], dependencies: [{ kind: "component", type: SourceButtonComponent, selector: "src-button", inputs: ["type", "appearance", "colorScheme", "size", "state", "customClass", "hasDisclosure", "isFullWidth", "isPressed", "isDisabled", "isLoading", "iconButton", "srcButtonConfig", "formID", "data-testid"], outputs: ["onClick", "onSubmit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4549
4562
|
}
|
|
4550
4563
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: WebrtcErrorModalComponent, decorators: [{
|
|
4551
4564
|
type: Component,
|
|
@@ -4711,5 +4724,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
4711
4724
|
* Generated bundle index. Do not edit.
|
|
4712
4725
|
*/
|
|
4713
4726
|
|
|
4714
|
-
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,
|
|
4727
|
+
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_AFK_TIMEOUT, DEFAULT_AFK_TIMEOUT_PERIOD, 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, SIGNALLING_PERCENT_VALUE, 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, getFreezeFrameNative, 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, getUnfreezeFrameNative, getUnselectAllProductsCommand, getWeatherCommand, initSignalling, initialState, mapQpToQuality, observeCommandResponse, provideAngularUnrealModule, removeExileCommands, resetAfk, resetAfkAction, resetConfig, resetIntroSrc, resetUnrealState, resetUnrealStateAction, resetWarnTimeout, selectCommandProgress, selectCommandsInProgress, selectFreezeFrameCombinedDataUrl, selectFreezeFrameDataUrl, selectFreezeFrameDataUrlFromVideo, selectFreezeFrameProgressMessageFromVideo, selectIsAutostart, selectIsFreezeFrameLoading, selectIsVideoPlayingAndDataChannelConnected, selectLastCommandInProgress, selectLoaderCommands, selectMatchMakerUrls, selectShowLoader, selectShowReconnectPopup, selectSignalingParameters, selectStreamConfig, selectTotalProgress, selectWarnTimeout, selectWsUrl, sendSignal, setAwsInstance, setCirrusConnected, setCirrusDisconnected, setConfig, setDataChannelConnected, setErrorMessage, setEstablishingConnection, setFreezeFrame, setFreezeFrameFromVideo, setIntroImageSrc, setIntroVideoSrc, setIsFreezeLoaderPercents, setLoadingImageSrc, setLoopBackCommandIsCompleted, setMatchMakerUrls, setMatchUrls, setMaxFps, setProductsLocationCommand, setSignalingName, setStatusMessage, setStatusPercentSignallingServer, setStreamClientCompanyId, setStreamViewId, setViewportReady, showUnrealErrorMessage, smoothTransition, trackMixpanelEvent, unLoadAllLevelsCommand, unrealFeature, unrealReducer, updateCirrusInfo };
|
|
4715
4728
|
//# sourceMappingURL=3dsource-angular-unreal-module.mjs.map
|