> For the complete documentation index, see [llms.txt](https://docs.videsk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.videsk.io/es-developers/sdks/webrtc/propiedades.md).

# Propiedades

A continuación, exponemos las propiedades disponibles, con sus descripciones y los tipos de datos de entrada.

## `localStream`

**Tipo:** `MediaStream | undefined` (solo lectura)

Retorna el stream de medios local (cámara y micrófono) si está activo.

```javascript
const stream = webrtc.localStream;
```

**Retorna:**

* `MediaStream` si hay un stream local activo
* `undefined` si no hay stream o el stream no está activo

***

## `layout`

**Tipo:** `string` (lectura/escritura)

Obtiene o establece el layout de visualización de los peers.

```javascript
// Obtener layout actual
const currentLayout = webrtc.layout;
console.log('Layout actual:', currentLayout);

// Establecer layout
webrtc.layout = 'grid';     // Vista en cuadrícula
webrtc.layout = 'sidebar';  // Vista con sidebar
```

**Valores permitidos:**

* `'sidebar'`: Layout con barra lateral
* `'grid'`: Layout en cuadrícula

**Nota:** Intentar establecer un valor no válido mostrará una advertencia en consola y no aplicará el cambio.

***

## `alias`

**Tipo:** `string | undefined` (lectura/escritura)

Alias legible para identificar al usuario actual. Este alias se propaga a través de los eventos y facilita la identificación de peers en la UI.

{% hint style="warning" %}
Debes utilizar `alias` antes de usar el método [create](/es-developers/sdks/webrtc/metodos.md#create) de WebRTC. De lo contrario, observarás un UUID.
{% endhint %}

```javascript
// Asignar alias
webrtc.alias = 'John Doe';

// Obtener alias
const currentAlias = webrtc.alias;
console.log('Mi alias:', currentAlias);

// El alias estará disponible en eventos de otros peers
webrtc.addEventListener('peer:quality', (event) => {
    console.log(`Peer ${event.detail.alias} tiene problemas`);
});
```

**Retorna:**

* `string` si se ha asignado un alias
* `undefined` si no se ha asignado


---

# 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.videsk.io/es-developers/sdks/webrtc/propiedades.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.
