Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PresenceService

Hierarchy

Index

Methods

addListener

clearState

  • clearState(): void
  • Returns void

events

  • Provides the events emitted by this object as an Observable stream.

    example
    
    eventEmitter.events()
      .filter(e => e.name === "myevent")
      .subscribe(e => console.log(e));

    Returns Observable<IConvergenceEvent>

    An Observable stream of all events emitted by this object.

isAvailable

  • isAvailable(): boolean
  • Returns boolean

off

on

once

  • Adds a single shot event listener for the specified event. The listener will be called the first time the specified event is fired after the event registration occurs, after which the registration will be removed and no further events will be passed to the listener.

    Parameters

    Returns ConvergenceEventEmitter<IConvergenceEvent>

    This object, in support of a fluent API.

presence

  • Parameters

    • username: string

    Returns Promise<UserPresence>

  • Parameters

    • usernames: string[]

    Returns Promise<UserPresence[]>

removeAllListeners

removeListener

removeListeners

removeState

  • removeState(key: string): void
  • removeState(keys: string[]): void
  • Parameters

    • key: string

    Returns void

  • Parameters

    • keys: string[]

    Returns void

session

setState

  • setState(state: StringMapLike): void
  • setState(key: string, value: any): void
  • Parameters

    Returns void

  • Parameters

    • key: string
    • value: any

    Returns void

state

  • state(): Map<string, any>
  • Returns Map<string, any>

subscribe

Object literals

Static Events

Events: object

AVAILABILITY_CHANGED

AVAILABILITY_CHANGED: string = PresenceAvailabilityChangedEvent.NAME

STATE_CLEARED

STATE_CLEARED: string = PresenceStateClearedEvent.NAME

STATE_REMOVED

STATE_REMOVED: string = PresenceStateRemovedEvent.NAME

STATE_SET

STATE_SET: string = PresenceStateSetEvent.NAME