VoiceAgentWebSocketHandlers interface
當連線事件發生時, VoiceAgentWebSocketTransport 會呼叫回調。
屬性詳細資料
onClose
連結關閉時會被召喚。
onClose: (code: number, reason: string, wasClean: boolean) => void
屬性值
(code: number, reason: string, wasClean: boolean) => void
onError
當傳輸遇到錯誤時會啟動。
onError: (error: Error) => void
屬性值
(error: Error) => void
onMessage
當收到來自服務的訊息時會被調用。
onMessage: (data: string | ArrayBuffer) => void
屬性值
(data: string | ArrayBuffer) => void