cn.tee3.avd_SDK-Objectc  2.1.0
AVDRoom.h
浏览该文件的文档.
1 //
2 // AVDRoom.h
3 // avd_sdk
4 //
5 // Created by skin on 15-7-21.
6 // Copyright (c) 2015年 t3ee. All rights reserved.
7 //
8 
9 #ifndef avd_sdk_AVDRoom_h
10 #define avd_sdk_AVDRoom_h
11 
12 #import "AVDRoomInfo.h"
13 #import "AVDUser.h"
14 #import "AVDUserManager.h"
15 #import "AVDRoomStats.h"
16 #import "AVDMediaStats.h"
17 
80 };
81 
82 @protocol AVDRoomJoinDelegate <NSObject>
83 - (void)onJoinResult:(AVDResult)aResult;
84 
85 @end
86 
92 @protocol AVDRoomDelegate<NSObject>
93 
94 @required
96 
106 - (void)onLeaveIndication:(AVDResult)reason fromUser:(AVDUserId)fromId;
108 
113 - (void)onConnectionStatus:(enum AVDConnectionStatus)status;
114 
115 @optional
117 
127 - (void)onJoinResult:(AVDResult)result;
128 
130 
137 - (void)onPublicData:(NSData*)data fromUser:(AVDUserId)fromId;
138 
146 - (void)onPrivateData:(NSData*)data fromUser:(AVDUserId)fromId;
147 
155 - (void)onAppDataNotify:(NSString*)key value:(NSString*)value;
156 
162 - (void)onRoomStatusNotify:(enum AVDRoomStatus)status;
163 
164 @end
165 
166 
167 
173 @interface AVDRoom : NSObject
174 
175 @property (nonatomic,weak) id <AVDRoomDelegate>delegate;
177 @property (nonatomic,strong) AVDUserManager* userManager;
184 + (AVDRoom* ) obtain:(AVDRoomId)roomID;
187 - (void) destory;
188 
198 - (AVDResult) joinWithUser:(AVDUser*)user password:(NSString*)password delegate:(id<AVDRoomJoinDelegate>)joinresult;
199 - (AVDResult) joinWithUser:(AVDUser*)user password:(NSString*)password delegate:(id<AVDRoomJoinDelegate>)joinresult oemToken:(NSString*)token;
200 
208 - (AVDResult) leave:(AVDResult)reason; // leave myself
209 
215 - (AVDResult) reJoin;
216 
226 - (AVDResult) kickoutUser:(AVDResult)reason userId:(AVDUserId)userId;
227 
235 - (AVDResult) updateRoomStatus:(enum AVDRoomStatus)status;
242 
247 - (AVDRoomId) getRoomId;
248 
254 - (NSString*) getAppRoomId;
255 
260 - (NSString*) getRoomName;
261 
266 - (NSString*) getRoomTopic;
267 
274 
282 - (AVDResult) sendPublicData:(NSData*)data;
283 
292 - (AVDResult) sendPrivateData:(NSData*)data toUserId:(AVDUserId)toId;
293 
301 - (NSString*) getAppData:(NSString*)key;
309 - (AVDResult) updateAppData:(NSString*)key value:(NSString*)value;
318 - (AVDDeviceId) createFakeDeviceID:(AVDDeviceId)fakeId;
319 
325 - (AVDResult) enableStats:(BOOL)isEnable;
336 - (AVDMediaStats*) getMediaStats:(AVDDeviceId)deviceId;
337 
338 //
346 - (AVDResult) setOption:(enum AVDRoomOption)type value:(NSString*)svalue;
353 - (NSString*) getOption:(enum AVDRoomOption)type;
354 
355 #ifndef DOXYGEN_SHOULD_SKIP_THIS
356 // Disallow init and don't add to documentation
357 - (id)init __attribute__((
358  unavailable("init is not a supported initializer for this class.")));
359 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
360 
361 @end
362 
363 #endif
值类型为uint32, 字符类型为"3" or "10"等数字字符:设置共享屏幕时的帧率,系统默认为5。 ...
Definition: AVDRoom.h:70
NSString * getRoomName()
获取房间名
NSString * getAppRoomId()
获取房间应用层Id
AVDRoomInfo * getRoomInfo()
获取房间信息
值类型为bool, 字符类型为"true" or "false":设置房间中发布视频时是否发布混屏后视频;系统默认为false。 ...
Definition: AVDRoom.h:75
值类型为bool, 字符类型为"true" or "false":表示音视频是否启用DTLS加密,DTLS加密数据更加安全,但是会加...
Definition: AVDRoom.h:33
媒体统计信息结构.
Definition: AVDMediaStats.h:17
房间统计信息结构.
Definition: AVDRoomStats.h:17
NSString * AVDDeviceId
Definition: AVDCommon.h:17
AVDResult reJoin()
重新加入当前房间
AVDRoomStats * getRoomStats()
获取房间的流量统计信息
id< AVDRoomDelegate > delegate
房间逻辑回调代理
Definition: AVDRoom.h:175
值类型为string, 音频编码算法:字符类型为"isac" or "opus":分别表示isac语音编码 和 opus音乐编码;缺省...
Definition: AVDRoom.h:48
值类型为uint32, 字符类型为"3" or "2"等数字字符:设置断线重连失败后自动加入的次数,在启用ro_room_auto_...
Definition: AVDRoom.h:66
NSInteger AVDResult
Definition: AVDCommon.h:14
NSString * AVDRoomId
Definition: AVDCommon.h:16
用户数据结构.
Definition: AVDUser.h:21
AVDConnectionStatus
房间网络状态
Definition: AVDRoomInfo.h:35
值类型为bool, 字符类型为"true" or "false":表示接收到音频数据后不解码直接丢弃,一般用于模拟客服端做并...
Definition: AVDRoom.h:29
AVDRoomStatus
房间状态
Definition: AVDRoomInfo.h:26
值类型为bool, 字符类型为"true" or "false":设置共享屏幕时的是否共享扬声器的声音;系统默认为false。暂...
Definition: AVDRoom.h:72
(unavailable("init is not a supported initializer for this class." __attribute__()
NSString * AVDUserId
Definition: AVDCommon.h:15
值类型为MediaCodecInfo.CodecCapabilities中的枚举值, 字符类型为枚举值的字符串,目前支持一下:"19" - YU...
Definition: AVDRoom.h:78
值类型为枚举CameraType, 字符类型为"front" or "back":表示前后置摄像头模式时房间中默认使用的摄像头:前...
Definition: AVDRoom.h:59
值类型为bool, 字符类型为"true" or "false":表示房间中是否优先使用硬件编码:优先使用硬件编码(true)和优...
Definition: AVDRoom.h:51
值类型为bool, 字符类型为"true" or "false":表示房间中混音数据回调是否缓冲为1024sample后回调:缓冲(tru...
Definition: AVDRoom.h:55
值类型为int32, 字符类型为"3" or "2"等数字字符:设置每次断线后重连次数。系统默认为重连3次,如需改变需...
Definition: AVDRoom.h:38
NSString * getRoomTopic()
获取房间主题
初始状态
Definition: AVDRoomInfo.h:37
房间信息结构.
Definition: AVDRoomInfo.h:48
值类型为string, 音频订阅模式:字符类型为"autosubscribe" or "nosubscribe":分别表示自动订阅房间中全部...
Definition: AVDRoom.h:44
值类型为int32, 字符类型为"true" or "false":在重连失败之后是否尝试自动重新加入房间,系统默认为true。 ...
Definition: AVDRoom.h:63
值类型为uint32, 字符类型为"3000" or "5000" :设置链接超时时间,单位毫秒,必须是正数,系统默认是5000毫...
Definition: AVDRoom.h:41
值类型为bool, 字符类型为"true" or "false":表示接收到视频数据后不解码直接丢弃,一般用于模拟客服端做并...
Definition: AVDRoom.h:25
AVDRoomId getRoomId()
获取房间Id
AVDUserManager * userManager
房间用户管理模块接口
Definition: AVDRoom.h:177
用户管理接口类
Definition: AVDUserManager.h:83
房间接口类
Definition: AVDRoom.h:173
void destory()
释放房间对象
房间回调接口类
Definition: AVDRoom.h:92
AVDRoomOption
房间选项
Definition: AVDRoom.h:24
enum AVDRoomStatus getRoomStatus()
获取房间状态