Documentation
Documentation for the two classes GuestVC and AdminVC with method descriptions
Class GuestVC
Class for creating a connection from the guest side
connect
connectDesc: Join to room
Type
Param
Return
method
-
-
disconnect
disconnectDesc: Leave the room
It can be called anywhere in the code, but after defining an instance of this class
Type
Param
Return
method
-
-
setVideoContainerForTestCamera
setVideoContainerForTestCameraDesc: Set video container for testing to display camera
Use before testing starts
Type
Param
Return
method
elem HTML
-
setCameraDevice
setCameraDeviceDesc: Set camera device
Use before connecting to the session
Type
Param
Return
method
string - device ID
-
setMicroDevice
setMicroDeviceDesc: Set micro device
Type
Param
Return
method
string - device ID
-
Use before connecting to the session
setSoundDevice
setSoundDeviceDesc: Set sound device
Use before connecting to the session
Type
Param
Return
method
string - device ID
-
getMicroDevicesList
getMicroDevicesListDesc: Get micro devices list
Use before connecting to the session
Type
Param
Return
method
-
objects array
{
deviceId: "",
label: ""
}
getCameraDevicesList
getCameraDevicesListDesc: Get camera devices list
Use before connecting to the session
Type
Param
Return
method
-
objects array
{
deviceId: "",
label: ""
}
getSoundDevicesList
getSoundDevicesListDesc: Get sound devices list
Use before connecting to the session
Type
Param
Return
method
-
objects array
{
deviceId: "",
label: ""
}
getCurrentCameraDevice
getCurrentCameraDeviceDesc: get current camera device ID
Use before connecting to the session
Type
Param
Return
method
-
string
getCurrentSoundDevice
getCurrentSoundDeviceDesc: get current sound device ID
Use before connecting to the session
Type
Param
Return
method
-
string
getCurrentMicroDevice
getCurrentMicroDeviceDesc: get current micro device ID
Use before connecting to the session
Type
Param
Return
method
-
string
startTest
startTestDesc: Start testing devices
Use before connecting to the session
Type
Param
Return
method
-
-
stopTest
stopTestDesc: Stop testing devices
Use before connecting to the session
Type
Param
Return
method
-
-
setElementHTMLMessages
setElementHTMLMessagesDesc: Set elem HTML for display chat
It can be called anywhere in the code, but after defining an instance of this class
Type
Param
Return
method
elem HTML
-
sendMsg
sendMsgDesc: Send message for chat
Type
Param
Return
method
string - message for send
-
string - user ID for direct message (example, @student1234 Hello!)
setClassStyleMsg
setClassStyleMsgDesc: Set classes for styling messages for chat
Type
Param
Return
method
{
own: "className",
fromGuestToMe: "className",
fromOwnerToMe: "className",
fromMeToGuest: "className",
guests: "className",
roomOwner: "className"
}
-
own - for display own messages
fromGuestToMe - messages from guest to guest as direct message (other guests doesn't see this message)
fromOwnerToMe - message from room owner to guest as direct message (other guests doesn't see this message)
fromMeToGuest - message as direct message from me to guest
guests - message for all users in room from guests
roomOwner - message from room owner for all users in room
setChatMode
setChatModeDesc: Set chat config for guests
Type
Param
Return
method
{
isDirect: true/false,
isVisibleForAll: true/false
}
isDirect - can the guest use the direct messaging feature
true- canfalse- can't
isVisibleForAll - can a guest see other guests messages for all
true- canfalse- can't
Be sure to set values for all parameters when using this method, or you can choose not to use this method, then the default parameters will be used
microOff
microOffDesc: Disable micro
It can be called anywhere in the code, but after defining an instance of this class
Type
Param
Return
method
-
-
microOn
microOnDesc: Enable micro
It can be called anywhere in the code, but after defining an instance of this class
Type
Param
Return
method
-
-
localCameraOff
localCameraOffDesc: Disable local camera
It can be called anywhere in the code, but after defining an instance of this class
Type
Param
Return
method
-
-
localCameraOn
localCameraOnDesc: Enable local camera
It can be called anywhere in the code, but after defining an instance of this class
Type
Param
Return
method
-
-
setUserName
setUserNameDesc: Set user name
Type
Param
Return
method
string
-
int
setUserID
setUserIDDesc: Set user ID
Type
Param
Return
method
string
-
getUserID
getUserIDDesc: Get user ID
Type
Param
Return
method
-
string
getUsersList
getUsersListDesc: Get users ID in room
Type
Param
Return
method
-
string array
setRoomID
setRoomIDDesc: Set room ID for connection
Type
Param
Return
method
string
-
int
setUserSatusConnection
setUserSatusConnectionDesc: Set user connection status
Type
Param
Return
method
bool
-
getUserStatusConnection
getUserStatusConnectionDesc: Get current user connection status
Type
Param
Return
method
-
bool
true - connected
false - disconnected
setElementHTMLVideoContainerRemote
setElementHTMLVideoContainerRemoteDesc: Set HTML elems for display remote video streams
Must call before connect
Type
Param
Return
method
HTML elem for display remote screen
-
HTML elem for display remote camera
setElementHTMLVideoContainerLocal
setElementHTMLVideoContainerLocalDesc: Set HTML elem for display local camera
Must call before connect
Type
Param
Return
method
HTML elem for display local camera
-
setConnectBtnUI
setConnectBtnUIDesc: Set callbacks for changing button state
Must call before connect
Type
Param
Return
method
callback for displaying the connection
-
callback for displaying the disconnection
getInstance
getInstanceDesc: Get instance of class GuestVC
Type
Param
Return
method
-
GuestVC
detect2g
detect2gDesc: Detect 2G network and alert the user
Type
Param
Return
method
-
-
sendDataToContentView
sendDataToContentViewDesc: Send some data to room owner for display it in content view
Type
Param
Return
method
structure
-
{
head: "title of custom event"
content: "hello world!"
}
-
setGuestAudibility
setGuestAudibilityDesc: Set whether a guest to hear the other guests in room
Type
Param
Return
method
bool
-
true- guest will be hear other guests
false - guest will not hear other guests
getGuestAudibility
getGuestAudibilityDesc: Set whether a guest to hear the other guests in room
Type
Param
Return
method
-
bool
true - guest will be hear other guests
false - guest will not hear other guests
setLocalVideoConstraints
setLocalVideoConstraintsDesc: Sey local video constraints
Type
Param
Return
method
-
int - width
int - height
int - frame rate
onUserStatusChanged
onUserStatusChangedDesc: Event that is triggered when the status of the room owner changes
Be sure to add at the end of the code
Type
Param
Return
method
-
-
onRoomFull
onRoomFullDesc: Event handler that is called when connecting if the room is full
Be sure to add at the end of the code
Type
Param
Return
event
-
-
onStream
onStreamDesc: Event handler that handle stream
Be sure to add at the end of the code
Type
Param
Return
event
-
-
onMediaError
onMediaErrorDesc: Event handler that handle stream error
Be sure to add at the end of the code
Type
Param
Return
event
-
-
onMessage
onMessageDesc: Event handler for messgae from other peers
Type
Param
Return
event
callback
-
Class AdminVC
Class for creating a link on the owner's side
setVideoContainerForTestCamera
setVideoContainerForTestCameraDesc: Set video container for testing to display camera
Use before testing starts
Type
Param
Return
method
elem HTML
-
setCameraDevice
setCameraDeviceDesc: Set camera device
Use before connecting to the session
Type
Param
Return
method
string - device ID
-
setMicroDevice
setMicroDeviceDesc: Set micro device
Type
Param
Return
method
string - device ID
-
Use before connecting to the session
setSoundDevice
setSoundDeviceDesc: Set sound device
Use before connecting to the session
Type
Param
Return
method
string - device ID
-
getMicroDevicesList
getMicroDevicesListDesc: Get micro devices list
Use before connecting to the session
Type
Param
Return
method
-
string array
getCameraDevicesList
getCameraDevicesListDesc: Get camera devices list
Use before connecting to the session
Type
Param
Return
method
-
string array
getSoundDevicesList
getSoundDevicesListDesc: Get sound devices list
Use before connecting to the session
Type
Param
Return
method
-
string array
getCurrentCameraDevice
getCurrentCameraDeviceDesc: get current camera device ID
Use before connecting to the session
Type
Param
Return
method
-
string
getCurrentSoundDevice
getCurrentSoundDeviceDesc: get current sound device ID
Use before connecting to the session
Type
Param
Return
method
-
string
getCurrentMicroDevice
getCurrentMicroDeviceDesc: get current micro device ID
Use before connecting to the session
Type
Param
Return
method
-
string
startTest
startTestDesc: Start testing devices
Use before connecting to the session
Type
Param
Return
method
-
-
stopTest
stopTestDesc: Stop testing devices
Use before connecting to the session
Type
Param
Return
method
-
-
setMaxGuestCount
setMaxGuestCountDesc: Set max guest count in room
Type
Param
Return
method
int
-
setElementsHTMLVideoContainerRemote
setElementsHTMLVideoContainerRemoteDesc: Set HTML elems for display remote video streams
Must call before connect
Type
Param
Return
method
HTML elems for display remote camera (the number of elements must be exactly max guest count)
-
setElementsHTMLVideoContainerLocal
setElementsHTMLVideoContainerLocalDesc: Set HTML elems for display local camera and screen
Must call before connect
Type
Param
Return
method
HTML elem for display local camera
-
HTML elem for display screen
setContentViewContainer
setContentViewContainerDesc: Set HTML elems for copy children
Must call before connect
Type
Param
Return
method
HTML elem
-
setElementHTMLMessages
setElementHTMLMessagesDesc: Set elem HTML for display chat
Must call before connect
Type
Param
Return
method
elem HTML
-
sendMsg
sendMsgDesc: Send message for chat
Type
Param
Return
method
string - message for send
-
string - user ID for direct message (example, @student1234 Привет!)
setClassStyleMsg
setClassStyleMsgDesc: Set classes for styling messages for chat
Type
Param
Return
метод
{
own: "className",
fromGuestToMe: "className",
fromMeToGuest: "className",
fromGuestToGuest: "className",
guests: "className",
}
-
own - for display own message
fromGuestToMe - message form guest to me as direct message
fromMeToGuest - message from me to guest as direct message
fromGuestToGuest - message from guest to guest as direct message
guests - message from guest for all
setChatMode
setChatModeDesc: Set chat config for room owner
Type
Param
Return
method
{
isDirect: true/false,
isVisibleGuestForOwner: true/false
}
isDirect - can the owner of the room use the direct message feature
true- canfalse- can't
isVisibleGuestForOwner - can room owner see message from guest to guest as direct message
true- canfalse- can't
Be sure to set values for all parameters when using this method, or you can choose not to use this method, then the default parameters will be used
setConnectBtnUI
setConnectBtnUIDesc: Set callbacks for changing button state
Must call before connect
Type
Param
Return
method
сallback for displaying the connection
-
сallback for displaying the disconnection
setVideoRecordingConfig
setVideoRecordingConfigDesc: Set config for screen recorder
Type
Param
Return
method
{
type: "video",
mimeType: "video/webm",
resolution: {
width: 1280,
height: 720
},
frameRate: 30,
bitrate: 128000,
}
-
setUserSatusConnection
setUserSatusConnectionDesc: Set user connection status
Type
Param
Return
method
bool
-
true - connected
false - disconnected
getUserStatusConnection
getUserStatusConnectionDesc: Get current user connection status
Type
Param
Return
method
-
bool
true - connected
false- disconnected
setRoomID
setRoomIDDesc: Set room ID for connection
Type
Param
Return
method
string
-
int
getUserID
getUserIDDesc: Get user ID
Type
Param
Return
method
-
string
setUserID
setUserIDDesc: Set user ID
Type
Param
Return
method
string
-
getUsersList
getUsersListDesc: Get users ID in room
Type
Param
Return
method
-
string array
setUserName
setUserNameDesc: Set user name
Type
Param
Return
method
string
-
int
screenRecordingOn
screenRecordingOnDesc: turn on screen recorder
It can be called anywhere in the code, but after defining an instance of this class
Type
Param
Return
method
-
bool
true - if success start
false - if error
screenRecordingOff
screenRecordingOffDesc: turn on screen recorder
It can be called anywhere in the code, but after defining an instance of this class
Type
Param
Return
method
callback(blob)
bool
true - if success end
false - if error
microOff
microOffDesc: Disable micro
It can be called anywhere in the code, but after defining an instance of this class
Type
Param
Return
method
-
-
microOn
microOnDesc: Enable micro
It can be called anywhere in the code, but after defining an instance of this class
Type
Param
Return
method
-
-
screenShareOn
screenShareOnDesc: Enable screen sharing
It can be called anywhere in the code, but after defining an instance of this class
Type
Param
Return
method
-
-
screenShareOff
screenShareOffDesc: Disable screen sharing
It can be called anywhere in the code, but after defining an instance of this class
Type
Param
Return
method
-
-
localCameraOff
localCameraOffDesc: Disable local camera
It can be called anywhere in the code, but after defining an instance of this class
Type
Param
Return
method
-
-
localCameraOn
localCameraOnDesc: Enable local camera
It can be called anywhere in the code, but after defining an instance of this class
Type
Param
Return
method
-
-
detect2g
detect2gDesc: Detect 2G network and alert the user
Type
Param
Return
method
-
-
sendDataToContentView
sendDataToContentViewDesc: Send some data to guests for display it in content view
Type
Param
Return
method
structure
-
{
head: "title of custom event"
content: "hello world!"
}
-
disconnect
disconnectDesc: Disabling and deleting a room
It can be called anywhere in the code, but after defining an instance of this class
Type
Param
Return
method
-
-
connect
connectDesc: Create room
Type
Param
Return
method
-
-
getInstance
getInstanceDesc: Get instance of class AdminVC
Type
Param
Return
method
-
AdminVC
changeVideoConstraints
changeVideoConstraintsDesc: change guest video constraints from room owner
Type
Param
Return
method
-
int - width
int - height
int - frame rate
onUserStatusChanged
onUserStatusChangedDesc: Event handler that is triggered when the status of the room owner changes
Be sure to add at the end of the code
Type
Param
Return
event
-
-
onStream
onStreamDesc: Event handler that handle stream
Be sure to add at the end of the code
Type
Param
Return
event
-
-
onMediaError
onMediaErrorDesc: Event handler that handle stream error
Be sure to add at the end of the code
Type
Param
Return
event
-
-
onMessage
onMessageDesc: Event handler for massage from guests
Be sure to add at the end of the code
Type
Param
Return
event
callback
-
Last updated