diff options
Diffstat (limited to 'makima/frontend/src/hooks/useWebSocket.ts')
| -rw-r--r-- | makima/frontend/src/hooks/useWebSocket.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/makima/frontend/src/hooks/useWebSocket.ts b/makima/frontend/src/hooks/useWebSocket.ts index 961951f..c593621 100644 --- a/makima/frontend/src/hooks/useWebSocket.ts +++ b/makima/frontend/src/hooks/useWebSocket.ts @@ -214,12 +214,13 @@ export function useWebSocket(options: UseWebSocketOptions = {}) { }, []); const startSession = useCallback( - (sampleRate: number, channels: number = 1) => { + (sampleRate: number, channels: number = 1, contractId?: string | null, authToken?: string | null) => { sendMessage({ type: "start", sampleRate, channels, encoding: "pcm32f", + ...(contractId && authToken ? { contractId, authToken } : {}), }); }, [sendMessage] |
