> 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/) transport é o mais versátil e eficiente dos transports suportados, e também o mais fácil de implementar. Os clientes devem usá‑lo quando receberem uma string de conexão apropriada do serviço do seu realm [Archipelago](https://github.com/decentraland/docs/blob/main/contributor/archipelago/README.md) ou se for indicado como um transport fixo.

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

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

URIs do LiveKit transport começam com o prefixo `livekit:` seguido pelo `wss://` URL do servidor. Eles também incluem um `access_token`, pré-autorizado, gerado por [Archipelago](https://github.com/decentraland/docs/blob/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 organizada toda a lógica de conexão e autenticação.

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

### Trocando Mensagens

Clientes que dependem da biblioteca LiveKit podem facilmente broadcastar, enviar mensagens diretas e publicar feeds de mídia ao vivo.

Payloads são comms simples [`Pacotes`](https://github.com/decentraland/docs/blob/main/contributor/messages/README.md) sem qualquer empacotamento 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
