TUIRoom
is based on Tencent Real-Time Communication (TRTC) and Instant Messaging (IM). TUIRoom
includes the following features:
TUIRoom
is an open-source class depending on two closed-source Tencent Cloud SDKs. For the specific implementation process, please see Group Audio/Video Room (for iOS).
TUIRoom
API OverviewTUIRoomCore
API | Description |
---|---|
shareInstance | Gets a singleton object. |
destroyInstance | Terminates a singleton object. |
setDelegate | Sets event callbacks. |
API | Description |
---|---|
createRoom | Creates a room (called by anchor). |
destroyRoom | Terminates a room (called by anchor). |
enterRoom | Enters a room (called by room member). |
leaveRoom | Exits a room (called by other room members). |
getRoomInfo | Gets the room information. |
getRoomUsers | Gets the information of all users in the room. |
getUserInfo | Gets the information of a user. |
transferRoomMaster | Transfers the anchor permission (called by anchor). |
API | Description |
---|---|
startCameraPreview | Enables the preview image of local video. |
stopCameraPreview | Stops local video capturing and preview. |
startLocalAudio | Enables mic capturing. |
stopLocalAudio | Stops mic capturing. |
setVideoMirror | Sets the mirroring preview mode of the local image. |
setSpeaker | Sets whether to use the speaker or receiver. |
API | Description |
---|---|
startRemoteView | Subscribes to and plays back the remote video image of a specified member. |
stopRemoteView | Unsubscribes from and stops the playback of a remote video image. |
API | Description |
---|---|
sendChatMessage | Sends a chat message. |
sendCustomMessage | Sends a custom message. |
API | Description |
---|---|
muteUserMicrophone | Enables/Disables the mic of a specified user. |
muteAllUsersMicrophone | Enables/Disables the mic of all users and syncs the status to room information. |
muteUserCamera | Enables/Disables the camera of a specified user. |
muteAllUsersCamera | Enables/Disables the camera of all users and syncs the status to room information. |
muteChatRoom | Mutes/Unmutes the chat room (called by anchor). |
kickOffUser | Removes a specified user in the room (called by anchor). |
startCallingRoll | Starts calling roll by the anchor. |
stopCallingRoll | Stops calling roll by the anchor. |
replyCallingRoll | Replies to roll call by a member. |
sendSpeechInvitation | Invites a member to speak by the anchor. |
cancelSpeechInvitation | Cancels invitation to a member for speech by the anchor. |
replySpeechInvitation | Accepts/Rejects the speech invitation from the anchor by a member. |
sendSpeechApplication | Applies for speech by a member. |
replySpeechApplication | Approves/Rejects the speech application of a member by the anchor. |
forbidSpeechApplication | Forbids speech application by the anchor. |
sendOffSpeaker | Stops the speech of a member by the anchor. |
sendOffAllSpeakers | Stops the speech of all members by the anchor. |
exitSpeechState | Stops speaking by a member and changes their role to audience. |
API | Description |
---|---|
startScreenCapture | Starts screen sharing. |
stopScreenCapture | Stops screen sharing. |
API | Description |
---|---|
getBeautyManager | Gets the beauty filter management object TXBeautyManager. |
API | Description |
---|---|
setVideoQosPreference | Sets network bandwidth limit parameters. |
API | Description |
---|---|
getSDKVersion | Gets the SDK version. |
TUIRoomCoreDelegate
API OverviewAPI | Description |
---|---|
onError | Error |
API | Description |
---|---|
onDestroyRoom | Room dismissal. |
onUserVoiceVolume | Volume level. |
onRoomMasterChanged | Anchor change. |
API | Description |
---|---|
onRemoteUserEnter | A remote user entered the room. |
onRemoteUserLeave | A remote user exited the room. |
onRemoteUserCameraAvailable | Whether a remote user enabled the camera. |
onRemoteUserScreenVideoAvailable | Whether a remote user enabled screen sharing. |
onRemoteUserAudioAvailable | Whether a remote user enabled sending audio. |
onRemoteUserEnterSpeechState | A remote user started speaking. |
onRemoteUserExitSpeechState | A remote user stopped speaking. |
API | Description |
---|---|
onReceiveChatMessage | A text message was received. |
API | Description |
---|---|
onReceiveSpeechInvitation | A member received a speech invitation from the anchor. |
onReceiveInvitationCancelled | A member received a speech invitation cancellation from the anchor. |
onReceiveSpeechApplication | The anchor received a speech application from a member. |
onSpeechApplicationCancelled | A member canceled a speech application. |
onSpeechApplicationForbidden | The anchor rejected a speech application. |
onOrderedToExitSpeechState | A member was asked to stop speaking. |
onCallingRollStarted | The anchor started a roll call. |
onCallingRollStopped | The anchor stopped a roll call. |
onMemberReplyCallingRoll | A member replied to roll call. |
onChatRoomMuted | The anchor muted/unmuted the room. |
onMicrophoneMuted | The anchor disabled the mic. |
onCameraMuted | The anchor disabled the camera. |
onReceiveKickedOff | The anchor removed a member. |
API | Description |
---|---|
onStatistics | Statistics on technical metrics. |
onNetworkQuality | Network quality. |
API | Description |
---|---|
onScreenCaptureStarted | Screen sharing started. |
onScreenCaptureStopped | Screen sharing stopped. |
TUIRoomCore
This API is used to get a TUIRoomCore singleton object.
+ (instancetype)shareInstance;
+ (void)destroyInstance;
This API is used to set the event callback of TUIRoomCore. You can use TUIRoomCoreDelegate
to get different status notifications of TUIRoomCore.
- (void)setDelegate:(id)delegate;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
delegate | TUIRoomCoreDelegate | Event callback class. |
This API is used to create a room (called by the anchor).
- (void)createRoom:(NSString *)roomId
speechMode:(TUIRoomSpeechMode)speechMode
callback:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
roomId | NSString | Room ID. You need to assign and manage the IDs in a centralized manner. |
speechMode | TUIRoomSpeechMode | Speech mode. |
callback | TUIRoomActionCallback | Room creation result. |
Generally, the anchor calls the APIs in the following steps:
createRoom()
to create a room, the result of which is returned via TUIRoomActionCallback
.startCameraPreview()
to enable camera capturing and preview.startLocalAudio()
to enable the local mic.This API is used to terminate a room (called by the anchor).
- (void)destroyRoom:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
callback | TUIRoomActionCallback | Room termination result. |
This API is used to enter a room (called by a member).
- (void)enterRoom:(NSString *)roomId
callback:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
roomId | NSString | Room ID. |
callback | TUIRoomActionCallback | Result. |
Generally, a member enters a room in the following steps:
enterRoom
and passes in roomId
to enter the room.startCameraPreview()
to enable camera preview and calls startLocalAudio()` to enable mic capturing.onRemoteUserCameraAvailable
event and calls startRemoteView()
to start playback.This API is used to exit a room (called by a member).
- (void)leaveRoom:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
callback | TUIRoomActionCallback | Result. |
This API is used to get the room information.
- (nullable TUIRoomInfo *)getRoomInfo;
This API is used to get the information of all users in the room.
- (nullable NSArray *)getRoomUsers;
This API is used to get the information of a user in the room.
- (void)getUserInfo:(NSString *)userId
callback:(TUIRoomUserInfoCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID. |
callback | TUIRoomUserInfoCallback | Room member details. |
Set User Info
- (void)setSelfProfile:(NSString *)userName
avatarURL:(NSString *)avatarURL
callback:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userName | NSString | User name. |
avatarURL | NSString | User profile photo URL. |
callback | TUIRoomActionCallback | Whether the setting succeeded. |
This API is used to transfer a group to another user.
- (void)transferRoomMaster:(NSString *)userId
callback:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID. |
callback | TUIRoomActionCallback | Result. |
This API is used to start the preview of the local camera.
- (void)startCameraPreview:(BOOL)isFront
view:(UIView *)view;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
isFront | BOOL | YES: front camera; NO: rear camera. |
view | UIView | Control that carries the video image. |
This API is used to stop the preview of the local camera.
- (void)stopCameraPreview;
This API is used to start mic capturing.
- (void)startLocalAudio:(TRTCAudioQuality)quality;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
quality | TRTCAudioQuality | Captured sound quality. |
This API is used to stop mic capturing.
- (void)stopLocalAudio;
This API is used to set the mirroring preview mode of local video image.
- (void)setVideoMirror:(TRTCVideoMirrorType)type;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
type | TRTCVideoMirrorType | Mirroring type. |
This API is used to set whether to use the speaker or receiver.
- (void)setSpeaker:(BOOL)isUseSpeaker;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
isUseSpeaker | BOOL | YES: speaker; NO: receiver. |
This API is used to subscribe to a remote user's video stream.
- (void)startRemoteView:(NSString *)userId
view:(UIView *)view
streamType:(TUIRoomStreamType)streamType
callback:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | ID of the user whose video image is to be played back. |
view | UIView | The control that loads video images. |
streamType | TUIRoomStreamType | Stream type. |
callback | TUIRoomActionCallback | Result. |
This API is used to unsubscribe from and stop the playback of a remote video image.
- (void)stopRemoteView:(NSString *)userId
streamType:(TUIRoomStreamType)streamType
callback:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | ID of the user whose video image is to be stopped. |
streamType | TUIRoomStreamType | Stream type. |
callback | TUIRoomActionCallback | Result. |
This API is used to switch between the front and rear cameras.
- (void)switchCamera:(BOOL)isFront;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
isFront | BOOL | YES: front camera; NO: rear camera. |
This API is used to broadcast a text message in a room, which is generally used for text chat.
- (void)sendChatMessage:(NSString *)message
callback:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
message | NSString | Message content. |
callback | TUIRoomActionCallback | Sending result. |
This API is used to enable/disable the mic of the specified user.
- (void)muteUserMicrophone:(NSString *)userId
mute:(BOOL)mute
callback:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID. |
mute | BOOL | Whether to disable. |
callback | TUIRoomActionCallback | Result. |
This API is used to enable/disable the mic of all users.
- (void)muteAllUsersMicrophone:(BOOL)mute
callback:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
mute | BOOL | Whether to disable. |
callback | TUIRoomActionCallback | Result. |
This API is used to enable/disable the camera of the specified user.
- (void)muteUserCamera:(NSString *)userId
mute:(BOOL)mute
callback:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID. |
mute | BOOL | Whether to disable. |
callback | TUIRoomActionCallback | Result. |
This API is used to enable/disable the camera of all users.
- (void)muteAllUsersCamera:(BOOL)mute
callback:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
mute | BOOL | Whether to disable. |
callback | TUIRoomActionCallback | Result. |
This API is used to forbid/allow text chat.
- (void)muteChatRoom:(BOOL)mute
callback:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
mute | BOOL | Whether to disable. |
callback | TUIRoomActionCallback | Result. |
This API is used by the anchor to remove a member.
- (void)kickOffUser:(NSString *)userId
callback:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID. |
callback | TUIRoomActionCallback | Result. |
This API is used by the anchor to start roll call.
- (void)startCallingRoll:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
callback | TUIRoomActionCallback | Result. |
This API is used by the anchor to stop roll call.
- (void)stopCallingRoll:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
callback | TUIRoomActionCallback | Result. |
This API is used by a member to reply to roll call.
- (void)replyCallingRoll:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
callback | TUIRoomActionCallback | Result. |
This API is used by the anchor to invite a member to speak.
- (void)sendSpeechInvitation:(NSString *)userId
callback:(TUIRoomInviteeCallback)callback
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID. |
callback | TUIRoomInviteeCallback | Result. |
This API is used by the anchor to cancel the speech invitation to a member.
- (void)cancelSpeechInvitation:(NSString *)userId
callback:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID. |
callback | TUIRoomActionCallback | Result. |
This API is used by a member to accept/reject the speech invitation from the anchor.
- (void)replySpeechInvitation:(BOOL)agree
callback:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
agree | BOOL | Whether to approve. |
callback | TUIRoomActionCallback | Result. |
This API is used by a member to apply to speak.
- (void)sendSpeechApplication:(TUIRoomInviteeCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
callback | TUIRoomInviteeCallback | Result. |
This API is used by a member to cancel the speech application.
- (void)cancelSpeechApplication:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
callback | TUIRoomActionCallback | Result. |
This API is used by the anchor to approve/reject the speech application of a member.
- (void)replySpeechApplication:(BOOL)agree
userId:(NSString *)userId
callback:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
agree | BOOL | Whether to approve. |
userId | NSString | User ID. |
callback | TUIRoomActionCallback | Result. |
This API is used by the anchor to forbid speech application.
- (void)forbidSpeechApplication:(BOOL)forbid
callback:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
forbid | BOOL | Whether to forbid. |
callback | TUIRoomActionCallback | Result. |
This API is used by the anchor to stop the speech of the specified member.
- (void)sendOffSpeaker:(NSString *)userId
callback:(TUIRoomInviteeCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID. |
callback | TUIRoomInviteeCallback | Result. |
This API is used by the anchor to stop the speech of all members.
- (void)sendOffAllSpeakers:(TUIRoomInviteeCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
callback | TUIRoomInviteeCallback | Result. |
This API is used for a member to stop speaking and change their role to audience.
- (void)exitSpeechState:(TUIRoomActionCallback)callback;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
callback | TUIRoomActionCallback | Result. |
This API is used to start screen sharing.
- (void)startScreenCapture:(TRTCVideoEncParam *)encParam API_AVAILABLE(ios(11.0));
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
encParams | TRTCVideoEncParam | Sets encoding parameters for screen sharing. |
Note:For more information, please see TRTC SDK.
This API is used to stop screen capturing.
- (void)stopScreenCapture API_AVAILABLE(ios(11.0));
This API is used to get the beauty filter management object TXBeautyManager.
- (TXBeautyManager *)getBeautyManager;
You can do the following using TXBeautyManager
:
set QoS parameters
- (void)setVideoQosPreference:(TRTCNetworkQosParam *)preference;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
preference | TRTCNetworkQosParam | Network bandwidth limit policy. |
This API is used to set audio quality.
- (void)setAudioQuality:(TRTCAudioQuality)quality;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
quality | TRTCAudioQuality | Audio quality. For more information, please see TRTC SDK. |
This API is used to set the resolution.
- (void)setVideoResolution:(TRTCVideoResolution)resolution;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
resolution | TRTCVideoResolution | Video resolution. For more information, please see TRTC SDK. |
This API is used to set the frame rate.
- (void)setVideoFps:(int)fps;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
fps | int | Video capturing frame rate. |
Note:Recommended value: 15 or 20 fps. If the frame rate is lower than 5 fps, there will be obvious lag; if lower than 10 fps but higher than 5 fps, there will be slight lag; if higher than 20 fps, excessive resources will be wasted (the frame rate of movies is generally 24 fps).
This API is used to set the bitrate.
- (void)setVideoBitrate:(int)bitrate;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
bitrate | int | Bitrate. The SDK encodes streams at the target video bitrate and will actively reduce the bitrate only if the network conditions are poor. For more information, please see TRTC SDK. |
Note:Recommended value: see the optimal bitrate for each tier in
TRTCVideoResolution
. You can also slightly increase the bitrate. For example,TRTC_VIDEO_RESOLUTION_1280_720
corresponds to the target bitrate of 1,200 Kbps, and you can also set the bitrate to 1,500 Kbps for higher definition.
This API is used to enable the volume reminder.
- (void)enableAudioEvaluation:(BOOL)enable;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
enable | BOOL | YES: enable; NO: disable |
Note:After this feature is enabled, the result of volume evaluation by the SDK will be obtained in
onUserVolumeUpdate
.
This API is used to set the playback volume.
- (void)setAudioPlayVolume:(NSInteger)volume;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
volume | int | Playback volume. Value range: 0–100. Default value: 100. |
This API is used to set the mic capturing volume.
- (void)setAudioCaptureVolume:(NSInteger)volume;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
volume | int | Capture volume. Value range: 0–100. Default value: 100. |
This API is used to start audio recording.
- (void)startFileDumping:(TRTCAudioRecordingParams *)params;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
params | TRTCAudioRecordingParams | Audio recording parameters. For more information, please see TRTC SDK. |
Note:After this API is called, the SDK will record all audio of a call, including local audio, remote audio, and background music, into a file. This API works regardless of whether a user is in the room. When
leaveRoom
is called, audio recording will stop automatically.
This API is used to stop audio recording.
- (void)stopFileDumping;
This API is used to get SDK version information.
- (NSInteger)getSdkVersion;
- (void)onError:(NSInteger)code message:(NSString *)message;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
code | NSInteger | Error code. |
message | NSString | Error message |
Room dismissal.
- (void)onDestroyRoom;
User volume level.
- (void)onUserVoiceVolume:(NSString *)userId volume:(NSInteger)volume;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID. |
volume | NSInteger | User volume level. Value range: 0–100. |
Anchor change.
- (void)onRoomMasterChanged:(NSString *)previousUserId
currentUserId:(NSString *)currentUserId;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
previousUserId | NSString | Anchor's user ID before change. |
currentUserId | NSString | Anchor's user ID after change. |
A remote user entered the room.
- (void)onRemoteUserEnter:(NSString *)userId;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID |
A remote user exited the room.
- (void)onRemoteUserLeave:(NSString *)userId;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID |
Whether a remote user enabled the camera.
- (void)onRemoteUserCameraAvailable:(NSString *)userId
available:(BOOL)available;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID. |
available | BOOL | YES: enabled; NO: disabled. |
A member enabled/disabled video sharing.
- (void)onRemoteUserScreenVideoAvailable:(NSString *)userId
available:(BOOL)available;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID. |
available | BOOL | Whether screen sharing stream data is available. |
Whether a remote user is sending audio.
- (void)onRemoteUserAudioAvailable:(NSString *)userId
available:(BOOL)available;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID. |
available | BOOL | Whether audio data is available. |
A remote user started speaking.
- (void)onRemoteUserEnterSpeechState:(NSString *)userId;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID |
A remote user stopped speaking.
- (void)onRemoteUserExitSpeechState:(NSString *)userId;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID |
Callback for receiving a text message.
- (void)onReceiveChatMessage:(NSString *)userId message:(NSString *)message;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID. |
message | NSString | Text message |
A user received a speech invitation from the anchor.
- (void)onReceiveSpeechInvitation:(NSString *)userId;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | Anchor's user ID. |
A user received a speech invitation cancellation from the anchor.
- (void)onReceiveInvitationCancelled:(NSString *)userId;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | Anchor's user ID. |
The anchor received a speech application from a member.
void onReceiveSpeechApplication(String userId);
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID |
A user canceled a speech application.
- (void)onSpeechApplicationCancelled:(NSString *)userId;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID |
The anchor forbidden a speech application.
- (void)onSpeechApplicationForbidden:(BOOL)isForbidden userId:(NSString *)userId;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
isForbidden | BOOL | Whether to forbid. |
userId | NSString | User ID |
A member was asked to stop speaking.
- (void)onOrderedToExitSpeechState:(NSString *)userId;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | Anchor's user ID. |
The anchor started a roll call.
- (void)onCallingRollStarted:(NSString *)userId;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | Anchor's user ID. |
The anchor stopped a roll call.
- (void)onCallingRollStopped:(NSString *)userId;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | Anchor's user ID. |
A member replied to roll call.
- (void)onMemberReplyCallingRoll:(NSString *)userId;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | User ID |
The anchor muted/unmuted the room.
- (void)onChatRoomMuted:(BOOL)muted userId:(NSString *)userId;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
muted | BOOL | Whether to disable. |
userId | NSString | Anchor's user ID. |
The anchor disabled the mic.
- (void)onMicrophoneMuted:(BOOL)muted userId:(NSString *)userId;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
muted | BOOL | Whether to disable. |
userId | NSString | Anchor's user ID. |
The anchor disabled the camera.
- (void)onCameraMuted:(BOOL)muted userId:(NSString *)userId;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
muted | BOOL | Whether to disable. |
userId | NSString | Anchor's user ID. |
The anchor removed a member.
- (void)onReceiveKickedOff:(NSString *)userId;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
userId | NSString | Anchor/Admin's user ID. |
Callback of technical metric statistics.
- (void)onStatistics:(TRTCStatistics *)statistics;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
statis | TRTCStatistics | Statistics. |
Network quality.
- (void)onNetworkQuality:(TRTCQualityInfo *)localQuality remoteQuality:(NSArray *)remoteQuality;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
localQuality | TRTCQualityInfo | Upstream network quality. |
remoteQuality | NSArray<TRTCQualityInfo *> | Downstream network quality. |
Note:For more information, please see TRTC SDK.
Screen sharing started.
- (void)onScreenCaptureStarted;
Screen sharing stopped.
- (void)onScreenCaptureStopped:(NSInteger)reason;
The parameters are as detailed below:
Parameter | Type | Description |
---|---|---|
reason | NSInteger | Reason for stop. 0: the user stopped proactively; 1: stopped due to preemption by another application. |
Was this page helpful?