跳转至

房间属性

设置房间属性

设置房间属性,如创建房间时可通过此功能标识房间创建者,其他房间内用户可获取到此属性信息

// 设置房间属性,并选择是否往房间中发送消息
-(void)setRoomAttributeValue:(NSString *)attributeValue forKey:(NSString *)key message:(RCMessageContent *)message completion:(RongRTCOperationCallback)completion;

删除房间属性

// 删除房间属性,并选择是否往房间中发送消息
-(void)deleteRoomAttributes:(NSArray <NSString *> *)attributeKeys message:(RCMessageContent *)message completion:(RongRTCOperationCallback)completion;

获取房间当前设置的属性信息

// 获取房间属性
-(void)getRoomAttributes:(NSArray <NSString *> *)attributeKeys completion:(RongRTCAttributeOperationCallback)completion;

房间内消息发送

发送消息,通过此接口向房间内发送消息

- (RCMessage *)sendRTCMessage:(RCMessageContent *)content
                  pushContent:(NSString *)pushContent
                     pushData:(NSString *)pushData
                      success:(void (^)(long messageId))successBlock
                        error:(void (^)(RCErrorCode nErrorCode, long messageId))errorBlock