IEMConferenceManager.h 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569
  1. /*!
  2. * \~chinese
  3. * @header IEMConferenceManager.h
  4. * @abstract 此协议定义了多人实时音频/视频通话相关操作
  5. * @author Hyphenate
  6. * @version 3.00
  7. *
  8. * \~english
  9. * @header IEMConferenceManager.h
  10. * @abstract This protocol defines a multiplayer real-time audio / video call related operation
  11. * @author Hyphenate
  12. * @version 3.00
  13. */
  14. #ifndef IEMConferenceManager_h
  15. #define IEMConferenceManager_h
  16. #import <Foundation/Foundation.h>
  17. #import <AVFoundation/AVFoundation.h>
  18. #import "EMCallConference.h"
  19. #import "EMConferenceManagerDelegate.h"
  20. #import "EMLocalAudioDataDelegate.h"
  21. #import "EMRemoteAudioDataDelegate.h"
  22. #import "EMCallVideoView.h"
  23. #import "EMWaterMarkOption.h"
  24. #import "EMWhiteboard.h"
  25. /*!
  26. * \~chinese
  27. * 加入房间时使用的配置信息
  28. *
  29. * \~english
  30. * The configuration used while join the room
  31. */
  32. @interface RoomConfig:NSObject
  33. /*!
  34. * \~chinese
  35. * 会议类型
  36. *
  37. * \~english
  38. * The type of conference
  39. */
  40. @property (nonatomic) EMConferenceType confrType;
  41. /*!
  42. * \~chinese
  43. * 录制时是否合并数据流
  44. *
  45. * \~english
  46. * Whether to merge data streams while recording
  47. */
  48. @property (nonatomic) BOOL isMerge;
  49. /*!
  50. * \~chinese
  51. * 是否开启服务端录制
  52. *
  53. * \~english
  54. * Whether to record data streams
  55. */
  56. @property (nonatomic) BOOL isRecord;
  57. /*!
  58. * \~chinese
  59. * 是否支持微信小程序
  60. *
  61. * \~english
  62. * Weather to support wechat mini program
  63. */
  64. @property (nonatomic) BOOL isSupportWechatMiniProgram;
  65. /*!
  66. * \~chinese
  67. * 会议中使用的昵称
  68. *
  69. * \~english
  70. * The nickName userd in conference
  71. */
  72. @property (nonatomic) NSString* nickName;
  73. /*!
  74. * \~chinese
  75. * 成员扩展信息
  76. *
  77. * \~english
  78. * The extension info of member
  79. */
  80. @property (nonatomic) NSString* ext;
  81. /*!
  82. * \~chinese
  83. * 会议最大主播数
  84. *
  85. * \~english
  86. * The limit count of talkers
  87. */
  88. @property (nonatomic) NSInteger maxTalkerCount ;
  89. /*!
  90. * \~chinese
  91. * 会议最大视频上传数
  92. *
  93. * \~english
  94. * The limit count of video streams
  95. */
  96. @property (nonatomic) NSInteger maxVideoCount;
  97. /*!
  98. * \~chinese
  99. * 会议最大观众数
  100. *
  101. * \~english
  102. * The limit count of audience
  103. */
  104. @property (nonatomic) NSInteger maxAudienceCount;
  105. /*!
  106. * \~chinese
  107. * 会议最大共享桌面数
  108. *
  109. * \~english
  110. * The limit count of desktop stream
  111. */
  112. @property (nonatomic) NSInteger maxPubDesktopCount;
  113. /*!
  114. * \~chinese
  115. * cdn 直播推流配置
  116. *
  117. * \~english
  118. * The cdn live config
  119. */
  120. @property (nonatomic) LiveConfig* liveConfig;
  121. @end
  122. @class EMError;
  123. /*!
  124. * \~chinese
  125. * 多人会议场景
  126. *
  127. * \~english
  128. * Conference mode
  129. */
  130. typedef enum {
  131. EMConferenceModeNormal = 0, /*! \~chinese 人数较少 \~english A small number of people for video conferencing */
  132. EMConferenceModeLarge, /*! \~chinese 人数较多 \~english A large number of people for video conferencing */
  133. } EMConferenceMode EM_DEPRECATED_IOS(3_1_0, 3_4_3, "Use -DELETE");
  134. /*!
  135. * \~chinese
  136. * 多人实时音频/视频通话相关操作
  137. *
  138. * \~english
  139. * Multi-user real-time audio / video call related operations
  140. */
  141. @protocol IEMConferenceManager <NSObject>
  142. @optional
  143. #pragma mark - Delegate
  144. /*!
  145. * \~chinese
  146. * 添加回调代理
  147. *
  148. * @param aDelegate 要添加的代理
  149. * @param aQueue 执行代理方法的队列
  150. *
  151. * \~english
  152. * Add delegate
  153. *
  154. * @param aDelegate Delegate
  155. * @param aQueue The queue of call delegate method
  156. */
  157. - (void)addDelegate:(id<EMConferenceManagerDelegate>)aDelegate
  158. delegateQueue:(dispatch_queue_t)aQueue;
  159. /*!
  160. * \~chinese
  161. * 移除回调代理
  162. *
  163. * @param aDelegate 要移除的代理
  164. *
  165. * \~english
  166. * Remove delegate
  167. *
  168. * @param aDelegate Delegate
  169. */
  170. - (void)removeDelegate:(id<EMConferenceManagerDelegate>)aDelegate;
  171. /*!
  172. * \~chinese
  173. * 添加回调代理
  174. *
  175. * @param aDelegate 要添加的代理
  176. * @param aQueue 执行代理方法的队列
  177. *
  178. * \~english
  179. * Add delegate
  180. *
  181. * @param aDelegate Delegate
  182. * @param aQueue The queue of call delegate method
  183. */
  184. - (void)addLocalAudioDataDelegate:(id<EMLocalAudioDataDelegate>)aDelegate
  185. delegateQueue:(dispatch_queue_t)aQueue;
  186. /*!
  187. * \~chinese
  188. * 移除回调代理
  189. *
  190. * @param aDelegate 要移除的代理
  191. *
  192. * \~english
  193. * Remove delegate
  194. *
  195. * @param aDelegate Delegate
  196. */
  197. - (void)removeLocalAudioDataDelegate:(id<EMLocalAudioDataDelegate>)aDelegate;
  198. /*!
  199. * \~chinese
  200. * 添加回调代理
  201. *
  202. * @param aDelegate 要添加的代理
  203. * @param aQueue 执行代理方法的队列
  204. *
  205. * \~english
  206. * Add delegate
  207. *
  208. * @param aDelegate Delegate
  209. * @param aQueue The queue of call delegate method
  210. */
  211. - (void)addRemoteAudioDataDelegate:(id<EMRemoteAudioDataDelegate>)aDelegate
  212. delegateQueue:(dispatch_queue_t)aQueue;
  213. /*!
  214. * \~chinese
  215. * 移除回调代理
  216. *
  217. * @param aDelegate 要移除的代理
  218. *
  219. * \~english
  220. * Remove delegate
  221. *
  222. * @param aDelegate Delegate
  223. */
  224. - (void)removeRemoteAudioDataDelegate:(id<EMRemoteAudioDataDelegate>)aDelegate;
  225. #pragma mark - Conference
  226. /*!
  227. * \~chinese
  228. * 设置应用Appkey, 环信ID, 环信ID对应的Token
  229. *
  230. * @param aAppkey 应用在环信注册的Appkey
  231. * @param aUserName 环信ID
  232. * @param aToken 环信ID对应的Token
  233. *
  234. * \~english
  235. * Setup MemberName
  236. *
  237. * @param aAppkey AppKey in Hyphenate
  238. * @param aUserName The Hyphenate ID
  239. * @param aToken The token of Hyphenate ID
  240. */
  241. - (void)setAppkey:(NSString *)aAppkey
  242. username:(NSString *)aUsername
  243. token:(NSString *)aToken;
  244. /*!
  245. * \~chinese
  246. * 构建MemberName
  247. *
  248. * @param aAppkey 应用在环信注册的Appkey
  249. * @param aUserName 环信ID
  250. *
  251. * @result MemberName
  252. *
  253. * \~english
  254. * Setup MemberName
  255. *
  256. * @param aAppkey AppKey in Hyphenate
  257. * @param aUserName The Hyphenate ID
  258. *
  259. * @result MemberName
  260. */
  261. - (NSString *)getMemberNameWithAppkey:(NSString *)aAppkey
  262. username:(NSString *)aUserName;
  263. /*!
  264. * \~chinese
  265. * 判断会议是否存在
  266. *
  267. * @param aConfId 会议ID(EMCallConference.confId)
  268. * @param aPassword 会议密码
  269. * @param aCompletionBlock 完成的回调
  270. *
  271. * \~english
  272. * Determine if the conference exists
  273. *
  274. * @param aConfId Conference ID (EMCallConference.confId)
  275. * @param aPassword The password of the conference
  276. * @param aCompletionBlock The callback block of completion
  277. */
  278. - (void)getConference:(NSString *)aConfId
  279. password:(NSString *)aPassword
  280. completion:(void (^)(EMCallConference *aCall, EMError *aError))aCompletionBlock;
  281. /*!
  282. * \~chinese
  283. * 创建并加入会议
  284. *
  285. * @param aType 会议类型
  286. * @param aPassword 会议密码
  287. * @param aCompletionBlock 完成的回调
  288. *
  289. * \~english
  290. * Create and join a conference
  291. *
  292. * @param aType The type of the conference
  293. * @param aPassword The password of the conference
  294. * @param aCompletionBlock The callback block of completion
  295. */
  296. - (void)createAndJoinConferenceWithType:(EMConferenceType)aType
  297. password:(NSString *)aPassword
  298. completion:(void (^)(EMCallConference *aCall, NSString *aPassword, EMError *aError))aCompletionBlock;
  299. /*!
  300. * \~chinese
  301. * 创建并加入会议
  302. *
  303. * @param aType 会议类型
  304. * @param aPassword 会议密码
  305. * @param isRecord 是否开启服务端录制
  306. * @param isMerge 录制时是否合并数据流
  307. * @param aCompletionBlock 完成的回调
  308. *
  309. * \~english
  310. * Create and join a conference
  311. *
  312. * @param aType The type of the conference
  313. * @param aPassword The password of the conference
  314. * @param isRecord Whether to record using a server
  315. * @param isMerge Whether to merge data streams while recording
  316. * @param aCompletionBlock The callback block of completion
  317. */
  318. - (void)createAndJoinConferenceWithType:(EMConferenceType)aType
  319. password:(NSString *)aPassword
  320. record:(BOOL)isRecord
  321. mergeStream:(BOOL)isMerge
  322. completion:(void (^)(EMCallConference *aCall, NSString *aPassword, EMError *aError))aCompletionBlock;
  323. /*!
  324. * \~chinese
  325. * 创建并加入会议,支持微信小程序设置
  326. *
  327. * @param aType 会议类型
  328. * @param aPassword 会议密码
  329. * @param isRecord 是否开启服务端录制
  330. * @param isMerge 录制时是否合并数据流
  331. * @param isSupportWechatMiniProgram 是否支持微信小程序
  332. * @param aCompletionBlock 完成的回调
  333. *
  334. * \~english
  335. * Create and join a conference
  336. *
  337. * @param aType The type of the conference
  338. * @param aPassword The password of the conference
  339. * @param isRecord Whether to record using a server
  340. * @param isMerge Whether to merge data streams while recording
  341. * @param isSupportWechatMiniProgram Weather to support client on wechat mini program
  342. * @param aCompletionBlock The callback block of completion
  343. */
  344. - (void)createAndJoinConferenceWithType:(EMConferenceType)aType
  345. password:(NSString *)aPassword
  346. record:(BOOL)isRecord
  347. mergeStream:(BOOL)isMerge
  348. isSupportWechatMiniProgram:(BOOL)isSupportWechatMiniProgram
  349. completion:(void (^)(EMCallConference *aCall, NSString *aPassword, EMError *aError))aCompletionBlock;
  350. /*!
  351. * \~chinese
  352. * 创建并加入会议,支持微信小程序设置,cdn推流设置,最大主播人数及视频人数设置
  353. *
  354. * @param aType 会议类型
  355. * @param aPassword 会议密码
  356. * @param isRecord 是否开启服务端录制
  357. * @param isMerge 录制时是否合并数据流
  358. * @param isSupportWechatMiniProgram 是否支持微信小程序
  359. * @param liveConfig 推流时使用的cdn布局
  360. * @param aMaxVideoCount 会议中的最大视频数
  361. * @param aMaxTalkerCount 会议中最大主播人数
  362. * @param aMaxAudienceCount 会议中最大观众人数
  363. * @param aCompletionBlock 完成的回调
  364. *
  365. * \~english
  366. * Create and join a conference
  367. *
  368. * @param aType The type of the conference
  369. * @param aPassword The password of the conference
  370. * @param isRecord Whether to record using a server
  371. * @param isMerge Whether to merge data streams while recording
  372. * @param isSupportWechatMiniProgram Weather to support client on wechat mini program
  373. * @param liveConfig The config of cdn live
  374. * @param aMaxVideoCount The max videos count in the confrence
  375. * @param aMaxTalkerCount The max speakers count in the confrence
  376. * @param aMaxAudienceCount The max audiences count int the confrence
  377. * @param aCompletionBlock The callback block of completion
  378. */
  379. - (void)createAndJoinConferenceWithType:(EMConferenceType)aType
  380. password:(NSString *)aPassword
  381. record:(BOOL)isRecord
  382. mergeStream:(BOOL)isMerge
  383. isSupportWechatMiniProgram:(BOOL)isSupportWechatMiniProgram
  384. liveConfig:(LiveConfig*)aLiveConfig
  385. maxVideoCount:(NSInteger)aMaxVideoCount
  386. maxTalkerCount:(NSInteger)aMaxTalkerCount
  387. maxAudienceCount:(NSInteger)aMaxAudienceCount
  388. completion:(void (^)(EMCallConference *aCall, NSString *aPassword, EMError *aError))aCompletionBlock;
  389. /*!
  390. * \~chinese
  391. * 创建并加入会议
  392. *
  393. * @param aType 会议类型
  394. * @param aPassword 会议密码
  395. * @param aConfrConfig 会议属性配置
  396. * @param aCompletionBlock 完成的回调
  397. *
  398. * \~english
  399. * Create and join a conference
  400. *
  401. * @param aType The type of the conference
  402. * @param aPassword The password of the conference
  403. * @param aConfrConfig The config of conference
  404. * @param aCompletionBlock The callback block of completion
  405. */
  406. - (void)createAndJoinConferenceWithType:(EMConferenceType)aType
  407. password:(NSString *)aPassword
  408. confrConfig:(RoomConfig*)aConfrConfig
  409. completion:(void (^)(EMCallConference *aCall, NSString *aPassword, EMError *aError))aCompletionBlock;
  410. /*!
  411. * \~chinese
  412. * 加入已有会议
  413. *
  414. * @param aConfId 会议ID(EMCallConference.confId)
  415. * @param aPassword 会议密码
  416. * @param aCompletionBlock 完成的回调
  417. *
  418. * \~english
  419. * Join a conference
  420. *
  421. * @param aConfId Conference ID (EMCallConference.confId)
  422. * @param aPassword The password of the conference
  423. * @param aCompletionBlock The callback block of completion
  424. */
  425. - (void)joinConferenceWithConfId:(NSString *)aConfId
  426. password:(NSString *)aPassword
  427. completion:(void (^)(EMCallConference *aCall, EMError *aError))aCompletionBlock;
  428. /*!
  429. * \~chinese
  430. * 加入房间
  431. *
  432. * @param roomName 房间名称
  433. * @param aPassword 房间密码
  434. * @param role 加入房间使用的角色
  435. * @param aCompletionBlock 完成的回调
  436. *
  437. * \~english
  438. * Join a Room
  439. *
  440. * @param roomName Room Name
  441. * @param aPassword The password of the room
  442. * @param role The role user used
  443. * @param aCompletionBlock The callback block of completion
  444. */
  445. -(void)joinRoom:(NSString*)roomName
  446. password:(NSString*)aPassword
  447. role:(EMConferenceRole)role
  448. completion:(void (^)(EMCallConference *aCall, EMError *aError))aCompletionBlock;
  449. /*!
  450. * \~chinese
  451. * 加入房间
  452. *
  453. * @param roomName 房间名称
  454. * @param aPassword 房间密码
  455. * @param role 加入房间使用的角色
  456. * @param roomConfig 加入房间使用的配置
  457. * @param aCompletionBlock 完成的回调
  458. *
  459. * \~english
  460. * Join a Room
  461. *
  462. * @param roomName Room Name
  463. * @param aPassword The password of the room
  464. * @param role The role user used
  465. * @param roomConfig The configuration used while join the room
  466. * @param aCompletionBlock The callback block of completion
  467. */
  468. -(void)joinRoom:(NSString*)roomName
  469. password:(NSString*)aPassword
  470. role:(EMConferenceRole)role
  471. roomConfig:(RoomConfig*)roomConfig
  472. completion:(void (^)(EMCallConference *aCall, EMError *aError))aCompletionBlock;
  473. /*!
  474. * \~chinese
  475. * 加入已有会议
  476. *
  477. * @param aTicket 加入会议的凭证
  478. * @param aCompletionBlock 完成的回调
  479. *
  480. * \~english
  481. * Join a conference
  482. *
  483. * @param aTicket Conference Tickets
  484. * @param aCompletionBlock The callback block of completion
  485. */
  486. - (void)joinConferenceWithTicket:(NSString *)aTicket
  487. completion:(void (^)(EMCallConference *aCall, EMError *aError))aCompletionBlock;
  488. /*!
  489. * \~chinese
  490. * 上传本地摄像头的数据流
  491. *
  492. * @param aCall 会议实例(自己创建的无效)
  493. * @param aStreamParam 数据流的配置项
  494. * @param aCompletionBlock 完成的回调
  495. *
  496. * \~english
  497. * Publish the data stream of the local camera
  498. *
  499. * @param aCall EMConference instance (invalid by yourself)
  500. * @param aStreamParam The config of stream
  501. * @param aCompletionBlock The callback block of completion
  502. */
  503. - (void)publishConference:(EMCallConference *)aCall
  504. streamParam:(EMStreamParam *)aStreamParam
  505. completion:(void (^)(NSString *aPubStreamId, EMError *aError))aCompletionBlock;
  506. /*!
  507. * \~chinese
  508. * 取消上传本地摄像头的数据流
  509. *
  510. * @param aCall 会议实例(自己创建的无效)
  511. * @param aStreamId 数据流ID(在[IEMConferenceManager publishConference:pubConfig:completion:]返回)
  512. * @param aCompletionBlock 完成的回调
  513. *
  514. * \~english
  515. * Cancel the publish of the local camera's data stream
  516. *
  517. * @param aCall EMConference instance (invalid by yourself)
  518. * @param aStreamId Stream id (in [IEMConferenceManager publishConference:pubConfig:completion:] return)
  519. * @param aCompletionBlock The callback block of completion
  520. */
  521. - (void)unpublishConference:(EMCallConference *)aCall
  522. streamId:(NSString *)aStreamId
  523. completion:(void (^)(EMError *aError))aCompletionBlock;
  524. /*!
  525. * \~chinese
  526. * 订阅其他人的数据流
  527. *
  528. * @param aCall 会议实例(自己创建的无效)
  529. * @param aStreamId 数据流ID (在[EMConferenceManagerDelegate streamDidUpdate:addStream]中返回)
  530. * @param aRemoteView 视频显示页面
  531. * @param aCompletionBlock 完成的回调
  532. *
  533. * \~english
  534. * Subscribe to other user`s data streams
  535. *
  536. * @param aCall EMConference instance (invalid by yourself)
  537. * @param aStreamId Stream id (in [EMConferenceManagerDelegate streamDidUpdate:addStream] return )
  538. * @param aRemoteView Video display view
  539. * @param aCompletionBlock The callback block of completion
  540. */
  541. - (void)subscribeConference:(EMCallConference *)aCall
  542. streamId:(NSString *)aStreamId
  543. remoteVideoView:(EMCallRemoteVideoView *)aRemoteView
  544. completion:(void (^)(EMError *aError))aCompletionBlock;
  545. /*!
  546. * \~chinese
  547. * 取消订阅的数据流
  548. *
  549. * @param aCall 会议实例(自己创建的无效)
  550. * @param aStreamId 数据流ID
  551. * @param aCompletionBlock 完成的回调
  552. *
  553. * \~english
  554. * Unsubscribe data stream
  555. *
  556. * @param aCall EMConference instance (invalid by yourself)
  557. * @param aStreamId Stream id
  558. * @param aCompletionBlock The callback block of completion
  559. */
  560. - (void)unsubscribeConference:(EMCallConference *)aCall
  561. streamId:(NSString *)aStreamId
  562. completion:(void (^)(EMError *aError))aCompletionBlock;
  563. /*!
  564. * \~chinese
  565. * 改变成员角色,需要管理员权限
  566. * 用户角色: Admin > Talker > Audience
  567. * 当角色升级时,用户需要给管理员发送申请,管理通过该接口改变用户接口.
  568. * 当角色降级时,用户直接调用该接口即可.
  569. * 注意: 暂时不支持Admin降级自己
  570. *
  571. * @param aConfId 会议ID(EMCallConference.confId)
  572. * @param aMember 成员
  573. * @param aRole 成员角色
  574. * @param aCompletionBlock 完成的回调
  575. *
  576. * \~english
  577. * Changing member roles, requires administrator privileges
  578. * Role: Admin > Talker > Audience
  579. * When role upgrade, you need to send a request to Admin, only Admin can upgrade a role.
  580. * When role degrade, you can degrade with this method yourself.
  581. * Attention: Admin can not degrade self.
  582. *
  583. * @param aConfId Conference ID (EMCallConference.confId)
  584. * @param aMember Member
  585. * @param aRole The Role
  586. * @param aCompletionBlock The callback block of completion
  587. */
  588. - (void)changeMemberRoleWithConfId:(NSString *)aConfId
  589. member:(EMCallMember *)aMember
  590. role:(EMConferenceRole)toRole
  591. completion:(void (^)(EMError *aError))aCompletionBlock;
  592. /*!
  593. * \~chinese
  594. * 改变成员角色,需要管理员权限
  595. * 用户角色: Admin > Talker > Audience
  596. * 当角色升级时,用户需要给管理员发送申请,管理通过该接口改变用户接口.
  597. * 当角色降级时,用户直接调用该接口即可.
  598. * 注意: 暂时不支持Admin降级自己
  599. *
  600. * @param aConfId 会议ID(EMCallConference.confId)
  601. * @param aMemberName 成员在会议中的memName
  602. * @param aRole 成员角色
  603. * @param aCompletionBlock 完成的回调
  604. *
  605. * \~english
  606. * Changing member roles, requires administrator privileges
  607. * Role: Admin > Talker > Audience
  608. * When role upgrade, you need to send a request to Admin, only Admin can upgrade a role.
  609. * When role degrade, you can degrade with this method yourself.
  610. * Attention: Admin can not degrade self.
  611. *
  612. * @param aConfId Conference ID (EMCallConference.confId)
  613. * @param aMemberName The memname of member
  614. * @param aRole The Role
  615. * @param aCompletionBlock The callback block of completion
  616. */
  617. - (void)changeMemberRoleWithConfId:(NSString *)aConfId
  618. memberName:(NSString *)aMemberName
  619. role:(EMConferenceRole)toRole
  620. completion:(void (^)(EMError *aError))aCompletionBlock;
  621. /*!
  622. * \~chinese
  623. * 踢人,需要管理员权限
  624. *
  625. * @param aConfId 会议ID(EMCallConference.confId)
  626. * @param aMemberNameList 成员名列表
  627. * @param aCompletionBlock 完成的回调
  628. *
  629. * \~english
  630. * Kick members, requires administrator privileges
  631. *
  632. * @param aConfId Conference ID (EMCallConference.confId)
  633. * @param aMemberNameList Member Name list
  634. * @param aCompletionBlock The callback block of completion
  635. */
  636. - (void)kickMemberWithConfId:(NSString *)aConfId
  637. memberNames:(NSArray<NSString *> *)aMemberNameList
  638. completion:(void (^)(EMError *aError))aCompletionBlock;
  639. /*!
  640. * \~chinese
  641. * 销毁会议,需要管理员权限
  642. *
  643. * @param aConfId 会议ID(EMCallConference.confId)
  644. * @param aCompletionBlock 完成的回调
  645. *
  646. * \~english
  647. * Destroy conference, requires administrator privileges
  648. *
  649. * @param aConfId Conference ID (EMCallConference.confId)
  650. * @param aCompletionBlock The callback block of completion
  651. */
  652. - (void)destroyConferenceWithId:(NSString *)aConfId
  653. completion:(void (^)(EMError *aError))aCompletionBlock;
  654. /*!
  655. * \~chinese
  656. * 离开会议(创建者可以离开,最后一个人离开,会议销毁)
  657. *
  658. * @param aCall 会议实例(自己创建的无效)
  659. * @param aCompletionBlock 完成的回调
  660. *
  661. * \~english
  662. * Leave the conference (the creator can leave, the last person to leave, the conference is destroyed)
  663. *
  664. * @param aCall EMConference instance (invalid by yourself)
  665. * @param aCompletionBlock The callback block of completion
  666. */
  667. - (void)leaveConference:(EMCallConference *)aCall
  668. completion:(void (^)(EMError *aError))aCompletionBlock;
  669. /*!
  670. * \~chinese
  671. * 开始监听说话者
  672. *
  673. * @param aCall 会议实例(自己创建的无效)
  674. * @param aTimeMillisecond 返回回调的间隔,单位毫秒,传0使用300毫秒[EMConferenceManagerDelegate conferenceSpeakerDidChange:speakingStreamIds:]
  675. * @param aCompletionBlock 完成的回调
  676. *
  677. * \~english
  678. * Start listening to the speaker
  679. *
  680. * @param aCall EMConference instance (invalid by yourself)
  681. * @param aTimeMillisecond The interval of callbacks [EMConferenceManagerDelegate conferenceSpeakerDidChange:speakingStreamIds:], Unit milliseconds, pass 0 using 300 milliseconds
  682. * @param aCompletionBlock The callback block of completion
  683. */
  684. - (void)startMonitorSpeaker:(EMCallConference *)aCall
  685. timeInterval:(long long)aTimeMillisecond
  686. completion:(void (^)(EMError *aError))aCompletionBlock;
  687. /*!
  688. * \~chinese
  689. * 结束监听说话者
  690. *
  691. * @param aCall 会议实例(自己创建的无效)
  692. *
  693. * \~english
  694. * Stop listening to the speaker
  695. *
  696. * @param aCall EMConference instance (invalid by yourself)
  697. */
  698. - (void)stopMonitorSpeaker:(EMCallConference *)aCall;
  699. /*!
  700. * \~chinese
  701. * 修改会议的cdn推流位置
  702. *
  703. * @param aCall 会议实例(自己创建的无效)
  704. * @param aReagionList 媒体流的位置信息
  705. * @param aCompletionBlock 回调函数
  706. *
  707. * \~english
  708. * Set region of live stream
  709. *
  710. * @param aCall EMConference instance (invalid by yourself)
  711. * @param aReagionList The list of all stream region
  712. * @param aCompletionBlock The callback function
  713. */
  714. - (void)updateConference:(EMCallConference*)aCall
  715. setRegions:(NSArray<LiveRegion*>*)aReagionList
  716. completion:(void(^)(EMError *aError))aCompletionBlock;
  717. /*!
  718. * \~chinese
  719. * 修改会议的cdn推流位置
  720. *
  721. * @param aCall 会议实例(自己创建的无效)
  722. * @param aReagionList 媒体流的位置信息
  723. * @param aLiveId 推流Id
  724. * @param aCompletionBlock 回调函数
  725. *
  726. * \~english
  727. * Set region of live stream
  728. *
  729. * @param aCall EMConference instance (invalid by yourself)
  730. * @param aLiveId 推流ID
  731. * @param aReagionList The list of all stream region
  732. * @param aCompletionBlock The callback function
  733. */
  734. - (void)updateConference:(EMCallConference*)aCall
  735. liveId:(NSString*)aLiveId
  736. setRegions:(NSArray<LiveRegion*>*)aReagionList
  737. completion:(void(^)(EMError *aError))aCompletionBlock;
  738. /*!
  739. * \~chinese
  740. * 添加一路推流
  741. *
  742. * @param aCall 会议实例(自己创建的无效)
  743. * @param aLiveConfig 推流配置
  744. * @param aCompletionBlock 回调函数
  745. *
  746. * \~english
  747. * Add a live push
  748. *
  749. * @param aCall EMConference instance (invalid by yourself)
  750. * @param aLiveConfig The config of live
  751. * @param aCompletionBlock The callback function
  752. */
  753. - (void)addConferenceLive:(EMCallConference*)aCall
  754. LiveCfg:(LiveConfig*)aLiveConfig
  755. completion:(void(^)(EMError *aError))aCompletionBlock;
  756. /*!
  757. * \~chinese
  758. * 启动/停止自定义录制
  759. *
  760. * @param aCall 会议实例(自己创建的无效)
  761. * @param aLiveId 推流/录制Id
  762. * @param aEnabled 操作,启动/停止
  763. * @param aCompletionBlock 回调函数
  764. *
  765. * \~english
  766. * Add a live push
  767. *
  768. * @param aCall EMConference instance (invalid by yourself)
  769. * @param aLiveId The live id
  770. * @param aEnabled operation,start/end
  771. * @param aCompletionBlock The callback function
  772. */
  773. - (void)enableRecordLiveStream:(EMCallConference*)aCall
  774. liveId:(NSString*)aLiveId
  775. enabled:(BOOL)aEnabled
  776. completion:(void(^)(EMError *aError))aCompletionBlock;
  777. /*!
  778. * \~chinese
  779. * 删除一路推流
  780. *
  781. * @param aCall 会议实例(自己创建的无效)
  782. * @param aLiveId 流Id
  783. * @param aCompletionBlock 回调函数
  784. *
  785. * \~english
  786. * Remove a live push
  787. *
  788. * @param aCall EMConference instance (invalid by yourself)
  789. * @param aLiveId The live Id
  790. * @param aCompletionBlock The callback function
  791. */
  792. - (void)deleteConferenceLive:(EMCallConference*)aCall
  793. liveId:(NSString*)aLiveId
  794. completion:(void(^)(EMError *aError))aCompletionBlock;
  795. /*!
  796. * \~chinese
  797. * 观众申请连麦成为主播,观众角色调用
  798. *
  799. * @param aCall 会议实例(自己创建的无效)
  800. * @param aAdminId 管理员的memId
  801. * @param aCompletionBlock 回调函数
  802. *
  803. * \~english
  804. * Request tobe Speaker,only audience call this function
  805. *
  806. * @param aCall EMConference instance (invalid by yourself)
  807. * @param aAdminId The memid of admin
  808. * @param aCompletionBlock The callback function
  809. */
  810. - (void)requestTobeSpeaker:(EMCallConference *)aCall adminId:(NSString *)aAdminId completion:(void (^)(EMError *aError))aCompletionBlock;
  811. /*!
  812. * \~chinese
  813. * 主播申请成为管理员,主播角色调用
  814. *
  815. * @param aCall 会议实例(自己创建的无效)
  816. * @param aAdminId 管理员的memId
  817. * @param aCompletionBlock 回调函数
  818. *
  819. * \~english
  820. * Request tobe Admin,only speraker call this function
  821. *
  822. * @param aCall EMConference instance (invalid by yourself)
  823. * @param aAdminId The memid of admin
  824. * @param aCompletionBlock The callback function
  825. */
  826. - (void)requestTobeAdmin:(EMCallConference *)aCall adminId:(NSString *)aAdminId completion:(void (^)(EMError *aError))aCompletionBlock;
  827. /*!
  828. * \~chinese
  829. * 将指定成员静音/解除静音,管理员调用
  830. *
  831. * @param aCall 会议实例(自己创建的无效)
  832. * @param aMemId 指定成员的memId
  833. * @param aMute 操作,YES为静音,NO为解除静音
  834. * @param aCompletionBlock 回调函数
  835. *
  836. * \~english
  837. * mute/unmute one member,only admin call this function
  838. *
  839. * @param aCall EMConference instance (invalid by yourself)
  840. * @param aMemId The memid of member
  841. * @param aMute Opereation,YES means mute,and NO means unmute
  842. * @param aCompletionBlock The callback function
  843. */
  844. - (void)setMuteMember:(EMCallConference *)aCall
  845. memId:(NSString *)aMemId
  846. mute:(BOOL)aMute
  847. completion:(void (^)(EMError *aError))aCompletionBlock;
  848. /*!
  849. * \~chinese
  850. * 管理员同意/拒绝观众的上麦申请,管理员调用
  851. *
  852. * @param aCall 会议实例(自己创建的无效)
  853. * @param aMemId 上麦申请的观众的memId
  854. * @param aResult 操作结果,0为同意,1为拒绝
  855. * @param aCompletionBlock 回调函数
  856. *
  857. * \~english
  858. * Admin agree/disagree the audience request tobe speaker.only admin call this function
  859. *
  860. * @param aCall EMConference instance (invalid by yourself)
  861. * @param aMemId The memid of member who requeset tobe speaker
  862. * @param aMute Opereation result,0 means agree,and 1 means disagree
  863. * @param aCompletionBlock The callback function
  864. */
  865. - (void)responseReqSpeaker:(EMCallConference *)aCall
  866. memId:(NSString *)aMemId
  867. result:(NSInteger)aResult
  868. completion:(void (^)(EMError *aError))aCompletionBlock;
  869. /*!
  870. * \~chinese
  871. * 管理员同意/拒绝主播的申请管理员请求,管理员调用
  872. *
  873. * @param aCall 会议实例(自己创建的无效)
  874. * @param aMemId 申请管理员的主播的memId
  875. * @param aResult 操作结果,0为同意,1为拒绝
  876. * @param aCompletionBlock 回调函数
  877. *
  878. * \~english
  879. * Admin agree/disagree the speaker request tobe admin.only admin call this function
  880. *
  881. * @param aCall EMConference instance (invalid by yourself)
  882. * @param aMemId The memid of speaker who request tobe admin
  883. * @param aMute Opereation result,0 means agree,and 1 means disagree
  884. * @param aCompletionBlock The callback function
  885. */
  886. - (void)responseReqAdmin:(EMCallConference *)aCall memId:(NSString *)aMemId result:(NSInteger)aResult completion:(void (^)(EMError *aError))aCompletionBlock;
  887. #pragma mark - Update
  888. /*!
  889. * \~chinese
  890. * 切换前后摄像头
  891. *
  892. * @param aCall 会议实例(自己创建的无效)
  893. *
  894. * \~english
  895. * Switch the camera before and after
  896. *
  897. * @param aCall EMConference instance (invalid by yourself)
  898. */
  899. - (void)updateConferenceWithSwitchCamera:(EMCallConference *)aCall;
  900. /*!
  901. * \~chinese
  902. * 设置是否静音
  903. *
  904. * @param aCall 会议实例(自己创建的无效)
  905. * @param aIsMute 是否静音
  906. *
  907. * \~english
  908. * Set whether to mute
  909. *
  910. * @param aCall EMConference instance (invalid by yourself)
  911. * @param aIsMute Is mute
  912. */
  913. - (void)updateConference:(EMCallConference *)aCall
  914. isMute:(BOOL)aIsMute;
  915. /*!
  916. * \~chinese
  917. * 设置视频是否可用
  918. *
  919. * @param aCall 会议实例(自己创建的无效)
  920. * @param aEnableVideo 视频是否可用
  921. *
  922. * \~english
  923. * Set whether the video is available
  924. *
  925. * @param aCall EMConference instance (invalid by yourself)
  926. * @param aEnableVideo Whether the video is available
  927. */
  928. - (void)updateConference:(EMCallConference *)aCall
  929. enableVideo:(BOOL)aEnableVideo;
  930. /*!
  931. * \~chinese
  932. * 更新视频显示页面
  933. *
  934. * @param aCall 会议实例
  935. * @param aStreamId 数据流ID
  936. * @param aRemoteView 显示页面
  937. * @param aCompletionBlock 完成的回调
  938. *
  939. * \~english
  940. * Update remote video view
  941. *
  942. * @param aCall EMConference instance
  943. * @param aStreamId Stream id
  944. * @param aRemoteView Video display view
  945. * @param aCompletionBlock The callback block of completion
  946. */
  947. - (void)updateConference:(EMCallConference *)aCall
  948. streamId:(NSString *)aStreamId
  949. remoteVideoView:(EMCallRemoteVideoView *)aRemoteView
  950. completion:(void (^)(EMError *aError))aCompletionBlock;
  951. /*!
  952. * \~chinese
  953. * 更新视频最大码率
  954. *
  955. * @param aCall 会议实例
  956. * @param aMaxVideoKbps 最大码率
  957. *
  958. * \~english
  959. * Update video maximum bit rate
  960. *
  961. * @param aCall EMConference instance
  962. * @param aMaxVideoKbps Maximum bit rate
  963. */
  964. - (void)updateConference:(EMCallConference *)aCall
  965. maxVideoKbps:(int)aMaxVideoKbps;
  966. #pragma mark - Input Video Data
  967. /*!
  968. * \~chinese
  969. * 自定义本地视频数据
  970. *
  971. * @param aSampleBuffer 视频采样缓冲区
  972. * @param aRotation 旋转方向
  973. * @param aCall 会议实例
  974. * @param aPubStreamId 调用接口[EMConferenceManager publishConference:streamParam:completion],如果成功则会在回调中返回该值
  975. * @param aCompletionBlock 完成后的回调
  976. *
  977. * \~english
  978. * Customize local video data
  979. *
  980. * @param aSampleBuffer Video sample buffer
  981. * @param aRotation UIDeviceOrientation
  982. * @param aCallId [EMCallSession callId]
  983. * @param aCompletionBlock The callback block of completion
  984. */
  985. - (void)inputVideoSampleBuffer:(CMSampleBufferRef)aSampleBuffer
  986. rotation:(UIDeviceOrientation)aRotation
  987. conference:(EMCallConference *)aCall
  988. publishedStreamId:(NSString *)aPubStreamId
  989. completion:(void (^)(EMError *aError))aCompletionBlock;
  990. /*!
  991. * \~chinese
  992. * 自定义本地视频数据
  993. *
  994. * @param aPixelBuffer 视频像素缓冲区
  995. * @param aTime 视频原始数据时间戳,CMTime time = CMSampleBufferGetPresentationTimeStamp((CMSampleBufferRef)sampleBuffer);
  996. * @param aRotation 旋转方向
  997. * @param aCall 会议实例
  998. * @param aPubStreamId 调用接口[EMConferenceManager publishConference:streamParam:completion],如果成功则会在回调中返回该值
  999. * @param aCompletionBlock 完成后的回调
  1000. *
  1001. * \~english
  1002. * Customize local video data
  1003. *
  1004. * @param aPixelBuffer Video pixel buffer
  1005. * @param aCallId [EMCallSession callId]
  1006. * @param aTime CMTime time = CMSampleBufferGetPresentationTimeStamp((CMSampleBufferRef)sampleBuffer);
  1007. * @param aRotation UIDeviceOrientation
  1008. * @param aCompletionBlock The callback block of completion
  1009. */
  1010. - (void)inputVideoPixelBuffer:(CVPixelBufferRef)aPixelBuffer
  1011. sampleBufferTime:(CMTime)aTime
  1012. rotation:(UIDeviceOrientation)aRotation
  1013. conference:(EMCallConference *)aCall
  1014. publishedStreamId:(NSString *)aPubStreamId
  1015. completion:(void (^)(EMError *aError))aCompletionBlock;
  1016. /**
  1017. * \~chinese
  1018. * 设置频道属性,该会议中的所有人(包括自己)都会收到
  1019. * {@link EMConferenceManagerDelegate#conferenceAttributeUpdated:attributeAction:attributeKey:}回调.
  1020. * 该方法需要在加入会议后调用.
  1021. *
  1022. * @param attrKey
  1023. * @param attrValue
  1024. * @param aCompletionBlock
  1025. *
  1026. * \~english
  1027. * Set conference attribute,All members in this conference(include myself) will receive a callback
  1028. * in {@link EMConferenceManagerDelegate#conferenceAttributeUpdated:attributeAction:attributeKey:}.
  1029. * this method can only be used after join a conference.
  1030. *
  1031. * @param attrKey
  1032. * @param attrValue
  1033. * @param aCompletionBlock
  1034. */
  1035. - (void)setConferenceAttribute:(NSString *)attrKey
  1036. value:(NSString *)attrValue
  1037. completion:(void(^)(EMError *aError))aCompletionBlock;
  1038. /**
  1039. * \~chinese
  1040. * 删除频道属性,该会议中的所有人(包括自己)都会收到
  1041. * {@link EMConferenceManagerDelegate#conferenceAttributeUpdated:attributeAction:attributeKey:}回调.
  1042. * 该方法需要在加入会议后调用.
  1043. *
  1044. * @param aKey
  1045. * @param aCompletionBlock
  1046. *
  1047. * \~english
  1048. * Delete conference attribute,All members in this conference(include myself) will receive a callback
  1049. * in {@link EMConferenceManagerDelegate#conferenceAttributeUpdated:attributeAction:attributeKey:}.
  1050. * this method can only be used after join a conference.
  1051. *
  1052. * @param aKey
  1053. * @param aCompletionBlock
  1054. */
  1055. - (void)deleteAttributeWithKey:(NSString *)aKey
  1056. completion:(void(^)(EMError *aError))aCompletionBlock;
  1057. /**
  1058. * \~chinese
  1059. * 创建白板房间
  1060. * @param aUsername 用户名
  1061. * @param aToken 用户的token
  1062. * @param aRoomName 房间名
  1063. * @param aPassword 房间的密码
  1064. * @param bInteract 是否允许互动
  1065. * @param aCompletionBlock 请求完成的回调
  1066. *
  1067. * \~english
  1068. * create room for whiteboard
  1069. * @param aUsername username
  1070. * @param aToken user's token
  1071. * @param aRoomName room name for whiteboard
  1072. * @param aPassword password for room
  1073. * @param bInteract weather allow members interact
  1074. * @param aCompletionBlock callback
  1075. */
  1076. - (void)createWhiteboardRoomWithUsername:(NSString *)aUsername
  1077. userToken:(NSString *)aToken
  1078. roomName:(NSString *)aRoomName
  1079. roomPassword:(NSString *)aPassword
  1080. interact:(BOOL)aInteract
  1081. completion:(void(^)(EMWhiteboard *aWhiteboard, EMError *aError))aCompletionBlock;
  1082. /**
  1083. * \~chinese
  1084. * 销毁白板房间
  1085. * @param aUsername 用户名
  1086. * @param aToken 用户的token
  1087. * @param aRoomId 房间id
  1088. * @param aCompletionBlock 请求完成的回调
  1089. *
  1090. * \~english
  1091. * create room for whiteboard
  1092. * @param aUsername username
  1093. * @param aToken user's token
  1094. * @param aRoomId room id for whiteboard
  1095. * @param aCompletionBlock callback
  1096. */
  1097. - (void)destroyWhiteboardRoomWithUsername:(NSString *)aUsername
  1098. userToken:(NSString *)aToken
  1099. roomId:(NSString *)aRoomId
  1100. completion:(void(^)(EMError *aError))aCompletionBlock;
  1101. /**
  1102. * \~chinese
  1103. * 通过白板id加入房间
  1104. * @param aRoomId 房间id
  1105. * @param aUsername 用户名
  1106. * @param aToken 用户的token
  1107. * @param aPassword 房间的密码
  1108. * @param aCompletionBlock 请求完成的回调
  1109. *
  1110. * \~english
  1111. * join whiteboard room with id
  1112. * @param aRoomId room id for whiteboard
  1113. * @param aUsername username
  1114. * @param aToken user's token
  1115. * @param aPassword password for room
  1116. * @param aCompletionBlock callback
  1117. */
  1118. - (void)joinWhiteboardRoomWithId:(NSString *)aRoomId
  1119. username:(NSString *)aUsername
  1120. userToken:(NSString *)aToken
  1121. roomPassword:(NSString *)aPassword
  1122. completion:(void(^)(EMWhiteboard *aWhiteboard, EMError *aError))aCompletionBlock;
  1123. /**
  1124. * \~chinese
  1125. * 通过白板名称加入房间
  1126. * @param aRoomName 房间名
  1127. * @param aUsername 用户名
  1128. * @param aToken 用户的token
  1129. * @param aPassword 房间的密码
  1130. * @param aCompletionBlock 请求完成的回调
  1131. *
  1132. * \~english
  1133. * join whiteboard room with name
  1134. * @param aRoomName room name for whiteboard
  1135. * @param aUsername username
  1136. * @param aToken user's token
  1137. * @param aPassword password for room
  1138. * @param aCompletionBlock callback
  1139. */
  1140. - (void)joinWhiteboardRoomWithName:(NSString *)aRoomName
  1141. username:(NSString *)aUsername
  1142. userToken:(NSString *)aToken
  1143. roomPassword:(NSString *)aPassword
  1144. completion:(void(^)(EMWhiteboard *aWhiteboard, EMError *aError))aCompletionBlock;
  1145. /**
  1146. * \~chinese
  1147. * 修改白板的用户互动权限
  1148. * @param aRoomId 房间Id
  1149. * @param aToken 用户的token
  1150. * @param aPassword 房间的密码
  1151. * @param aInteract 是否允许互动,YES为允许互动,NO为不允许互动
  1152. * @param aAll 是否操作所有成员,YES时操作所有人,aServentIds不起作用
  1153. * @param aServentIds 操作的成员数组,aAll为NO时有效
  1154. * @param aCompletionBlock 请求完成的回调
  1155. *
  1156. * \~english
  1157. * update whiteboard room interact
  1158. * @param aRoomId room Id
  1159. * @param aUsername username
  1160. * @param aToken user's token
  1161. * @param aInteract weather allow members interact
  1162. * @param aAll weather update all members`s interact right.if YES,aServentIds is invalid.
  1163. * @param aServentIds array of members`s id.invalid when aAll is NO
  1164. * @param aCompletionBlock callback
  1165. */
  1166. - (void)updateWhiteboardRoomWithRoomId:(NSString *)aRoomId
  1167. username:(NSString *)aUsername
  1168. userToken:(NSString *)aToken
  1169. intract:(BOOL)aInteract
  1170. allUsers:(BOOL)aAll
  1171. serventIds:(NSArray<NSString *>*)aServentIds
  1172. completion:(void(^)(EMError *aError))aCompletionBlock;
  1173. /**
  1174. * \~chinese
  1175. * 开启本地伴音功能,请在加入会议成功后调用,该伴音配置只存在于该会议存在期间.
  1176. *
  1177. * @param filePath 文件路径
  1178. * @param loop 指定音频文件循环播放的次数:
  1179. * 正整数:循环的次数
  1180. * -1:无限循环
  1181. * @param isSendMix 是否启动远端伴音 启动后播放的音乐对方也可以听到
  1182. *
  1183. * @return {@link EMError#EM_NO_ERROR} - 成功
  1184. * {@link EMError#CALL_CONFERENCE_NO_EXIST} - 未加入会议
  1185. * {@link EMError#CALL_INVALID_PARAMS} - 路径参数下的音频文件不存在
  1186. *
  1187. * \~english
  1188. * Start local audio mixing, this method can only be used after join a conference and only worked
  1189. * during this conference exists.
  1190. *
  1191. * @param filePath Audio file path.
  1192. * If file path is start with /assets/, we will find in assets/ dir.
  1193. * Otherwise, we will find in absolute path.
  1194. * @param loop loop mode (0 = no loop, -1 = loop forever)
  1195. * @param isSendMix send mixed audio
  1196. *
  1197. * @return {@link EMError#EM_NO_ERROR} - Success
  1198. * {@link EMError#CALL_CONFERENCE_NO_EXIST} - Not in a conference.
  1199. * {@link EMError#CALL_INVALID_PARAMS} - File not exists.
  1200. */
  1201. - (EMError *)startAudioMixing:(NSURL *)aFileURL loop:(int)aLoop sendMix:(BOOL)isSendMix;
  1202. /**
  1203. * \~chinese
  1204. * 关闭本地混音功能,请在加入会议成功后调用
  1205. *
  1206. * @return {@link EMError#EM_NO_ERROR} - 成功
  1207. * {@link EMError#CALL_CONFERENCE_NO_EXIST} - 未加入会议
  1208. *
  1209. * \~english
  1210. * Stop local audio mixing,this method can only be used after join a conference.
  1211. *
  1212. * @return {@link EMError#EM_NO_ERROR} - Success
  1213. * {@link EMError#CALL_CONFERENCE_NO_EXIST} - Not in a conference.
  1214. */
  1215. - (EMError *)stopAudioMixing;
  1216. /**
  1217. * \~chinese
  1218. * 设置伴奏音量,请在加入会议成功后调用
  1219. *
  1220. * @param volume 伴奏音量范围为 0~100。默认 100 为原始文件音量
  1221. *
  1222. * @return {@link EMError#EM_NO_ERROR} - 成功
  1223. * {@link EMError#CALL_CONFERENCE_NO_EXIST} - 未加入会议
  1224. *
  1225. * \~english
  1226. * Adjust audio mixing volume,this method can only be used after join a conference.
  1227. *
  1228. * @param volume scope: 0~100. Default volume is 100, which is the original audio file volume.
  1229. *
  1230. * @return {@link EMError#EM_NO_ERROR} - Success
  1231. * {@link EMError#CALL_CONFERENCE_NO_EXIST} - Not in a conference.
  1232. */
  1233. - (EMError *)adjustAudioMixingVolume:(int)aVolume;
  1234. /**
  1235. * \~chinese
  1236. * mute远端音频
  1237. *
  1238. * @param aStreamId 要操作的Steam id
  1239. * @param isMute 是否静音
  1240. *
  1241. * \~english
  1242. * Mute remote audio
  1243. *
  1244. * @param aStreamId Steam id
  1245. * @param isMute is mute
  1246. */
  1247. - (void)muteRemoteAudio:(NSString *)aStreamId mute:(BOOL)isMute;
  1248. /**
  1249. * \~chinese
  1250. * mute远端视频
  1251. *
  1252. * @param aStreamId 要操作的Steam id
  1253. * @param isMute 是否显示
  1254. *
  1255. * \~english
  1256. * Mute remote video
  1257. *
  1258. * @param aStreamId Steam id
  1259. * @param isMute is mute
  1260. */
  1261. - (void)muteRemoteVideo:(NSString *)aStreamId mute:(BOOL)isMute;
  1262. /**
  1263. * \~chinese
  1264. * 启用统计
  1265. *
  1266. * @param enable 是否启用统计
  1267. *
  1268. * \~english
  1269. * enable statistics
  1270. * @params enable enable statistics
  1271. */
  1272. - (void)enableStatistics:(BOOL)isEnable;
  1273. /**
  1274. * \~chinese
  1275. * 开启/停止全体静音
  1276. *
  1277. * @param enable 是否启用全体静音
  1278. * @param completion 回调
  1279. *
  1280. * \~english
  1281. * start/stop mute all members
  1282. * @params enable whether to start
  1283. * @params completion the callback functio
  1284. */
  1285. - (void)muteAll:(BOOL)mute
  1286. completion:(void(^)(EMError *aError))aCompletionBlock;
  1287. #pragma mark - 自定义音频数据
  1288. /*!
  1289. * \~chinese
  1290. * 自定义外部音频数据,PCM格式,一个音频采样16bit,每次最大100ms数据
  1291. *
  1292. * @param data 外部音频数据
  1293. *
  1294. * \~english
  1295. * Customize external audio data,PCM format,each audio sample contail 16 bits,the maxinum data durateion is 100ms
  1296. *
  1297. * @param data Custom audio data,format with PCM
  1298. */
  1299. - (int) inputCustomAudioData:(NSData*)data;
  1300. #pragma mark - Watermark
  1301. /*!
  1302. * \~chinese
  1303. * 开启水印功能
  1304. *
  1305. * @param option 水印配置项,包括图片url,marginX,marginY以及起始点
  1306. *
  1307. * \~english
  1308. * Enable water mark feature
  1309. *
  1310. * @param origin the option of watermark picture,include url,margingX,marginY,margin point
  1311. */
  1312. - (void)addVideoWatermark:(EMWaterMarkOption*)option;
  1313. /*!
  1314. * \~chinese
  1315. * 取消水印功能
  1316. *
  1317. * \~english
  1318. * Disable water mark feature
  1319. *
  1320. */
  1321. - (void)clearVideoWatermark;
  1322. #pragma mark - EM_DEPRECATED_IOS 3.5.2
  1323. /*!
  1324. * \~chinese
  1325. * 自定义本地视频数据
  1326. *
  1327. * @param aSampleBuffer 视频采样缓冲区
  1328. * @param aCall 会议实例
  1329. * @param aPubStreamId 调用接口[EMConferenceManager publishConference:streamParam:completion],如果成功则会在回调中返回该值
  1330. * @param aFormat 视频格式
  1331. * @param aRotation 旋转角度0~360,默认0
  1332. * @param aCompletionBlock 完成后的回调
  1333. *
  1334. * \~englishat
  1335. * Customize local video da
  1336. *
  1337. * @param aSampleBuffer Video sample buffer
  1338. * @param aCall EMConference instance
  1339. * @param aPubStreamId [EMConferenceManager publishConference:streamParam:completion], If successful, the value will be returned in the callback
  1340. * @param aFormat Video format
  1341. * @param aRotation Rotation angle 0~360, default 0
  1342. * @param aCompletionBlock The callback block of completion
  1343. */
  1344. - (void)inputVideoSampleBuffer:(CMSampleBufferRef)aSampleBuffer
  1345. conference:(EMCallConference *)aCall
  1346. publishedStreamId:(NSString *)aPubStreamId
  1347. format:(EMCallVideoFormat)aFormat
  1348. rotation:(int)aRotation
  1349. completion:(void (^)(EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_2_2, 3_5_2, "Delete, Use -inputVideoSampleBuffer:rotation:conference:publishedStreamId:completion:");
  1350. /*!
  1351. * \~chinese
  1352. * 自定义本地视频数据
  1353. *
  1354. * @param aPixelBuffer 视频像素缓冲区
  1355. * @param aCall 会议实例
  1356. * @param aPubStreamId 调用接口[EMConferenceManager publishConference:streamParam:completion],如果成功则会在回调中返回该值
  1357. * @param aFormat 视频格式
  1358. * @param aRotation 旋转角度0~360,默认0
  1359. * @param aCompletionBlock 完成后的回调
  1360. *
  1361. * \~english
  1362. * Customize local video data
  1363. *
  1364. * @param aPixelBuffer Video pixel buffer
  1365. * @param aCall EMConference instance
  1366. * @param aPubStreamId [EMConferenceManager publishConference:streamParam:completion], If successful, the value will be returned in the callback
  1367. * @param aFormat Video format
  1368. * @param aRotation Rotation angle 0~360, default 0
  1369. * @param aCompletionBlock The callback block of completion
  1370. */
  1371. - (void)inputVideoPixelBuffer:(CVPixelBufferRef)aPixelBuffer
  1372. conference:(EMCallConference *)aCall
  1373. publishedStreamId:(NSString *)aPubStreamId
  1374. format:(EMCallVideoFormat)aFormat
  1375. rotation:(int)aRotation
  1376. completion:(void (^)(EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_2_2, 3_5_2, "Delete, Use -inputVideoPixelBuffer:sampleBufferTime:rotation:conference:publishedStreamId:completion:");
  1377. /*!
  1378. * \~chinese
  1379. * 自定义本地视频数据
  1380. *
  1381. * @param aData 视频数据
  1382. * @param aCall 会议实例
  1383. * @param aPubStreamId 调用接口[EMConferenceManager publishConference:streamParam:completion],如果成功则会在回调中返回该值
  1384. * @param aWidth 宽度
  1385. * @param aHeight 高度
  1386. * @param aFormat 视频格式
  1387. * @param aRotation 旋转角度0~360,默认0
  1388. * @param aCompletionBlock 完成后的回调
  1389. *
  1390. * \~english
  1391. * Customize local video data
  1392. *
  1393. * @param aData Video data
  1394. * @param aCall EMConference instance
  1395. * @param aPubStreamId [EMConferenceManager publishConference:streamParam:completion], If successful, the value will be returned in the callback
  1396. * @param aWidth Width
  1397. * @param aHeight Height
  1398. * @param aFormat Video format
  1399. * @param aRotation Rotation angle 0~360, default 0
  1400. * @param aCompletionBlock The callback block of completion
  1401. */
  1402. - (void)inputVideoData:(NSData *)aData
  1403. conference:(EMCallConference *)aCall
  1404. publishedStreamId:(NSString *)aPubStreamId
  1405. widthInPixels:(size_t)aWidth
  1406. heightInPixels:(size_t)aHeight
  1407. format:(EMCallVideoFormat)aFormat
  1408. rotation:(int)aRotation
  1409. completion:(void (^)(EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_2_2, 3_5_2, "Delete");
  1410. #pragma mark - EM_DEPRECATED_IOS 3.4.3
  1411. /*!
  1412. * \~chinese
  1413. * 多人会议场景
  1414. *
  1415. * \~english
  1416. * Conference mode
  1417. */
  1418. @property (nonatomic) EMConferenceMode mode EM_DEPRECATED_IOS(3_1_0, 3_4_3, "Use -DELETE");
  1419. /*!
  1420. * \~chinese
  1421. * 创建并加入会议
  1422. *
  1423. * @param aPassword 会议密码
  1424. * @param aCompletionBlock 完成的回调
  1425. *
  1426. * \~english
  1427. * Create and join a conference
  1428. *
  1429. * @param aPassword The password of the conference
  1430. * @param aCompletionBlock The callback block of completion
  1431. */
  1432. - (void)createAndJoinConferenceWithPassword:(NSString *)aPassword
  1433. completion:(void (^)(EMCallConference *aCall, NSString *aPassword, EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_4_3, "Use -[EMConferenceManagerDelegate createAndJoinConferenceWithType:password:completion:]");
  1434. /*!
  1435. * \~chinese
  1436. * 邀请人加入会议
  1437. *
  1438. * @param aCall 会议实例(自己创建的无效)
  1439. * @param aUserName 被邀请人的环信ID
  1440. * @param aPassword 会议密码
  1441. * @param aExt 扩展信息
  1442. * @param aCompletionBlock 完成的回调
  1443. *
  1444. * \~english
  1445. * Invite user join the conference
  1446. *
  1447. * @param aCall EMConference instance (invalid by yourself)
  1448. * @param aUserName The Hyphenate ID of the invited user
  1449. * @param aPassword The password of the conference
  1450. * @param aExt Extended Information
  1451. * @param aCompletionBlock The callback block of completion
  1452. */
  1453. - (void)inviteUserToJoinConference:(EMCallConference *)aCall
  1454. userName:(NSString *)aUserName
  1455. password:(NSString *)aPassword
  1456. ext:(NSString *)aExt
  1457. error:(EMError **)pError EM_DEPRECATED_IOS(3_1_0, 3_4_3, "Use -DELETE, 在demo层自定义实现");
  1458. /*!
  1459. * \~chinese
  1460. * 改变成员角色,需要管理员权限
  1461. *
  1462. * @param aConfId 会议ID(EMCallConference.confId)
  1463. * @param aMemberNameList 成员名列表
  1464. * @param aRole 成员角色
  1465. * @param aCompletionBlock 完成的回调
  1466. *
  1467. * \~english
  1468. * Changing member roles, requires administrator privileges
  1469. *
  1470. * @param aConfId Conference ID (EMCallConference.confId)
  1471. * @param aMemberNameList Member Name list
  1472. * @param aRole The Role
  1473. * @param aCompletionBlock The callback block of completion
  1474. */
  1475. - (void)changeMemberRoleWithConfId:(NSString *)aConfId
  1476. memberNames:(NSArray<NSString *> *)aMemberNameList
  1477. role:(EMConferenceRole)aRole
  1478. completion:(void (^)(EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_5_0, 3_6_0, "Use -[changeMemberRoleWithConfId:memberName:role:completion]");
  1479. @end
  1480. #endif /* IEMConferenceManager_h */