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

    Class HiyveStore

    Framework-agnostic state store for Hiyve WebRTC client.

    Exposes subscribe/getSnapshot for universal framework integration:

    • React: useSyncExternalStore
    • Vue: watch + ref
    • Svelte: readable store
    • Vanilla: direct subscribe
    Index

    Constructors

    Methods

    • Admit a user from the waiting room (owner only).

      Parameters

      • userId: string

      Returns Promise<void>

    • Connect to the active rooms SSE stream for real-time room discovery. The stream delivers snapshot, room-added, room-removed, and room-updated events.

      Parameters

      • streamUrl: string

        Full SSE endpoint URL (obtained from cloudClient.getActiveRoomsStreamUrl())

      Returns void

    • Create a no-video (offline/signaling-only) room as the owner. Connects via signaling for chat, files, whiteboard, etc. — no WebRTC media.

      Parameters

      • roomName: string
      • userId: string

      Returns Promise<void>

    • Create a new folder at the given location.

      Parameters

      • location: string
      • OptionalroomName: string

      Returns Promise<void>

    • Delete a stored room by roomName.

      Parameters

      • roomName: string
      • userId: string

      Returns Promise<boolean>

    • Delete a user file by ID.

      Parameters

      • fileId: string

      Returns Promise<void>

    • Delete a folder at the given location.

      Parameters

      • location: string

      Returns Promise<void>

    • Fetch active rooms (one-shot query for late joiners).

      Parameters

      • cloudClient: { getActiveRooms(userId?: string): Promise<ActiveRoom[]> }
      • OptionaluserId: string

      Returns Promise<ActiveRoom[]>

    • Fetch all stored rooms for a user.

      Parameters

      • userId: string
      • Optionaloptions: { consumerOnly?: boolean; enabledOnly?: boolean; offlineOnly?: boolean }

      Returns Promise<StoredRoom[]>

    • Get the streaming URLs for the current stream.

      Returns Promise<string | null>

    • Get a presigned download URL for a file.

      Parameters

      • fileId: string

      Returns Promise<string>

    • Join an existing no-video (offline/signaling-only) room as a participant. Connects via signaling for chat, files, whiteboard, etc. — no WebRTC media.

      Parameters

      • roomName: string
      • userId: string

      Returns Promise<void>

    • Join an existing room as a participant.

      Parameters

      • roomName: string
      • userId: string

      Returns Promise<void>

    • Load chat history from the server.

      Parameters

      • Optionalcursor: string | null

      Returns Promise<{ hasMore: boolean }>

    • Move a user file to a new location/folder.

      Parameters

      • fileId: string
      • newLocation: string

      Returns Promise<void>

    • Mute/unmute a remote participant's audio output locally (owner only).

      Parameters

      • userId: string
      • muted: boolean

      Returns Promise<void>

    • Reject a user from the waiting room (owner only).

      Parameters

      • userId: string

      Returns Promise<void>

    • Remotely mute/unmute a participant's audio (owner only).

      Parameters

      • userId: string
      • muted: boolean

      Returns Promise<void>

    • Remotely mute/unmute a participant's video (owner only).

      Parameters

      • userId: string
      • muted: boolean

      Returns Promise<void>

    • Remove an advertised room from discovery (owner action).

      Parameters

      • cloudClient: { removeAdvertisedRoom(roomName: string): Promise<void> }
      • roomName: string

      Returns Promise<void>

    • Rename a user file.

      Parameters

      • fileId: string
      • newFilename: string

      Returns Promise<void>

    • Invalidate the cached lightweight client so the next API call generates a fresh room token for the new user. Call this on user change / logout to prevent stale-token data leaks.

      Returns void

    • Switch the active room name for file operations on an existing no-video connection. Avoids tearing down and re-establishing the signaling connection.

      Parameters

      • roomName: string

      Returns void

    • Switch to a different microphone.

      Parameters

      • deviceId: string

      Returns Promise<void>

    • Switch to a different speaker.

      Parameters

      • deviceId: string

      Returns Promise<void>

    • Set the dominant speaker for video grid layouts (owner only).

      Parameters

      • userId: string | null

      Returns void

    • Switch to a different camera.

      Parameters

      • deviceId: string

      Returns Promise<void>

    • Share a user file with other users.

      Parameters

      • fileId: string
      • userIds: string[]
      • OptionalsharedRoom: string

      Returns Promise<void>

    • Start real-time transcription. Returns true if API call succeeded.

      Returns Promise<boolean>

    • Subscribe to all state changes. Returns unsubscribe function.

      Parameters

      • listener: () => void

      Returns () => void

    • Switch the featured user in the stream.

      Parameters

      • userId: string

      Returns Promise<void>

    • Trigger post-recording transcription and analysis on a completed recording. Unlike real-time transcription, this processes an existing recording asynchronously. Poll transcription status to track progress.

      Parameters

      • recordingId: string

      Returns Promise<boolean>

    • Update an advertised room's metadata (owner action).

      Parameters

      • cloudClient: {
            updateAdvertisedRoom(
                roomName: string,
                updates: Partial<AdvertiseRoomOptions>,
            ): Promise<void>;
        }
      • roomName: string
      • updates: Partial<AdvertiseRoomOptions>

      Returns Promise<void>

    • Update coaching data from the coaching endpoint response.

      Parameters

      • data: {
            currentTopic?: string;
            hints?: CoachingHint[];
            talkRatio?: { listening: number; speaking: number };
            topicShifts?: TopicShift[];
        }

      Returns void

    • Update application-specific metadata for a file without re-uploading content. Unlike other file mutations, this does NOT refresh the full file list to avoid disrupting the UI (re-sorting, losing selection). Callers manage local state.

      Parameters

      • fileId: string
      • appData: Record<string, unknown>

      Returns Promise<void>

    • Upload a file to the user's file storage.

      Parameters

      • file: File
      • location: string
      • OptionalresourceType: string

      Returns Promise<{ fileId: string }>