Namespace: SFUSession

FlashphonerSFU.SFUSession

Represents connection to server. Once connected will emmit FlashphonerSFU.SFU_EVENT.CONNECTED with local instance of previously specified room.
Source:
See:

Methods

(static) disconnect()

Disconnect from the server
Source:

(static) nickname() → {String}

Preconfigured nickname
Source:
Returns:
Type
String

(static) room() → {FlashphonerSFU.Room}

Returns room object if available
Source:
Returns:
Type
FlashphonerSFU.Room

(static) state() → {FlashphonerSFU.SFU_STATE}

Returns FlashphonerSFU.SFU_STATE state of connection
Source:
Returns:
Type
FlashphonerSFU.SFU_STATE

(inner) off(event, callback) → {FlashphonerSFU.SFUSession}

Remove session event callback.
Parameters:
Name Type Description
event String One of FlashphonerSFU.SFU_EVENT events
callback FlashphonerSFU.SFUSession~eventCallback Callback function
Source:
Throws:
  • Error if event is not specified
    Type
    TypeError
  • Error if callback is not a valid function
    Type
    Error
Returns:
Session callback was removed from
Type
FlashphonerSFU.SFUSession

(inner) on(event, callback) → {FlashphonerSFU.SFUSession}

Add session event callback.
Parameters:
Name Type Description
event String One of FlashphonerSFU.SFU_EVENT events
callback FlashphonerSFU.SFUSession~eventCallback Callback function
Source:
Throws:
  • Error if event is not specified
    Type
    TypeError
  • Error if callback is not a valid function
    Type
    Error
Returns:
Session callback was attached to
Type
FlashphonerSFU.SFUSession

Type Definitions

eventCallback(session)

Session event callback.
Parameters:
Name Type Description
session FlashphonerSFU.SFUSession SFUSession that corresponds to the event
Source: