房间内广播消息
功能介绍
实现房间内消息广播。
此接口只能在进入房间后才能使用,房间内所有在线人员都能收到。
在消息内自定义接收者参数,只有目标用户才处理消息,可以达到1对1,1对n的效果;
发送自定义广播消息
- 调用接口:
//发送自定义广播消息
NSString *roomMsg=@"{\"CmdType":\"IM\", \"IMMsg\":\"xxxxxxxxxxx\"}";
[[RTCMeeting shareInstance] sendMeetingCustomMsg:roomMsg cookie:@""];
- 回调通知:
//发送数据的结果通知
- (void)sendMeetingCustomMsgRslt:(int)err cookie:(NSString *)cookie{
}
相关API请参考:
相关结构定义请参考:
处理房间广播消息
//通知收到房间广播消息
- (void)notifyMeetingCustomMsg:(NSString *)UserID jsonDat:(NSString *)data{
}
相关API请参考: