Hiyve Components - v1.0.0
    Preparing search index...

    Module @hiyve/react

    @hiyve/react - React bindings for the Hiyve SDK core state store.

    This package provides React hooks that efficiently track state changes from the @hiyve/core HiyveStore. Each hook re-renders only when its relevant data changes.

    @hiyve/react

    React bindings for the Hiyve SDK. Provides a provider component, hooks for connection, room, media, participants, recording, intelligence, presence, and more, plus optional cloud integration for building video conferencing applications with React 18+.

    npx @hiyve/cli login
    npm install @hiyve/react @hiyve/core @hiyve/rtc-client

    To use cloud features (AI, room discovery, meeting intelligence), also install:

    npm install @hiyve/cloud
    
    import { HiyveProvider, useConnection, useRoom, useParticipants, useLocalMedia } from '@hiyve/react';

    function App() {
    return (
    <HiyveProvider>
    <VideoRoom />
    </HiyveProvider>
    );
    }

    function VideoRoom() {
    const { joinRoom, isConnecting, error } = useConnection();
    const { room, isInRoom, isOwner } = useRoom();
    const { participants, participantCount } = useParticipants();
    const { isAudioMuted, isVideoMuted, toggleAudio, toggleVideo } = useLocalMedia();

    if (!isInRoom) {
    return (
    <button onClick={() => joinRoom('my-room', 'user-123')} disabled={isConnecting}>
    {isConnecting ? 'Joining...' : 'Join Room'}
    </button>
    );
    }

    return (
    <div>
    <h1>{room?.name} ({participantCount} participants)</h1>
    <button onClick={toggleAudio}>{isAudioMuted ? 'Unmute' : 'Mute'}</button>
    <button onClick={toggleVideo}>{isVideoMuted ? 'Camera On' : 'Camera Off'}</button>
    </div>
    );
    }

    Each hook tracks only its relevant state, so components re-render only when their data changes.

    Hook Returns
    useConnection() isConnected, isConnecting, error, createRoom, joinRoom, joinRoomWithToken, getRoomInfoFromToken, leaveRoom
    useRoom() room, isOwner, isInRoom, isNoVideo
    useNoVideoRoom() isConnected, isConnecting, error, isNoVideo, isInRoom, room, createNoVideoRoom, joinNoVideoRoom, closeNoVideoRoom, setActiveRoom
    useClient() Raw rtc-client instance (Client | null)
    Hook Returns
    useParticipants() participants (array), participantsMap, localUserId, participantCount
    useParticipant(userId) Single Participant | undefined for a specific user
    useLocalMedia() isAudioMuted, isVideoMuted, isOutputMuted, isScreenSharing, toggleAudio, toggleVideo, toggleOutputMute, startScreenShare, stopScreenShare
    useDevices() setVideoDevice, setAudioInputDevice, setAudioOutputDevice
    useRemoteMute() remoteMuteAudio, remoteMuteVideo, muteRemoteOutput
    useOutputMute() muteRemoteOutput
    Hook Returns
    useRecording() isRecording, isRecordingStarting, recordingId, recordingStartTime, responseId, error, recordingDuration, startRecording, stopRecording, clearError
    useStreaming() isStreaming, isStreamingStarting, streamingId, featuredUserId, streamingStartTime, streamingUrl, error, streamingDuration, startStreaming, stopStreaming, switchStreamingUser, getStreamingUrls, clearError
    useTranscription() isTranscribing, isTranscriptionStarting, transcriptions, startTranscription, stopTranscription, enrichTranscription
    Hook Returns
    useChat() messages, unreadCount, sendMessage, sendDataMessage, clearUnread, loadChatHistory
    useWaitingRoom() waitingUsers, isWaitingForAdmission, wasRejected, admitUser, rejectUser
    useWaitForHost() isWaiting, roomName, timeout, elapsedTime
    useAiChat() messages, setMessages
    Hook Returns
    useIntelligenceStream() isActive, coachingEnabled, coachingVariant, hints, allHints, talkRatio, currentTopic, topicShifts, enableCoaching, disableCoaching, updateCoachingData, dismissHint
    Hook Returns
    useLayout() dominantSpeaker, setDominant
    useHandRaise() raisedHands, isHandRaised, raisedHandCount, toggleHandRaised, lowerAllHands
    useAudioProcessing() feedbackDetected, audioValidation, gainNode, audioInputMonitor, setGain
    Hook Returns
    useStoredRooms() rooms, isLoading, error, lastFetchedAt, fetchStoredRooms, addStoredRoom, updateStoredRoom, deleteStoredRoom, getStoredRoom, clearError, clearStoredRooms
    useUserFiles() files, isLoading, error, lastFetchedAt, fetchUserFiles, deleteFile, renameFile, moveFile, shareFile, createFolder, deleteFolder, getFileUrl, uploadFile, clearError
    usePublicFiles({ userId, brandOrgId?, enabled? }) files, isLoading, error, refresh, copyToPrivate — role-gated public file pool. See FileManager public-files docs
    useActiveRooms() rooms, isConnected, isLoading, error, connectActiveRooms, disconnectActiveRooms, fetchActiveRooms, advertiseRoom, removeAdvertisedRoom, updateAdvertisedRoom, clearError
    Hook Returns
    useJoinToken(options) Token validation, room info, password handling, auto-join
    Hook Returns
    useRoomFlow() screen ('lobby' | 'connecting' | 'waiting-for-host' | 'waiting-room' | 'waiting-room-rejected' | 'in-room'), isConnecting, isInRoom
    Hook Returns
    useAdditionalCameras(options) cameras, addCamera, removeCamera, removeAll, ghostUserIds, isGhostCamera, getLabel
    useRemoteCamera(options) startPairing, disconnect, qrUrl, status, ghostUserId, error, isExpired
    Hook Returns
    useOrphanedRooms(onError?) orphanedRooms, loading, closeRoom, refresh -- detects active rooms owned by the current user that may have been left running
    useRoomFileStats(roomName, userId, participantCount?, monthRange?) RoomFileStats -- aggregated file statistics for a room (file count, recording count, monthly activity, recent files)
    useRoomStats(roomName, options?) RoomStats -- extends useRoomFileStats with consumer-provided server-side session data (sessions, minutes, unique participants, transcription/composition counts, monthly session activity)
    useNavigationGuard(options) dialogOpen, confirm, cancel, dismiss -- prevents accidental navigation away from a page (e.g. an active meeting)
    useOnlineUsers(callerProfileId, matchConfig, pollInterval?, onError?) onlineUserIds (Set), isLoading -- polls the Cloud presence API to detect which users are currently online
    Hook Returns
    useCloudClient() CloudClient | null -- the cloud client from HiyveProvider, or null if no cloud auth was configured
    useUserChat() conversations, activeRoomName, activeMessages, isLoading, isLoadingHistory, error, nextCursor, fetchConversations, fetchHistory, sendMessage, setActiveConversation, loadMore

    Manages global chat conversations via the cloud service. Fetches conversation lists, loads message history with cursor-based pagination, sends messages with optimistic updates, and subscribes to real-time message delivery when a conversation is active.

    import { useUserChat } from '@hiyve/react';

    function ChatView({ userId }: { userId: string }) {
    const {
    conversations,
    activeMessages,
    isLoading,
    isLoadingHistory,
    nextCursor,
    fetchConversations,
    setActiveConversation,
    fetchHistory,
    sendMessage,
    loadMore,
    } = useUserChat();

    useEffect(() => {
    fetchConversations(userId);
    }, [userId, fetchConversations]);

    return (
    <div>
    {conversations.map((c) => (
    <button key={c.roomName} onClick={() => {
    setActiveConversation(c.roomName);
    fetchHistory(c.roomName);
    }}>
    {c.roomName}
    </button>
    ))}
    {activeMessages.map((m) => (
    <p key={m.id}>{m.userId}: {m.content}</p>
    ))}
    {nextCursor && <button onClick={loadMore} disabled={isLoadingHistory}>Load older</button>}
    </div>
    );
    }

    Manages additional camera feeds that join as separate ghost participants. Each camera creates an independent WebRTC connection, so the feed appears automatically in recordings and live streams.

    import { useAdditionalCameras } from '@hiyve/react';

    function CameraManager() {
    const { cameras, addCamera, removeCamera, removeAll } = useAdditionalCameras({
    roomName: 'my-room',
    ownerUserId: 'user@example.com',
    generateRoomToken: async () => {
    const res = await fetch('/api/generate-room-token', { method: 'POST' });
    const data = await res.json();
    return data.roomToken;
    },
    enabled: true,
    });

    return (
    <div>
    <button onClick={() => addCamera('device-id-123', 'Document Camera')}>Add Camera</button>
    {cameras.map((cam) => (
    <div key={cam.id}>
    {cam.label} - {cam.isActive ? 'Active' : cam.isConnecting ? 'Connecting...' : 'Error'}
    <button onClick={() => removeCamera(cam.id)}>Remove</button>
    </div>
    ))}
    </div>
    );
    }

    Options (UseAdditionalCamerasOptions):

    Option Type Default Description
    roomName string -- Room name to join ghost cameras into
    ownerUserId string -- Owner's userId (used to build ghost camera userIds)
    generateRoomToken () => Promise<string> -- Async function that returns a room token for the ghost client
    enabled boolean true Whether the hook is enabled
    onError (error: Error, cameraId: string) => void -- Callback when an error occurs

    Returns (UseAdditionalCamerasReturn):

    Property Type Description
    cameras AdditionalCamera[] List of all additional cameras (connecting, active, or errored)
    addCamera (deviceId: string, label?: string) => Promise<void> Add a new camera by device ID
    removeCamera (id: string) => Promise<void> Remove a specific camera by instance ID
    removeAll () => Promise<void> Remove all additional cameras
    ghostUserIds Set<string> Set of active ghost camera userIds
    isGhostCamera (userId: string) => boolean Check if a userId is a ghost camera
    getLabel (userId: string) => string | null Get the display label for a ghost camera userId

    Manages pairing a remote device (e.g., a phone) as an additional camera feed via QR code. The remote device joins the room as a ghost participant using a time-limited join token.

    import { useRemoteCamera } from '@hiyve/react';

    function RemoteCameraPairing() {
    const { startPairing, disconnect, qrUrl, status, isExpired } = useRemoteCamera({
    roomName: 'my-room',
    ownerUserId: 'user@example.com',
    enabled: true,
    });

    if (status === 'connected') {
    return <button onClick={disconnect}>Disconnect Phone Camera</button>;
    }

    return (
    <div>
    <button onClick={startPairing}>Pair Phone Camera</button>
    {qrUrl && <img src={`https://api.qrserver.com/v1/create-qr-code/?data=${encodeURIComponent(qrUrl)}`} alt="QR Code" />}
    {isExpired && <p>Link expired. Tap to generate a new one.</p>}
    </div>
    );
    }

    Options (UseRemoteCameraOptions):

    Option Type Default Description
    roomName string -- Room name to pair the remote camera into
    ownerUserId string -- Owner's userId
    baseUrl string window.location.origin Base URL for the QR code link
    joinPath string '/camera' Path for the camera page
    expiresIn number 300 Token expiry in seconds
    label string 'Phone' Label for the ghost camera
    enabled boolean true Whether the hook is enabled

    Returns (UseRemoteCameraReturn):

    Property Type Description
    startPairing () => Promise<void> Initiate pairing (generates join token and QR URL)
    disconnect () => void Disconnect the remote camera
    qrUrl string | null URL to display as a QR code
    status 'idle' | 'waiting' | 'connected' | 'error' Current pairing status
    ghostUserId string | null Ghost userId for the remote camera
    error string | null Error message if pairing failed
    isExpired boolean Whether the current token has expired

    Utility functions for working with ghost camera participant IDs. Re-exported from @hiyve/core.

    Export Type Description
    GHOST_CAMERA_DELIMITER string The delimiter used in ghost camera userIds ('__cam__')
    isGhostCamera(userId) (userId: string) => boolean Returns true if the userId belongs to a ghost camera participant
    getGhostCameraLabel(userId) (userId: string) => string | null Extracts the human-readable label from a ghost camera userId
    getGhostCameraOwner(userId) (userId: string) => string | null Extracts the owner's userId from a ghost camera userId
    buildGhostCameraUserId(ownerUserId, label) (ownerUserId: string, label: string) => string Builds a ghost camera userId from the owner's userId and a label

    HiyveProvider is the recommended provider. It accepts all HiyveStoreOptions plus optional cloud configuration:

    Prop Type Default Description
    generateRoomToken () => Promise<string> auto Returns a Hiyve room token. Defaults to POST /api/generate-room-token when using @hiyve/admin server middleware
    localVideoElementId string 'local-video' ID of the local video element
    connectOptions { videoDeviceId?, audioDeviceId? } {} Initial device IDs
    persistDeviceChanges boolean false Persist device selections across sessions
    onError (error: Error) => void - Error callback
    generateCloudToken (params: GenerateCloudTokenParams) => Promise<string | CloudTokenResponse> auto Returns a short-lived cloud token. Receives { userId } so the callback can forward it to the backend. Defaults to POST /api/generate-cloud-token when using @hiyve/admin server middleware
    cloudToken string - Static cloud token. Use generateCloudToken instead for auto-refresh
    cloudEnvironment 'production' | 'development' 'production' Cloud API environment
    cloudBaseUrl string - Override the cloud API base URL
    presence boolean | { intervalMs?: number } - Enable automatic presence heartbeat. When true, the cloud client signals the server that the current user is online

    Both room tokens and cloud tokens are generated automatically when your server uses @hiyve/admin middleware. HiyveProvider calls POST /api/generate-room-token and POST /api/generate-cloud-token by default -- no props needed.

    // Zero-config -- room and cloud tokens are generated automatically
    <HiyveProvider>
    <App />
    </HiyveProvider>

    You can still pass custom generators or static tokens to override the defaults:

    // Custom token generators (override the defaults)
    <HiyveProvider
    generateRoomToken={myCustomRoomTokenGenerator}
    generateCloudToken={myCustomCloudTokenGenerator}
    >
    <App />
    </HiyveProvider>

    A stable CloudClient instance is available to all child components via useCloudClient():

    import { useCloudClient } from '@hiyve/react';

    function MyComponent() {
    const cloudClient = useCloudClient();

    if (!cloudClient) return <p>Cloud not configured</p>;

    // Use cloudClient for AI queries, room discovery, etc.
    }

    When used alongside @hiyve/react-identity, the IdentityProvider automatically provides the authenticated user's email to cloud services and the HiyveProvider. This allows cloud tokens to be generated for the correct user without passing userId manually.

    import { useIdentityEmail } from '@hiyve/react';

    function Header() {
    const email = useIdentityEmail();
    return email ? <span>Signed in as {email}</span> : null;
    }
    Hook Returns Description
    useIdentityEmail() string | null Authenticated identity user's email, or null

    For custom integrations, access the HiyveStore directly:

    import { useStore } from '@hiyve/react';

    function CustomComponent() {
    const store = useStore();
    // Access store methods for custom integrations
    }

    All core state types are re-exported from @hiyve/core for convenience. The full set of types available from @hiyve/react:

    Type Description
    HiyveStoreState Full state shape of the store
    HiyveStoreOptions Options accepted by the store / HiyveProvider
    SliceName Union of all slice names
    Type Description
    ConnectionState Connection slice state
    RoomState Room slice state
    RoomInfo Room metadata returned by the signaling server
    CreateRoomOptions Options for createRoom()
    JoinRoomWithTokenOptions Options for joinRoomWithToken()
    GetRoomInfoFromTokenOptions Options for getRoomInfoFromToken()
    RoomInfoFromToken Room info returned from a join token
    Type Description
    Participant Per-participant state
    ParticipantsState Participants slice state
    LocalMediaState Local audio/video/screen-share state
    Type Description
    RecordingOptions Options for startRecording()
    RecordingState Recording slice state
    StreamingOptions Options for startStreaming()
    StreamingState Streaming slice state
    TranscriptionEntry Single transcription line
    TranscriptionMoodData Mood/sentiment data attached to a transcription
    TranscriptionState Transcription slice state
    Type Description
    ChatMessage A single chat message
    ChatState Chat slice state
    WaitingRoomUser A user waiting to be admitted
    WaitingRoomState Waiting room slice state
    WaitForHostState Wait-for-host slice state
    AiChatMessage A single AI chat message
    Type Description
    AudioValidation Audio validation result
    AudioProcessingState Audio processing slice state
    LayoutState Layout slice state
    HandRaiseState Hand raise slice state
    Type Description
    CoachingHint A single coaching hint
    TopicShift A detected topic shift
    CoachingVariant Coaching variant identifier
    IntelligenceState Intelligence slice state
    Type Description
    FileUploadOptions Options for uploadFile()
    FileUploadResult Result of an upload
    FileModifyOptions Options for renaming, moving, or modifying a file
    FileClient File client interface
    FileShareEntry Share entry for a file
    UserFile A single user file
    UserFilesState User files slice state
    TabsFeatureConfig Resolved tabs feature configuration
    StoredRoom A stored room
    StoredRoomTabsConfig Tabs configuration on a stored room
    StoredRoomUpdates Updatable fields on a stored room
    CreateStoredRoomOptions Options for creating a stored room
    StoredRoomsState Stored rooms slice state
    Type Description
    ActiveRoom A currently active (advertised) room
    AdvertiseRoomOptions Options for advertising a room
    ActiveRoomsState Active rooms slice state
    Type Description
    ClientState Underlying RTC client slice state
    ClientActions Available client actions
    ClientContextValue Combined client state and actions
    Type Description
    JoinTokenErrorCode Union of join token error code strings
    JoinTokenError Error class thrown for join token failures
    Type Description
    UserChatMessage Message returned from useUserChat
    RoomFlowScreen Screen state returned by useRoomFlow
    UseRoomFlowReturn Full return shape of useRoomFlow
    UseJoinTokenState State returned by useJoinToken
    UseJoinTokenActions Actions returned by useJoinToken
    UseJoinTokenOptions Options accepted by useJoinToken
    AdditionalCamera A single additional camera entry
    UseAdditionalCamerasOptions Options for useAdditionalCameras
    UseAdditionalCamerasReturn Return shape of useAdditionalCameras
    UseRemoteCameraOptions Options for useRemoteCamera
    UseRemoteCameraReturn Return shape of useRemoteCamera
    OrphanedRoom A detected orphaned room
    UseOrphanedRoomsResult Return shape of useOrphanedRooms
    RoomFileStats Aggregated file statistics for a room
    MonthlyActivity Monthly file/recording activity bucket
    RoomStats Combined room statistics (extends RoomFileStats)
    RoomServerStats Server-side session statistics for a room
    RoomMonthlyActivity Monthly server-side session activity bucket
    UseRoomStatsOptions Options for useRoomStats
    NavigationGuardOptions Options for useNavigationGuard
    NavigationGuardResult Return shape of useNavigationGuard
    PresenceMatchConfig Match configuration for useOnlineUsers
    UseOnlineUsersResult Return shape of useOnlineUsers
    Type Description
    CloudEnvironment 'production' | 'development' — re-exported from @hiyve/cloud
    IdentityBridgeValue Value provided by the identity bridge context
    import type {
    HiyveStoreState,
    Participant,
    RoomInfo,
    ChatMessage,
    TranscriptionEntry,
    RecordingState,
    StreamingState,
    WaitingRoomUser,
    } from '@hiyve/react';

    For advanced integrations, the underlying React contexts are exported:

    Context Description
    StoreContext Holds the HiyveStore instance — consume via useStore()
    CloudClientContext Holds the CloudClient instance — consume via useCloudClient()
    IdentityBridgeContext Holds identity info bridged from IdentityProvider — consume via useIdentityEmail()

    Join token error codes, re-exported from @hiyve/core:

    Constant Value Description
    TOKEN_NOT_FOUND 'TOKEN_NOT_FOUND' Token does not exist (HTTP 404)
    TOKEN_EXPIRED 'TOKEN_EXPIRED' Token has expired (HTTP 410)
    INVALID_PASSWORD 'INVALID_PASSWORD' Incorrect room password (HTTP 401)
    USER_NOT_AUTHORIZED 'USER_NOT_AUTHORIZED' User is not allowed to join via this token (HTTP 403)
    ROOM_NOT_ACTIVE 'ROOM_NOT_ACTIVE' Room is not active yet (HTTP 503)
    Function Description
    resolveTabsConfig(config, mode) Resolves a StoredRoomTabsConfig into a flat TabsFeatureConfig for 'offline' or 'live' mode. Handles structured, legacy flat, and null configs. Re-exported from @hiyve/core.
    cleanUserId(userId) Sanitizes a user ID string for use with the signaling server. Re-exported from @hiyve/rtc-client.
    userIdsMatch(a, b) Compare two user IDs for equality. Use this instead of === whenever comparing a stored userId (from file content, database, or appData) with a runtime userId from useParticipants.
    • React 18+
    • @hiyve/core and @hiyve/rtc-client as peer dependencies
    • @hiyve/cloud as optional peer dependency (for cloud features)
    • @hiyve/core -- Framework-agnostic state store (works with React, Angular, Vue, or any framework)
    • @hiyve/react-ui -- Pre-built UI components (video tile, video grid, control bar, sidebar)
    • @hiyve/react-capture -- Recording, streaming, and transcription components
    • @hiyve/react-collaboration -- Chat, polls, Q&A, and file manager components
    • @hiyve/react-intelligence -- AI assistant, meeting summary, alerts, and sentiment
    • @hiyve/react-notes -- Collaborative meeting notes
    • @hiyve/react-whiteboard -- Collaborative whiteboard

    Proprietary - Hiyve SDK

    Connection

    CreateRoomOptions
    GetRoomInfoFromTokenOptions
    JoinRoomWithTokenOptions
    RoomInfoFromToken

    Context Types

    ClientActions
    ClientContextValue
    ClientState

    Core Types

    AiChatMessage
    AudioValidation
    ChatMessage
    CoachingHint
    Participant
    RecordingOptions
    RoomInfo
    StreamingOptions
    TopicShift
    TranscriptionEntry
    TranscriptionMoodData
    WaitingRoomUser
    CoachingVariant

    File Types

    FileModifyOptions
    FileShareEntry
    FileUploadOptions
    FileUploadResult
    UserFile
    UserFilesState

    Hooks

    useActiveRooms
    useAiChat
    useAudioProcessing
    useChat
    useClient
    useConnection
    useDevices
    useHandRaise
    useJoinToken
    useLayout
    useLocalMedia
    useNoVideoRoom
    useOutputMute
    useParticipant
    useParticipants
    usePublicFiles
    useRecording
    useRemoteMute
    useRoom
    useStoredRooms
    useStreaming
    useTranscription
    useUserChat
    useUserFiles
    useWaitForHost
    useWaitingRoom

    Other

    ActiveRoom
    ActiveRoomsState
    AdditionalCamera
    AdvertiseRoomOptions
    CreateStoredRoomOptions
    FileClient
    HiyveProviderProps
    HiyveStoreOptions
    HiyveStoreState
    IdentityBridgeValue
    JoinRoomOptions
    JoinTokenError
    MonthlyActivity
    OrphanedRoom
    PresenceMatchConfig
    RoomFileStats
    RoomMonthlyActivity
    RoomServerStats
    RoomStats
    StoredRoom
    StoredRoomsState
    StoredRoomTabsConfig
    StoredRoomUpdates
    TabsFeatureConfig
    UseAdditionalCamerasOptions
    UseAdditionalCamerasReturn
    UseJoinTokenActions
    UseJoinTokenOptions
    UseJoinTokenState
    UseMediaPassthroughBridgeOptions
    UseOnlineUsersResult
    UseOrphanedRoomsResult
    UserChatMessage
    UseRemoteCameraOptions
    UseRemoteCameraReturn
    UseRoomFlowReturn
    UseRoomStatsOptions
    CloudEnvironment
    JoinTokenErrorCode
    RoomFlowScreen
    SliceName
    CloudClientContext
    GHOST_CAMERA_DELIMITER
    IdentityBridgeContext
    INVALID_PASSWORD
    ROOM_NOT_ACTIVE
    StoreContext
    TOKEN_EXPIRED
    TOKEN_NOT_FOUND
    USER_NOT_AUTHORIZED
    buildGhostCameraUserId
    cleanUserId
    getGhostCameraLabel
    getGhostCameraOwner
    HiyveProvider
    isGhostCamera
    resolveTabsConfig
    useAdditionalCameras
    useCloudClient
    useIdentityEmail
    useIntelligenceStream
    useMediaPassthroughBridge
    useNavigationGuard
    useOnlineUsers
    useOrphanedRooms
    useRemoteCamera
    userIdsMatch
    useRoomFileStats
    useRoomFlow
    useRoomStats
    useStore

    State Types

    AudioProcessingState
    ChatState
    ConnectionState
    HandRaiseState
    IntelligenceState
    LayoutState
    LocalMediaState
    ParticipantsState
    RecordingState
    RoomState
    StreamingState
    TranscriptionState
    WaitForHostState
    WaitingRoomState