> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt

# WebSocketEvents

## Values

<a id="open" />

Triggered when the WebSocket connection is opened. `WebSocket.onopen` is called right before any other handlers.

<a id="close" />

Triggered when the WebSocket connection is closed. `WebSocket.onclose` is called right before any other handlers.

<a id="message" />

Triggered when a message is received by a target object. `WebSocket.onmessage` is called right before any other handlers.

<a id="error" />

Triggers when an error occurs during the WebSocket connection. `WebSocket.onerror` is called right before any other handlers.

<a id="created" />

Triggered when the WebSocket connection is created. `WebSocket.oncreated` is called right before any other handlers.

<a id="mediastarted" />

Triggered when the audio stream sent by a third party through a WebSocket is started playing.

<a id="mediaended" />

Triggers after the end of the audio stream sent by a third party through a WebSocket (**1 second of silence**).