TUICallKit is an audio/video call component that includes UI elements. You can use its APIs to quickly implement an audio/video call application similar to WeChat. For directions on integration, see Integrating TUICallKit.API | Description |
Creates a TUICallKit instance (singleton mode). | |
Sets the alias and profile photo. | |
Initiates a one-to-one or multi-person call. | |
Proactively joins a call. | |
Sets the ringtone. | |
Sets whether to turn on the mute mode. | |
Sets whether to enable floating windows. | |
Sets whether to display incoming banner. | |
Sets the screen orientation. | |
Sets a blurred background. |
TUICallKit singleton.import com.tencent.qcloud.tuikit.tuicallkit.TUICallKitfun createInstance(context: Context): TUICallKit
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKit;TUICallKit createInstance(Context context);
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKitfun setSelfInfo(nickname: String?, avatar: String?, completion: CompletionHandler?);
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKit;TUICallKit createInstance(Context context);
Parameter | Type | Meaning |
nickname | String | The target user names. |
avatar | String | The target user avatar. |
completion | CompletionClosure | The result callback of the asynchronous operation. |
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKitimport io.trtc.tuikit.atomicxcore.api.call.CallMediaTypeimport io.trtc.tuikit.atomicxcore.api.call.CallParamsfun calls(userIdList: List<String>, mediaType: CallMediaType,params: CallParams?, completion: CompletionHandler?);
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKit;import io.trtc.tuikit.atomicxcore.api.call.CallMediaType;import io.trtc.tuikit.atomicxcore.api.call.CallParams;void calls(List<String> userIdList, CallMediaType mediaType, CallParams params, CompletionHandler completion);
Parameter | Type | Description |
userIdList | List<String> | Target user ID list |
mediaType | Media type of the call, such as video call, voice call | |
params | Call extension parameters, such as room number, call invitation timeout | |
completion | CompletionClosure | Callback for the result of an asynchronous operation |
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKitfun join(callId: String?, completion: CompletionHandler?);
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKit;void join(String callId, CompletionHandler completion);
Parameter | Type | Description |
callId | String | The unique ID for this call |
completion | CompletionClosure | The result callback of the asynchronous operation. |
filePath must be an accessible local file URL.filePath.import com.tencent.qcloud.tuikit.tuicallkit.TUICallKitfun setCallingBell(filePath: String?);
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKit;void setCallingBell(String filePath);
false, This API is used to set whether to play the music when user received a call. import com.tencent.qcloud.tuikit.tuicallkit.TUICallKitfun enableMuteMode(enable: Boolean);
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKit;void enableMuteMode(boolean enable);
false, and the floating window button in the top left corner of the call view is hidden. If it is set to true, the button will become visible.import com.tencent.qcloud.tuikit.tuicallkit.TUICallKitfun enableFloatWindow(enable: Boolean);
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKit;void enableFloatWindow(boolean enable);
false, The callee will pop up a full-screen call view by default when receiving the invitation. If it is set to true, the callee will display a banner first.import com.tencent.qcloud.tuikit.tuicallkit.TUICallKitfun enableIncomingBanner(enable: Boolean);
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKit;void enableIncomingBanner(boolean enable);
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKitfun setScreenOrientation(orientation: Int);
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKit;void setScreenOrientation(int orientation);
false.import com.tencent.qcloud.tuikit.tuicallkit.TUICallKitfun enableVirtualBackground(enable: Boolean);
fun call(userId: String, callMediaType: TUICallDefine.MediaType)
void call(String userId, TUICallDefine.MediaType callMediaType)
Parameter | Type | Description |
userId | String | The target user ID. |
callMediaType | The call type, which can be video or audio. |
fun call(userId: String, callMediaType: TUICallDefine.MediaType,params: CallParams?, callback: TUICommonDefine.Callback?)
void call(String userId, TUICallDefine.MediaType callMediaType,TUICallDefine.CallParams params, TUICommonDefine.Callback callback)
Parameter | Type | Description |
userId | String | The target user ID. |
callMediaType | The call type, which can be video or audio. | |
params | Call extension parameters, such as roomID, call timeout, offline push info,etc. |
fun groupCall(groupId: String, userIdList: List<String?>?, callMediaType: TUICallDefine.MediaType)
void groupCall(String groupId, List<String> userIdList, TUICallDefine.MediaType callMediaType);
Parameter | Type | Description |
groupId | String | The group ID. |
userIdList | List | The target user IDs. |
callMediaType | The call type, which can be video or audio. |
fun groupCall(groupId: String, userIdList: List<String?>?,callMediaType: TUICallDefine.MediaType, params: CallParams?,callback: TUICommonDefine.Callback?)
void groupCall(String groupId, List<String> userIdList, TUICallDefine.MediaType callMediaType,TUICallDefine.CallParams params, TUICommonDefine.Callback callback);
Parameter | Type | Description |
groupId | String | The group ID. |
userIdList | List | The target user IDs. |
callMediaType | The call type, which can be video or audio. | |
params | Call extension parameters, such as roomID, call timeout, offline push info,etc. |
fun joinInGroupCall(roomId: RoomId?, groupId: String?, callMediaType: TUICallDefine.MediaType?)
void joinInGroupCall(TUICommonDefine.RoomId roomId, String groupId, TUICallDefine.MediaType callMediaType);
Parameter | Type | Description |
roomId | The room ID. | |
groupId | String | The group ID. |
callMediaType | The call type, which can be video or audio. |
fun disableControlButton(button: Constants.ControlButton?)
void disableControlButton(Constants.ControlButton button);
Parameter | Type | Description |
button | ControlButton | Hide button. |
Feedback