이 페이지는 현재 영어로만 제공되며 한국어 버전은 곧 제공될 예정입니다. 기다려 주셔서 감사드립니다.

uni-app (Anroid&iOS)

This article introduces the use of the group call feature, such as initiating a group call and joining a group call.

Expected outcome

TUICallKit supports group calls. The expected outcome is shown in the figure below.
Initiate a group call
Received Group Call Invitation
Accept Group Call Invitation










Create groupID

Before using the group call feature, you need to create a group first and initiate a group call in an existing group.
Method one: Create a group by calling the IM API, see IM Group Management for details.
Method two: Manually create a group through the console, see Console group management for details.

Group call

Initiate a group call

Launch a group call using the groupCall API.
const TUICallKit = uni.requireNativePlugin('TencentCloud-TUICallKit');
const options = {
groupID: 'myGroup',
userIDList: ['mike', 'tom'],
callMediaType: 1, // voice call(callMediaType = 1),video call(callMediaType = 2)
};
TUICallKit.groupCall(options, (res) => {
if (res.code === 0) {
console.log('groupCall success');
} else {
console.log(`groupCall failed, error message = ${res.msg}`);
}
});

Join a group call

Actively join an existing audio and video call in the group by calling the joinInGroupCall API.
const TUICallKit = uni.requireNativePlugin('TencentCloud-TUICallKit');
const options = {
roomID: 9898,
groupID: 'myGroup',
callMediaType: 1, // voice call(callMediaType = 1),video call(callMediaType = 2)
};
TUICallKit.joinInGroupCall(options, (res) => {
if (res.code === 0) {
console.log('joinInGroupCall success');
} else {
console.log(`joinInGroupCall failed, error message = ${res.msg}`);
}
});