diff --git a/frontend/projects/shared-meet-components/src/lib/pages/meeting/meeting.component.ts b/frontend/projects/shared-meet-components/src/lib/pages/meeting/meeting.component.ts index ad87652..dad1acd 100644 --- a/frontend/projects/shared-meet-components/src/lib/pages/meeting/meeting.component.ts +++ b/frontend/projects/shared-meet-components/src/lib/pages/meeting/meeting.component.ts @@ -48,6 +48,7 @@ import { DataPacket_Kind, OpenViduComponentsUiModule, OpenViduService, + OpenViduThemeMode, OpenViduThemeService, ParticipantLeftEvent, ParticipantLeftReason, @@ -135,9 +136,10 @@ export class MeetingComponent implements OnInit { this.features = this.featureConfService.features; // Change theme variables when custom theme is enabled - effect(async () => { + effect(() => { if (this.features().hasCustomTheme) { const theme = this.features().themeConfig; + this.ovThemeService.setTheme(theme!.baseTheme as unknown as OpenViduThemeMode); this.ovThemeService.updateThemeVariables({ '--ov-primary-action-color': theme?.primaryColor, '--ov-secondary-action-color': theme?.secondaryColor, diff --git a/frontend/projects/shared-meet-components/src/lib/services/feature-configuration.service.ts b/frontend/projects/shared-meet-components/src/lib/services/feature-configuration.service.ts index 14342cf..d60d6cb 100644 --- a/frontend/projects/shared-meet-components/src/lib/services/feature-configuration.service.ts +++ b/frontend/projects/shared-meet-components/src/lib/services/feature-configuration.service.ts @@ -2,6 +2,7 @@ import { computed, Injectable, signal } from '@angular/core'; import { MeetAppearanceConfig, MeetRoomConfig, + MeetRoomTheme, ParticipantPermissions, ParticipantRole, RecordingPermissions, @@ -36,12 +37,7 @@ export interface ApplicationFeatures { // Appearance hasCustomTheme: boolean; - themeConfig?: { - primaryColor?: string; - secondaryColor?: string; - backgroundColor?: string; - surfaceColor?: string; - }; + themeConfig?: MeetRoomTheme; } /** @@ -204,12 +200,7 @@ export class FeatureConfigurationService { features.showThemeSelector = !hasEnabledTheme; if (hasEnabledTheme) { - features.themeConfig = { - primaryColor: theme.primaryColor, - secondaryColor: theme.secondaryColor, - backgroundColor: theme.backgroundColor, - surfaceColor: theme.surfaceColor - }; + features.themeConfig = theme; } }