refactor: stricter domain: voice-session
This commit is contained in:
@@ -9,15 +9,20 @@ The actual mixed live-stream workspace UI lives in `features/room/voice-workspac
|
||||
```
|
||||
voice-session/
|
||||
├── application/
|
||||
│ ├── voice-session.facade.ts Tracks active voice session, drives floating controls
|
||||
│ └── voice-workspace.service.ts Workspace mode (hidden/expanded/minimized), focused stream, mini-window position
|
||||
│ ├── facades/
|
||||
│ │ └── voice-session.facade.ts Tracks active voice session, drives floating controls
|
||||
│ └── services/
|
||||
│ └── voice-workspace.service.ts Workspace mode (hidden/expanded/minimized), focused stream, mini-window position
|
||||
│
|
||||
├── domain/
|
||||
│ ├── voice-session.logic.ts isViewingVoiceSessionServer, buildVoiceSessionRoom
|
||||
│ └── voice-session.models.ts VoiceSessionInfo interface
|
||||
│ ├── logic/
|
||||
│ │ └── voice-session.logic.ts isViewingVoiceSessionServer, buildVoiceSessionRoom
|
||||
│ └── models/
|
||||
│ └── voice-session.model.ts VoiceSessionInfo interface
|
||||
│
|
||||
├── infrastructure/
|
||||
│ └── voice-settings.storage.ts Persists audio device IDs, volumes, bitrate, latency, noise reduction to localStorage
|
||||
│ └── util/
|
||||
│ └── voice-settings-storage.util.ts Persists audio device IDs, volumes, bitrate, latency, noise reduction to localStorage
|
||||
│
|
||||
├── feature/
|
||||
│ ├── voice-controls/ Full voice control panel (mic, camera, deafen, devices, screen share, settings)
|
||||
@@ -49,10 +54,10 @@ graph TD
|
||||
VSF --> Store
|
||||
VWS --> VSF
|
||||
|
||||
click VSF "application/voice-session.facade.ts" "Tracks active voice session" _blank
|
||||
click VWS "application/voice-workspace.service.ts" "Workspace mode and focused stream" _blank
|
||||
click VSS "infrastructure/voice-settings.storage.ts" "localStorage persistence for audio settings" _blank
|
||||
click Logic "domain/voice-session.logic.ts" "Pure helper functions" _blank
|
||||
click VSF "application/facades/voice-session.facade.ts" "Tracks active voice session" _blank
|
||||
click VWS "application/services/voice-workspace.service.ts" "Workspace mode and focused stream" _blank
|
||||
click VSS "infrastructure/util/voice-settings-storage.util.ts" "localStorage persistence for audio settings" _blank
|
||||
click Logic "domain/logic/voice-session.logic.ts" "Pure helper functions" _blank
|
||||
click VC "feature/voice-controls/" "Full voice control panel" _blank
|
||||
click FC "feature/floating-voice-controls/" "Minimal floating overlay" _blank
|
||||
```
|
||||
|
||||
@@ -6,9 +6,9 @@ import {
|
||||
inject
|
||||
} from '@angular/core';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { RoomsActions } from '../../../store/rooms/rooms.actions';
|
||||
import { buildVoiceSessionRoom, isViewingVoiceSessionServer } from '../domain/voice-session.logic';
|
||||
import type { VoiceSessionInfo } from '../domain/voice-session.models';
|
||||
import { RoomsActions } from '../../../../store/rooms/rooms.actions';
|
||||
import { buildVoiceSessionRoom, isViewingVoiceSessionServer } from '../../domain/logic/voice-session.logic';
|
||||
import type { VoiceSessionInfo } from '../../domain/models/voice-session.model';
|
||||
|
||||
/**
|
||||
* Tracks the user's current voice session across client-side
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
signal
|
||||
} from '@angular/core';
|
||||
|
||||
import { VoiceSessionFacade } from './voice-session.facade';
|
||||
import { VoiceSessionFacade } from '../facades/voice-session.facade';
|
||||
|
||||
export type VoiceWorkspaceMode = 'hidden' | 'expanded' | 'minimized';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Room } from '../../../shared-kernel';
|
||||
import type { VoiceSessionInfo } from './voice-session.models';
|
||||
import type { Room } from '../../../../shared-kernel';
|
||||
import type { VoiceSessionInfo } from '../models/voice-session.model';
|
||||
|
||||
export function isViewingVoiceSessionServer(
|
||||
session: VoiceSessionInfo | null,
|
||||
@@ -19,8 +19,8 @@ import {
|
||||
lucideArrowLeft
|
||||
} from '@ng-icons/lucide';
|
||||
|
||||
import { VoiceSessionFacade } from '../../application/voice-session.facade';
|
||||
import { loadVoiceSettingsFromStorage, saveVoiceSettingsToStorage } from '../../infrastructure/voice-settings.storage';
|
||||
import { VoiceSessionFacade } from '../../application/facades/voice-session.facade';
|
||||
import { loadVoiceSettingsFromStorage, saveVoiceSettingsToStorage } from '../../infrastructure/util/voice-settings-storage.util';
|
||||
import { VoiceConnectionFacade } from '../../../../domains/voice-connection';
|
||||
import { VoicePlaybackService } from '../../../../domains/voice-connection';
|
||||
import { ScreenShareFacade, ScreenShareQuality } from '../../../../domains/screen-share';
|
||||
|
||||
@@ -22,8 +22,8 @@ import {
|
||||
lucideHeadphones
|
||||
} from '@ng-icons/lucide';
|
||||
|
||||
import { VoiceSessionFacade } from '../../application/voice-session.facade';
|
||||
import { loadVoiceSettingsFromStorage, saveVoiceSettingsToStorage } from '../../infrastructure/voice-settings.storage';
|
||||
import { VoiceSessionFacade } from '../../application/facades/voice-session.facade';
|
||||
import { loadVoiceSettingsFromStorage, saveVoiceSettingsToStorage } from '../../infrastructure/util/voice-settings-storage.util';
|
||||
import { VoiceActivityService, VoiceConnectionFacade } from '../../../../domains/voice-connection';
|
||||
import { PlaybackOptions, VoicePlaybackService } from '../../../../domains/voice-connection';
|
||||
import { ScreenShareFacade, ScreenShareQuality } from '../../../../domains/screen-share';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export * from './application/voice-session.facade';
|
||||
export * from './application/voice-workspace.service';
|
||||
export * from './domain/voice-session.models';
|
||||
export * from './infrastructure/voice-settings.storage';
|
||||
export * from './application/facades/voice-session.facade';
|
||||
export * from './application/services/voice-workspace.service';
|
||||
export * from './domain/models/voice-session.model';
|
||||
export * from './infrastructure/util/voice-settings-storage.util';
|
||||
|
||||
// Feature components
|
||||
export { VoiceControlsComponent } from './feature/voice-controls/voice-controls.component';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { STORAGE_KEY_VOICE_SETTINGS } from '../../../core/constants';
|
||||
import { STORAGE_KEY_VOICE_SETTINGS } from '../../../../core/constants';
|
||||
import {
|
||||
DEFAULT_LATENCY_PROFILE,
|
||||
DEFAULT_SCREEN_SHARE_QUALITY,
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
SCREEN_SHARE_QUALITIES,
|
||||
type LatencyProfile,
|
||||
type ScreenShareQuality
|
||||
} from '../../../shared-kernel';
|
||||
} from '../../../../shared-kernel';
|
||||
|
||||
export interface VoiceSettings {
|
||||
inputDevice: string;
|
||||
Reference in New Issue
Block a user