Events

react-native-daily-js video call events

Our events give you a heads up when something interesting happens during your call. For example, when you (the local participant) join a call, the joining-meeting event fires. When someone else (a remote participant) joins a call, participant-joined triggers. You can design your app to react to these and any react-native-daily-js events.

We built the call object on top of the EventEmitter interface. This means you can customize how your video application responds to Daily events using callback functions. You might want to broadcast a message when all participants have joined, for example, or to update a participant list when someone leaves a meeting.

The on(), once(), and off() methods add and remove callbacks. These all return the this object, so it's easy to chain calls.

Here's how you might use on() to console.log the joining-meeting event, show a loading spinner while you're joining, and to make the iframe visible once you've arrived.

The event object passed to the callbacks always includes an action property with the event's name, so that your callback functions can process multiple action types at once.

You can install callbacks for the following events:

Meeting events

Participant events

Quality events