import * as react from 'react'; import { ReactNode } from 'react'; import { E as EmbedTheme } from '../theme-DBX7D2y9.cjs'; export { a as applyEmbedTheme, d as decodeEmbedTheme, r as resolveEmbedThemeInput } from '../theme-DBX7D2y9.cjs'; import { S as StreamCommunityFlags } from '../types-BOCLwGDj.cjs'; type StudioRole = "moderator" | "guest"; type StudioStageStatus = "OFF_STAGE" | "REQUESTED_TO_JOIN_STAGE" | "ACCEPTED_TO_JOIN_STAGE" | "ON_STAGE"; type StudioStreamSummary = { id: string; title: string; status: string; encoderLostAt?: number | null; captionsEnabled?: boolean; /** Missing means broadcast on, so older sessions keep Go Live. */ broadcastEnabled?: boolean; recordingEnabled?: boolean; }; type StudioSession = { authToken: string; meetingId: string; role: StudioRole; guestUrl: string | null; studioControlToken?: string | null; expiresAt?: number | null; stream: StudioStreamSummary; }; type StudioWaitlistedGuest = { id: string; name: string; userId?: string; customParticipantId?: string; picture?: string | null; }; type StudioStageRequest = { userId: string; peerId: string; name: string; }; type StudioParticipantTile = { id: string; name: string; isSelf: boolean; audioEnabled: boolean; videoEnabled: boolean; screenShareEnabled: boolean; picture: string | null; userId?: string; customParticipantId?: string; stageStatus?: StudioStageStatus; pinned?: boolean; chatCanSend?: boolean; }; type StudioChatMessage = { id: string; userId: string; name: string; text: string; time: number; targetUserIds?: string[]; pinned?: boolean; isEdited?: boolean; }; type StudioLivestreamEgress = "live" | "starting"; declare function studioErrorCode(error: unknown): string | null; /** Injected by the host app. JWT mint stays outside the SDK. */ type StudioControlActions = { livestream: () => Promise; publish: () => Promise; stop: () => Promise; answerQuestion?: (input: { itemId: string; body: string; displayName?: string; picture?: string | null; }) => Promise; addPanelist?: (customParticipantId: string) => Promise; removePanelist?: (customParticipantId: string) => Promise; }; type StudioControlClientOptions = { apiUrl?: string; token: string; fetchFn?: typeof fetch; }; declare class StudioControlError extends Error { readonly status: number; readonly body: unknown; constructor(status: number, message: string, body: unknown); } declare class StudioControlClient { private token; private readonly apiUrl; private readonly fetchFn; constructor(options: StudioControlClientOptions); get currentToken(): string; private url; private request; livestream(): Promise<{ ok: true; egress: "live" | "starting"; }>; publish(): Promise<{ stream: { id: string; status: string; }; }>; stop(): Promise<{ stream: { id: string; status: string; }; }>; state(): Promise<{ stream: { id: string; title: string; status: string; }; }>; refresh(): Promise<{ studioControlToken: string; expiresAt: number; }>; answer(itemId: string, input: { body: string; displayName?: string; picture?: string | null; }): Promise<{ item: { id: string; }; }>; addPanelist(customParticipantId: string): Promise<{ ok: true; }>; removePanelist(customParticipantId: string): Promise<{ ok: true; }>; } declare function createStudioControlClient(options: StudioControlClientOptions): StudioControlClient; declare function controlActionsFromClient(client: StudioControlClient): StudioControlActions; type StudioBenchLabels = { title: string; description: string; camera: string; startCamera: string; stopCamera: string; microphone: string; startMicrophone: string; stopMicrophone: string; screen: string; startScreen: string; stopScreen: string; screenNeedsDesktop: string; laser: string; previewOnly: string; effects: string; effectNone: string; effectBlur: string; effectBlurStrong: string; effectBackgrounds: string; pickBackground: string; backgroundImageInvalid: string; effectFilters: string; effectFilterNone: string; effectFilterGrayscale: string; effectFilterSepia: string; effectFilterWarm: string; effectFilterCool: string; effectFilterBright: string; cameraDevice: string; micDevice: string; }; declare function StudioBench({ labels, cdnBase, }: { labels?: Partial; cdnBase?: string; }): react.JSX.Element; type StudioVideoFilter = "none" | "grayscale" | "sepia" | "warm" | "cool" | "bright"; type StudioVideoBackground = "none" | "blur" | "image"; type StudioVideoEffectsConfig = { background: StudioVideoBackground; blurStrength: number; imageUrl?: string; filter: StudioVideoFilter; }; type StudioDeviceKind = "audio" | "video" | "speaker"; type StudioDeviceOption = { deviceId: string; label: string; }; type StudioDevices = { audio: StudioDeviceOption[]; video: StudioDeviceOption[]; speaker: StudioDeviceOption[]; }; type StudioVideoKind = "camera" | "screen"; type StudioHostMediaKind = "audio" | "video" | "screen"; type StudioScreenSharePermission = "ALLOWED" | "NOT_ALLOWED" | "CAN_REQUEST"; type StudioConnectionState = "joined" | "waitlisted" | "connecting" | "failed"; type StudioBroadcast = { type: "host-media"; kind: StudioHostMediaKind; } | { type: "share-request"; participantId: string; name: string; } | { type: "share-response"; participantId: string; granted: boolean; } | { type: "display-name"; participantId: string; name: string; }; type StudioBroadcastTarget = { participantIds: string[]; } | { presetNames: string[]; }; type StudioMeetingHandle = { join: () => Promise; leave: () => Promise; setAudioEnabled: (enabled: boolean) => Promise; setVideoEnabled: (enabled: boolean) => Promise; setScreenShareEnabled: (enabled: boolean) => Promise; admit: (participantId: string) => Promise; deny: (participantId: string) => Promise; kick: (participantId: string) => Promise; disableParticipantMedia: (participantId: string, kind: StudioHostMediaKind) => Promise; sendBroadcast: (message: StudioBroadcast, target?: StudioBroadcastTarget) => Promise; subscribeBroadcast: (cb: (message: StudioBroadcast) => void) => () => void; admitAs: (participantId: string, as: "panelist" | "audience") => Promise; admitAll: (as: "panelist" | "audience") => Promise; setStageAccess: (userId: string, on: boolean) => Promise; denyStageAccess: (userId: string) => Promise; requestStageAccess: () => Promise; joinStage: () => Promise; leaveStage: () => Promise; stageStatus: () => StudioStageStatus; stageRequests: () => StudioStageRequest[]; subscribeStage: (cb: () => void) => () => void; subscribeStageGrant: (cb: (userId: string) => void) => () => void; canManageStage: () => boolean; stageEnabled: () => boolean; ensureStageJoined: () => Promise; setParticipantPinned: (participantId: string, pinned: boolean) => Promise; pinnedIds: () => string[]; subscribePinned: (cb: () => void) => () => void; setParticipantChat: (participantId: string, enabled: boolean) => Promise; sendChatMessage: (text: string, participantIds?: string[]) => Promise; editChatMessage: (id: string, text: string) => Promise; deleteChatMessage: (id: string) => Promise; pinChatMessage: (id: string, pinned: boolean) => Promise; fetchChatHistory: (opts?: { timestamp?: number; userId?: string; }) => Promise; pinnedChatMessages: () => StudioChatMessage[]; chatMaxTextLimit: () => number; subscribeParticipants: (cb: () => void) => () => void; participants: () => StudioParticipantTile[]; waitlisted: () => StudioWaitlistedGuest[]; inWaitingRoom: () => boolean; connectionState: () => StudioConnectionState; lastMeetingError: () => string | null; moderatorIds: () => string[]; localAudioTrack: () => MediaStreamTrack | null; localVideoTrack: () => MediaStreamTrack | null; participantAudioTrack: (participantId: string) => MediaStreamTrack | null; participantVideoTrack: (participantId: string) => MediaStreamTrack | null; participantScreenTrack: (participantId: string) => MediaStreamTrack | null; activeSpeakerId: () => string | null; subscribeActiveSpeaker: (cb: () => void) => () => void; screenSharePermission: () => StudioScreenSharePermission; subscribePermissions: (cb: () => void) => () => void; attachVideo: (participantId: string, el: HTMLVideoElement | null, kind?: StudioVideoKind) => void; attachAudio: (participantId: string, el: HTMLAudioElement | null) => void; subscribeMedia: (cb: () => void) => () => void; subscribeRoomLeft: (cb: (state: string) => void) => () => void; chatMessages: () => StudioChatMessage[]; subscribeChat: (cb: () => void) => () => void; listDevices: () => Promise; setDevice: (kind: StudioDeviceKind, deviceId: string) => Promise; setDisplayName: (name: string) => Promise; setVideoEffects: (config: StudioVideoEffectsConfig) => Promise; videoEffects: () => StudioVideoEffectsConfig; livestreamState: () => string | null; roomState: () => string | null; startLivestream: () => Promise; }; type StudioRoomLabels = ReturnType; declare function studioRoomLabels(t: (key: string, values?: Record) => string): { live: string; preview: string; waiting: string; waitingHost: string; connecting: string; connectFailed: string; retry: string; linkExpiredTitle: string; linkExpiredDescription: string; openFailedTitle: string; openFailedDescription: string; admit: string; deny: string; denied: string; denyError: string; rejectedTitle: string; rejectedDescription: string; rejectedAction: string; kick: string; camera: string; screen: string; mute: string; unmute: string; copyLink: string; shareLink: string; shareGuestText: string; shareFailed: string; copied: string; publish: string; publishTitle: string; publishDescription: string; publishConfirm: string; publishPending: string; stop: string; stopTitle: string; stopDescription: string; stopConfirm: string; fullscreen: string; publishError: string; stopError: string; published: string; stopped: string; cameraDevice: string; micDevice: string; speakerDevice: string; preflightCamera: string; preflightMic: string; knock: string; egressLost: string; livestreamStarting: string; livestreamSending: string; livestreamInitializing: string; livestreamRetry: string; livestreamError: string; screenBusy: string; endedTitle: string; endedDescription: string; endedAction: string; rejoin: string; duplicateTitle: string; duplicateDescription: string; duplicateDescriptionNoTakeover: string; duplicateAction: string; duplicateTakenOver: string; joinBusy: string; cameraError: string; screenError: string; leave: string; leaveTitle: string; leaveDescription: string; leaveConfirm: string; chat: string; chatSend: string; chatPlaceholder: string; chatError: string; settings: string; settingsTitle: string; settingsDescription: string; guestName: string; displayNameSave: string; displayNameSaved: string; displayNameError: string; testSpeaker: string; testSpeakerError: string; cameraOff: string; micLevel: string; share: string; shareCopied: string; stopCamera: string; stopScreen: string; hostMutedYou: string; hostStoppedYourCamera: string; hostStoppedYourScreen: string; hostMediaError: string; tileMenu: string; openPip: string; closePip: string; backToStudio: string; pipTitle: string; pipError: string; screenUnsupportedDevice: string; screenDownloadAppTitle: string; screenDownloadAppAction: string; screenDownloadAppDismiss: string; screenNotAllowed: string; askToShare: string; shareRequested: string; cancelShareRequest: string; shareRequestSent: string; shareRequestFrom: string; approve: string; shareApproved: string; shareDenied: string; shareRequestError: string; shareRequestTimeout: string; shareRespondError: string; goOffAir: string; moveToAudience: string; moveToAudienceTitle: string; moveToAudienceDescription: string; moveToAudienceConfirm: string; goOnAir: string; takeOffAir: string; bringOnAir: string; offAir: string; offAirCount: string; offAirBanner: string; offAirLastVisible: string; offAirHidden: string; offAirShown: string; offAirError: string; takeOffAirTitle: string; takeOffAirDescription: string; takeOffAirConfirm: string; admitAsPanelist: string; admitAsAudience: string; admitAllPanelists: string; admitAllAudience: string; askToGoOnAir: string; stageRequested: string; stageApproved: string; stageDenied: string; stageRequests: string; people: string; community: string; comments: string; qa: string; composer: string; questionComposer: string; emptyComments: string; emptyQuestions: string; jumpToLatest: string; answer: string; upvote: string; closed: string; qaClosed: string; postError: string; answerError: string; panelists: string; audience: string; noWaiting: string; noPanelists: string; noAudience: string; closePanel: string; muteChat: string; allowChat: string; pin: string; unpin: string; pinnedToast: string; unpinnedToast: string; pinError: string; kickTitle: string; kickTitleNamed: string; kickDescription: string; kickConfirm: string; kickError: string; stageError: string; stageDisabled: string; stageGrantNoEffect: string; stageOverflow: string; chatEveryone: string; chatEdited: string; chatPinned: string; chatLoadOlder: string; chatRateLimited: string; chatDelete: string; chatEdit: string; chatPin: string; chatUnpin: string; chatSave: string; waitingSkeleton: string; more: string; captions: string; captionsOn: string; captionsOff: string; captionsNotReady: string; captionsDelayed: string; captionsLanguage: string; captionsSize: string; captionsSizeS: string; captionsSizeM: string; captionsSizeL: string; settingsGeneral: string; settingsAudio: string; settingsVideo: string; settingsEffects: string; settingsSubtitles: string; effectNone: string; effectBlur: string; effectBlurStrong: string; effectBackgrounds: string; effectFilters: string; effectFilterNone: string; effectFilterGrayscale: string; effectFilterSepia: string; effectFilterWarm: string; effectFilterCool: string; effectFilterBright: string; localeEn: string; localeEs: string; localePt: string; }; type StudioDeviceSelection = { audio: string; video: string; speaker: string; }; declare function StudioRoom({ session, meeting, control, onRefreshStatus, onRejoin, labels, reducedMotion, embed, chrome, headerStart, playerOrigin, windowGate, initialCameraOn, initialMuted, initialDevices, appDownloadUrl, captionsBaseUrl, apiUrl, cdnBase, endedHref, endedExtra, }: { session: StudioSession; meeting: StudioMeetingHandle; control: StudioControlActions; onRefreshStatus?: () => Promise; onRejoin?: () => void; reducedMotion: boolean; labels: StudioRoomLabels; embed?: boolean; chrome?: ReactNode; /** Partner controls rendered before the stream title. */ headerStart?: ReactNode; playerOrigin?: string; windowGate?: { reportDuplicate: () => void; }; initialCameraOn?: boolean; initialMuted?: boolean; initialDevices?: StudioDeviceSelection; appDownloadUrl?: string; captionsBaseUrl?: string; apiUrl?: string; cdnBase?: string; /** Partner URL for the ended-session action. Defaults to `/streams/:id`. */ endedHref?: string; /** Partner content under the return link on the session-over card. */ endedExtra?: ReactNode; }): react.JSX.Element; declare function StudioSkeleton(): react.JSX.Element; type StudioGuestLobbyLabels = { title: string; hint: string; name: string; join: string; joining: string; waitingForHost: string; camera: string; mic: string; cameraDevice?: string; micDevice?: string; speakerDevice?: string; testSpeaker?: string; testSpeakerError?: string; cameraOff?: string; }; declare function StudioGuestLobby({ reducedMotion, cameraOn, muted, displayName, showName, joining, waitingForHost, error, labels, savedDevices, onCameraChange, onMutedChange, onDisplayNameChange, onDeviceChange, onJoin, }: { reducedMotion: boolean; cameraOn: boolean; muted: boolean; displayName: string; showName: boolean; joining: boolean; waitingForHost: boolean; error: string | null; labels: StudioGuestLobbyLabels; savedDevices?: StudioDeviceSelection; onCameraChange: (on: boolean) => void; onMutedChange: (muted: boolean) => void; onDisplayNameChange: (name: string) => void; onDeviceChange?: (kind: StudioDeviceKind, deviceId: string) => void; onJoin: () => void; }): react.JSX.Element; type StudioWindowGateContextValue = { reportDuplicate: () => void; }; declare const StudioWindowGateContext: react.Context; declare function useStudioWindowGate(): StudioWindowGateContextValue; declare function StudioWindowGate({ lockKey, allowTakeover, labels, children, }: { lockKey: string; allowTakeover?: boolean; labels: { duplicateTitle: string; duplicateDescription: string; duplicateDescriptionNoTakeover: string; duplicateTakenOver: string; duplicateAction: string; }; children: ReactNode; }): react.JSX.Element; declare function LivoHostStudio({ token, apiUrl, labels, redeemError, embed, chrome, headerStart, playerOrigin, theme, appDownloadUrl, guestUrl, endedHref, endedExtra, }: { token: string; apiUrl?: string; labels: StudioRoomLabels; redeemError?: string; embed?: boolean; chrome?: ReactNode; /** Partner controls rendered before the stream title. */ headerStart?: ReactNode; playerOrigin?: string; theme?: EmbedTheme | string | null; appDownloadUrl?: string; /** Partner invite URL. Overrides redeem `guestUrl` when non-empty. */ guestUrl?: string | null; /** Partner URL for the ended-session action. Defaults to `/streams/:id`. */ endedHref?: string; /** Partner content under the return link on the session-over card. */ endedExtra?: ReactNode; }): react.JSX.Element; type StudioLobbyLabels = { title: string; hint: string; name: string; join: string; joining: string; waitingForHost: string; camera: string; mic: string; cameraDevice?: string; micDevice?: string; speakerDevice?: string; testSpeaker?: string; testSpeakerError?: string; cameraOff?: string; joinError: string; joinBusy: string; endedTitle: string; }; declare function LivoGuestStudio({ token, apiUrl, labels, lobbyLabels, embed, playerOrigin, theme, appDownloadUrl, }: { token: string; apiUrl?: string; labels: StudioRoomLabels; lobbyLabels: StudioLobbyLabels; embed?: boolean; playerOrigin?: string; theme?: EmbedTheme | string | null; appDownloadUrl?: string; }): react.JSX.Element; declare function useRealtimeKitMeeting(authToken: string | null, generation?: number): { meeting: StudioMeetingHandle | null; error: string | null; }; declare function usePrefersReducedMotion(): boolean; declare class StudioApiError extends Error { readonly status: number; readonly body: unknown; constructor(status: number, message: string, body: unknown); } declare function redeemStudioHost(token: string, apiUrl?: string, fetchFn?: typeof fetch): Promise; declare function joinStudioGuest(token: string, input: { displayName: string; guestId: string; }, apiUrl?: string, fetchFn?: typeof fetch): Promise; declare function getStudioJoinStatus(token: string, apiUrl?: string, fetchFn?: typeof fetch): Promise<{ ready: boolean; streamStatus: string | null; } | "ended">; declare function getPublicStreamStatus(streamId: string, apiUrl?: string, fetchFn?: typeof fetch): Promise; declare function getPublicStreamMeta(streamId: string, apiUrl?: string, fetchFn?: typeof fetch): Promise<{ status: string; captionsEnabled: boolean; community: StreamCommunityFlags | null; } | null>; export { LivoGuestStudio, LivoHostStudio, StudioApiError, StudioBench, type StudioBenchLabels, type StudioControlActions, StudioControlClient, type StudioControlClientOptions, StudioControlError, StudioGuestLobby, type StudioLobbyLabels, type StudioMeetingHandle, type StudioRole, StudioRoom, type StudioRoomLabels, type StudioSession, StudioSkeleton, StudioWindowGate, StudioWindowGateContext, controlActionsFromClient, createStudioControlClient, getPublicStreamMeta, getPublicStreamStatus, getStudioJoinStatus, joinStudioGuest, redeemStudioHost, studioErrorCode, studioRoomLabels, usePrefersReducedMotion, useRealtimeKitMeeting, useStudioWindowGate };