@3dsource/angular-unreal-module 0.0.143-dev.8 → 0.0.144
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.
|
@@ -4732,15 +4732,6 @@ const RESIZE_DEBOUNCE_MS = 300;
|
|
|
4732
4732
|
const FUNCTION_KEY_MIN = 112;
|
|
4733
4733
|
const FUNCTION_KEY_MAX = 123;
|
|
4734
4734
|
const TAB_KEY_CODE = 9;
|
|
4735
|
-
// Browser-destructive / navigation keys (Backspace can navigate back, Enter and
|
|
4736
|
-
// Delete leak into the stream). These are ignored in the viewport regardless of
|
|
4737
|
-
// dev mode — unless an HTML input is focused — to match non-dev-mode behavior.
|
|
4738
|
-
const BROWSER_DESTRUCTIVE_CODES = new Set([
|
|
4739
|
-
'Backspace',
|
|
4740
|
-
'Delete',
|
|
4741
|
-
'Enter',
|
|
4742
|
-
'NumpadEnter',
|
|
4743
|
-
]);
|
|
4744
4735
|
class InputService extends SubService {
|
|
4745
4736
|
constructor() {
|
|
4746
4737
|
super();
|
|
@@ -5166,15 +5157,9 @@ class InputService extends SubService {
|
|
|
5166
5157
|
};
|
|
5167
5158
|
this.startListenKeys(keyBlock);
|
|
5168
5159
|
}
|
|
5169
|
-
/**
|
|
5170
|
-
* Keys that must never reach the Unreal stream from the viewport — Backspace
|
|
5171
|
-
* (browser back navigation), Enter and Delete — regardless of dev mode. An
|
|
5172
|
-
* HTML input keeps them so text entry still works; only the viewport ignores
|
|
5173
|
-
* them. Applied independently of the configurable key filter.
|
|
5174
|
-
*/
|
|
5175
5160
|
isIgnoredViewportKey(event) {
|
|
5176
5161
|
const isInputFieldFocused = event.target?.localName === 'input';
|
|
5177
|
-
return !isInputFieldFocused
|
|
5162
|
+
return !isInputFieldFocused;
|
|
5178
5163
|
}
|
|
5179
5164
|
startListenKeys(_filter) {
|
|
5180
5165
|
const filter = _filter ?? (() => false);
|
|
@@ -7191,20 +7176,21 @@ class UnrealSceneComponent {
|
|
|
7191
7176
|
this.unrealConfig = inject(UNREAL_CONFIG);
|
|
7192
7177
|
this.autoHighResolution = false;
|
|
7193
7178
|
this.destroyRef.onDestroy(() => {
|
|
7194
|
-
//
|
|
7195
|
-
//
|
|
7196
|
-
// so on navigation the route's environment
|
|
7197
|
-
// UnrealEffects
|
|
7198
|
-
// `destroyUnrealScene → destroyRemoteConnections` effect chain
|
|
7199
|
-
//
|
|
7200
|
-
//
|
|
7201
|
-
//
|
|
7202
|
-
//
|
|
7203
|
-
|
|
7179
|
+
// Mirror of the `destroyRemoteConnections$` effect's teardown tap, run
|
|
7180
|
+
// directly here as a safeguard. provideUnrealModule (effects) is
|
|
7181
|
+
// registered per 3D route, so on navigation the route's environment
|
|
7182
|
+
// injector — and its UnrealEffects — may be torn down before the
|
|
7183
|
+
// `destroyUnrealScene → destroyRemoteConnections` effect chain closes the
|
|
7184
|
+
// WebSocket/PeerConnection, which would leak the stream session. The
|
|
7185
|
+
// engine services are providedIn:'root' singletons, so we close them
|
|
7186
|
+
// directly. Keep the SAME calls, args and order as the effect's tap
|
|
7187
|
+
// (close → closePC); both are idempotent, so whichever runs second is a
|
|
7188
|
+
// harmless no-op.
|
|
7204
7189
|
this.signallingService.close({
|
|
7205
7190
|
code: WSCloseCode_FORCE_CIRRUS_CLOSE,
|
|
7206
7191
|
reason: DisconnectReason.Destroy,
|
|
7207
7192
|
});
|
|
7193
|
+
this.webRtcPlayerService.closePC();
|
|
7208
7194
|
// State cleanup is reducer-driven, not effect-driven: the
|
|
7209
7195
|
// `destroyUnrealScene` reducer resets the whole UnrealState to
|
|
7210
7196
|
// initialState (cirrusConnected/viewportReady/… → false). Reducers run in
|