Namespace: RoomSession

roomApi.RoomSession

Represents connection to room api app
Source:

Methods

(inner) disconnect()

Disconnect session
Source:

(inner) getRooms() → {Array.<roomApi.Room>}

Get rooms
Source:
Returns:
Type
Array.<roomApi.Room>

(inner) getServerUrl() → {string}

Get server address
Source:
Returns:
Server url
Type
string

(inner) id() → {string}

Get session id
Source:
Returns:
session id
Type
string

(inner) join(options) → {roomApi.Room}

Join room
Parameters:
Name Type Description
options Object Room options
Properties
Name Type Description
name String Room name
record Boolean Record
Source:
Returns:
Type
roomApi.Room

(inner) on(event, callback) → {roomApi.RoomSession}

Add session event callback.
Parameters:
Name Type Description
event string One of Flashphoner.constants.SESSION_STATUS events
callback RoomSession~eventCallback Callback function
Source:
Throws:
  • Error if event is not specified
    Type
    TypeError
  • Error if callback is not a valid function
    Type
    Error
Returns:
Room Session
Type
roomApi.RoomSession

(inner) status() → {string}

Get session status
Source:
Returns:
Type
string

(inner) username() → {string}

Get session username
Source:
Returns:
username
Type
string