EMConferenceManagerDelegate.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. /*!
  2. * \~chinese
  3. * @header EMConferenceManagerDelegate.h
  4. * @abstract 此协议定义了多人实时语音/视频相关的回调
  5. * @author Hyphenate
  6. * @version 3.00
  7. *
  8. * \~english
  9. * @header EMConferenceManagerDelegate.h
  10. * @abstract This protocol defines a multiplayer real-time voice / video related callback
  11. * @author Hyphenate
  12. * @version 3.00
  13. */
  14. #ifndef EMConferenceManagerDelegate_h
  15. #define EMConferenceManagerDelegate_h
  16. #import <Foundation/Foundation.h>
  17. #import "EMCommonDefs.h"
  18. #import "EMCallEnum.h"
  19. #import "EMCallConference.h"
  20. #import "EMCallStream.h"
  21. #import "EMConferenceAttribute.h"
  22. @class EMError;
  23. /*!
  24. * \~chinese
  25. * 多人实时语音/视频相关的回调
  26. *
  27. * \~english
  28. * Callbacks of multiplayer real time voice/video
  29. */
  30. @protocol EMConferenceManagerDelegate <NSObject>
  31. @optional
  32. /*!
  33. * \~chinese
  34. * 有人加入会议
  35. *
  36. * @param aConference 会议实例
  37. * @param aMember 加入的用户
  38. *
  39. * \~english
  40. * Someone joined the conference
  41. *
  42. * @param aConference EMConference instance
  43. * @param aMember The joined user
  44. */
  45. - (void)memberDidJoin:(EMCallConference *)aConference
  46. member:(EMCallMember *)aMember;
  47. /*!
  48. * \~chinese
  49. * 有人离开会议
  50. *
  51. * @param aConference 会议实例
  52. * @param aMember 离开的用户
  53. *
  54. * \~english
  55. * Someone leaved the conference
  56. *
  57. * @param aConference EMConference instance
  58. * @param aMember The leaved user
  59. */
  60. - (void)memberDidLeave:(EMCallConference *)aConference
  61. member:(EMCallMember *)aMember;
  62. /*!
  63. * \~chinese
  64. * 自己的角色发生变化
  65. *
  66. * @param aConference 会议实例
  67. *
  68. * \~english
  69. * The role has changed
  70. *
  71. * @param aConference EMConference instance
  72. */
  73. - (void)roleDidChanged:(EMCallConference *)aConference;
  74. /*!
  75. * \~chinese
  76. * 有新的数据流上传
  77. *
  78. * @param aConference 会议实例
  79. * @param aStream 数据流实例
  80. *
  81. * \~english
  82. * New data streams pulished
  83. *
  84. * @param aConference EMConference instance
  85. * @param aStream EMCallStream instance
  86. */
  87. - (void)streamDidUpdate:(EMCallConference *)aConference
  88. addStream:(EMCallStream *)aStream;
  89. /*!
  90. * \~chinese
  91. * 有数据流移除
  92. *
  93. * @param aConference 会议实例
  94. * @param aStream 数据流实例
  95. *
  96. * \~english
  97. * Stream removed
  98. *
  99. * @param aConference EMConference instance
  100. * @param aStream EMCallStream instance
  101. */
  102. - (void)streamDidUpdate:(EMCallConference *)aConference
  103. removeStream:(EMCallStream *)aStream;
  104. /*!
  105. * \~chinese
  106. * 数据流有更新(是否静音,视频是否可用)
  107. *
  108. * @param aConference 会议实例
  109. * @param aStream 数据流实例
  110. *
  111. * \~english
  112. * Stream is updated (whether it is mute, video is available)
  113. *
  114. * @param aConference EMConference instance
  115. * @param aStream EMCallStream instance
  116. */
  117. - (void)streamDidUpdate:(EMCallConference *)aConference
  118. stream:(EMCallStream *)aStream;
  119. /*!
  120. * \~chinese
  121. * 会议已经结束
  122. *
  123. * @param aConference 会议实例
  124. * @param aReason 结束原因
  125. * @param aError 错误信息
  126. *
  127. * \~english
  128. * The conference is over
  129. *
  130. * @param aConference EMConference instance
  131. * @param aReason The end reason
  132. * @param aError The error
  133. */
  134. - (void)conferenceDidEnd:(EMCallConference *)aConference
  135. reason:(EMCallEndReason)aReason
  136. error:(EMError *)aError;
  137. /*!
  138. * \~chinese
  139. * 数据流已经开始传输数据
  140. *
  141. * @param aConference 会议实例
  142. * @param aStreamId 数据流ID
  143. *
  144. * \~english
  145. * The stream has already begun to transfer data
  146. *
  147. * @param aConference EMConference instance
  148. * @param aStreamId Stream ID
  149. */
  150. - (void)streamStartTransmitting:(EMCallConference *)aConference
  151. streamId:(NSString *)aStreamId;
  152. /*!
  153. * \~chinese
  154. * 用户A和用户B正在通话中,用户A的网络状态出现不稳定,用户A会收到该回调
  155. *
  156. * @param aSession 会话实例
  157. * @param aStatus 当前状态
  158. *
  159. * \~english
  160. * User A and B is on the call, A network status is not stable, A will receive the callback
  161. *
  162. * @param aSession Session instance
  163. * @param aStatus Current status
  164. */
  165. - (void)conferenceNetworkDidChange:(EMCallConference *)aConference
  166. status:(EMCallNetworkStatus)aStatus;
  167. /*!
  168. * \~chinese
  169. * 用户A用户B在同一个会议中,用户A开始说话时,用户B会收到该回调
  170. *
  171. * @param aSession 会话实例
  172. * @param aStreamIds 数据流ID列表
  173. *
  174. * \~english
  175. * User A and B is on the call, when A starts speaking, B will receive the callback
  176. *
  177. * @param aSession Session instance
  178. * @param aStreamIds The list of stream id
  179. */
  180. - (void)conferenceSpeakerDidChange:(EMCallConference *)aConference
  181. speakingStreamIds:(NSArray *)aStreamIds;
  182. - (void)conferenceAttributeUpdated:(EMCallConference *)aConference
  183. attributes:(NSArray <EMConferenceAttribute *>*)attrs;
  184. #pragma mark - EM_DEPRECATED_IOS 3.4.3
  185. /*!
  186. * \~chinese
  187. * 有人加入会议
  188. *
  189. * @param aConference 会议实例
  190. * @param aUserName 加入的用户
  191. *
  192. * \~english
  193. * Someone joined the conference
  194. *
  195. * @param aConference EMConference instance
  196. * @param aUserName The joined user
  197. */
  198. - (void)userDidJoin:(EMCallConference *)aConference
  199. user:(NSString *)aUserName EM_DEPRECATED_IOS(3_1_0, 3_4_3, "Use -[EMConferenceManagerDelegate memberDidJoin:member:]");
  200. /*!
  201. * \~chinese
  202. * 有人离开会议
  203. *
  204. * @param aConference 会议实例
  205. * @param aMember 离开的用户
  206. *
  207. * \~english
  208. * Someone leaved the conference
  209. *
  210. * @param aConference EMConference instance
  211. * @param aMember The leaved user
  212. */
  213. - (void)userDidLeave:(EMCallConference *)aConference
  214. user:(NSString *)aUserName EM_DEPRECATED_IOS(3_1_0, 3_4_3, "Use -[EMConferenceManagerDelegate memberDidLeave:member:]");
  215. /*!
  216. * \~chinese
  217. * 被邀请加入会议
  218. *
  219. * @param aConfId 会议ID (EMCallConference.confId)
  220. * @param aPassword 会议密码
  221. * @param aExt 扩展信息
  222. *
  223. * \~english
  224. * Invited to join the conference
  225. *
  226. * @param aConfId Conference ID (EMCallConference.confId)
  227. * @param aPassword The password of the conference
  228. * @param aExt Extended Information
  229. */
  230. - (void)userDidRecvInvite:(NSString *)aConfId
  231. password:(NSString *)aPassword
  232. ext:(NSString *)aExt EM_DEPRECATED_IOS(3_1_0, 3_4_3, "Use -DELETE");
  233. @end
  234. #endif /* EMConferenceManagerDelegate_h */