Room Management Class
Room Management Class
Room.js is the main interface class file of the SDK, which defines the primary interfaces related to room calls. The properties and methods defined in this class are as follows.
Instantiate
This method instantiates an object of the room management class. Almost all operations within the room are controlled by this object.
Initialization Settings
Interface Name |
Interface Function |
init |
Initialize the Room Object |
uninit |
Reset the Room Object to an Uninitialized State |
checkInit |
Check the Initialization Status of the Room |
Interface Name |
Interface Function |
joinroom |
Enter a normal room, which must be created in the backend before entering |
joinRoomEx |
Enter an instant room, which does not require prior creation in the backend |
leaveRoom |
Leave the Room |
getRoomProperties |
Get Room-Related Properties |
Interface Name |
Interface Function |
getMySelf |
Get Your Own User Object |
getUser |
Get the Specified User Object |
getUsers |
Get All User Objects in the Room |
getUsersByProperty |
Get User Objects with the Specified Property |
getRoomUsers |
Get the User List of the Room (for Large-Scale Rooms) |
getRoomUserNum |
Get the Total Number of Users in the Room (for Large-Scale Rooms) |
getUserList |
Get the User List of the Room |
Signaling and Modifying Properties
Interface Name |
Interface Function |
sendMessage |
Send Chat Messages |
pubMsg |
Publish Custom Signaling Messages |
delMsg |
Delete Published Custom Signaling Messages |
evictUser |
Remove a User from the Room |
changeUserProperty |
Modify User Properties |
batchChangeUserProperty |
Modify User Properties in Batch |
changeUserPropertyByRole |
Modify the Properties of Users with the Specified Role |
Publishing and Playing Audio and Video
Interface Name |
Interface Function |
publishVideo |
Publish Local Video |
unpublishVideo |
Stop Publishing Local Video |
publishAudio |
Publish Local Audio |
unpublishAudio |
Stop Publishing Local Audio |
playVideo |
Play Video |
playAudio |
Play Audio |
unplayVideo |
Stop Playing Video |
unplayAudio |
Stop Playing Audio |
Set Local Audio and Video Properties
Interface Name |
Interface Function |
getDeviceMgr |
Get the Local Device Management Class Object |
setLocalVideoMirror |
Set the Mirroring of Local Video |
getVideoProfile |
Get Video Properties |
setVideoProfile |
Set My Video Capture and Publish Resolution |
setRemoteAudioVolume |
Set the Volume of the Remote Audio Stream |
getAudioVolume |
Get the Volume Level |
registerAudioVolumeListener |
Register a Volume Listener |
unregisterAudioVolumeListener |
Remove the Volume Listener |
disableVideoDevice |
Whether to Disable the Local Camera |
setAutoProcessDeviceChangeEvent |
Set Whether to Automatically Handle Device Change (Plug-in/Unplug) Events |
Share and Play Screen Sharing Streams
Interface Name |
Interface Function |
startShareScreen |
Start Screen Sharing |
stopShareScreen |
Stop Screen Sharing |
playRemoteScreen |
Play the Audio and Video Stream of Screen Sharing |
unplayRemoteScreen |
Stop Playing the Audio and Video Stream of Screen Sharing |
Interface Name |
Interface Function |
startShareMedia |
Start Sharing Media Files |
stopShareMedia |
Stop Sharing Media Files |
pauseShareMedia |
Pause/Play Media Files |
seekMedia |
Seek Media Files |
playRemoteMedia |
Play Shared Media |
unplayRemoteMedia |
Cancel Playing Shared Media |
playRemoteMediaFile |
Play the Media Files Shared by Remote Users |
unplayRemoteMediaFile |
Cancel Playing the Media Files Shared by Remote Users |
Room Status
Interface Name |
Interface Function |
switchOnlyAudioRoom |
Toggle the Audio and Video Status of the Room |
Server Recording and Local Recording
Interface Name |
Interface Function |
startServerRecord |
Start Server Recording of the Course |
stopServerRecord |
Stop Server Recording of the Course |
pauseServerRecord |
Pause Server Recording of the Course |
resumeServerRecord |
Resume Server Recording of the Course |