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