Methods
(static) assignRole(nickname, role)
Parameters:
- Source:
(static) authorizeWaitingList(userId, authorized)
Authorize user that is currently resides in waiting room. Note that this will only work with
FlashphonerSFUExtended
Parameters:
Name |
Type |
Description |
userId |
String
|
User id |
authorized |
Boolean
|
If true participant will move to the main room otherwise participant will be evicted. |
- Source:
(static) changeQuality(trackId, quality, tid)
Change receiving quality of the simulcast track.
Parameters:
Name |
Type |
Description |
trackId |
String
|
Id of the track |
quality |
String
|
one of qualities advertised in FlashphonerSFU.Room.TrackInfo |
tid |
String
|
In some tracks (Such as WebRTC simulcast VP8 track) there is an option of changing FPS of the
track by changing TID. At the time of writing there were 3 TIDs (lower TID = lower FPS) 0|1|2 |
- Source:
Turn waiting room on/off
Parameters:
Name |
Type |
Description |
enabled |
Boolean
|
Boolean flag |
- Source:
(static) destroyRoom()
Destroys room instance at server side.
- Source:
(static) join(configopt)
Join room.
Parameters:
Name |
Type |
Attributes |
Description |
config |
Object
|
<optional>
|
Config for track marking. Key is a track id and value is a String (e.g. screen_sharing, camera, front_camera).
The specified value will be available for other participants as contentType in FlashphonerSFU.Room.TrackInfo |
- Source:
(static) leaveRoom()
Leave room.
- Source:
(static) moveToWaitingRoom(nickname)
Parameters:
Name |
Type |
Description |
nickname |
String
|
Participant nickname |
- Source:
(static) muteTrack(trackId, mute)
Mute track. Mute takes place at server side - server stops forwarding this track.
Parameters:
Name |
Type |
Description |
trackId |
String
|
Id of the track |
mute |
Boolean
|
Mute flag |
- Source:
Remove room event callback.
Parameters:
- Source:
Throws:
-
-
Error if event is not specified
-
-
Type
-
TypeError
-
-
Error if callback is not a valid function
-
-
Type
-
Error
Returns:
SDK instance callback was removed from
-
Type
-
FlashphonerSFU.Room
Add room event callback.
Parameters:
- Source:
Throws:
-
-
Error if event is not specified
-
-
Type
-
TypeError
-
-
Error if callback is not a valid function
-
-
Type
-
Error
Returns:
SDK instance callback was attached to
-
Type
-
FlashphonerSFU.Room
(static) sendMessage(msg)
Broadcast message to participants currently in the Room.
This method will use DataChannels.
Parameters:
Name |
Type |
Description |
msg |
String
|
|
- Source:
(static) subscribeToWaitingParticipant(nickname)
Parameters:
Name |
Type |
Description |
nickname |
String
|
Nickname of the participant |
- Source:
(static) unsubscribeFromWaitingParticipant(nickname)
Unsubscribe from tracks of participant that is currently resides in waiting room.
Note that this will only work with
FlashphonerSFUExtended
Parameters:
Name |
Type |
Description |
nickname |
String
|
Nickname of the participant |
- Source:
(static) updateState(configopt)
Update state after adding tracks to PeerConnection.
This method kicks off sdp renegotiation.
Parameters:
Name |
Type |
Attributes |
Description |
config |
Object
|
<optional>
|
Config for track marking. Key is a track id and value is a String (e.g. screen_sharing, camera, front_camera).
The specified value will be available for other participants as contentType in FlashphonerSFU.Room.TrackInfo |
- Source:
Throws:
-
Error if peer connection is being negotiated
-
-
Type
-
Error
Type Definitions
Message
Properties:
Name |
Type |
Description |
message |
String
|
message body |
nickName |
String
|
nickname of the sender |
- Source:
OperationFailedInfo
Properties:
Name |
Type |
Description |
error |
String
|
error name |
info |
String
|
details about the error |
operation |
FlashphonerSFUExtended.SFU_OPERATIONS
|
Specifies operation that failed |
roomName |
String
|
room name |
type |
String
|
Event type |
- Source:
ParticipantInfo
Properties:
Name |
Type |
Description |
name |
String
|
nickname of participant |
roomName |
String
|
room name |
type |
String
|
Event type |
- Source:
ParticipantList
Properties:
Name |
Type |
Description |
participants |
Array.<String>
|
array with nicknames |
roomName |
String
|
room name |
type |
String
|
Event type |
- Source:
QualityInfo
Properties:
Name |
Type |
Description |
quality |
String
|
quality id |
available |
Boolean
|
true if quality is available |
- Source:
RoleInfo
Properties:
- Source:
TrackInfo
Properties:
Name |
Type |
Description |
id |
String
|
track id |
contentType |
String
|
content type that was advertised by content creator |
mid |
String
|
mid of the track |
mute |
Boolean
|
true if track is muted at server side |
quality |
Array.<String>
|
array of advertised quality types |
type |
FlashphonerSFU.SFU_TRACK_TYPE
|
track type |
- Source:
TrackQualityInfo
Properties:
- Source:
TracksInfo
Properties:
Name |
Type |
Description |
info |
Object
|
tracks info
Properties
Name |
Type |
Description |
nickName |
String
|
nickname of the owner of the tracks |
waitingRoom |
Boolean
|
true if this track belongs to waiting room |
info |
Array.<FlashphonerSFU.Room.TrackInfo>
|
details of each track |
|
type |
String
|
Event type |
roomName |
String
|
name of the Room this data corresponds to |
- Source:
TracksQualityInfo
Properties:
Name |
Type |
Description |
roomName |
String
|
room name |
type |
String
|
Event type |
info |
Object
|
Properties
|
- Source:
WaitingList
Properties:
- Source:
eventCallback(sdk)
Room event callback.
Parameters:
- Source: