ZMVideoSDKSession.h 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. #import <Foundation/Foundation.h>
  2. NS_ASSUME_NONNULL_BEGIN
  3. @class ZMVideoSDKUser;
  4. @interface ZMFileTransferProgress : NSObject
  5. /**
  6. @brief The ratio of the file transfer completed.
  7. */
  8. @property(nonatomic, assign, readonly) unsigned int ratio;
  9. /**
  10. @brief The size of the file transferred so far in bytes.
  11. */
  12. @property(nonatomic, assign, readonly) unsigned long long completeSize;
  13. /**
  14. @brief The speed of the file transfer in bits per second.
  15. */
  16. @property(nonatomic, assign, readonly) unsigned int bitPreSecond;
  17. @end
  18. @interface ZMVideoSDKFileStatus : NSObject
  19. /**
  20. @brief The status of the file transfer.
  21. */
  22. @property(nonatomic, assign, readonly) ZMVideoSDKFileTransferStatus transStatus;
  23. /**
  24. @brief The progress of the file transfer.
  25. */
  26. @property(nonatomic, retain, readonly) ZMFileTransferProgress *transProgress;
  27. @end
  28. @interface ZMVideoSDKSendFile : NSObject
  29. /**
  30. @brief The timestamp of the file transfer.
  31. */
  32. @property(nonatomic, assign, readonly) time_t timeStamp;
  33. /**
  34. @brief Determine whether the file transfer is send to all.
  35. */
  36. @property(nonatomic, assign, readonly) BOOL isSendToAll;
  37. /**
  38. @brief The file size of the file transfer.
  39. */
  40. @property(nonatomic, assign, readonly) unsigned long long fileSize;
  41. /**
  42. @brief The file name of the file transfer.
  43. */
  44. @property(nonatomic, copy, readonly) NSString *fileName;
  45. /**
  46. @brief The status of the file transfer.
  47. */
  48. @property(nonatomic, retain, readonly) ZMVideoSDKFileStatus *status;
  49. /**
  50. @brief The receiver of the file transfer.
  51. */
  52. @property(nonatomic, retain, readonly) ZMVideoSDKUser *receiver;
  53. /**
  54. @brief Cancel the file transfer.
  55. @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
  56. */
  57. - (ZMVideoSDKErrors)cancelSend;
  58. @end
  59. @interface ZMVideoSDKReceiveFile : NSObject
  60. /**
  61. @brief The timestamp of the file transfer.
  62. */
  63. @property(nonatomic, assign, readonly) time_t timeStamp;
  64. /**
  65. @brief Determine whether the file transfer is send to all.
  66. */
  67. @property(nonatomic, assign, readonly) BOOL isSendToAll;
  68. /**
  69. @brief The file size of the file transfer.
  70. */
  71. @property(nonatomic, assign, readonly) unsigned long long fileSize;
  72. /**
  73. @brief The file name of the file transfer.
  74. */
  75. @property(nonatomic, copy, readonly) NSString *fileName;
  76. /**
  77. @brief The status of the file transfer.
  78. */
  79. @property(nonatomic, retain, readonly) ZMVideoSDKFileStatus *status;
  80. /**
  81. @brief The sender of the file transfer.
  82. */
  83. @property(nonatomic, retain, readonly) ZMVideoSDKUser *sender;
  84. /**
  85. @brief Start receive the file.
  86. @param downloadPath The download path, you need to pass the complete path, including the file name and file format.
  87. @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
  88. */
  89. - (ZMVideoSDKErrors)startReceive:(NSString *)downloadPath;
  90. /**
  91. @brief Cancel receive the file.
  92. @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
  93. */
  94. - (ZMVideoSDKErrors)cancelReceive;
  95. @end
  96. /**
  97. @brief Session audio statistic information interface.
  98. */
  99. @interface ZMVideoSDKSessionAudioStatisticInfo : NSObject
  100. /**
  101. @brief Get the frequency in kilohertz (KHz) sent by the current user.
  102. */
  103. @property(nonatomic, assign, readonly) int sendFrequency;
  104. /**
  105. @brief Get the audio latency (delay in network data transfer) experienced by the current user while sending data.
  106. */
  107. @property(nonatomic, assign, readonly) int sendLatency;
  108. /**
  109. @brief Get the audio jitter (change in latency) experienced by the current user while sending data.
  110. */
  111. @property(nonatomic, assign, readonly) int sendJitter;
  112. /**
  113. @brief Get the average audio packet loss sent by the current user.
  114. */
  115. @property(nonatomic, assign, readonly) float sendPacketLossAvg;
  116. /**
  117. @brief Get the maximum audio packet loss sent by the current user.
  118. */
  119. @property(nonatomic, assign, readonly) float sendPacketLossMax;
  120. /**
  121. @brief Get the frequency in kilohertz (KHz) received by the current user.
  122. */
  123. @property(nonatomic, assign, readonly) int recvFrequency;
  124. /**
  125. @brief Get the audio latency (delay in network data transfer) experienced by the current user while receiving data.
  126. */
  127. @property(nonatomic, assign, readonly) int recvLatency;
  128. /**
  129. @brief Get the audio jitter (change in latency) experienced by the current user while receiving data.
  130. */
  131. @property(nonatomic, assign, readonly) int recvJitter;
  132. /**
  133. @brief Get the average audio packet loss received by the current user.
  134. */
  135. @property(nonatomic, assign, readonly) float recvPacketLossAvg;
  136. /**
  137. @brief Get the maximum audio packet loss received by the current user.
  138. */
  139. @property(nonatomic, assign, readonly) float recvPacketLossMax;
  140. @end
  141. /**
  142. @brief Share statistic information such as FPS, latency, data loss, etc.
  143. */
  144. @interface ZMVideoSDKSessionASVStatisticInfo : NSObject
  145. /**
  146. @brief Get the frame width in pixels sent by the current user.
  147. */
  148. @property(nonatomic, assign, readonly) int sendFrameWidth;
  149. /**
  150. @brief Get the frame height in pixels sent by the current user.
  151. */
  152. @property(nonatomic, assign, readonly) int sendFrameHeigh;
  153. /**
  154. @brief Get the frame rate in FPS sent by the current user.
  155. */
  156. @property(nonatomic, assign, readonly) int sendFps;
  157. /**
  158. @brief Get the video latency (delay in network data transfer) experienced by the current user while sending data.
  159. */
  160. @property(nonatomic, assign, readonly) int sendLatency;
  161. /**
  162. @brief Get the video jitter (change in latency) experienced by the current user while sending data.
  163. */
  164. @property(nonatomic, assign, readonly) int sendJitte;
  165. /**
  166. @brief Get the average video packet loss sent by the current user.
  167. */
  168. @property(nonatomic, assign, readonly) float sendPacketLossAvg;
  169. /**
  170. @brief Get the maximum video packet loss sent by the current user.
  171. */
  172. @property(nonatomic, assign, readonly) float sendPacketLossMax;
  173. /**
  174. @brief Get the frame width in pixels received by the current user.
  175. */
  176. @property(nonatomic, assign, readonly) int recvFrameWidth;
  177. /**
  178. @brief Get the frame height in pixels received by the current user.
  179. */
  180. @property(nonatomic, assign, readonly) int recvFrameHeigh;
  181. /**
  182. @brief Get the frame rate in FPS received by the current user.
  183. */
  184. @property(nonatomic, assign, readonly) int recvFps;
  185. /**
  186. @brief Get the video latency (delay in network data transfer) experienced by the current user while receiving data.
  187. */
  188. @property(nonatomic, assign, readonly) int recvLatency;
  189. /**
  190. @brief Get the video jitter (change in latency) experienced by the current user while receiving data.
  191. */
  192. @property(nonatomic, assign, readonly) int recvJitte;
  193. /**
  194. @brief Get the video average packet loss received by the current user.
  195. */
  196. @property(nonatomic, assign, readonly) float recvPacketLossAvg;
  197. /**
  198. @brief Get the maximum video packet loss received by the current user.
  199. */
  200. @property(nonatomic, assign, readonly) float recvPacketLossMax;
  201. @end
  202. /**
  203. @brief Video session information interface.
  204. */
  205. @interface ZMVideoSDKSession : NSObject
  206. /**
  207. @brief Get the current session number.
  208. @return If the function succeeds, the return value is the current meeting number. Otherwise returns ZERO(0).
  209. */
  210. - (unsigned long long)getSessionNumber;
  211. /**
  212. @brief Get the session's name.
  213. @return The value is session name.
  214. */
  215. - (NSString*)getSessionName;
  216. /**
  217. @brief Get the session's password.
  218. @return The value is session password.
  219. */
  220. - (NSString*)getSessionPassword;
  221. /**
  222. @brief Get the session's password.
  223. @return The value is session password.
  224. */
  225. - (NSString*)getSessionPhonePasscode;
  226. /**
  227. @brief Get the session Id.
  228. @Note: Only the host can get the session Id.
  229. @return The value is session ID.
  230. */
  231. - (NSString*)getSessionID;
  232. /**
  233. @brief Get the host's name.
  234. @return The value is session host name.
  235. */
  236. - (NSString*)getSessionHostName;
  237. /**
  238. @brief Get the session's host user object.
  239. @return Remote users list.
  240. */
  241. - (ZMVideoSDKUser*)getSessionHost;
  242. /**
  243. @brief Get a list of the session's remote users.
  244. @return If the function succeeds, the return value is remote users list. Otherwise returns nil.
  245. */
  246. - (NSArray<ZMVideoSDKUser *>*)getRemoteUsers;
  247. /**
  248. @brief The session's user object for myself.
  249. @return If the function succeeds, the return value is myself object. Otherwise returns nil.
  250. */
  251. - (ZMVideoSDKUser*)getMySelf;
  252. /**
  253. @brief Get the session's audio statistic information.
  254. @return If the function succeeds, it will return a session audio statistic infomation object, otherwise returns nil.
  255. */
  256. - (ZMVideoSDKSessionAudioStatisticInfo*)getSessionAudioStatisticInfo;
  257. /**
  258. @brief Get the session's video statistic information.
  259. @return If the function succeeds, it will return a session video statistic information object, otherwise returns nil.
  260. */
  261. - (ZMVideoSDKSessionASVStatisticInfo*)getSessionVideoStatisticInfo;
  262. /**
  263. @brief Get the session's screen share statistic information.
  264. @return If the function succeeds, it will return a session share statistic information object, otherwise returns nil.
  265. */
  266. - (ZMVideoSDKSessionASVStatisticInfo*)getSessionShareStatisticInfo;
  267. /**
  268. @brief Determine whether file transfer is enabled.
  269. @return YES if file transfer is enabled, otherwise NO.
  270. */
  271. - (BOOL)isFileTransferEnabled;
  272. /**
  273. @brief Send file to all users in current session.
  274. @param filePath The local path of the file.
  275. @return If the function succeeds, it will return ZMVideoSDKErrors_Success.
  276. */
  277. - (ZMVideoSDKErrors)transferFile:(NSString *)filePath;
  278. /**
  279. @brief Get the list of allowed file types in transfer.
  280. @return The value of allowed file types in transfer, comma-separated if there are multiple values. Exe files are by default forbidden from being transferred.
  281. */
  282. - (NSString *)getTransferFileTypeWhiteList;
  283. /**
  284. @brief Get the maximum size for file transfer.
  285. @return The maximum number of bytes for file transfer.
  286. */
  287. - (unsigned long long)getMaxTransferFileSize;
  288. @end
  289. NS_ASSUME_NONNULL_END