Events
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 daily-js
events.
We built the daily-js
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:
loading
loaded
load-attempt-failed
started-camera
camera-error
joining-meeting
joined-meeting
left-meeting
call-instance-destroyed
meeting-session-updated
test-completed
fullscreen
*exited-fullscreen
*active-speaker-change
active-speaker-mode-change
*access-state-updated
error
theme-updated
receive-settings-updated
send-settings-updated
show-local-video-changed
input-settings-updated
nonfatal-error
custom-button-click
local-screen-share-started
local-screen-share-stopped
local-screen-share-canceled
local-audio-level
remote-participants-audio-level
face-counts-updated
*
These events are only supported when using Daily Prebuilt.
Participant events
participant-joined
participant-updated
participant-left
waiting-participant-added
waiting-participant-updated
waiting-participant-removed
app-message
track-started
track-stopped
lang-updated
Quality events
recording-started
recording-stopped
recording-stats
recording-error
recording-upload-completed
recording-data