@3dsource/angular-unreal-module 0.0.146-dev.6 → 0.0.146-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1214,6 +1214,17 @@ declare class StreamStatusTelemetryService2 {
|
|
|
1214
1214
|
private readonly disconnectReason$;
|
|
1215
1215
|
private readonly errorMessage$;
|
|
1216
1216
|
private readonly viewPortReady$;
|
|
1217
|
+
/**
|
|
1218
|
+
* Synchronous adoption flag. The `streamAdopted` reducer sets it BEFORE any
|
|
1219
|
+
* action subscriber runs, so the connection-phase closers (which fire inside
|
|
1220
|
+
* the same dispatch, e.g. `ssinfo-received` off the `ssData` state change)
|
|
1221
|
+
* can read it and defer to the prefetch-timed attribution emitted by
|
|
1222
|
+
* {@link emitAdoptedConnection} instead of recording the live wall-clock.
|
|
1223
|
+
*/
|
|
1224
|
+
private readonly adopted$;
|
|
1225
|
+
/** Streamer identity for the adopted signaling phase params. */
|
|
1226
|
+
private readonly ssData$;
|
|
1227
|
+
private readonly awsInstance$;
|
|
1217
1228
|
private session;
|
|
1218
1229
|
/**
|
|
1219
1230
|
* Whether a session has already started during the current page lifetime.
|
|
@@ -1277,6 +1288,35 @@ declare class StreamStatusTelemetryService2 {
|
|
|
1277
1288
|
* are derived from neighbor phases.
|
|
1278
1289
|
*/
|
|
1279
1290
|
private emitPhaseEnded;
|
|
1291
|
+
/**
|
|
1292
|
+
* Emit the region / signaling / webrtc phases for an ADOPTED connection.
|
|
1293
|
+
*
|
|
1294
|
+
* The prefetch script established the connection in parallel with page load,
|
|
1295
|
+
* so its raw timeline (prefetch_start … ready) mostly predates this session —
|
|
1296
|
+
* showing it verbatim would look identical to a non-prefetched connect. What
|
|
1297
|
+
* matters is measured from the moment Angular reached the connect call
|
|
1298
|
+
* (session start, == `lastMilestonePerf` here): the REAL wait until adoption,
|
|
1299
|
+
* and how much the prefetch SAVED by finishing the handshake during page load.
|
|
1300
|
+
*
|
|
1301
|
+
* So the three phases fill exactly the `[session start → adopted]` window
|
|
1302
|
+
* (split across signaling / webrtc by the prefetch's own sub-step ratio; the
|
|
1303
|
+
* region was served from cache → ~0), and the savings figures ride in params:
|
|
1304
|
+
* - `prefetchConnectMs` — full handshake the prefetch measured (the cost a
|
|
1305
|
+
* cold, non-prefetched connect would pay here).
|
|
1306
|
+
* - `prefetchSavedMs` — how much of it completed before Angular was ready.
|
|
1307
|
+
* - `adoptionWaitMs` — the actual wait Angular experienced (= window).
|
|
1308
|
+
* - `adoptionOverheadMs` — gap between prefetch-ready and adoption.
|
|
1309
|
+
*/
|
|
1310
|
+
private emitAdoptedConnection;
|
|
1311
|
+
/** Emit one adopted phase with an explicit (prefetch-derived) duration and
|
|
1312
|
+
* advance `lastMilestonePerf` synthetically so the next phase chains right. */
|
|
1313
|
+
private emitAdoptedPhase;
|
|
1314
|
+
/** Streamer identity params for the adopted signaling phase — mirrors the
|
|
1315
|
+
* `ssinfo-received` closer's shape (client / instanceName / …ssData). */
|
|
1316
|
+
private adoptedSignalingParams;
|
|
1317
|
+
/** Read the region-ping cache the prefetch reused (localStorage), so the
|
|
1318
|
+
* adopted region phase can still report the winning region + samples. */
|
|
1319
|
+
private readRegionCache;
|
|
1280
1320
|
private handleWindow;
|
|
1281
1321
|
private evaluateAnomalies;
|
|
1282
1322
|
private updateMaxFpsTarget;
|
|
@@ -2589,9 +2629,29 @@ declare const initSignalling: node_modules__ngrx_store_types_ngrx_store.ActionCr
|
|
|
2589
2629
|
declare const streamAdopted: node_modules__ngrx_store_types_ngrx_store.ActionCreator<string, (props: {
|
|
2590
2630
|
machineId: string | null;
|
|
2591
2631
|
ssData: SignalingData | null;
|
|
2632
|
+
/**
|
|
2633
|
+
* `performance.now()` marks the prefetch script recorded while it
|
|
2634
|
+
* established the connection (`prefetch_start` / `ws_open` / `dc_open` /
|
|
2635
|
+
* `ready`), on the page navigation timeline. The telemetry service uses
|
|
2636
|
+
* them to attribute the signaling / webrtc phase durations to the time the
|
|
2637
|
+
* prefetch actually spent — instead of dumping the whole pre-adoption wait
|
|
2638
|
+
* onto whichever phase closer happens to fire first. `null` when adopting a
|
|
2639
|
+
* stream that carried no timings.
|
|
2640
|
+
*/
|
|
2641
|
+
timings: Record<string, number> | null;
|
|
2592
2642
|
}) => {
|
|
2593
2643
|
machineId: string | null;
|
|
2594
2644
|
ssData: SignalingData | null;
|
|
2645
|
+
/**
|
|
2646
|
+
* `performance.now()` marks the prefetch script recorded while it
|
|
2647
|
+
* established the connection (`prefetch_start` / `ws_open` / `dc_open` /
|
|
2648
|
+
* `ready`), on the page navigation timeline. The telemetry service uses
|
|
2649
|
+
* them to attribute the signaling / webrtc phase durations to the time the
|
|
2650
|
+
* prefetch actually spent — instead of dumping the whole pre-adoption wait
|
|
2651
|
+
* onto whichever phase closer happens to fire first. `null` when adopting a
|
|
2652
|
+
* stream that carried no timings.
|
|
2653
|
+
*/
|
|
2654
|
+
timings: Record<string, number> | null;
|
|
2595
2655
|
} & node_modules__ngrx_store_types_ngrx_store.Action<string>>;
|
|
2596
2656
|
declare const startStream: node_modules__ngrx_store_types_ngrx_store.ActionCreator<string, (props: {
|
|
2597
2657
|
config: Partial<StreamConfig>;
|
|
@@ -2810,7 +2870,6 @@ declare class UnrealEffects {
|
|
|
2810
2870
|
connectToSignaling$: node_modules_rxjs_dist_types.Observable<{
|
|
2811
2871
|
value: boolean;
|
|
2812
2872
|
} & node_modules__ngrx_store_types_ngrx_store.Action<string>> & node_modules__ngrx_effects_types_ngrx_effects.CreateEffectMetadata;
|
|
2813
|
-
regionTelemetryOnAdopt$: node_modules_rxjs_dist_types.Observable<node_modules__ngrx_store_types_ngrx_store.Action<string>> & node_modules__ngrx_effects_types_ngrx_effects.CreateEffectMetadata;
|
|
2814
2873
|
private canPeerReconnect;
|
|
2815
2874
|
/**
|
|
2816
2875
|
* Either schedules the next peer-reconnect attempt or gives up with the
|
|
@@ -2827,6 +2886,7 @@ declare const unrealFeature: {
|
|
|
2827
2886
|
name: "unrealFeature";
|
|
2828
2887
|
reducer: node_modules__ngrx_store_types_ngrx_store.ActionReducer<_3dsource_angular_unreal_module.UnrealState, node_modules__ngrx_store_types_ngrx_store.Action<string>>;
|
|
2829
2888
|
selectUnrealFeatureState: node_modules__ngrx_store_types_ngrx_store.MemoizedSelector<Record<string, any>, _3dsource_angular_unreal_module.UnrealState, (featureState: _3dsource_angular_unreal_module.UnrealState) => _3dsource_angular_unreal_module.UnrealState>;
|
|
2889
|
+
selectAdopted: node_modules__ngrx_store_types_ngrx_store.MemoizedSelector<Record<string, any>, boolean, (featureState: _3dsource_angular_unreal_module.UnrealState) => boolean>;
|
|
2830
2890
|
selectFreezeFrame: node_modules__ngrx_store_types_ngrx_store.MemoizedSelector<Record<string, any>, _3dsource_angular_unreal_module.FreezeFrameMessage, (featureState: _3dsource_angular_unreal_module.UnrealState) => _3dsource_angular_unreal_module.FreezeFrameMessage>;
|
|
2831
2891
|
selectIsVideoPlaying: node_modules__ngrx_store_types_ngrx_store.MemoizedSelector<Record<string, any>, boolean, (featureState: _3dsource_angular_unreal_module.UnrealState) => boolean>;
|
|
2832
2892
|
selectStatusMessage: node_modules__ngrx_store_types_ngrx_store.MemoizedSelector<Record<string, any>, string | null, (featureState: _3dsource_angular_unreal_module.UnrealState) => string | null>;
|
|
@@ -2883,6 +2943,13 @@ interface UnrealState {
|
|
|
2883
2943
|
isAfkTimerVisible: boolean;
|
|
2884
2944
|
afkCountdown: number;
|
|
2885
2945
|
cirrusConnected: boolean;
|
|
2946
|
+
/**
|
|
2947
|
+
* True once a prefetched connection has been adopted (`streamAdopted`).
|
|
2948
|
+
* Read synchronously by the telemetry service so the connection-phase
|
|
2949
|
+
* closers know to defer to the prefetch-timed attribution instead of the
|
|
2950
|
+
* live-event one. Reset on every fresh attempt / disconnect.
|
|
2951
|
+
*/
|
|
2952
|
+
adopted: boolean;
|
|
2886
2953
|
viewportReady: boolean;
|
|
2887
2954
|
freezeFrameFromVideo: FreezeFrameMessage;
|
|
2888
2955
|
freezeFrame: FreezeFrameMessage;
|