> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/contributor/contributor-pt/comunicacoes/tipos-de-transporte/livekit.md).

# LiveKit

O [LiveKit](https://livekit.io/) o transporte é o mais versátil e eficiente dos transportes suportados, e também o mais fácil de implementar. Os clientes devem usá-lo quando recebem uma cadeia de conexão apropriada do service do seu realm's [Archipelago](https://github.com/decentraland/docs/tree/main/contributor/archipelago/README.md) service, ou se estiver indicado como um transporte fixo.

{% hint style="info" %}
Você pode ver o transporte LiveKit em ação e explorar os seus recursos usando o open-source [Comms Station](https://decentraland.github.io/comms-station/).
{% endhint %}

Ao contrário do transporte personalizado [WebSocket](https://github.com/decentraland/docs/tree/main/contributor/transport-types/websocket/README.md) transporte, ele usa uma biblioteca de terceiros (de código aberto), o que simplifica muito o processo de desenvolvimento ao abstrair toda a lógica e serialização em nível de transporte.

As URIs do transporte LiveKit começam com o `livekit:` prefixo, seguido pelo `wss://` URL do servidor. Elas também incluem um `access_token`, gerado por [Archipelago](https://github.com/decentraland/docs/tree/main/contributor/archipelago/README.md) quando o cliente se autentica.

```
livekit:wss://comms.example.com?access_token=eyJhbGciOiJI...
```

### Conectando e Autenticando

A biblioteca cliente LiveKit encapsula de forma elegante toda a lógica de conexão e autenticação.

Não há uma etapa adicional de autenticação ao usar o transporte LiveKit. O `access_token` fornecido por Archipelago já está verificado e autorizado.

### Trocando Mensagens

Os clientes que dependem da biblioteca LiveKit podem facilmente fazer broadcast, enviar mensagens diretas e publicar feeds de media ao vivo.

As cargas úteis são simples comms [`Pacotes`](https://github.com/decentraland/docs/tree/main/contributor/messages/README.md) sem qualquer encapsulamento adicional.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.decentraland.org/contributor/contributor-pt/comunicacoes/tipos-de-transporte/livekit.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
