TKRoomManager Overview
TKRoomManager class
TKRoomManager is the main interface class file of the SDK, in which the main interfaces related to room calls are defined. The main class is TKRoomManager. The following are the properties and methods defined in this class.
Variable name |
Variable description |
localUser |
The local user object has read-only properties, and after calling the joinRoomWithHost interface, the localUser object will be initialized. |
inBackground |
Whether the app goes into the background |
Attribute name |
Property description |
localUser |
The local user object has read-only properties, and after calling the joinRoomWithHost interface, the localUser object will be initialized. |
inBackground |
Whether the app goes into the background |
- Initialization and registration settings
Interface name |
Interface functionality |
getInstance |
Instantiate the singleton SDK object |
destroy |
Destroy the SDK object |
setLoggerInfo |
Set the SDK log level for printing |
init |
SDK Initialize the SDK |
registerRoomObserver |
Set the room signaling callback delegate |
registerMediaFrameObserver |
Set the callback delegate for obtaining audio and video data |
- Entering and leaving rooms and room information
Interface Name |
Functionality of the Interface |
joinRoom |
Enter a regular room, which needs to be created in the background before it can be entered |
joinRoomEx |
Enter an instant room, which does not require creation in the background |
leaveRoom |
Leave the room |
getRoomEntity |
Retrieve room-related attributes |
getUser |
Get the user object |
getServiceList |
Get the list of servers |
getStreamStatus |
Obtain the user’s upstream audio and video statistical information data |
- Publish and play audio and video
Interface name |
Interface functionality |
publishVideo |
Publish your own video |
unPublishVideo |
Stop publishing your own video |
publishAudio |
Publish your own audio |
unPublishAudio |
Stop publishing my own audio |
playVideo |
Play the video |
playAudio |
Play the audio |
unPlayVideo |
Stop playing the video |
unPlayAudio |
Stop playing the audio |
- Signaling and modifying attributes
Interface name |
Interface functionality |
sendMessage |
Send a chat message |
pubMsg |
Publish a custom signaling message |
delMsg |
Cancel the published custom signaling message |
evictUser |
Kick a user out of the room |
switchOnlyAudioRoom |
Whether to switch the room to a pure audio room |
changeDefaultServer |
Switch to the current linked server |
changeUserProperty |
Modify user attributes |
- Set local audio and video attributes
Interface name |
Interface functionality |
setLocalVideoMirrorMode |
Set local video mirror mode |
setVideoProfile |
Set my video capture and publish resolution |
selectCameraPosition |
Switch between my front and rear cameras |
setCameraOrientation |
Set the local camera capture orientation |
enableLocalVideo |
Whether to disable local camera |
enableLocalAudio |
Whether to disable local microphone |
useLoudSpeaker |
Is the audio played out loud |
setRemoteAudioVolume |
Set user audio volume level |
- Share and play media streams
Interface name |
Interface functionality |
startShareMedia |
Publish shared media stream files |
stopShareMedia |
Cancel sharing media stream files |
playMedia |
Play or pause shared media streams |
unPlayMedia |
Stop playing shared media streams |
seekMedia |
Seek shared media streams |
- Play desktop sharing and movie file streams
Interface name |
Interface functionality |
playScreen |
Play desktop sharing audio and video streams |
unPlayScreen |
Stop playing desktop sharing audio and video streams |
playFile |
Play shared movie file streams |
unPlayFile |
Stop playing shared movie file streams |
- Server recording and local recording
Interface name |
Interface functionality |
startServerRecord |
Start server recording for courses |
stopServerRecord |
Stop server recording of the course |
pauseServerRecord |
Pause server recording of the course |
resumeServerRecord |
Resume server recording of the course |
startAudioRecord |
Start local audio recording |
pauseAudioRecord |
Pause local audio recording |
stopAudioRecord |
Stop local audio recording |
Interface name |
Interface functionality |
enableDualStream |
Whether to enable local dual-stream mode |
setSmallStreamParameter |
Set the video resolution for the small stream (only effective when dual-stream mode is enabled) |
setRemoteDefaultVideoStreamType |
Set the default type for subscribing to remote audio and video streams (only effective when dual-stream mode is enabled |
setRemoteVideoStreamType |
Set the type of remote video stream and the ID of the video capture device (only effective when dual-stream mode is enabled) |
- Play local audio and video files
Interface name |
Interface functionality |
startPlayAudioFile |
Play local audio files (audio files will be mixed and played in stream form) |
stopPlayAudioFile |
Stop playing local audio files |
pauseAudioFile |
Pause playing local audio files |
resumeAudioFile |
Resume playing local audio files |
setAudioFileVolume |
Set the volume for playing local audio files |
Interface name |
Interface functionality |
getRoomUserNum |
Obtain the number of people in a large-scale classroom |
getRoomUsers |
Retrieve room user information (user list) in a large-scale classroom |
Set the type of remote video stream and the ID of the video capture device (only effective when dual-stream mode is enabled)batchChangeUserProperty |
Batch change specified user attributes |