Signature
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
event | EventName | The name of the event to listen for | Yes |
callback | EventCallback<T> | The callback function to invoke when the event fires | Yes |
Returns
this โ the client instance, allowing method chaining.
Example
Type-Safe Event Handling
More Information
- off โ remove an event listener
- Event Reference โ all available events
- WebRTCClientEvents โ type map for event callbacks