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
(static) nickname() → {String}
Preconfigured nickname
Returns:
- Type
- String
(static) room() → {FlashphonerSFU.Room}
Returns room object if available
Returns:
- Type
- FlashphonerSFU.Room
(static) state() → {FlashphonerSFU.SFU_STATE}
Returns FlashphonerSFU.SFU_STATE state of connection
Returns:
(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 |
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
(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 |
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 Definitions
eventCallback(session)
Session event callback.
Parameters:
Name | Type | Description |
---|---|---|
session |
FlashphonerSFU.SFUSession | SFUSession that corresponds to the event |