当前用户进入房间触发
- TalkfunSDKLiveDelegate 或 TalkfunSDKLifeLiveDelegate
- (void)onMemberJoinMe:(TFMember*_Nullable)result
其它人进入房间触发
- TalkfunSDKLiveDelegate 或 TalkfunSDKLifeLiveDelegate
- (void)onMemberJoinOther:(TFMember*_Nullable)result
有人退出房间
- TalkfunSDKLiveDelegate 或 TalkfunSDKLifeLiveDelegate
- (void)onMemberLeave:(TFMember*_Nullable)result
同时在线人数 (真实人+虚拟人员 的总数)
- TalkfunSDKLiveDelegate 或 TalkfunSDKLifeLiveDelegate
- (void)onPeakConcurrentUsers:(NSInteger)total
相互挤下线
- TalkfunSDKLiveDelegate 或 TalkfunSDKLifeLiveDelegate
- (void)onMemberForceout
当前用户被踢出房间的事件回调
- TalkfunSDKLiveDelegate 或 TalkfunSDKLifeLiveDelegate
- (void)onMemberKick
//成员信息
@interface TFMember : NSObject
///【字段含义】成员名字
@property (nonatomic, copy, nonnull) NSString* nickname;
///【字段含义】成员头像
@property (nonatomic, copy, nonnull) NSString* avatar;
@property (nonatomic, copy, nonnull) NSString* gender;
@property (nonatomic, copy, nonnull) NSString* uid;
/**角色
extern NSString * const TalkfunMemberRoleSpadmin; //超级管理员(老师)
extern NSString * const TalkfunMemberRoleAdmin; //管理员(助教)
extern NSString * const TalkfunMemberRoleUser; //普通用户(学生)
extern NSString * const TalkfunMemberRoleGuest; //游客
*/
@property (nonatomic, copy, nonnull) NSString* role;
/**{
"enable" : 1,
"grant" : 0
}
*/
@property (nonatomic, copy, nonnull) NSDictionary*chat;
/**{
"enable" : 1,
"grant" : 0
}
*/
@property (nonatomic, copy, nonnull) NSDictionary*voice;
@property (nonatomic, copy, nonnull) NSString* a;
@property (nonatomic, copy, nonnull) NSString* xid;
/**成员所在分组*/
@property (nonatomic, copy, nonnull) NSString* gid;
@property (nonatomic, copy, nonnull) NSString* term;
@end
----------------------下面的代码为过期的方法,不建议使用----------------------
新用户进入直播间: TALKFUN_EVENT_MEMBER_JOIN_OTHER
@参数说明:
member
参数 |
类型 |
描述 |
xid |
NSNumber |
欢拓用户ID |
uid |
NSString |
合作方用户ID |
nickname |
NSString |
用户昵称 |
role |
NSString |
用户角色 |
gender |
NSNumber |
用户性别 |
Total:用户总数
调用示例:
[self.talkfunSDK on:TALKFUN_EVENT_MEMBER_JOIN_OTHER callback:^(id res) {
//返回数据
{
member = {
avatar = "";
chat = {
enable = 1;
grant = 0;
};
gender = 0;
nickname = rrr;
role = user;
uid = 2277843;
voice = {
enable = 1;
grant = 0;
};
xid = 346440;
};
total = 3;
}
}];
在线用户总数: TALKFUN_EVENT_MEMBER_TOTAL
@参数说明:
参数 |
类型 |
描述 |
total |
NSNumber |
在线人数 |
调用示例:
[self.talkfunSDK on:TALKFUN_EVENT_MEMBER_TOTAL callback:^(id obj) {
//{"total":2}
}];
用户离开房间: TALKFUN_EVENT_MEMBER_LEAVE
@参数说明:
参数 |
类型 |
描述 |
member |
NSDictionary |
走掉的人的信息 |
total |
NSNumber |
剩余总人数 |
调用示例:
[self.talkfunSDK on:TALKFUN_EVENT_MEMBER_LEAVE callback:^(id obj) {
//返回数据
{
nickname = rrr;
total = 2;
uid = 2277843;
xid = 346440;
}
}];
member说明:
参数 |
类型 |
描述 |
xid |
NSNumber |
欢拓用户ID |
uid |
NSString |
合作方用户ID |
nickname |
NSString |
用户昵称 |
role |
NSString |
用户角色 |
gender |
NSNumber |
用户性别 |
voice |
NSDictionary |
是否可以说话(1是可以) |
chat |
NSDictionary |
是否可以聊天(1是可以) |
踢人: TALKFUN_EVENT_MEMBER_KICK
@参数说明:
参数 |
类型 |
描述 |
xid |
NSNumber |
欢拓用户ID |
nickname |
NSString |
欢拓用户名 |
role |
NSString |
用户角色 |
voice |
NSDictionary |
是否可以说话(1是可以) |
chat |
NSDictionary |
是否可以聊天(1是可以) |
video |
NSDictionary |
是否可以看直播(1是可以) |
调用示例:
[self.talkfunSDK on:TALKFUN_EVENT_MEMBER_KICK callback:^(id obj) {
//返回数据
{
chat = {
enable = 0;
grant = 1;
};
nickname = rrr;
role = user;
video = {
enable = 1;
grant = 0;
};
voice = {
enable = 1;
grant = 0;
};
xid = 346440;
}
}];
被人强迫下线: TALKFUN_EVENT_MEMBER_FORCEOUT
@参数说明:
参数 |
类型 |
描述 |
uid |
NSString |
合作方用户ID |
xid |
NSNumber |
欢拓用户ID |
role |
NSString |
用户角色 |
state |
NSNumber |
状态 |
nickname |
NSString |
欢拓用户名 |
gender |
NSNumber |
用户性别 |
sessionid |
NSString |
服务器返回的标志 |
voice |
NSDictionary |
是否可以说话(1是可以) |
video |
NSDictionary |
是否可以看直播(1是可以) |
chat |
NSDictionary |
是否可以聊天(1是可以) |
heatbeatTime |
NSNumber |
被强迫下线时间 |
roomid |
NSNumber |
房间ID |
lastTime |
NSNumber |
进入房间时间 |
调用示例:
[self.talkfunSDK on:TALKFUN_EVENT_MEMBER_FORCEOUT callback:^(id obj) {
//返回数据
{
attr = (
);
avatar = "";
chat = {
enable = 1;
grant = 0;
};
gender = 0;
heatbeatTime = 1457088463;
nickname = rrrr;
regtime = 1457087820;
role = user;
roomid = 550481;
sessionid = "2697a65d-1c8b-4095-9925-9316eb825aba";
sid = "a5t5ol4-rlvRsvLeAAN-";
state = 1;
uid = 1185252;
video = {
enable = 1;
grant = 0;
};
voice = {
enable = 1;
grant = 0;
};
xid = 337861;
}
}];