会中邀请相关接口,此页面中的函数仅支持 Conference 房间类型。
TUIConferenceInvitationManager
函数接口 | 描述 |
邀请成员 | |
取消邀请 | |
接受邀请 | |
拒绝邀请 | |
拉取邀请列表 | |
TUIConferenceInvitationManagerEvents
事件接口 | 描述 |
收到邀请回调 | |
邀请已在其他设备被处理回调 | |
邀请被取消回调 | |
邀请被接受回调 | |
邀请被拒绝回调 | |
邀请超时回调 | |
邀请被管理员/房主撤销回调 | |
新增邀请回调 | |
邀请被移除回调 | |
邀请状态变更回调 |
结构体类型
函数列表 | 描述 |
邀请信息结构体 |
枚举类型
枚举类型 | 描述 |
邀请状态 | |
邀请错误码枚举 | |
邀请拒绝原因枚举 |
函数接口详情
inviteUsers
邀请成员
const roomEngine = new TUIRoomEngine();const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();await conferenceInvitationManager.inviteUsers({roomId: '12345',timeout: 60,userIdList,extensionInfo})
参数 | 类型 | 说明 | 默认 | 含义 |
roomId | string | 必填 | - | 房间 ID,roomId 限制长度为64字节,且仅支持以下范围的字符集: 大小写英文字母(a-zA-Z) 数字(0-9) 空格 ! # $ % & ( ) + - : ; < = . > ? @ [ ] ^ _ { } | ~ , |
timeout | number | 非必填 | 0 | 超时时间。 |
userIdList | Array<string> | 必填 | [] | 成员 userId 列表。 |
extensionInfo | string | 非必填 | '' | 扩展信息。 |
cancelInvitation
取消邀请
const roomEngine = new TUIRoomEngine();const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();await conferenceInvitationManager.cancelInvitation({roomId: '12345';userIdList: ['userId']})
参数 | 类型 | 说明 | 默认 | 含义 |
roomId | string | 必填 | - | 房间 ID,roomId 限制长度为64字节,且仅支持以下范围的字符集: 大小写英文字母(a-zA-Z) 数字(0-9) 空格 ! # $ % & ( ) + - : ; < = . > ? @ [ ] ^ _ { } | ~ , |
userIdList | Array<string> | 必填 | [] | 成员 userId 列表。 |
accept
接受邀请
const roomEngine = new TUIRoomEngine();const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();await conferenceInvitationManager.accept({roomId: '12345';})
参数 | 类型 | 说明 | 默认 | 含义 |
roomId | string | 必填 | - | 房间 ID,roomId 限制长度为64字节,且仅支持以下范围的字符集: 大小写英文字母(a-zA-Z) 数字(0-9) 空格 ! # $ % & ( ) + - : ; < = . > ? @ [ ] ^ _ { } | ~ , |
reject
拒绝邀请
const roomEngine = new TUIRoomEngine();const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();await conferenceInvitationManager.reject({roomId: '12345';})
参数 | 类型 | 说明 | 默认 | 含义 |
roomId | string | 必填 | - | 房间 ID,roomId 限制长度为64字节,且仅支持以下范围的字符集: 大小写英文字母(a-zA-Z) 数字(0-9) 空格 ! # $ % & ( ) + - : ; < = . > ? @ [ ] ^ _ { } | ~ , |
getInvitationList
拉取邀请列表
const roomEngine = new TUIRoomEngine();const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();await conferenceInvitationManager.reject({roomId: '12345';cursor: '';count: 10;})
参数 | 类型 | 说明 | 默认 | 含义 |
roomId | string | 必填 | - | 房间 ID,roomId 限制长度为64字节,且仅支持以下范围的字符集: 大小写英文字母(a-zA-Z) 数字(0-9) 空格 ! # $ % & ( ) + - : ; < = . > ? @ [ ] ^ _ { } | ~ , |
cursor | string | 必填 | '' | 分页获取索引,第一次拉取填 "",回调成功后,如果 callback 返回的数据中 cursor 不为"",表示需要分页,请以返回的 cursor 作为参数再次调用接口拉取,直至返回的 cursor 为"",表示数据已经全部拉取。 |
count | number | 必填 | 0 | 本次拉取数量。 |
on
const roomEngine = new TUIRoomEngine();const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();const callback = ({ roomInfo, accepted, extensionInfo }) => {console.log('conferenceInvitationManager.onReceiveInvitation', roomInfo, accepted, extensionInfo);};conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onReceiveInvitation, callback);
参数 | 类型 | 是否必填 | 默认值 | 说明 |
eventName | 是 | - | 事件名。 | |
func | (...args: any[]) => void | 是 | - | 事件处理函数。 |
off
const roomEngine = new TUIRoomEngine();const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();const callback = ({ roomInfo, accepted, extensionInfo }) => {console.log('conferenceInvitationManager.onReceiveInvitation', roomInfo, accepted, extensionInfo);};conferenceInvitationManager.off(TUIConferenceInvitationManagerEvents.onReceiveInvitation, callback);
参数 | 类型 | 是否必填 | 默认值 | 说明 |
eventName | 是 | - | 事件名。 | |
func | (...args: any[]) => void | 是 | - | 事件处理函数。 |
事件接口详情
onReceiveInvitation
收到邀请回调
const roomEngine = new TUIRoomEngine();const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();const callback = ({ roomInfo, accepted, extensionInfo }) => {console.log('conferenceInvitationManager.onReceiveInvitation', roomInfo, accepted, extensionInfo);};conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onReceiveInvitation, callback);
参数 | 类型 | 描述 |
roomInfo | 房间信息。 | |
invitation | 邀请信息。 | |
extensionInfo | string | 扩展信息。 |
onInvitationHandledByOtherDevice
邀请已在其他设备被处理回调
const roomEngine = new TUIRoomEngine();const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();const callback = ({ roomInfo, accepted }) => {console.log('conferenceInvitationManager.onInvitationHandledByOtherDevice', roomInfo, accepted);};conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationHandledByOtherDevice, callback);
参数 | 类型 | 描述 |
roomInfo | 房间信息。 | |
accepted | boolean | 邀请是否被接受。 |
onInvitationCancelled
邀请被取消回调
const roomEngine = new TUIRoomEngine();const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();const callback = ({ roomInfo, invitation }) => {console.log('conferenceInvitationManager.onInvitationCancelled', roomInfo, invitation);};conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationCancelled, callback);
参数 | 类型 | 描述 |
roomInfo | 房间信息。 | |
invitation | 邀请信息。 |
onInvitationAccepted
邀请被接受回调
const roomEngine = new TUIRoomEngine();const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();const callback = ({ roomInfo, invitation }) => {console.log('conferenceInvitationManager.onInvitationAccepted', roomInfo, invitation);};conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationAccepted, callback);
参数 | 类型 | 描述 |
roomInfo | 房间信息。 | |
invitation | 邀请信息。 |
onInvitationRejected
邀请被拒绝回调
const roomEngine = new TUIRoomEngine();const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();const callback = ({ roomInfo, invitation, reason }) => {console.log('conferenceInvitationManager.onInvitationRejected', roomInfo, invitation, reason);};conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationRejected, callback);
参数 | 类型 | 描述 |
roomInfo | 房间信息。 | |
invitation | 邀请信息。 | |
reason | 拒绝原因。 |
onInvitationTimeout
邀请超时回调
const roomEngine = new TUIRoomEngine();const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();const callback = ({ roomInfo, invitation }) => {console.log('conferenceInvitationManager.onInvitationTimeout', roomInfo, invitation);};conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationTimeout, callback);
参数 | 类型 | 描述 |
roomInfo | 房间信息。 | |
invitation | 邀请信息。 |
onInvitationRevokedByAdmin
邀请被管理员/房主撤销回调
const roomEngine = new TUIRoomEngine();const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();const callback = ({ roomInfo, invitation, userRole }) => {console.log('conferenceInvitationManager.onInvitationRevokedByAdmin', roomInfo, invitation, operateUser);};conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationRevokedByAdmin, callback);
参数 | 类型 | 描述 |
roomInfo | 房间信息。 | |
invitation | 邀请信息。 | |
operateUser | 撤回邀请的人的信息。 |
onInvitationAdded
新增邀请回调
const roomEngine = new TUIRoomEngine();const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();const callback = ({ roomInfo, invitation }) => {console.log('conferenceInvitationManager.onInvitationAdded', roomInfo, invitation);};conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationAdded, callback);
参数 | 类型 | 描述 |
roomInfo | 房间信息。 | |
invitation | 邀请信息。 |
onInvitationRemoved
邀请被移除回调
const roomEngine = new TUIRoomEngine();const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();const callback = ({ roomInfo, invitation }) => {console.log('conferenceInvitationManager.onInvitationRemoved', roomInfo, invitation);};conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationRemoved, callback);
参数 | 类型 | 描述 |
roomInfo | 房间信息。 | |
invitation | 邀请信息。 |
onInvitationStatusChanged
邀请状态变更回调
const roomEngine = new TUIRoomEngine();const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();const callback = ({ roomInfo, invitation }) => {console.log('conferenceInvitationManager.onInvitationStatusChanged', roomInfo, invitation);};conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationStatusChanged, callback);
参数 | 类型 | 描述 |
roomInfo | 房间信息。 | |
invitation | 邀请信息。 |
结构体类型详情
TUIInvitation
邀请信息结构体
枚举类型 | 描述 |
invitee | 被邀请者信息。 |
inviter | 邀请者信息。 |
status | 邀请状态。 |
枚举类型详情
TUIInvitationStatus
邀请状态
枚举 | 取值 | 描述 |
NONE | 0 | 未知状态。 |
PENDING | 1 | 待处理状态。 |
TIMEOUT | 2 | 超时状态。 |
ACCEPTED | 3 | 已接受状态。 |
REJECTED | 4 | 被拒绝状态。 |
TUIInvitationCode
邀请错误码枚举
枚举 | 取值 | 描述 |
SUCCESS | 0 | 邀请成功。 |
ALREADY_IN_INVITATION_LIST | 1 | 当前用户已在邀请列表。 |
ALREADY_IN_CONFERENCE | 2 | 当前用户已在房间内。 |
TUIInvitationRejectedReason
邀请拒绝原因枚举
枚举 | 取值 | 描述 |
REJECT_TO_ENTER | 0 | 拒绝进入。 |
IN_OTHER_CONFERENCE | 1 | 在其他会议中。 |