frontend: reorder RoomFeature properties
This commit is contained in:
parent
c00c255533
commit
92b96f9a34
@ -65,14 +65,10 @@ export class MeetingContextService {
|
||||
return local ? [local, ...remotes] : remotes;
|
||||
});
|
||||
|
||||
/**
|
||||
* Computed signal for meeting features
|
||||
*/
|
||||
readonly meetingUI = computed(() => this.roomFeatureService.features());
|
||||
/**
|
||||
* Computed signal for room appearance configuration from global settings
|
||||
*/
|
||||
readonly meetingAppearance = computed(() => this.globalConfigService.roomAppearanceConfig());
|
||||
/** Readonly signal for meeting features */
|
||||
readonly meetingUI = this.roomFeatureService.features;
|
||||
/** Readonly signal for room appearance configuration from global settings */
|
||||
readonly meetingAppearance = this.globalConfigService.roomAppearanceConfig;
|
||||
|
||||
/** Readonly signal for whether the device is mobile */
|
||||
readonly isMobile = this.viewportService.isMobile;
|
||||
|
||||
@ -10,11 +10,11 @@ import { NotificationService } from '../../../shared/services/notification.servi
|
||||
})
|
||||
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);
|
||||
|
||||
protected httpService = inject(HttpService);
|
||||
protected notificationService = inject(NotificationService);
|
||||
protected clipboard = inject(Clipboard);
|
||||
protected loggerService = inject(LoggerService);
|
||||
protected log = this.loggerService.get('OpenVidu Meet - MeetingService');
|
||||
|
||||
/**
|
||||
|
||||
@ -4,4 +4,3 @@ export * from './models';
|
||||
export * from './pages';
|
||||
export * from './services';
|
||||
export * from './utils';
|
||||
|
||||
|
||||
@ -20,12 +20,10 @@ export interface RoomFeatures {
|
||||
* 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
|
||||
*/
|
||||
@ -35,41 +33,19 @@ export interface RoomFeatures {
|
||||
* Indicates if the recording controls is shown in the UI
|
||||
*/
|
||||
showStartStopRecording: boolean;
|
||||
|
||||
/**
|
||||
* Indicates if the chat panel is shown in the UI
|
||||
* Indicates if the view recordings controls 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;
|
||||
showViewRecordings: boolean;
|
||||
|
||||
/**
|
||||
* Indicates if the fullscreen control is shown in the UI
|
||||
*/
|
||||
showFullscreen: boolean;
|
||||
|
||||
/**
|
||||
* Indicates if the theme selector is shown in the UI
|
||||
* Indicates if the virtual backgrounds feature 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;
|
||||
showBackgrounds: boolean;
|
||||
/**
|
||||
* Indicates if the captions controls (like toggle captions button) is shown in the UI
|
||||
*/
|
||||
@ -79,26 +55,47 @@ export interface RoomFeatures {
|
||||
*/
|
||||
showCaptionsControlsDisabled: boolean;
|
||||
|
||||
/**
|
||||
* Indicates if the chat panel is shown in the UI
|
||||
*/
|
||||
showChat: 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 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 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 make moderator controls is shown in the UI
|
||||
*/
|
||||
showMakeModerator: 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
|
||||
*/
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// export * from './features.model';
|
||||
export * from './features.model';
|
||||
export * from './room-request';
|
||||
export * from './wizard.model';
|
||||
|
||||
|
||||
@ -16,25 +16,26 @@ const DEFAULT_FEATURES: RoomFeatures = {
|
||||
showMicrophone: true,
|
||||
showScreenShare: true,
|
||||
showStartStopRecording: true,
|
||||
showChat: true,
|
||||
showBackgrounds: true,
|
||||
showParticipantList: true,
|
||||
showSettings: true,
|
||||
showViewRecordings: true,
|
||||
showFullscreen: true,
|
||||
showThemeSelector: true,
|
||||
showLayoutSelector: true,
|
||||
showBackgrounds: true,
|
||||
showCaptionsControls: true,
|
||||
showCaptionsControlsDisabled: false,
|
||||
showShareAccessLinks: true,
|
||||
showMakeModerator: false,
|
||||
showChat: true,
|
||||
showParticipantList: true,
|
||||
showSettings: true,
|
||||
showThemeSelector: true,
|
||||
showLayoutSelector: true,
|
||||
showShareAccessLinks: false,
|
||||
showEndMeeting: false,
|
||||
showMakeModerator: false,
|
||||
showKickParticipants: false,
|
||||
showViewRecordings: true,
|
||||
showJoinMeeting: true
|
||||
};
|
||||
|
||||
/**
|
||||
* Service responsible for calculating and providing the current set of enabled features in the meeting based on room configuration, participant role, permissions, and appearance settings.
|
||||
* Service responsible for calculating and providing the current set of enabled features in the meeting
|
||||
* based on room configuration, user permissions, and global settings.
|
||||
* This service acts as a single source of truth for feature availability across the app.
|
||||
*/
|
||||
@Injectable({
|
||||
|
||||
@ -6,7 +6,7 @@ import {
|
||||
} from '@openvidu-meet/typings';
|
||||
import { CaptionsStatus, RoomFeatures } from '../models/features.model';
|
||||
|
||||
// New helper class for feature calculation logic
|
||||
// Helper class for feature calculation logic
|
||||
export class FeatureCalculator {
|
||||
static applyRoomConfig(features: RoomFeatures, roomConfig: MeetRoomConfig, captionsGlobalEnabled: boolean): void {
|
||||
features.showStartStopRecording = roomConfig.recording.enabled;
|
||||
|
||||
@ -1,3 +1,2 @@
|
||||
export * from './features.utils';
|
||||
export * from './ui';
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user