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

# Conference

## Methods

### add

Creates a new [Endpoint](/api-reference/voxengine/endpoint) instance and adds it to the specified conference. ***IMPORTANT!*** You can only use this function for a conference with the “video conference” option checked in the routing rule.
Otherwise, you receive the `ConferenceEvents.ConferenceError` event with code **102**. The maximum number of endpoints is **100**.

```ts
add(parameters: EndpointParameters): Endpoint
```

**Parameters**

**`parameters`** `EndpointParameters` — required

---

**`parameters.receiveParameters`** `ReceiveParameters`

*optional*

Optional. Endpoints and their streams (audio and/or video) to receive. These settings apply to the target endpoint right after adding it to a conference.

---

**`parameters.receiveParameters[remoteParticipantId]`** `ParticipantReceiveParameters`

*index signature*

Substitute one of the available keys from the description.

---

**`parameters.receiveParameters[remoteParticipantId].video`** `Array<'default' | string>`

*optional*

Optional. Video streams to receive.

---

**`parameters.receiveParameters[remoteParticipantId].audio`** `Array<'default' | string>`

*optional*

Optional. Audio streams to receive.

---

### addEventListener

Adds a handler for the specified [ConferenceEvents](/api-reference/voxengine/conference-events) event. Use only functions as handlers; anything except a function leads to the error and scenario termination when a handler is called.

```ts
addEventListener(event: ConferenceEvents | T, callback: (event: _ConferenceEvents[T]) => any): void
```

**Parameters**

**`event`** `ConferenceEvents | T` — required

---

**`callback`** `(event: _ConferenceEvents[T]) => any` — required

---

### get

Gets the endpoint by the id.

```ts
get(id: string): Endpoint
```

**Parameters**

**`id`** `string` — required

---

### getList

Gets the endpoint list for current conference.

```ts
getList(): Endpoint[]
```

### id

Returns the conference's id.

```ts
id(): string
```

### removeEventListener

Removes a handler for the specified [ConferenceEvents](/api-reference/voxengine/conference-events) event.

```ts
removeEventListener(event: ConferenceEvents | T, callback?: (event: _ConferenceEvents[T]) => any): void
```

**Parameters**

**`event`** `ConferenceEvents | T` — required

---

**`callback`** `(event: _ConferenceEvents[T]) => any`

---

### sendMediaTo

Starts sending media (voice and video) from the conference to the media unit.

```ts
sendMediaTo(mediaUnit: VoxMediaUnit, parameters?: SendMediaParameters): void
```

**Parameters**

**`mediaUnit`** `VoxMediaUnit` — required

---

**`parameters`** `SendMediaParameters`

---

### stop

Stops the conference. Triggers the `ConferenceEvents.Stopped` event.

```ts
stop(): void
```

### stopMediaTo

Stops sending media (voice and video) from the conference to the media unit.

```ts
stopMediaTo(mediaUnit: VoxMediaUnit): void
```

**Parameters**

**`mediaUnit`** `VoxMediaUnit` — required

---