Browser Phone » Presence
OpenVBX contains hooks for monitoring Presence events on Twilio Client.
Presence events fire each time a user connects, disconnects, or toggles their online status in their browser.
Bind an event listener and callback function to OpenVBX.presence to receive Client Presence events on your page.
Your callback function must take 2 parameters
| Name | Type | Description |
|---|---|---|
| client | Object | The current event object. This object will have 2 members:
|
| onlineClients | Array | The current list of online client IDs. |
void
jQuery(function($) {
$(OpenVBX.presence).bind('presence', function(client, onlineClients) {
// ... your code here
});
});