Type definition
Below is the type definition for theUseAmbientSessionParams type. This is the type definition for the parameters you pass to the useAmbientSession hook.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
📋 Fill your own custom forms with Dynamic Form Filling. Learn more.
Parameters type for useAmbientSession hook
UseAmbientSessionParams type. This is the type definition for the parameters you pass to the useAmbientSession hook.
type UseAmbientSessionParams = {
ambientSessionId: string;
config?: {
audioBatchSize?: number;
};
onAudioChunkAvailable?: (audioChunk: Array<Int16Array>) => void;
onSessionTerminatedByPeer?: (payload: {
sessionId: string;
reason: string;
}) => void;
};
| Field | Description |
|---|---|
ambientSessionId | Session id returned by useAmbient after a successful create. |
config.audioBatchSize | Optional batch size for onAudioChunkAvailable. |
onAudioChunkAvailable | Optional callback for real-time audio visualization. |
onSessionTerminatedByPeer | Optional callback when another product cancels or ends the live session. Update UI only. |
Was this page helpful?
Suggestions