EMCallStream.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. /*!
  2. * \~chinese
  3. * @header EMCallStream.h
  4. * @abstract 数据流
  5. * @author Hyphenate
  6. * @version 3.00
  7. *
  8. * \~english
  9. * @header EMCallStream.h
  10. * @abstract Stream
  11. * @author Hyphenate
  12. * @version 3.00
  13. */
  14. #import <UIKit/UIKit.h>
  15. #import <Foundation/Foundation.h>
  16. #import "EMCallEnum.h"
  17. #import "EMCommonDefs.h"
  18. /*!
  19. * \~chinese
  20. * 数据流类型
  21. *
  22. * \~english
  23. * Stream type
  24. */
  25. typedef enum {
  26. EMStreamTypeNormal = 0, /*! \~chinese 默认,视频或者语音 \~english Default, video or audio */
  27. EMStreamTypeDesktop, /*! \~chinese 分享桌面 \~english Share desktop */
  28. } EMStreamType;
  29. /*!
  30. * \~chinese
  31. * 数据流
  32. *
  33. * \~english
  34. * Stream
  35. */
  36. @interface EMCallStream : NSObject
  37. /*!
  38. * \~chinese
  39. * 数据流标识符
  40. *
  41. * \~english
  42. * Unique stream id
  43. */
  44. @property (nonatomic, strong, readonly) NSString *streamId;
  45. /*!
  46. * \~chinese
  47. * 数据流名称
  48. *
  49. * \~english
  50. * Stream name
  51. */
  52. @property (nonatomic, strong, readonly) NSString *streamName;
  53. /*!
  54. * \~chinese
  55. * 上传者的成员名称
  56. *
  57. * \~english
  58. * Member name of the publisher
  59. */
  60. @property (nonatomic, strong, readonly) NSString *memberName;
  61. /*!
  62. * \~chinese
  63. * 上传者环信ID
  64. *
  65. * \~english
  66. * Hyphenate ID of the publisher
  67. */
  68. @property (nonatomic, strong, readonly) NSString *userName;
  69. /*!
  70. * \~chinese
  71. * 音频是否可用
  72. *
  73. * \~english
  74. * Whether the audio is available
  75. */
  76. @property (nonatomic, readonly) BOOL enableVoice;
  77. /*!
  78. * \~chinese
  79. * 视频是否可用
  80. *
  81. * \~english
  82. * Whether the video is available
  83. */
  84. @property (nonatomic, readonly) BOOL enableVideo;
  85. /*!
  86. * \~chinese
  87. * 扩展信息
  88. *
  89. * \~english
  90. * Extended Information
  91. */
  92. @property (nonatomic, strong, readonly) NSString *ext;
  93. /*!
  94. * \~chinese
  95. * 数据流类型
  96. *
  97. * \~english
  98. * Stream type
  99. */
  100. @property (nonatomic) EMStreamType type;
  101. @end
  102. /*!
  103. * \~chinese
  104. * 上传数据流时的属性对象
  105. *
  106. * \~english
  107. * The config object when the stream is published
  108. */
  109. @class EMCallLocalVideoView;
  110. @interface EMStreamParam : NSObject
  111. /*!
  112. * \~chinese
  113. * 数据流名称
  114. *
  115. * \~english
  116. * Stream name
  117. */
  118. @property (nonatomic, copy) NSString *streamName;
  119. /*!
  120. * \~chinese
  121. * 数据流类型
  122. *
  123. * \~english
  124. * Stream type
  125. */
  126. @property (nonatomic) EMStreamType type;
  127. /*!
  128. * \~chinese
  129. * 视频是否可用,默认NO
  130. *
  131. * \~english
  132. * Whether the video is available, the default NO
  133. */
  134. @property (nonatomic) BOOL enableVideo;
  135. /*!
  136. * \~chinese
  137. * 是否静音,默认NO
  138. *
  139. * \~english
  140. * Whether the mute, the default NO
  141. */
  142. @property (nonatomic) BOOL isMute;
  143. /*!
  144. * \~chinese
  145. * 扩展信息
  146. *
  147. * \~english
  148. * Extended Information
  149. */
  150. @property (nonatomic, copy) NSString *ext;
  151. /*!
  152. * \~chinese
  153. * 是否自定义视频数据,默认NO
  154. *
  155. * \~english
  156. * Whether to customize the video data, the default NO
  157. */
  158. @property (nonatomic) BOOL enableCustomizeVideoData;
  159. /*!
  160. * \~chinese
  161. * 是否自定义音频数据,默认NO
  162. *
  163. * \~english
  164. * Whether to customize the audio data, the default NO
  165. */
  166. @property (nonatomic) BOOL enableCustomizeAudioData;
  167. /*!
  168. * \~chinese
  169. * 自定义音频数据的采样率
  170. *
  171. * \~english
  172. * The samplerate of the custom audio data
  173. */
  174. @property (nonatomic) int customAudioSamples;
  175. /*!
  176. * \~chinese
  177. * 自定义音频数据的通道数,当前只支持单通道,必须为1
  178. *
  179. * \~english
  180. * The channels of the custom audio data
  181. */
  182. @property (nonatomic) int customAudioChannels;
  183. /*!
  184. * \~chinese
  185. * 是否使用后置摄像头,默认NO
  186. *
  187. * \~english
  188. * Whether to use the back camera, the default NO
  189. *
  190. */
  191. @property (nonatomic, assign) BOOL isBackCamera;
  192. /*!
  193. * \~chinese
  194. * 最大视频码率
  195. * 范围 50 < videoKbps < 5000, 默认0, 0为自适应
  196. * 建议设置为0
  197. *
  198. * \~english
  199. * Video kbps
  200. * range: 50 < videoKbps < 5000. Default value is 0, which is adaptive bitrate streaming.
  201. * recommend use default value
  202. */
  203. @property (nonatomic, assign) int maxVideoKbps;
  204. /*!
  205. * \~chinese
  206. * 最小视频码率, 默认0
  207. *
  208. * \~english
  209. * Min video kbps. Default value is 0
  210. *
  211. */
  212. @property (nonatomic, assign) int minVideoKbps;
  213. /*!
  214. * \~chinese
  215. * 最大音频码率
  216. * 范围 6 < AudioKbps < 510, 默认32
  217. * 建议设置为32
  218. *
  219. * \~english
  220. * Audio kbps
  221. * range: 6 < AudioKbps < 510. Default value is 32
  222. * recommend use default value
  223. */
  224. @property (nonatomic, assign) int maxAudioKbps;
  225. /*!
  226. * \~chinese
  227. * 视频分辨率
  228. * 默认自适应
  229. *
  230. * \~english
  231. * Video resolution
  232. * default adaptive
  233. */
  234. @property (nonatomic, assign) EMCallVideoResolution videoResolution;
  235. /*!
  236. * \~chinese
  237. * 显示本地视频的页面
  238. *
  239. * \~english
  240. * The view of displays the local video
  241. */
  242. @property (nonatomic, strong) EMCallLocalVideoView *localView;
  243. /*!
  244. * \~chinese
  245. * 分享桌面时要显示的页面
  246. *
  247. * \~english
  248. * The view to display when sharing the desktop
  249. */
  250. @property (nonatomic, strong) UIView *desktopView;
  251. /*!
  252. * \~chinese
  253. * 初始化方法
  254. *
  255. * @param aStreamName 数据流名称
  256. *
  257. * @result 数据流实例
  258. *
  259. * \~english
  260. * Initialization method
  261. *
  262. * @param aStreamName Stream name
  263. *
  264. * @result Stream instance
  265. */
  266. - (instancetype)initWithStreamName:(NSString *)aStreamName;
  267. #pragma mark - EM_DEPRECATED_IOS 3.5.2
  268. /*!
  269. * \~chinese
  270. * 是否固定视频分辨率,默认为NO
  271. *
  272. * \~english
  273. * Enable fixed video resolution, default NO
  274. *
  275. */
  276. @property (nonatomic, assign) BOOL isFixedVideoResolution EM_DEPRECATED_IOS(3_4_3, 3_5_2, "Delete");
  277. @end