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

# Recorder

## Methods

### addEventListener

Adds a handler for the specified [RecorderEvents](/api-reference/voxengine/recorder-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: RecorderEvents | T, callback: (event: _RecorderEvents[T]) => any): void
```

**Parameters**

**`event`** `RecorderEvents | T` — required

---

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

---

### id

Returns the recorder's id.

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

### mute

Whether to mute whole record without detaching media sources from it.

```ts
mute(doMute: boolean): void
```

**Parameters**

**`doMute`** `boolean` — required

---

### removeEventListener

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

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

**Parameters**

**`event`** `RecorderEvents | T` — required

---

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

---

### stop

Stops recording and triggers the `RecorderEvents.Stopped` event.

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