connectOtherRoom() API in TRTCCloud will set up a video call between two anchors from different rooms. The caller will receive the onConnectOtherRoom() callback, which can be used to determine whether the cross-room call is successful. If it is successful, all users in both rooms will receive the onUserVideoAvailable() callback.userId of the anchor to compete withERR_NULL indicates a successful switch. For more information, please see Error Codes.enterRoom() API in TRTCCloud to enter a room, you will receive the onEnterRoom(result) callback from the SDK.result would be a positive number (result > 0), indicating the time in milliseconds (ms) room entry took.result would be a negative number (result < 0), which represents the error code.result is greater than 0, it indicates the time (in ms) room entry takes; if result is less than 0, it represents the error code.exitRoom() API in TRTCCloud will trigger the execution of room exit-related logic, including releasing resources such as audio/video devices and codecs. After all the resources are released, the SDK will notify you via the onExitRoom() callback.enterRoom() again or switch to another RTC SDK, please wait until you receive the onExitRoom() callback. Otherwise, you may encounter problems such as the camera or mic being occupied.0: The user called exitRoom to exit the room; 1: The user was kicked out of the room by the server; 2: The room was closed.userId is null, it indicates that the first video frame of the local user is rendered, in which case the callback is triggered by startLocalPreview. If userId is not null, it indicates that the first video frame of a remote user is rendered, in which case the callback is triggered by startRemoteView.startLocalPreview(), startRemoteView(), or startRemoteSubStreamView() is called.userId == null indicates the local user, while userId != null indicates a remote user.-1 in the current versionsendCustomCmdMsg to send a custom message, other users in the room can receive the message through the onRecvCustomCmdMsg callback.sendSEIMsg to send data, other users in the room can receive the data through the onRecvSEIMsg callback.TRTCCloudDef.TRTC_APP_SCENE_VIDEOCALL and TRTCCloudDef.TRTC_APP_SCENE_AUDIOCALL): The concept of roles does not apply, and the callback is triggered when any remote user enters the room.TRTCCloudDef.TRTC_APP_SCENE_LIVE and TRTCCloudDef.TRTC_APP_SCENE_VOICE_CHATROOM): Given that there is no limit on audience size and frequent callbacks may affect the SDK’s performance, the callback is triggered only when an anchor enters the room.onRemoteUserEnterRoom, this callback works differently under call and live streaming scenarios.TRTCCloudDef.TRTC_APP_SCENE_VIDEOCALL and TRTCCloudDef.TRTC_APP_SCENE_AUDIOCALL): The concept of roles does not apply, and the callback is triggered when any remote user exits the room.TRTCCloudDef.TRTC_APP_SCENE_LIVE and TRTCCloudDef.TRTC_APP_SCENE_VOICE_CHATROOM): The callback is triggered only when an anchor exits the room.0: The user exited the room voluntarily; 1: The user exited the room due to timeout; 2: The user was kicked out of the room.0: The user paused screen sharing; 1: Screen sharing was paused because the shared window became invisible.0: The user resumed screen sharing; 1: Screen sharing was resumed automatically after the shared window became visible again.-reason: reason. 0: The user stopped screen sharing; 1: Screen sharing stopped because the shared window was closed.
enterRoom() and startLocalAudio() are called successfully, the SDK will capture audio from the mic and encode the audio captured. It will return this callback after sending the first audio frame to the cloud.enterRoom() and startLocalPreview() are called successfully, the SDK will capture video from the camera and encode the video captured. It will return this callback after sending the first video frame to the cloud.setMixTranscodingConfig() API in TRTCCloud)0: successful; other values: failederrorCode is 0, the screenshot is taken successfully. Other values indicate failure to take the screenshot.startPublishCDNStream() API in TRTCCloud.0 (successful) is returned, it indicates that Tencent Cloud has been notified of the relaying request, but if an error occurs in the target CDN, relaying may still fail.0: successful; other values: failedstartPublishing() API in TRTCCloud)0: successful; other values: failedonNetworkQuality callback only.stopPublishCDNStream() API in TRTCCloud.0: successful; other values: failedstopPublishing() API in TRTCCloud)0: successful; other values: failedswitchRole() API in TRTCCloud to switch between the anchor and audience roles. This is accompanied by a line switching process. After the switch, the onSwitchRole() callback will be returned.0 indicates a successful switch.switchRoom)startMicDeviceTest.startSpeakerDeviceTest.onUserVideoAvailable(userId, true) callback indicates that the user has playable video frames. You can call startRemoteView(userid) to load the user’s video, and will receive the onFirstVideoFrame(userid) callback, which indicates that the first video frame has been rendered.onUserVideoAvailable(userId, false) callback indicates that the remote user has disabled video. It may be because the user called muteLocalVideo() or stopLocalPreview().userId and total remote volume)enableAudioVolumeEvaluation API in TRTCCloud to enable this callback or set its triggering interval. After enableAudioVolumeEvaluation is called to enable the volume callback, no matter whether there is a user speaking in the room, this callback will be triggered at the specified interval. If there is no one speaking, userVolumes will be empty, and totalVolume will be 0.userId is the ID of the local user, volume indicates the local user’s volume. userVolumes includes only the volumes of speaking users, i.e., users whose volume is not 0.Generated using TypeDoc
Listener type enumeration