Skip to main content

PresenceChannel

A class which represents a PresenceChannel on the client-side

presenceChannel.users

List of users present in this channel

Kind: instance property of PresenceChannel

presenceChannel.count ⇒ number

Count of users present in this channel

Kind: instance property of PresenceChannel

presenceChannel.countOnly ⇒ boolean

Is this channel in countOnly mode?

Kind: instance property of PresenceChannel

presenceChannel.init()

Create a PresenceChannel

Kind: instance method of PresenceChannel

presenceChannel.enter()

Mark the current user as 'present' in this channel By default, the user will temporarily 'leave' the channel when the current tab is in the background, or has no interaction for more than 60 seconds. To override this behaviour, set onlyWhileActive: false To specify custom thresholds, set activeOptions. See lib/user-presence.js for options.

Kind: instance method of PresenceChannel

presenceChannel.leave()

Mark the current user as leaving this channel

Kind: instance method of PresenceChannel

presenceChannel.subscribe()

Start the subscription

Kind: instance method of PresenceChannel

presenceChannel.unsubscribe()

Unsubscribe from this channel

Kind: instance method of PresenceChannel