SpeakingMap
declare class SpeakingMap extends EventEmitter$1 declare class SpeakingMap extends EventEmitter$1 Tracks the speaking states of users in a voice channel.
Extends
EventEmitter$1constructor()
Constructs a new instance of the
SpeakingMap class| Name | Type | Optional | Description |
|---|
Readonly
DELAY
:
The delay after a packet is received from a user until they're marked as not speaking anymore.
Readonly
users
:
Map<string, number>
The currently speaking users, mapped to the milliseconds since UNIX epoch at which they started speaking.
onPacket(userId)
:
void
| Name | Type | Optional | Description |
|---|---|---|---|
| userId | string | No | None |
on(event, listener)
:
this
Emitted when a user starts speaking.
| Name | Type | Optional | Description |
|---|---|---|---|
| event | 'start' | No | None |
| listener | (userId: string) => void | No | None |