用户

新用户进入直播间: BroadCastCmdType.MEMBER_JOIN_OTHER

{"noxid":["22872173"],"cmd":"member:join:other","args":{"member":{"xid":"22872173","uid":"u_46162857","nickname":"哈哈","role":"user","gender":0,"avatar":"","a":0,"voice":{"enable":1,"grant":0},"chat":{"enable":1,"grant":0},"gid":0,"term":1},"total":1}}

@参数说明:

member
参数 类型 描述
xid String 欢拓用户ID
uid String 合作方用户ID
nickname String 用户昵称
role String 用户角色
gender String 用户性别
Total:用户总数
调用示例:
HtSdk.getInstance().on(BroadcastCmdType.MEMBER_JOIN_OTHER, new Emitter.Listener() {
@Override
public void call(Object... args) {

    ...
}

在线用户总数: BroadCastCmdType.MEMBER_TOTAL

{"total":2}

@参数说明:

参数 类型 描述
total int 在线人数
调用示例:
HtSdk.getInstance().on(BroadcastCmdType.MEMBER_TOTAL, new Emitter.Listener() {
@Override
public void call(Object... args) {
    ...
}

用户离开房间: BroadCastCmdType.MEMBER_LEAVE

{"noxid":[22872418],"cmd":"member:leave","args":{"xid":22872418,"uid":"u_12771357","nickname":"解解渴","total":1}}

@参数说明:

参数 类型 描述
xid String 欢拓用户ID
uid String 合作方用户ID
nickname String 用户昵称
total int 剩余人数
调用示例:
HtSdk.getInstance().on(BroadcastCmdType.MEMBER_LEAVE, new Emitter.Listener() {
@Override
public void call(Object... args) {
    ...
}

踢人: BroadCastCmdType.MEMBER_KICK

{"cmd":"member:kick","args":{"xid":22873790,"nickname":"哈哈"}}

@参数说明:

参数 类型 描述
xid String 欢拓用户ID
nickname String 用户名
调用示例:
HtSdk.getInstance().on(BroadcastCmdType.MEMBER_KICK, new Emitter.Listener() {
@Override
public void call(Object... args) {
    ...
}

被人强迫下线: BroadCastCmdType.MEMBER_FORCEOUT

{"cmd":"member:forceout","args":{"uid":"u_90243230","xid":"22874173","role":"user","regtime":1513851238,"state":1,"nickname":"哈哈","gender":0,"avatar":"","a":0,"sid":"ldzttx4nI3xNNI0KAwiY","sessionid":"","serverID":"14.29.84.210:1080","gid":0,"term":1,"ip":"219.136.204.230","voice":{"enable":1,"grant":0},"video":{"enable":1,"grant":0},"chat":{"enable":1,"grant":0},"heatbeatTime":1513851486,"lastTime":1513851431}}

@参数说明:

参数 类型 描述
xid String 欢拓用户ID
uid String 合作方用户ID
role String 角色
nickname String 用户名
gender int 用户性别
state int 状态
heatbeatTime init 被强迫下线时间
lastTime init 进入房间时间
调用示例:
HtSdk.getInstance().on(BroadcastCmdType.MEMBER_FORCEOUT, new Emitter.Listener() {
@Override
public void call(Object... args) {
    ...
}
Copyright Talkfun all right reserved,powered by Gitbook修订时间: 2020-05-13 10:23:22

results matching ""

    No results matching ""