frontend: Refactors room feature service location

Moves the RoomFeatureService from the shared directory to the rooms domain directory.
This change improves the modularity and organization of the codebase by grouping
domain-specific services within their respective domains. It also updates
imports to reflect the new location of the service.
This commit is contained in:
CSantosM 2026-02-18 13:06:27 +01:00
parent 2df238f0cc
commit dec8307cfb
13 changed files with 124 additions and 124 deletions

View File

@ -1,9 +1,9 @@
import { computed, effect, inject, Injectable, signal } from '@angular/core';
import { MeetRoom } from 'node_modules/@openvidu-meet/typings/dist/room';
import { MeetRoom } from '@openvidu-meet/typings';
import { ParticipantService, Room, ViewportService } from 'openvidu-components-angular';
import { GlobalConfigService } from '../../../shared/services/global-config.service';
import { RoomFeatureService } from '../../../shared/services/room-feature.service';
import { SessionStorageService } from '../../../shared/services/session-storage.service';
import { RoomFeatureService } from '../../rooms/services/room-feature.service';
import { CustomParticipantModel } from '../models';
/**

View File

@ -20,12 +20,12 @@ import {
} from 'openvidu-components-angular';
import { NavigationService } from '../../../shared/services/navigation.service';
import { NotificationService } from '../../../shared/services/notification.service';
import { RoomFeatureService } from '../../../shared/services/room-feature.service';
import { SessionStorageService } from '../../../shared/services/session-storage.service';
import { SoundService } from '../../../shared/services/sound.service';
import { TokenStorageService } from '../../../shared/services/token-storage.service';
import { RecordingService } from '../../recordings/services/recording.service';
import { RoomMemberContextService } from '../../room-members/services/room-member-context.service';
import { RoomFeatureService } from '../../rooms/services/room-feature.service';
import { MeetingContextService } from './meeting-context.service';
import { MeetingWebComponentManagerService } from './meeting-webcomponent-manager.service';

View File

@ -1,6 +1,6 @@
import { Clipboard } from '@angular/cdk/clipboard';
import { inject, Injectable } from '@angular/core';
import { MeetRoom } from 'node_modules/@openvidu-meet/typings/dist/room';
import { MeetRoom } from '@openvidu-meet/typings';
import { LoggerService } from 'openvidu-components-angular';
import { HttpService } from '../../../shared/services/http.service';
import { NotificationService } from '../../../shared/services/notification.service';
@ -12,7 +12,6 @@ export class MeetingService {
protected readonly MEETINGS_API = `${HttpService.INTERNAL_API_PATH_PREFIX}/meetings`;
protected loggerService: LoggerService = inject(LoggerService);
protected notificationService = inject(NotificationService);
protected httpService: HttpService = inject(HttpService);
protected clipboard = inject(Clipboard);

View File

@ -3,5 +3,5 @@ export * from './guards';
export * from './models';
export * from './pages';
export * from './services';
export * from './utils/ui';
export * from './utils';

View File

@ -0,0 +1,106 @@
/**
* Status of captions feature based on room and global configuration
*/
export type CaptionsStatus = 'HIDDEN' | 'ENABLED' | 'DISABLED_WITH_WARNING';
/**
* Interface that defines all available features in the application
*/
export interface RoomFeatures {
/**
* Indicates if video track is enabled in the room (mutued or unmuted)
*/
videoEnabled: boolean;
/**
* Indicates if audio track is enabled in the room (muted or unmuted)
*/
audioEnabled: boolean;
/**
* Indicates if camera control is shown in the UI
*/
showCamera: boolean;
/**
* Indicates if microphone control is shown in the UI
*/
showMicrophone: boolean;
/**
* Indicates if screen share control is shown in the UI
*/
showScreenShare: boolean;
/**
* Indicates if the recording controls is shown in the UI
*/
showStartStopRecording: boolean;
/**
* Indicates if the chat panel is shown in the UI
*/
showChat: boolean;
/**
* Indicates if the virtual backgrounds feature is shown in the UI
*/
showBackgrounds: boolean;
/**
* Indicates if the participant list is shown in the UI
*/
showParticipantList: boolean;
/**
* Indicates if the settings panel is shown in the UI
*/
showSettings: boolean;
/**
* Indicates if the fullscreen control is shown in the UI
*/
showFullscreen: boolean;
/**
* Indicates if the theme selector is shown in the UI
*/
showThemeSelector: boolean;
/**
* Indicates if the flag for allowing smart layout is enabled.
*
* It's changed manually (not based on permissions or room config).
*/
showLayoutSelector: boolean;
/**
* Indicates if the captions controls (like toggle captions button) is shown in the UI
*/
showCaptionsControls: boolean;
/**
* Indicates if the captions controls are shown but disabled in the UI, with a warning that captions are globally disabled
*/
showCaptionsControlsDisabled: boolean;
/**
* Indicates if the share access links controls is shown in the UI
*/
showShareAccessLinks: boolean;
/**
* Indicates if the make moderator controls is shown in the UI
*/
showMakeModerator: boolean;
/**
* Indicates if the end meeting controls is shown in the UI
*/
showEndMeeting: boolean;
/**
* Indicates if the kick participants controls is shown in the UI
*/
showKickParticipants: boolean;
/**
* Indicates if the view recordings controls is shown in the UI
*/
showViewRecordings: boolean;
/**
* Indicates if the join meeting controls is shown in the UI
*/
showJoinMeeting: boolean;
}

