Interface 接口文档
接口定义总览
本页面包含所有的接口类型定义,包括 interface、type、enum 和 const 类型。
LoginOptions
interface
登录选项
属性列表
| Name | Type | Required | Description |
|---|---|---|---|
| sdkAppID | number | 是 | 腾讯云应用ID(必填) |
| userID | string | 是 | 用户ID(必填) |
| userSig | string | 是 | 用户签名(必填) |
| onSuccess | Function | 否 | 登录成功回调(可选) |
| onError | Function | 否 | 登录失败回调(可选) |
LogoutOptions
interface
登出选项
属性列表
| Name | Type | Required | Description |
|---|---|---|---|
| onSuccess | Function | 否 | 登出成功回调(可选) |
| onError | Function | 否 | 登出失败回调(可选) |
SetSelfInfoOptions
interface
设置用户信息选项
属性列表
| Name | Type | Required | Description |
|---|---|---|---|
| userProfile | Object | 是 | 用户信息对象(必填) |
| onSuccess | Function | 否 | 设置成功回调(可选) |
| onError | Function | 否 | 设置失败回调(可选) |
TakeSeatModeType
type
上麦模式类型
说明
| 值 | 说明 |
|---|---|
FREE |
自由上麦模式 |
APPLY |
申请上麦模式 |
LiveUserInfoParam
type
直播间用户信息参数
属性列表
| Name | Type | Required | Description |
|---|---|---|---|
| userID | string | 否 | 用户ID(必填) |
| userName | string | 否 | 用户名(可选) |
| avatarURL | string | 否 | 头像URL(可选) |
LiveInfoParam
interface
直播信息参数
属性列表
| Name | Type | Required |
|---|---|---|
| liveID | string | 是 |
| liveName | string | 否 |
| notice | string | 否 |
| isMessageDisable | boolean | 否 |
| isPublicVisible | boolean | 否 |
| isSeatEnabled | boolean | 否 |
| keepOwnerOnSeat | boolean | 否 |
| maxSeatCount | number | 否 |
| seatMode | TakeSeatModeType | 否 |
| seatLayoutTemplateID | number | 否 |
| coverURL | string | 否 |
| backgroundURL | string | 否 |
| categoryList | number[] | 否 |
| activityStatus | number | 否 |
| totalViewerCount | number | 否 |
| liveOwner | LiveUserInfoParam | 否 |
| createTime | number | 否 |
| isGiftEnabled | boolean | 否 |
| metaData | Map |
否 |
FetchLiveListOptions
interface
获取直播列表选项
属性列表
| Name | Type | Required |
|---|---|---|
| cursor | string | 否 |
| count | number | 否 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
CreateLiveOptions
interface
创建直播选项
属性列表
| Name | Type | Required |
|---|---|---|
| liveInfo | LiveInfoParam | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
JoinLiveOptions
interface
加入直播选项
属性列表
| Name | Type | Required |
|---|---|---|
| liveID | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
LeaveLiveOptions
interface
离开直播选项
属性列表
| Name | Type | Required |
|---|---|---|
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
EndLiveOptions
interface
结束直播选项
属性列表
| Name | Type | Required |
|---|---|---|
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
UpdateLiveInfoOptions
interface
更新直播信息选项
属性列表
| Name | Type | Required |
|---|---|---|
| liveID | string | 是 |
| title | string | 否 |
| coverUrl | string | 否 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
TakeSeatOptions
interface
上麦选项
属性列表
| Name | Type | Required |
|---|---|---|
| seatIndex | number | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
LeaveSeatOptions
interface
下麦选项
属性列表
| Name | Type | Required |
|---|---|---|
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
MuteMicrophoneOptions
interface
静音麦克风选项
属性列表
| Name | Type | Required |
|---|---|---|
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
UnmuteMicrophoneOptions
interface
取消静音麦克风选项
属性列表
| Name | Type | Required |
|---|---|---|
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
KickUserOutOfSeatOptions
interface
踢出座位选项
属性列表
| Name | Type | Required |
|---|---|---|
| userID | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
MoveUserToSeatOptions
interface
移动用户到座位选项
属性列表
| Name | Type | Required |
|---|---|---|
| fromSeatIndex | number | 是 |
| toSeatIndex | number | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
LockSeatOptions
interface
锁定座位选项
属性列表
| Name | Type | Required |
|---|---|---|
| seatIndex | number | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
UnlockSeatOptions
interface
解锁座位选项
属性列表
| Name | Type | Required |
|---|---|---|
| seatIndex | number | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
OpenRemoteCameraOptions
interface
开启远程摄像头选项
属性列表
| Name | Type | Required |
|---|---|---|
| userID | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
CloseRemoteCameraOptions
interface
关闭远程摄像头选项
属性列表
| Name | Type | Required |
|---|---|---|
| userID | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
OpenRemoteMicrophoneOptions
interface
开启远程麦克风选项
属性列表
| Name | Type | Required |
|---|---|---|
| userID | string | 是 |
| policy | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
CloseRemoteMicrophoneOptions
interface
关闭远程麦克风选项
属性列表
| Name | Type | Required |
|---|---|---|
| userID | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
LiveUserInfoParam
interface
直播用户信息参数
属性列表
| Name | Type | Required |
|---|---|---|
| userID | string | 是 |
| nickname | string | 否 |
| avatarURL | string | 否 |
| role | string | 否 |
FetchAudienceListOptions
interface
获取观众列表选项
属性列表
| Name | Type | Required |
|---|---|---|
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
SetAdministratorOptions
interface
设置管理员选项
属性列表
| Name | Type | Required |
|---|---|---|
| userID | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
RevokeAdministratorOptions
interface
撤销管理员选项
属性列表
| Name | Type | Required |
|---|---|---|
| userID | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
KickUserOutOfRoomOptions
interface
踢出用户选项
属性列表
| Name | Type | Required |
|---|---|---|
| userID | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
DisableSendMessageOptions
interface
禁用发送消息选项
属性列表
| Name | Type | Required |
|---|---|---|
| userID | string | 是 |
| isDisable | boolean | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
LiveUserInfoParam
interface
直播用户信息参数
属性列表
| Name | Type | Required |
|---|---|---|
| userID | string | 是 |
| nickname | string | 否 |
| avatarURL | string | 否 |
| role | string | 否 |
ApplyForSeatOptions
interface
申请连麦座位选项
属性列表
| Name | Type | Required |
|---|---|---|
| seatIndex | number | 否 |
| timeout | number | 否 |
| extension | string | 否 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
CancelApplicationOptions
interface
取消申请选项
属性列表
| Name | Type | Required |
|---|---|---|
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
AcceptApplicationOptions
interface
接受申请选项
属性列表
| Name | Type | Required |
|---|---|---|
| userID | string | 是 |
| seatIndex | number | 否 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
RejectApplicationOptions
interface
拒绝申请选项
属性列表
| Name | Type | Required |
|---|---|---|
| userID | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
InviteToSeatOptions
interface
邀请上麦选项
属性列表
| Name | Type | Required |
|---|---|---|
| userID | string | 是 |
| seatIndex | number | 否 |
| timeout | number | 否 |
| extension | string | 否 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
CancelInvitationOptions
interface
取消邀请选项
属性列表
| Name | Type | Required |
|---|---|---|
| inviteeID | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
AcceptInvitationOptions
interface
接受邀请选项
属性列表
| Name | Type | Required |
|---|---|---|
| inviterID | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
RejectInvitationOptions
interface
拒绝邀请选项
属性列表
| Name | Type | Required |
|---|---|---|
| inviterID | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
DisconnectOptions
interface
断开连接选项
属性列表
| Name | Type | Required |
|---|---|---|
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
BattleInfoParam
interface
PK 信息参数
属性列表
| Name | Type | Required |
|---|---|---|
| battleID | string | 否 |
| liveID | string | 否 |
| duration | number | 否 |
| startTime | number | 否 |
| endTime | number | 否 |
BattleConfigParam
interface
PK 配置参数
属性列表
| Name | Type | Required |
|---|---|---|
| duration | number | 否 |
| needResponse | boolean | 否 |
| extensionInfo | string | 否 |
RequestBattleOptions
interface
请求 PK 选项
属性列表
| Name | Type | Required |
|---|---|---|
| liveID | string | 是 |
| userIDList | string[] | 是 |
| timeout | number | 否 |
| config | BattleConfigParam | 否 |
| onSuccess | (battleInfo?: BattleInfoParam, result?: unknown) => void | 否 |
| onError | (error: Error | string) => void | 否 |
CancelBattleRequestOptions
interface
取消 PK 请求选项
属性列表
| Name | Type | Required |
|---|---|---|
| liveID | string | 是 |
| battleID | string | 是 |
| userIDList | string[] | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
AcceptBattleOptions
interface
接受 PK 选项
属性列表
| Name | Type | Required |
|---|---|---|
| liveID | string | 是 |
| battleID | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
RejectBattleOptions
interface
拒绝 PK 选项
属性列表
| Name | Type | Required |
|---|---|---|
| liveID | string | 是 |
| battleID | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
ExitBattleOptions
interface
退出 PK 选项
属性列表
| Name | Type | Required |
|---|---|---|
| liveID | string | 是 |
| battleID | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
AudioChangerTypeParam
type
变声器类型参数
AudioReverbTypeParam
type
混响类型参数
SetAudioChangerTypeOptions
interface
设置变声效果选项
属性列表
| Name | Type | Required |
|---|---|---|
| changerType | AudioChangerTypeParam | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
SetAudioReverbTypeOptions
interface
设置混响效果选项
属性列表
| Name | Type | Required |
|---|---|---|
| reverbType | AudioReverbTypeParam | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
SetVoiceEarMonitorEnableOptions
interface
设置耳返开关选项
属性列表
| Name | Type | Required |
|---|---|---|
| enable | boolean | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
VolumeOptions
interface
音量选项
属性列表
| Name | Type | Required |
|---|---|---|
| volume | number | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
BarrageParam
interface
弹幕参数
属性列表
| Name | Type | Required |
|---|---|---|
| content | string | 否 |
| text | string | 否 |
| sender | string | 否 |
| userID | string | 否 |
| nickname | string | 否 |
| avatarURL | string | 否 |
| timestamp | number | 否 |
| messageID | string | 否 |
SendTextMessageOptions
interface
发送文本消息选项
属性列表
| Name | Type | Required |
|---|---|---|
| liveID | string | 是 |
| text | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
SendCustomMessageOptions
interface
发送自定义消息选项
属性列表
| Name | Type | Required |
|---|---|---|
| liveID | string | 是 |
| businessID | string | 是 |
| data | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
AppendLocalTipOptions
interface
添加本地提示消息选项
属性列表
| Name | Type | Required |
|---|---|---|
| liveID | string | 是 |
| message | BarrageParam | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
SetSmoothLevelOptions
interface
设置磨皮级别选项
属性列表
| Name | Type | Required |
|---|---|---|
| smoothLevel | number | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
SetWhitenessLevelOptions
interface
设置美白级别选项
属性列表
| Name | Type | Required |
|---|---|---|
| whitenessLevel | number | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
SetRuddyLevelOptions
interface
设置红润级别选项
属性列表
| Name | Type | Required |
|---|---|---|
| ruddyLevel | number | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
BeautyType
type
美颜类型
RefreshUsableGiftsOptions
interface
刷新可用礼物列表选项
属性列表
| Name | Type | Required |
|---|---|---|
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
SendGiftOptions
interface
发送礼物选项
属性列表
| Name | Type | Required |
|---|---|---|
| liveID | string | 是 |
| giftID | string | 是 |
| count | number | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
SetLanguageOptions
interface
设置礼物语言选项
属性列表
| Name | Type | Required |
|---|---|---|
| liveID | string | 是 |
| language | string | 是 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |
SendLikeOptions
interface
发送点赞选项
属性列表
| Name | Type | Required |
|---|---|---|
| count | number | 否 |
| onSuccess | () => void | 否 |
| onError | (error: Error | string) => void | 否 |