@@ -54,19 +54,21 @@ import {
5454 useToggleCamera , useToggleLayout , useToggleMicrophone
5555} from " ../composable/conferenceActions.ts" ;
5656import {useClickSidebarButton , useModal } from " ../composable/ui.ts" ;
57- import {useThrottleFn } from " @vueuse/core" ;
57+ import {useColorMode , useThrottleFn } from " @vueuse/core" ;
5858import {defineShortcuts2 as defineShortcuts } from " ../composable/nuxtui/defineShortcuts2.ts" ;
5959import {type HxComponentDescriptor , useExtensions } from " ../composable/useExtensions.ts" ;
6060import {type HxHandler , type HxEvent , useEvents } from " ../composable/useEvents.ts" ;
6161
6262const { hideSidebar } = useUIState ();
6363const {closeAllModals} = useModal ()
64+ const colorMode = useColorMode ()
6465
6566export interface HxMeetingProps {
6667 livekitUrl: string ,
6768 livekitToken: string ,
6869 extensions? : Record <string , string | Ref | HxComponentDescriptor >;
6970 events? : Partial <Record <HxEvent , HxHandler >>;
71+ colorMode? : ' light' | ' dark' | ' auto' ;
7072}
7173const props = defineProps <HxMeetingProps >()
7274
@@ -88,6 +90,12 @@ watch(() => props.events, (events) => {
8890 for (const [name, item] of Object .entries (events )) on (name as HxEvent , item );
8991}, { immediate: true , deep: true });
9092
93+ watch (() => props .colorMode , () => {
94+ if (props .colorMode !== undefined ) {
95+ colorMode .value = props .colorMode
96+ }
97+ }, { immediate: true });
98+
9199onBeforeMount (() => {
92100 provideLivekitConfig (
93101 props .livekitUrl ,
0 commit comments