View File

@ -1,2 +1,4 @@
// export * from './features.model';
export * from './room-request';
export * from './wizard.model';

View File

@ -1,2 +1,4 @@
export * from './room-feature.service';
export * from './room.service';
export * from './wizard-state.service';

View File

@ -1,10 +1,10 @@
import { computed, inject, Injectable, signal } from '@angular/core';
import { MeetAppearanceConfig, MeetRoomConfig, MeetRoomMemberPermissions } from '@openvidu-meet/typings';
import { LoggerService } from 'openvidu-components-angular';
import { RoomMemberContextService } from '../../domains/room-members/services/room-member-context.service';
import { RoomFeatures } from '../models/app.model';
import { GlobalConfigService } from '../../../shared/services/global-config.service';
import { RoomMemberContextService } from '../../room-members/services/room-member-context.service';
import { RoomFeatures } from '../models/features.model';
import { FeatureCalculator } from '../utils/features.utils';
import { GlobalConfigService } from './global-config.service';
/**
* Base configuration for features, used as a starting point before applying room-specific and user-specific configurations

View File

@ -13,8 +13,8 @@ import {
} from '@openvidu-meet/typings';
import { ILogger, LoggerService } from 'openvidu-components-angular';
import { HttpService } from '../../../shared/services/http.service';
import { RoomFeatureService } from '../../../shared/services/room-feature.service';
import { MeetRoomClientResponseOptions } from '../models/room-request';
import { RoomFeatureService } from './room-feature.service';
@Injectable({
providedIn: 'root'

View File

@ -4,7 +4,7 @@ import {
MeetRoomConfig,
MeetRoomMemberPermissions
} from '@openvidu-meet/typings';
import { CaptionsStatus, RoomFeatures } from '../models/app.model';
import { CaptionsStatus, RoomFeatures } from '../models/features.model';
// New helper class for feature calculation logic
export class FeatureCalculator {

View File

@ -0,0 +1,3 @@
export * from './features.utils';
export * from './ui';

View File

@ -13,115 +13,3 @@ export enum Edition {
CE = 'CE',
PRO = 'PRO'
}
/**
* Status of captions feature based on room and global configuration
*/
export type CaptionsStatus = 'HIDDEN' | 'ENABLED' | 'DISABLED_WITH_WARNING';
/**
* Interface that defines all available features in the application
*/
export interface RoomFeatures {
/**
* Indicates if video track is enabled in the room (mutued or unmuted)
*/
videoEnabled: boolean;
/**
* Indicates if audio track is enabled in the room (muted or unmuted)
*/
audioEnabled: boolean;
/**
* Indicates if camera control is shown in the UI
*/
showCamera: boolean;
/**
* Indicates if microphone control is shown in the UI
*/
showMicrophone: boolean;
/**
* Indicates if screen share control is shown in the UI
*/
showScreenShare: boolean;
/**
* Indicates if the recording controls is shown in the UI
*/
showStartStopRecording: boolean;
/**
* Indicates if the chat panel is shown in the UI
*/
showChat: boolean;
/**
* Indicates if the virtual backgrounds feature is shown in the UI
*/
showBackgrounds: boolean;
/**
* Indicates if the participant list is shown in the UI
*/
showParticipantList: boolean;
/**
* Indicates if the settings panel is shown in the UI
*/
showSettings: boolean;
/**
* Indicates if the fullscreen control is shown in the UI
*/
showFullscreen: boolean;
/**
* Indicates if the theme selector is shown in the UI
*/
showThemeSelector: boolean;
/**
* Indicates if the flag for allowing smart layout is enabled.
*
* It's changed manually (not based on permissions or room config).
*/
showLayoutSelector: boolean;
/**
* Status of captions feature based on room and global configuration
*/
// captionsStatus: CaptionsStatus;
/**
* Indicates if the captions controls (like toggle captions button) is shown in the UI
*/
showCaptionsControls: boolean;
/**
* Indicates if the captions controls are shown but disabled in the UI, with a warning that captions are globally disabled
*/
showCaptionsControlsDisabled: boolean;
/**
* Indicates if the share access links controls is shown in the UI
*/
showShareAccessLinks: boolean;
/**
* Indicates if the make moderator controls is shown in the UI
*/
showMakeModerator: boolean;
/**
* Indicates if the end meeting controls is shown in the UI
*/
showEndMeeting: boolean;
/**
* Indicates if the kick participants controls is shown in the UI
*/
showKickParticipants: boolean;
/**
* Indicates if the view recordings controls is shown in the UI
*/
showViewRecordings: boolean;
/**
* Indicates if the join meeting controls is shown in the UI
*/
showJoinMeeting: boolean;
}

View File

@ -7,9 +7,9 @@ export * from './http-header-provider.service';
export * from './http.service';
export * from './navigation.service';
export * from './notification.service';
export * from './room-feature.service';
export * from './runtime-config.service';
export * from './session-storage.service';
export * from './storage.service';
export * from './theme.service';
export * from './token-storage.service';