diff --git a/src/lib/store/rooms/roomsSelectors.ts b/src/lib/store/rooms/roomsSelectors.ts index a14a977..5c8cb52 100644 --- a/src/lib/store/rooms/roomsSelectors.ts +++ b/src/lib/store/rooms/roomsSelectors.ts @@ -40,6 +40,13 @@ export const useRoomDestinations = (roomKey: string) => : undefined ); +export const useRoomDestinationList = (roomKey: string) => + useAppSelector((state) => + state.rooms[roomKey] + ? state.rooms[roomKey]?.configuration?.destinationList + : undefined + ); + export const useRoomEnvironmentalDevices = (roomKey: string) => useAppSelector((state) => state.rooms[roomKey] @@ -49,15 +56,15 @@ export const useRoomEnvironmentalDevices = (roomKey: string) => export const useRoomProgramAudioDestinationKey = (roomKey: string) => useAppSelector((state) => - state.rooms[roomKey] - ? state.rooms[roomKey]?.configuration?.destinations["programAudio"] - : undefined + state.rooms[roomKey]?.configuration?.destinationList["programAudio"] + ? state.rooms[roomKey]?.configuration?.destinationList["programAudio"]?.sinkKey + : state.rooms[roomKey]?.configuration?.destinationList["defaultDisplay"]?.sinkKey || "" ); export const useRoomCodecContentDestinationKey = (roomKey: string) => useAppSelector((state) => state.rooms[roomKey] - ? state.rooms[roomKey]?.configuration?.destinations["codecContent"] + ? state.rooms[roomKey]?.configuration?.destinationList["codecContent"]?.sinkKey : undefined ); diff --git a/src/lib/types/state/DestinationListItem.ts b/src/lib/types/state/DestinationListItem.ts new file mode 100644 index 0000000..bfb5d6a --- /dev/null +++ b/src/lib/types/state/DestinationListItem.ts @@ -0,0 +1,14 @@ +import { SignalType } from 'src/lib/shared'; + + +export interface DestinationListItem { + sinkKey: string; + preferredName: string; + name: string; + includeInDestinationList: boolean; + order: number; + surfaceLocation: number; + vertialLocation: number; + horizontalLocation: number; + sinkType: SignalType; +} \ No newline at end of file diff --git a/src/lib/types/state/state/RoomState.ts b/src/lib/types/state/state/RoomState.ts index 83e5afb..f61033b 100644 --- a/src/lib/types/state/state/RoomState.ts +++ b/src/lib/types/state/state/RoomState.ts @@ -1,5 +1,6 @@ /* eslint-disable max-classes-per-file */ +import { DestinationListItem } from '../DestinationListItem'; import { SourceListItem } from '../sourceListItem'; import { Volume } from '../volume/volume'; import { DeviceState } from './DeviceState'; @@ -26,6 +27,7 @@ export interface RoomConfiguration { defaultDisplayKey?: string; defaultPresentationSourceKey: string; destinations: Record; + destinationList: Record; environmentalDevices: EnvironmentalDeviceConfiguration[]; hasAudioConferencing?: boolean; hasEnvironmentalControls?: boolean;